[
  {
    "path": ".bazeliskrc",
    "content": "# See https://github.com/bazelbuild/bazelisk\n# Should match https://github.com/googleapis/googleapis/blob/master/.bazeliskrc\nUSE_BAZEL_VERSION=6.3.0\n"
  },
  {
    "path": ".bazelrc",
    "content": "# To make proto_library rules to include source info in the descriptor\nbuild --protocopt=--include_source_info\n\n# Required because showcase protos include proto3_optional fields\nbuild --protocopt=--experimental_allow_proto3_optional\n\n# New boringssl requires C++14\n# Copied from googleapis.\nbuild --repo_env=BAZEL_CXXOPTS=\"-std=c++14\"\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "# Code owners file.\n# This file controls who is tagged for review for any given pull request.\n\n# For syntax help see:\n# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax\n\n* @googleapis/cloud-sdk @googleapis/cloud-sdk-java-team\n"
  },
  {
    "path": ".github/auto-label.yml",
    "content": "---\nproduct: false"
  },
  {
    "path": ".github/label-sync.yml",
    "content": "---\nignored: true"
  },
  {
    "path": ".github/release-please.yml",
    "content": "handleGHRelease: true\nreleaseType: simple\n"
  },
  {
    "path": ".github/snippet-bot.yml",
    "content": "aggregateChecks: false\nalwaysCreateStatusCheck: false\n"
  },
  {
    "path": ".github/sync-repo-settings.yaml",
    "content": "rebaseMergeAllowed: false\nsquashMergeAllowed: true\nmergeCommitAllowed: false\nbranchProtectionRules:\n- pattern: main\n  isAdminEnforced: true\n  requiredStatusCheckContexts:\n    - 'regenerate'\n    - 'lint'\n    - 'tests'\n    - 'probes'\n    - 'protobufjs-load-test'\n    - 'cla/google'\n  requiredApprovingReviewCount: 1\n  requiresCodeOwnerReviews: true\n  requiresStrictStatusChecks: true\npermissionRules:\n  - team: actools\n    permission: admin\n"
  },
  {
    "path": ".github/workflows/assets.yaml",
    "content": "---\nname: assets\non:\n  release:\n    types:\n      - created\n  workflow_dispatch:\n    inputs:\n      tag:\n        description: 'Release tag to checkout'\n        required: true\n        type: string\nenv:\n  # e.g. v1.0.0 (use release tag on release events or the provided tag on manual invocation)\n  TAG_NAME: ${{ github.event.release.tag_name || github.event.inputs.tag }}\n\njobs:\n  get-upload-url:\n    outputs:\n      automated_upload_url: ${{ steps.automated-upload-url.outputs.AUTO_UPLOAD_URL }}\n      manual_upload_url: ${{ steps.manual-upload-url.outputs.MANUAL_UPLOAD_URL }}\n    runs-on: ubuntu-latest\n    steps:\n      - name: Get upload URL for automated releases\n        id: automated-upload-url\n        if: ${{ github.event.release.tag_name }}\n        run: echo \"AUTO_UPLOAD_URL=${{ github.event.release.upload_url }}\" >> \"$GITHUB_OUTPUT\"\n      - name: Get upload URL for manually triggered releases\n        id: manual-upload-url\n        if: ${{ github.event.inputs.tag }}\n        uses: actions/github-script@v9\n        with:\n          script: |\n            const release = await github.rest.repos.getReleaseByTag({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              tag: \"${{ github.event.inputs.tag }}\"\n            });\n            core.setOutput(\"MANUAL_UPLOAD_URL\", release.data.upload_url);\n  proto-assets:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n    steps:\n      - uses: actions/setup-go@v6\n        with:\n          go-version: '1.26'\n      - uses: actions/checkout@v6\n      - name: Init submodule\n        run: git submodule init && git submodule update\n      - name: Set raw version\n        id: raw_tag\n        # Strips the 'v' from the actual semver version.\n        run: echo ::set-output name=raw_version::\"${TAG_NAME#v}\"\n      - name: Install Protoc\n        uses: arduino/setup-protoc@v1\n      - name: Compile proto release assets\n        run: go run ./util/cmd/release -version=${{ steps.raw_tag.outputs.raw_version }}\n      - name: Upload proto release assets\n        uses: svenstaro/upload-release-action@v2\n        with:\n          repo_token: ${{ secrets.GITHUB_TOKEN }}\n          file: ./dist/*\n          tag: ${{ env.TAG_NAME }}\n          overwrite: true\n          file_glob: true\n  binary-assets:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n    needs: [get-upload-url, proto-assets]\n    env:\n      AUTO_UPLOAD_URL: ${{ needs.get-upload-url.outputs.automated_upload_url }}\n      MANUAL_UPLOAD_URL: ${{ needs.get-upload-url.outputs.manual_upload_url }}\n      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n    strategy:\n      matrix:\n        osarch:\n          - os: linux\n            arch: amd64\n          - os: linux\n            arch: arm\n          - os: darwin\n            arch: amd64\n          - os: darwin\n            arch: arm64\n          - os: windows\n            arch: amd64\n    steps:\n      - name: Determine which upload URL to use\n        id: determine_upload_url\n        run: |\n          echo \"automated URL: $AUTO_UPLOAD_URL\"\n          echo \"manual URL: $MANUAL_UPLOAD_URL\"\n          if [[ -n \"$AUTO_UPLOAD_URL\" ]]; then\n          echo \"GITHUB_UPLOAD_URL=$AUTO_UPLOAD_URL\" >> \"$GITHUB_OUTPUT\"\n          else\n          echo \"GITHUB_UPLOAD_URL=$MANUAL_UPLOAD_URL\" >> \"$GITHUB_OUTPUT\"\n          fi\n      - uses: actions/setup-go@v6\n        with:\n          go-version: '1.26'\n      - name: Install gox\n        run: go install github.com/mitchellh/gox@latest\n      - uses: actions/checkout@v6\n      - name: Set raw version\n        id: raw_tag\n        # Strips the 'v' from the actual semver version.\n        run: echo ::set-output name=raw_version::\"${TAG_NAME#v}\"\n      # The generator does not use this,  but we need it to build the\n      # binaries.\n      #\n      # Mousetrap is installed individually because it is needed for the\n      # Windows build. Since we are building on Linux, it is not installed\n      # automatically as a dependency.\n      - name: Install the cross-platform build dependency.\n        run: go get github.com/inconshreveable/mousetrap\n      - name: Build for the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} platform.\n        run: |\n          gox -osarch ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} -output gapic-showcase ./cmd/gapic-showcase && \\\n          tar cvfz gapic-showcase.tar.gz gapic-showcase*\n      - name: Upload the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} release.\n        uses: actions/upload-release-asset@v1\n        with:\n          upload_url: ${{ steps.determine_upload_url.outputs.GITHUB_UPLOAD_URL }}\n          asset_path: ./gapic-showcase.tar.gz\n          asset_name: gapic-showcase-${{ steps.raw_tag.outputs.raw_version }}-${{ matrix.osarch.os }}-${{ matrix.osarch.arch }}.tar.gz\n          asset_content_type: application/tar+gzip\n  # Note: Disabled until better solution for storing the GCR key is found.\n  # push_to_registry:\n  #   needs:\n  #     - inspect\n  #     - release\n  #   runs-on: ubuntu-latest\n  #   steps:\n  #     - name: Check out the repo\n  #       uses: actions/checkout@v2\n  #     - name: Login to GCR\n  #       uses: docker/login-action@v1\n  #       with:\n  #         registry: gcr.io\n  #         username: _json_key\n  #         password: ${{ secrets.GCR_JSON_KEY }}\n  #     - name: Push to GCR\n  #       uses: docker/build-push-action@v2\n  #       with:\n  #         tags: gcr.io/gapic-images/gapic-showcase:${{ needs.inspect.outputs.raw_version }},gcr.io/gapic-images/gapic-showcase:latest\n  #         push: true\n  #         context: .\n"
  },
  {
    "path": ".github/workflows/ci.yaml",
    "content": "---\nname: Showcase CI\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  workflow_dispatch:\n\njobs:\n  regenerate:\n    runs-on: ubuntu-latest\n    outputs:\n      modified_files: ${{ steps.mod.outputs.modified_files }}\n    steps:\n    - uses: actions/setup-go@v6\n      with:\n        go-version: '1.26'\n    - name: Install Protoc\n      uses: arduino/setup-protoc@v1\n    - name: Install external generators\n      run: |\n        go install github.com/golang/protobuf/protoc-gen-go@latest\n        go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_cli@latest\n        go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic@latest\n    - uses: actions/checkout@v6\n    - name: Checkout common protos\n      run: git submodule init && git submodule update\n    - name: Download go deps\n      run: go mod download\n    - name: Install REST server generator\n      run: go install ./util/cmd/protoc-gen-go_rest_server\n    - name: Regenerate sources\n      run: go run ./util/cmd/compile_protos\n    - name: Capture modified files\n      id: mod\n      run: |\n        files=$(git ls-files --deleted --modified --other --directory --exclude-standard cmd client server/genproto server/genrest)\n        echo ::set-output name=modified_files::$files\n    - name: Prepare regenerated sources\n      if: steps.mod.outputs.modified_files\n      run: tar czf regen.tgz ${{ steps.mod.outputs.modified_files }}\n    - uses: actions/upload-artifact@v7\n      if: steps.mod.outputs.modified_files\n      with:\n        name: regenerated-sources\n        path: regen.tgz\n  lint:\n    needs: regenerate\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/setup-go@v6\n      with:\n        go-version: '1.26'\n    - name: Install golint\n      run: go install golang.org/x/lint/golint@latest\n    - uses: actions/checkout@v6\n    - uses: actions/download-artifact@v8\n      if: needs.regenerate.outputs.modified_files\n      with:\n        name: regenerated-sources\n    - name: Expand regen archive\n      if: needs.regenerate.outputs.modified_files\n      run: |\n        tar xvzf regen.tgz\n        rm regen.tgz\n    - name: Check formatting\n      run: gofmt -l ./server/services > gofmt.txt && ! [ -s gofmt.txt ]\n      if: ${{ always() }}\n    - name: Lint service implementations\n      run: golint ./server/services >> golint.txt && ! [ -s golint.txt ]\n      if: ${{ always() }}\n    - name: Vet service implementations\n      # The mod download is there to prevent go vet from logging mod downloads\n      # which would mess up the empty vetting results check.\n      run: go mod download && go vet ./server/services 2> govet.txt && ! [ -s govet.txt ]\n      if: ${{ always() }}\n    - uses: actions/upload-artifact@v7\n      if: ${{ always() }}\n      with:\n        name: linting-results\n        path: |\n          gofmt.txt\n          golint.txt\n          govet.txt\n  tests:\n    needs: regenerate\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v6\n    - uses: actions/setup-go@v6\n      with:\n        go-version: '1.26'\n    - uses: actions/download-artifact@v8\n      if: needs.regenerate.outputs.modified_files\n      with:\n        name: regenerated-sources\n    - name: Expand regen archive\n      if: needs.regenerate.outputs.modified_files\n      run: |\n        tar xvzf regen.tgz\n        rm regen.tgz\n    - name: Run mod tidy\n      run: go mod tidy\n    - name: Build the code\n      run: go build ./...\n    - name: Run unit tests\n      run: go test ./...\n    - name: Run server coverage\n      run: go test ./server/... -coverprofile=coverage.txt -covermode=atomic\n  probes:\n    needs: regenerate\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v6\n    - uses: actions/setup-go@v6\n      with:\n        go-version: '1.26'\n    - uses: actions/download-artifact@v8\n      if: needs.regenerate.outputs.modified_files\n      with:\n        name: regenerated-sources\n    - name: Expand regen archive\n      if: needs.regenerate.outputs.modified_files\n      run: |\n        tar xvzf regen.tgz\n        rm regen.tgz\n    - name: Run mod tidy\n      run: go mod tidy\n    - name: Install gapic-showcase CLI\n      run: go install ./cmd/gapic-showcase\n    - name: Probe gRPC and REST servers\n      run: |\n        gapic-showcase run &\n        gapic-showcase echo echo --response content --response.content \"hello!\"\n        GRPC_EXIT_CODE=$?\n        STATUSCODE=$(curl --silent --output /dev/null --write-out \"%{http_code}\" http://localhost:7469/hello)\n        echo \"gRPC exit code: $GRPC_EXIT_CODE\"\n        echo \"REST status code: $STATUSCODE\"\n        [ $STATUSCODE = \"200\" ]  && [ GRPC_EXIT_CODE != 0 ]\n  # Disabled until https://github.com/googleapis/gapic-generator-typescript/pull/955 is merged/released.\n  # typescript-smoke-test:\n  #   runs-on: ubuntu-latest\n  #   steps:\n  #   - uses: actions/checkout@v2\n  #   - uses: actions/setup-node@v2\n  #     with:\n  #       node-version: '12'\n  #   - name: Run gapic-generator-typescript\n  #     run: |\n  #       mkdir tsout\n  #       docker run --rm --user $UID \\\n  #         --mount type=bind,source=\"$(pwd)\"/schema,destination=/in/protos/google/showcase/v1beta1,readonly \\\n  #         --mount type=bind,source=\"$(pwd)\"/tsout,destination=/out/ \\\n  #         gcr.io/gapic-images/gapic-generator-typescript:latest\n  #   - name: Run auto-generated tests\n  #     run: |\n  #       cd tsout\n  #       npm install\n  #       npm test\n  #       npm run system-test\n  protobufjs-load-test:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v6\n    - uses: actions/setup-node@v6\n      with:\n        node-version: '24'\n    - name: Install protobuf loader\n      run: npm install google-proto-files\n    - name: Verify protos can be loaded by protobufjs\n      run: |\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/echo.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/identity.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/messaging.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/rest_error.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/testing.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/compliance.proto');\"\n        node -e \"require('google-proto-files').loadSync('schema/google/showcase/v1beta1/sequence.proto');\"\n  push-generated-sources:\n    needs: [regenerate, lint, tests, probes]\n    runs-on: ubuntu-latest\n    if: github.ref == 'refs/heads/main' && needs.regenerate.outputs.modified_files\n    steps:\n    - uses: actions/checkout@v6\n      with:\n        ref: main\n    - uses: actions/download-artifact@v8\n      with:\n        name: regenerated-sources\n    - name: Expand regen archive\n      run: |\n        tar xvzf regen.tgz\n        rm regen.tgz\n    - uses: googleapis/code-suggester@v5\n      id: code_suggester\n      env:\n        ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}\n      with:\n        command: pr\n        upstream_owner: googleapis\n        upstream_repo: gapic-showcase\n        description: 'Regenerated sources resulting from most recent commit to main'\n        title: 'chore: regenerate sources'\n        message: 'chore: regenerate sources'\n        primary: 'main'\n        branch: regen\n        git_dir: '.'\n        force: true\n    - name: Add automerge label to pull request\n      uses: actions/github-script@v9\n      with:\n        script: |\n          github.rest.issues.addLabels({\n            issue_number: ${{ steps.code_suggester.outputs.pull }},\n            owner: context.repo.owner,\n            repo: context.repo.repo,\n            labels: ['automerge']\n          })\n  bazel_build_protos:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v6\n    - uses: bazel-contrib/setup-bazel@0.19.0\n      with:\n        # Avoid downloading Bazel every time.\n        bazelisk-cache: true\n        # Store build cache per workflow.\n        disk-cache: ${{ github.workflow }}\n        # Share repository cache between workflows.\n        repository-cache: true\n    - run: bazelisk build //schema/google/showcase/v1beta1:showcase_proto\n"
  },
  {
    "path": ".gitignore",
    "content": "# Temp directories\ntmp/\ndist/\ncoverage.txt\n.vscode\n*~\nbazel-*\ngolint.txt\ngofmt.txt\ngovet.txt\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"googleapis\"]\n\tpath = schema/googleapis\n\turl = https://github.com/googleapis/googleapis.git\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Release History\n\n## [0.39.0](https://github.com/googleapis/gapic-showcase/compare/v0.38.0...v0.39.0) (2026-03-30)\n\n\n### Features\n\n* Echo W3C trace propagation headers in showcase ([#1621](https://github.com/googleapis/gapic-showcase/issues/1621)) ([e8cd646](https://github.com/googleapis/gapic-showcase/commit/e8cd646fb411a9ca4e266a5d97e072794757fa4b))\n\n## [0.38.0](https://github.com/googleapis/gapic-showcase/compare/v0.37.0...v0.38.0) (2026-02-10)\n\n\n### Features\n\n* **compliance:** Add optional fields for all primitive types ([#1602](https://github.com/googleapis/gapic-showcase/issues/1602)) ([ec41cbd](https://github.com/googleapis/gapic-showcase/commit/ec41cbde514ec092ce0da86d791bdef3c525aff6))\n* Support apiVersion system parameter ([#1607](https://github.com/googleapis/gapic-showcase/issues/1607)) ([3fd9cb2](https://github.com/googleapis/gapic-showcase/commit/3fd9cb2f682d5f8263d913eaba8b78e045acc4d2))\n\n## [0.37.0](https://github.com/googleapis/gapic-showcase/compare/v0.36.2...v0.37.0) (2025-10-21)\n\n\n### Features\n\n* Update dependencies and regenerate clients ([#1597](https://github.com/googleapis/gapic-showcase/issues/1597)) ([0ae044d](https://github.com/googleapis/gapic-showcase/commit/0ae044d8dda556672eaf6b2eb24a82ef0d2e4c4e))\n\n## [0.36.2](https://github.com/googleapis/gapic-showcase/compare/v0.36.1...v0.36.2) (2025-04-16)\n\n\n### Bug Fixes\n\n* Name code_suggester step to fix CI action ([#1586](https://github.com/googleapis/gapic-showcase/issues/1586)) ([08c981d](https://github.com/googleapis/gapic-showcase/commit/08c981d696f1d5841119d97b131a39f182d8acb7))\n\n## [0.36.1](https://github.com/googleapis/gapic-showcase/compare/v0.36.0...v0.36.1) (2025-04-16)\n\n\n### Bug Fixes\n\n* Update generated files to reflect proto changes ([#1579](https://github.com/googleapis/gapic-showcase/pull/1579)) ([6579d3a](https://github.com/googleapis/gapic-showcase/commit/6579d3aaf4bd541c43d3c2f8e981e94caf446dbe))\n* Expand echo.proto comments ([#1580](https://github.com/googleapis/gapic-showcase/issues/1580)) ([076cb09](https://github.com/googleapis/gapic-showcase/commit/076cb0923e02f60a791ad82e6fc2c94c57e6671f))\n\n## [0.36.0](https://github.com/googleapis/gapic-showcase/compare/v0.35.5...v0.36.0) (2025-04-10)\n\n\n### Features\n\n* Add Echo.FailEchoWithDetails RPC that always fails with all standard and one custom error detail ([#1576](https://github.com/googleapis/gapic-showcase/issues/1576)) ([709b57d](https://github.com/googleapis/gapic-showcase/commit/709b57d724327abe091965c54f402042155aa178))\n\n\n### Bug Fixes\n\n* Return AIP/193-compliant errors over rest transport ([#1573](https://github.com/googleapis/gapic-showcase/issues/1573)) ([d47045b](https://github.com/googleapis/gapic-showcase/commit/d47045be1ee31f373d5a6ded287cbc9c5b9b605a))\n* Typos in some proto comments ([#1563](https://github.com/googleapis/gapic-showcase/issues/1563)) ([ae41e96](https://github.com/googleapis/gapic-showcase/commit/ae41e96133b36fa86f8d08c0f839ab9fb12e3e96))\n\n## [0.35.5](https://github.com/googleapis/gapic-showcase/compare/v0.35.4...v0.35.5) (2024-12-04)\n\n\n### Bug Fixes\n\n* Replace use of github.com/golang/protobuf/proto where possible ([#1557](https://github.com/googleapis/gapic-showcase/issues/1557)) ([0215dd6](https://github.com/googleapis/gapic-showcase/commit/0215dd637e130ca0c0a74adcc74d34d3373060d8)), closes [#1525](https://github.com/googleapis/gapic-showcase/issues/1525)\n\n## [0.35.4](https://github.com/googleapis/gapic-showcase/compare/v0.35.3...v0.35.4) (2024-12-03)\n\n\n### Bug Fixes\n\n* Revert replace use of github.com/golang/protobuf/proto ([#1534](https://github.com/googleapis/gapic-showcase/issues/1534))\" ([#1553](https://github.com/googleapis/gapic-showcase/issues/1553)) ([b82e7c5](https://github.com/googleapis/gapic-showcase/commit/b82e7c5d8b63ba11cc21361a4b84d0cb29a59826))\n\n## [0.35.3](https://github.com/googleapis/gapic-showcase/compare/v0.35.2...v0.35.3) (2024-12-03)\n\n\n### Bug Fixes\n\n* Downgrade go version to 1.21 ([#1551](https://github.com/googleapis/gapic-showcase/issues/1551)) ([36831cf](https://github.com/googleapis/gapic-showcase/commit/36831cfe255e13e3a5328ad548ddba9c3174434e))\n\n## [0.35.2](https://github.com/googleapis/gapic-showcase/compare/v0.35.1...v0.35.2) (2024-12-03)\n\n\n### Bug Fixes\n\n* **deps:** Update bazel-contrib/setup-bazel action to v0.9.1 ([#1546](https://github.com/googleapis/gapic-showcase/issues/1546)) ([bc936fb](https://github.com/googleapis/gapic-showcase/commit/bc936fb7c3607853bbc58fcd8f4d0aa7ccbc4a1c))\n\n## [0.35.1](https://github.com/googleapis/gapic-showcase/compare/v0.35.0...v0.35.1) (2024-07-08)\n\n\n### Bug Fixes\n\n* Use io.ReadAll ([#1520](https://github.com/googleapis/gapic-showcase/issues/1520)) ([6dddadd](https://github.com/googleapis/gapic-showcase/commit/6dddadd9fcdfed197209271a1201178a57951660))\n\n## [0.35.0](https://github.com/googleapis/gapic-showcase/compare/v0.34.0...v0.35.0) (2024-04-29)\n\n\n### Features\n\n* Echo request headers in response over REST transport ([#1509](https://github.com/googleapis/gapic-showcase/issues/1509)) ([de93c4c](https://github.com/googleapis/gapic-showcase/commit/de93c4c5e33b4e1a8ec3ebbeb7af36143dbc19dd))\n\n## [0.34.0](https://github.com/googleapis/gapic-showcase/compare/v0.33.0...v0.34.0) (2024-04-23)\n\n\n### Features\n\n* Add ability to echo request headers in trailing metadata ([#1501](https://github.com/googleapis/gapic-showcase/issues/1501)) ([48f9b74](https://github.com/googleapis/gapic-showcase/commit/48f9b742970e2199431066807d3f7a5cd2f31728))\n\n## [0.33.0](https://github.com/googleapis/gapic-showcase/compare/v0.32.2...v0.33.0) (2024-04-15)\n\n\n### Features\n\n* Add google.api.api_version annotation to echo.proto ([#1484](https://github.com/googleapis/gapic-showcase/issues/1484)) ([9a2298b](https://github.com/googleapis/gapic-showcase/commit/9a2298b90a90d812c331f2c0d9971b2312ae167d))\n* Log REST request headers ([#1497](https://github.com/googleapis/gapic-showcase/issues/1497)) ([05605c6](https://github.com/googleapis/gapic-showcase/commit/05605c60b41b95be07ca7cf38ae12e2fdbe82094))\n\n## [0.32.2](https://github.com/googleapis/gapic-showcase/compare/v0.32.1...v0.32.2) (2024-03-22)\n\n\n### Bug Fixes\n\n* **bazel:** Fix bazel build and add presubmit ([#1479](https://github.com/googleapis/gapic-showcase/issues/1479)) ([e446229](https://github.com/googleapis/gapic-showcase/commit/e44622986d706bcbdb5de710484318f40b571c20))\n\n## [0.32.1](https://github.com/googleapis/gapic-showcase/compare/v0.32.0...v0.32.1) (2024-03-21)\n\n\n### Bug Fixes\n\n* Add missing dependency in bazel rule ([#1477](https://github.com/googleapis/gapic-showcase/issues/1477)) ([f08b26d](https://github.com/googleapis/gapic-showcase/commit/f08b26d62da0a3c3214382915167b33633eb9558))\n\n## [0.32.0](https://github.com/googleapis/gapic-showcase/compare/v0.31.0...v0.32.0) (2024-03-20)\n\n\n### Features\n\n* Add autopopulated proto3 optional field to echo ([#1471](https://github.com/googleapis/gapic-showcase/issues/1471)) ([dba317f](https://github.com/googleapis/gapic-showcase/commit/dba317ff2ef63899bcc20de6a29c21f63afc7acc))\n\n## [0.31.0](https://github.com/googleapis/gapic-showcase/compare/v0.30.0...v0.31.0) (2024-02-08)\n\n\n### Features\n\n* Add request id as part of EchoResponse ([#1440](https://github.com/googleapis/gapic-showcase/issues/1440)) ([fe3c90e](https://github.com/googleapis/gapic-showcase/commit/fe3c90eba35a5d94fb419d495178ff90c9bcc795))\n\n## [0.30.0](https://github.com/googleapis/gapic-showcase/compare/v0.29.0...v0.30.0) (2024-01-10)\n\n\n### Features\n\n* Add autopopulated request id field to echo ([#1404](https://github.com/googleapis/gapic-showcase/issues/1404)) ([196b665](https://github.com/googleapis/gapic-showcase/commit/196b6650ff01483246d5c3fe67ca2ad29d1a21dc))\n* Replace api-common-protos submodule with googleapis ([#1395](https://github.com/googleapis/gapic-showcase/issues/1395)) ([d72c489](https://github.com/googleapis/gapic-showcase/commit/d72c4899c111e8c870b552cd1721166434096348))\n\n## [0.29.0](https://github.com/googleapis/gapic-showcase/compare/v0.28.4...v0.29.0) (2023-11-08)\n\n\n### Features\n\n* Add EchoErrorDetails RPC for Any testing ([#1385](https://github.com/googleapis/gapic-showcase/issues/1385)) ([c839a8e](https://github.com/googleapis/gapic-showcase/commit/c839a8ec6973b6c5189c9cba8b6a81f1663b8fd1))\n\n## [0.28.4](https://github.com/googleapis/gapic-showcase/compare/v0.28.3...v0.28.4) (2023-08-14)\n\n\n### Bug Fixes\n\n* Add fail index to streaming sequence ([#1364](https://github.com/googleapis/gapic-showcase/issues/1364)) ([567e756](https://github.com/googleapis/gapic-showcase/commit/567e7567600a0c3cb369a98ac25351f10000fcec))\n\n## [0.28.3](https://github.com/googleapis/gapic-showcase/compare/v0.28.2...v0.28.3) (2023-07-07)\n\n\n### Bug Fixes\n\n* Remove content_sent from StreamingSequences ([#1351](https://github.com/googleapis/gapic-showcase/issues/1351)) ([ae910cc](https://github.com/googleapis/gapic-showcase/commit/ae910cca182787fb5babbfe1005b086d4f2f8c4b))\n\n## [0.28.2](https://github.com/googleapis/gapic-showcase/compare/v0.28.1...v0.28.2) (2023-07-05)\n\n\n### Bug Fixes\n\n* Update HttpJson regex for URL paths ([#1340](https://github.com/googleapis/gapic-showcase/issues/1340)) ([4110fee](https://github.com/googleapis/gapic-showcase/commit/4110fee63a22f8d32cae7f8ba318919bee94e752))\n\n## [0.28.1](https://github.com/googleapis/gapic-showcase/compare/v0.28.0...v0.28.1) (2023-05-10)\n\n\n### Bug Fixes\n\n* Remove non-exist fields from method signature in sequence.proto ([#1315](https://github.com/googleapis/gapic-showcase/issues/1315)) ([a7c8ffc](https://github.com/googleapis/gapic-showcase/commit/a7c8ffca1fec5f25b630ac1d2aa83bc3db0fe521))\n\n## [0.28.0](https://github.com/googleapis/gapic-showcase/compare/v0.27.0...v0.28.0) (2023-05-09)\n\n\n### Features\n\n* Add a configurable wait time between messages sent for server streaming RPCs ([#1309](https://github.com/googleapis/gapic-showcase/issues/1309)) ([dd11687](https://github.com/googleapis/gapic-showcase/commit/dd1168792054cfccb16e53753764cda3431d6170))\n\n## [0.27.0](https://github.com/googleapis/gapic-showcase/compare/v0.26.1...v0.27.0) (2023-04-19)\n\n\n### Features\n\n* Add iam and location mixin rest handlers ([#1300](https://github.com/googleapis/gapic-showcase/issues/1300)) ([6adab7b](https://github.com/googleapis/gapic-showcase/commit/6adab7bb4e7c979f90441a37cde36ecda0bee68f))\n* Add proto + logic for streaming sequence ([#1266](https://github.com/googleapis/gapic-showcase/issues/1266)) ([82814d8](https://github.com/googleapis/gapic-showcase/commit/82814d8a8ada26bf9a831497b667183edf1f0e4f))\n\n\n### Bug Fixes\n\n* Handle already quoted protojson wkt ([#1294](https://github.com/googleapis/gapic-showcase/issues/1294)) ([f74f03d](https://github.com/googleapis/gapic-showcase/commit/f74f03d50ea8aa5832f830a6f92e16e99fb3e623))\n\n## [0.26.1](https://github.com/googleapis/gapic-showcase/compare/v0.26.0...v0.26.1) (2023-03-28)\n\n\n### Bug Fixes\n\n* **rest:** Properly handle string-encoded well-known types in URLs ([#1282](https://github.com/googleapis/gapic-showcase/issues/1282)) ([579fe72](https://github.com/googleapis/gapic-showcase/commit/579fe729c0b506cdf48cd834beb14a8ffb4b5994))\n\n## [0.26.0](https://github.com/googleapis/gapic-showcase/compare/v0.25.0...v0.26.0) (2023-03-07)\n\n\n### Features\n\n* **go:** Update Go version to 1.19 ([#1225](https://github.com/googleapis/gapic-showcase/issues/1225)) ([d4b108e](https://github.com/googleapis/gapic-showcase/commit/d4b108e16dc91c0ea6d4dec3dca4d3270d3bf47a))\n\n\n### Bug Fixes\n\n* Build assets for darwin/arm64 ([#1267](https://github.com/googleapis/gapic-showcase/issues/1267)) ([0833a57](https://github.com/googleapis/gapic-showcase/commit/0833a579131c14582b053f26698fdfe93e465d87))\n* Export showcase_v1beta1.yaml from BUILD.bazel to support external GAPIC generation ([#1223](https://github.com/googleapis/gapic-showcase/issues/1223)) ([5076348](https://github.com/googleapis/gapic-showcase/commit/507634898e208b7ff88784e4ec5f0efd22bff9ab))\n* Handle x-http-method-override for PATCH as POST ([#1262](https://github.com/googleapis/gapic-showcase/issues/1262)) ([4070ce3](https://github.com/googleapis/gapic-showcase/commit/4070ce331bd5e852ccb2f4f2267dce80a9dda9c4))\n* Use quotes around extreme int64 values ([#1206](https://github.com/googleapis/gapic-showcase/issues/1206)) ([c9d9ff1](https://github.com/googleapis/gapic-showcase/commit/c9d9ff191bfd72fe8563625be4074fe4659585d6)), closes [#1205](https://github.com/googleapis/gapic-showcase/issues/1205)\n\n## [0.25.0](https://github.com/googleapis/gapic-showcase/compare/v0.24.0...v0.25.0) (2022-09-01)\n\n\n### Features\n\n* Support FieldMask in Updates ([#1197](https://github.com/googleapis/gapic-showcase/issues/1197)) ([cdb4ce6](https://github.com/googleapis/gapic-showcase/commit/cdb4ce63778a8ea6bcef0006c1e4c4a50da45a6c))\n\n\n### Bug Fixes\n\n* Use resource field in http body for Updates ([#1198](https://github.com/googleapis/gapic-showcase/issues/1198)) ([48a2632](https://github.com/googleapis/gapic-showcase/commit/48a2632b5f25af24b239216f1ff079ed60de2a61))\n\n## [0.24.0](https://github.com/googleapis/gapic-showcase/compare/v0.23.0...v0.24.0) (2022-07-28)\n\n\n### Features\n\n* **regapic:** accept numeric enums, allow testing enum round trips ([#1159](https://github.com/googleapis/gapic-showcase/issues/1159)) ([1e863ae](https://github.com/googleapis/gapic-showcase/commit/1e863ae834ad58453c1d74cf593be1188ff15033))\n\n## [0.23.0](https://github.com/googleapis/gapic-showcase/compare/v0.22.0...v0.23.0) (2022-07-27)\n\n\n### Features\n\n* add binding testing and multiple bindings test data to compliance service ([#1150](https://github.com/googleapis/gapic-showcase/issues/1150)) ([9d43ed0](https://github.com/googleapis/gapic-showcase/commit/9d43ed0621e4c9549a3d92a53dedc5dd57e9bec2))\n\n\n### Bug Fixes\n\n* remove broken test cases in compliance ([#1151](https://github.com/googleapis/gapic-showcase/issues/1151)) ([a56df9a](https://github.com/googleapis/gapic-showcase/commit/a56df9ab5ad9cdd6cb0385ba9c74263b95538ad8))\n\n## [0.22.0](https://github.com/googleapis/gapic-showcase/compare/v0.21.0...v0.22.0) (2022-06-13)\n\n\n### Features\n\n* Support LRO mixins over REST ([#1118](https://github.com/googleapis/gapic-showcase/issues/1118)) ([5ca6fe1](https://github.com/googleapis/gapic-showcase/commit/5ca6fe1b8ea7e5645e87718e84b1198ad8ce9c63))\n\n## [0.21.0](https://github.com/googleapis/gapic-showcase/compare/v0.20.0...v0.21.0) (2022-06-08)\n\n\n### Features\n\n* respond to requests specifying response enum values be JSON-encoded as ints ([#1111](https://github.com/googleapis/gapic-showcase/issues/1111)) ([5389bd1](https://github.com/googleapis/gapic-showcase/commit/5389bd17aedb7f0c8a8de562421222e703589823))\n\n\n### Bug Fixes\n\n* **genrest:** pass http request context to service handler ([#1088](https://github.com/googleapis/gapic-showcase/issues/1088)) ([bad9b6b](https://github.com/googleapis/gapic-showcase/commit/bad9b6b89b0f75d3ec8408610d329068775703e5))\n\n## [0.20.0](https://github.com/googleapis/gapic-showcase/compare/v0.19.5...v0.20.0) (2022-05-10)\n\n\n### Features\n\n* **genrest:** format rest errors as Google Errors ([#1082](https://github.com/googleapis/gapic-showcase/issues/1082)) ([e49f134](https://github.com/googleapis/gapic-showcase/commit/e49f134dc54ae734c716f8649fc3279efd68916f))\n\n### [0.19.5](https://github.com/googleapis/gapic-showcase/compare/v0.19.4...v0.19.5) (2022-03-08)\n\n\n### Bug Fixes\n\n* add a routing.proto dependency to showcase proto bazel target ([#1033](https://github.com/googleapis/gapic-showcase/issues/1033)) ([e2aa303](https://github.com/googleapis/gapic-showcase/commit/e2aa3033e67c0c50c5650512211001e1ad29d36a))\n\n### [0.19.4](https://github.com/googleapis/gapic-showcase/compare/v0.19.3...v0.19.4) (2022-03-03)\n\n\n### Bug Fixes\n\n* **ci:** yet another attempt to fix asset ci ([#1026](https://github.com/googleapis/gapic-showcase/issues/1026)) ([32a2603](https://github.com/googleapis/gapic-showcase/commit/32a2603550220dcd0a86d533a883fa1ba860a3b1))\n\n### [0.19.3](https://github.com/googleapis/gapic-showcase/compare/v0.19.2...v0.19.3) (2022-03-03)\n\n\n### Bug Fixes\n\n* **ci:** asset version shouldn't include the leading v ([#1023](https://github.com/googleapis/gapic-showcase/issues/1023)) ([a78d624](https://github.com/googleapis/gapic-showcase/commit/a78d6243b9cbfa088b6863954b0bf6dec91c6786))\n\n### [0.19.2](https://github.com/googleapis/gapic-showcase/compare/v0.19.1...v0.19.2) (2022-03-02)\n\n\n### Bug Fixes\n\n* use tag_name for proto-assets upload ([#1021](https://github.com/googleapis/gapic-showcase/issues/1021)) ([c3f2f36](https://github.com/googleapis/gapic-showcase/commit/c3f2f36128a3c7b5c51fc1bd87c83f8f833adf9a))\n\n### [0.19.1](https://github.com/googleapis/gapic-showcase/compare/v0.19.0...v0.19.1) (2022-03-02)\n\n\n### Bug Fixes\n\n* ruby package name ([#1015](https://github.com/googleapis/gapic-showcase/issues/1015)) ([7289f2e](https://github.com/googleapis/gapic-showcase/commit/7289f2e20afa198695d3da9d5a5362a161032244))\n\n### v0.19.0 / 2022-01-31\n- update api-common-protos submodule\n- add ability to echo headers and added several routing annotations to the `Echo` method\n- enable generation of both grpc and rest clients\n\n### v0.18.0 / 2021-12-06\n- add `parent` to method signature for `Messaging.SearchBlurbs()`\n- update `RELEASING.md` instructions\n\n### v0.17.0 / 2021-11-02\n- Implement server streaming RPCs over REST, using chunked encoding.\n- Implement RPCs that map to PUT and PATCH HTTP verbs\n- Check that REST RPCs using HTTP GET or DELETE don't contain bodies.\n- Disable TypeScript smoke tests pending upstream fixes (TS generator Docker image).\n\n### v0.16.0 / 2021-06-16\n- Require incoming REST requests to have expected `x-goog-api-client` header tokens\n- Allow mTLS to work over gRPC when using `cmux` to also listen to REST requests on the same port\n- Make REST `PATCH` methods work\n- Fix multi-line truncation in release notes\n- Add Docker push instructions to RELEASING.md\n\n### v0.15.0 / 2021-05-05\n- Enforce `Content-Type: application/json` in the bodies of REST requests\n- Enforce correct `optional` field presence/absence in test suite requests (bodies and query strings)\n- Lower-camel-case field names in `compliance_suite.json`\n\n### v0.14.0 / 2021-04-27\n- Fix collision between operation helper for `Echo.Wait` and generated mixin `Operations.WaitOpertation`\n- REST endpoints: ensure enum values are received as string values\n- REST endpoints: ensure full body responses\n- Rest endpoints: enforce lower-camel-cased field names in request bodies and query params\n- fix windows binary upload\n- fix go vet/lint warnings\n- pin Go version in CI\n- fix release asset version\n- add Code of Conduct\n- add `SECURITY.md`\n\n### v0.13.0 / 2021-02-24\n- Auto-generate REST endpoints for Showcase services via `genrest` (partial)\n- Add Compliance service for generators to use to test REST-transcoding their\n  protos and RPCs (partial)\n- Add mix-in service implementations\n- Update API Service config with mix-ins and more\n- Add Bazel proto_library targets for schema/\n- Migrated to GitHub Actions\n- Regen client & CLI with small updates\n- Update dependencies\n\n### v0.12.0 / 2020-08-12\n- Add client-side retry/deadline testing surface\n- Regen client & CLI with small updates\n- Update dependencies\n\n### v0.11.0 / 2020-05-26\n- Add non-slash resource name patterns to Blurb resource\n- Fix typo in User-parented Blurb resource patterns\n- Add an enum to EchoRequest/EchoResponse\n- Regen CLI with new fields\n- Update dependencies\n\n### v0.10.1 / 2020-05-20\n- Fix UpdateUser handler response to send entire updated resource\n- Note: non-slash resource name changes are not included in this release\n\n### v0.10.0 / 2020-05-18\n- Add use of proto3_optional in schema\n- Upgrade CI protoc to v3.12.0\n- Regen CLI with new proto3_optional fields\n- Update dependencies\n\n### v0.9.0 / 2020-04-22\n- Print gRPC request headers in verbose mode (`gapic-showcase run -v`)\n- Add TypeScript smoke tests\n- Fix Kotlin smoke tests\n\n### v0.8.1 / 2020-04-15\n- Fix bug in mTLS configuration resolution\n\n### v0.8.0 / 2020-04-14\n- Add mtls support with user provided cert/key to server\n- Regen cli:\n  - Paginated RPCs only collect a single page\n  - Default page_size changed from 0 to 10 to avoid short circuiting\n- Regen client:\n  - clientHook support added\n- Update CI use of go.mod\n- Update dependencies\n\n### v0.7.0 / 2020-02-06\n- Regen client and protobuf code for Go grpc.ClientConn interface\n- Update dependencies\n\n### v0.6.1 / 2019-11-01\n- Fix the resource name for Blurb.\n\n### v0.6.0 / 2019-11-01\n- Add a gRPC ServiceConfig for microgenerator retry config\n- Regen client code with retry config\n- Update dependencies\n\n### v0.5.0 / 2019-09-04\n- Update to Go version 1.13\n- Update dependencies\n- Add trailers testing support to Echo\n- Fix pagination in operations service\n\n### v0.4.0 / 2019-08-13\n- Add dummy LRO service\n- Dependency updates\n\n### v0.3.0 / 2019-08-09\n- Remove nodejs server implementation\n- Update dependencies\n- Update golang docker tag to v1.12\n- Add Block method to Echo service\n- Enable kotlin smoke test\n- Add renovate.json\n\n### v0.2.4 / 2019-07-11\n- Update `grpc-fallback-go` version to `v0.1.3`\n\n### v0.2.3 / 2019-07-09\n- Update `grpc-fallback-go` version to `v0.1.2`\n\n### v0.2.2 / 2019-07-09\n- Update `grpc-fallback-go` version to `v0.1.1`\n\n### v0.2.1 / 2019-07-03\n- Add fallback-proxy to `gapic-showcase run` via grpc-fallback-go\n- Expose fallback-proxy port in Dockerfile\n- Tidy `go.mod`\n\n### v0.2.0 / 2019-05-24\n- Regenerate GAPIC & GCLI with small updates\n- Update resource annotations\n- Fix bug in README\n- Add Node.js EchoService implementation\n- Remove extraneous logging\n\n### v0.1.1 / 2019-04-17\n- Regenerate GAPIC & GCLI to capture fixes for paged RPCs & commands\n\n### v0.1.0 / 2019-04-04\n- Beta release.\n\n### v0.0.16 / 2019-03-25\n- Fixing some field names in path templates\n\n### v0.0.15 / 2019-03-25\n- Fixing path templates to make sure curly braces match\n- Use Go modules\n\n### v0.0.14 / 2019-03-25\n- Serve Testing service CLI service\n- Ensure all path templates start with `/`\n\n### v0.0.13 / 2019-03-01\n- Fix issue which tombstones users.\n\n### v0.0.12 / 2019-02-20\n- Remove google.api.client_package proto annotations.\n\n### v0.0.11 / 2019-02-19\n- Update GAPIC config proto annotations.\n\n### v0.0.10 / 2019-01-29\n- Expose messaging and identity services when running `gapic-showcase run`.\n- Refactor `Echo.WaitRequest` to follow API style for denoting time to live.\n- Use GCLI Generated Code for the CLI cmd.\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Code of Conduct\n\nAs contributors and maintainers of this project,\nand in the interest of fostering an open and welcoming community,\nwe pledge to respect all people who contribute through reporting issues,\nposting feature requests, updating documentation,\nsubmitting pull requests or patches, and other activities.\n\nWe are committed to making participation in this project\na harassment-free experience for everyone,\nregardless of level of experience, gender, gender identity and expression,\nsexual orientation, disability, personal appearance,\nbody size, race, ethnicity, age, religion, or nationality.\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery\n* Personal attacks\n* Trolling or insulting/derogatory comments\n* Public or private harassment\n* Publishing other's private information,\nsuch as physical or electronic\naddresses, without explicit permission\n* Other unethical or unprofessional conduct.\n\nProject maintainers have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct.\nBy adopting this Code of Conduct,\nproject maintainers commit themselves to fairly and consistently\napplying these principles to every aspect of managing this project.\nProject maintainers who do not follow or enforce the Code of Conduct\nmay be permanently removed from the project team.\n\nThis code of conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community.\n\nInstances of abusive, harassing, or otherwise unacceptable behavior\nmay be reported by opening an issue\nor contacting one or more of the project maintainers.\n\nThis Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,\navailable at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing\n============\n\nWe are thrilled that you are interested in contributing to this project.\nPlease open an issue or pull request with your ideas.\n\nContributor License Agreements\n------------------------------\n\nBefore we can accept your pull requests, you will need to sign a\nContributor License Agreement (CLA):\n\n-   **If you are an individual writing original source code** and **you\n    own the intellectual property**, then you'll need to sign an\n    [individual CLA].\n-   **If you work for a company that wants to allow you to contribute\n    your work**, then you'll need to sign a [corporate CLA].\n\nYou can sign these electronically (just scroll to the bottom). After\nthat, we'll be able to accept your pull requests.\n\n  [individual CLA]: https://developers.google.com/open-source/cla/individual\n  [corporate CLA]: https://developers.google.com/open-source/cla/corporate\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM golang:1.26-alpine AS builder\n\n# Install git and gcc.\nRUN apk add --no-cache git gcc musl-dev\n\n# Setup directory.\nWORKDIR /go/src/github.com/googleapis/gapic-showcase\nCOPY . .\n\n# Compile for Linux.\nENV CGO_ENABLED 0\nENV GOOS linux\nENV GOARCH amd64\n\n# Install showcase.\nRUN go get ./...\nRUN go build -installsuffix cgo \\\n  -ldflags=\"-w -s\" \\\n  -o /go/bin/gapic-showcase \\\n  ./cmd/gapic-showcase\n\n# Start a fresh image, and only copy the built binary.\nFROM scratch\nCOPY --from=builder /go/bin/gapic-showcase /go/bin/gapic-showcase\n\n# Expose ports\nEXPOSE 7469\nEXPOSE 1337\n\n# Run the server.\nENTRYPOINT [\"/go/bin/gapic-showcase\"]\nCMD [\"run\"]\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\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"
  },
  {
    "path": "README.md",
    "content": "# GAPIC Showcase\n\n[![Release Level][releaselevelimg]][releaselevel]\n[![Code Coverage][codecovimg]][codecov]\n[![GoDoc][godocimg]][godoc]\n\nGAPIC Showcase is an API that demonstrates Generated API Client (GAPIC) features\nand common API patterns used by Google. It follows the [Cloud APIs design\nguide](https://cloud.google.com/apis/design/).  This project provides a server\nand client implementation of the API that can be run locally over both gRPC and\nHTTP/JSON.\n\n## Installation\nThe GAPIC Showcase CLI can be installed using three different mechanisms:\npulling a docker image from [Google Container Registry](https://gcr.io/gapic-images/gapic-showcase),\ndownloading the compiled binary from our our [releases](https://github.com/googleapis/gapic-showcase/releases)\npage, or simply by installing from source using go.\n\n### Docker\n\n**NOTE**: The \"latest\" Docker image is currently stale. We expect to update it in the near future. (We're upgrading our processes.)\n\n```sh\n$ docker pull gcr.io/gapic-images/gapic-showcase:latest\n$ docker run \\\n    --rm \\\n    -p 7469:7469/tcp \\\n    -p 7469:7469/udp \\\n    gcr.io/gapic-images/gapic-showcase:latest \\\n    --help\n> Root command of gapic-showcase\n>\n> Usage:\n>   gapic-showcase [command]\n>\n> Available Commands:\n>   completion  Emits bash a completion for gapic-showcase\n>   echo        This service is used showcase the four main types...\n>   help        Help about any command\n>   identity    A simple identity service.\n>   messaging   A simple messaging service that implements chat...\n>   run         Runs the showcase server\n>   testing     A service to facilitate running discrete sets of...\n>\n> Flags:\n>   -h, --help      help for gapic-showcase\n>   -j, --json      Print JSON output\n>   -v, --verbose   Print verbose output\n>       --version   version for gapic-showcase\n>\n> Use \"gapic-showcase [command] --help\" for more information about a command.\n```\n\n### Binary\n```sh\n$ export GAPIC_SHOWCASE_VERSION=0.36.1  # use the current version here\n$ export OS=linux\n$ export ARCH=amd64\n$ curl -L https://github.com/googleapis/gapic-showcase/releases/download/v${GAPIC_SHOWCASE_VERSION}/gapic-showcase-${GAPIC_SHOWCASE_VERSION}-${OS}-${ARCH}.tar.gz | sudo tar -zx --directory /usr/local/bin/\n$ gapic-showcase --help\n...\n```\n\n### Source\n```sh\n$ go install github.com/googleapis/gapic-showcase/cmd/gapic-showcase@latest\n$ PATH=$PATH:`go env GOPATH`/bin\n$ gapic-showcase --help\n...\n```\n_* Bear in mind this is not a versioned installation so no versioning guarantees\nhold using this installation method._\n\n## Schema\nThe schema of GAPIC Showcase API can be found in [schema/google/showcase/v1beta1](schema/google/showcase/v1beta1)\nIts dependencies can be found in the [googleapis/googleapis](https://github.com/googleapis/googleapis)\nsubmodule.\n\n## Development Environment\nTo set up this repository for local development, follow these steps:\n\n1. Install `protoc` from the protobuf [release page](https://github.com/protocolbuffers/protobuf/releases)\nor your OS package manager. This API utilizes `proto3_optional`, thus `v3.12.0`\nis the minimum supported version of `protoc`.\n\n1. Initialize the `googleapis` submodule:\n    ```sh\n    git submodule update --init --recursive\n    ```\n\n1. Install Go\n    1. Linux: `sudo apt-get install golang`\n    2. Mac, Windows, or other options: Please see the [official set-up docs](https://golang.org/doc/install).\n\n1. Clone this repository.\n\n1. Set up Go protobuf tools:\n    ```sh\n    go install github.com/golang/protobuf/protoc-gen-go@latest\n    go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_cli@latest\n    go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic@latest\n    ```\n\n1. Export the Go binaries to your environment path.\n    ```sh\n    PATH=$PATH:`go env GOPATH`/bin\n    ```\n\n1. To compile the Showcase binary, as well as associated development utilities in this repository, run the following after you make changes:\n    ```sh\n    go install ./...\n    ```\n\n\n\n### Making changes to the protos\n\nIf there are any changes to the protobuf files, the generated support code must\nbe regenerated. This can be done by executing the following command:\n\n    go install ./util/cmd/... && go run ./util/cmd/compile_protos\n\nIf successful, you may see changes in the following directories:\n\n* `server/genproto`\n* `server/genrest`\n* `client/`\n* `cmd/gapic-showcase`\n\nThen, update the binaries:\n\n    go install ./...\n\n## Quick Start\nThis quick start guide will show you how to start the server and make a request to it.\n\n### Step 1. Run the server\nRun the showcase server to allow requests to be sent to it. This opens port :7469 to\nsend and receive requests.\n\n```sh\n$ gapic-showcase run\n> 2018/09/19 02:13:09 Showcase listening on port: :7469\n```\n\n### Step 2. Make a request\nOpen a new terminal window and make a request to the server.\n```sh\n$ gapic-showcase \\\n  identity \\ # Service name\n  create-user \\ # Message name\n  --user.display_name Rumble \\ # Request fields\n  --user.email rumble@goodboi.com\n> name:\"users/0\" display_name:\"Rumble\" email:\"rumble@goodboi.com\" create_time:<seconds:1554414332 nanos:494679000 > update_time:<seconds:1554414332 nanos:494679000 >\n```\n**_Note: You can make requests to this server from your own client but an insecure channel\nmust be used since the server does not implement auth. Client library generators with\nShowcase-based integration tests need to provide the insecure channel to the client library\nin the tests._**\n\n#### Example for Node.js:\n\n```js\nconst grpc = require('@grpc/grpc-js');\nconst showcase = require('showcase');\nconst client = new showcase.EchoClient({ grpc, sslCreds: grpc.credentials.createInsecure() });\n```\n\n#### Example for Go:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/googleapis/gapic-showcase/client\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\nfunc main() {\n\tconn, err := grpc.Dial(\"localhost:7469\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\topt := option.WithGRPCConn(conn)\n\tctx := context.Background()\n\t_, err = client.NewEchoClient(ctx, opt)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n\n#### Example for Java (gRPC):\n\n```java\nEchoSettings echoSettings = EchoSettings.newBuilder()\n    .setCredentialsProvider(NoCredentialsProvider.create())\n    .setTransportChannelProvider(\n        InstantiatingGrpcChannelProvider.newBuilder()\n            .setChannelConfigurator(\n                new ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder>() {\n                  @Override\n                  public ManagedChannelBuilder apply(ManagedChannelBuilder input) {\n                    return input.usePlaintext();\n                  }\n                })\n            .build())\n    .build();\nEchoClient echoClient = EchoClient.create(echoSettings);\n```\n\n#### Example for Java (httpJson):\n\n```java\nEchoSettings echoSettings = EchoSettings.newHttpJsonBuilder()\n    .setTransportChannelProvider(EchoSettings.defaultHttpJsonTransportProviderBuilder()\n        .setHttpTransport(new NetHttpTransport.Builder().doNotValidateCertificate().build())\n        .setEndpoint(\"http://localhost:7469\")\n        .build())\n    .build();\nEchoClient echoClient = EchoClient.create(echoSettings);\n```\n\n#### Example for Python\n\n```python\nfrom google import showcase_v1beta1\nfrom google.auth import credentials\n\nimport grpc\n\n# ...\n\nif do_grpc:\n    transport_cls = showcase_v1beta1.EchoClient.get_transport_class(\"grpc\")\n    transport = transport_cls(\n        credentials=credentials.AnonymousCredentials(),\n        channel=grpc.insecure_channel(\"localhost:7469\"),\n        host=\"localhost:7469\",\n    )\nelse:\n    transport_cls = showcase_v1beta1.EchoClient.get_transport_class(\"rest\")\n    transport = transport_cls(\n        credentials=credentials.AnonymousCredentials(),\n        host=\"localhost:7469\",\n        url_scheme=\"http\",\n    )\n\n```\n\n## Released Artifacts\nGAPIC Showcase releases three main artifacts, a CLI tool, the gapic-showcase\nservice protobuf files staged alongside its dependencies, and a protocol buffer\ndescriptor set compiled from the gapic-showcase service protos.\n\nCheck out our [releases](https://github.com/googleapis/gapic-showcase/releases) page to see our released artifacts.\n\n## Versioning\nGAPIC Showcase follows semantic versioning. All artifacts that are\nreleased for a certain version are guaranteed to be compatible with one another.\n\n## Releases\nReleases are made by [release-please](https://github.com/googleapis/release-please)\nbased on the contents of the Conventional Commits made to the project. Assets\nare then uploaded to the releases that are created.\n\n## Supported Go Versions\nGAPIC Showcase is supported for go versions 1.16 and later.\n\n## FAQ\n\n### Is this Showcase API publicly served?\n\nThis API is not publicly served.\n\n## Disclaimer\n\nThis is not an official Google product.\n\n[codecovimg]: https://codecov.io/github/googleapis/gapic-showcase/coverage.svg?branch=main\n[codecov]: https://codecov.io/github/googleapis/gapic-showcase?branch=main\n[godoc]: https://godoc.org/github.com/googleapis/gapic-showcase/server\n[godocimg]: https://godoc.org/github.com/googleapis/gapic-showcase/server?status.svg\n[releaselevel]: https://cloud.google.com/terms/launch-stages\n[releaselevelimg]: https://img.shields.io/badge/release%20level-beta-red.svg?style&#x3D;flat\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\nTo report a security issue, please use [g.co/vulnz](https://g.co/vulnz).\n\nThe Google Security Team will respond within 5 working days of your report on g.co/vulnz.\n\nWe use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.\n"
  },
  {
    "path": "WORKSPACE.bazel",
    "content": "# Copyright 2021 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#      https://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\n\"\"\"\nA workspace for gapic-showcase\n\"\"\"\nworkspace(name = \"gapic_showcase\")\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\n\n##\n# googleapis for the common protos\n#\nhttp_archive(\n  name = \"com_google_googleapis\",\n  strip_prefix = \"googleapis-7976ffadc0f21ee9149708c0c97ef000e15de1eb\",\n  urls = [\"https://github.com/googleapis/googleapis/archive/7976ffadc0f21ee9149708c0c97ef000e15de1eb.zip\"],\n  sha256 = \"935fb7ebbc65f43e293fac7240471c24d9d52249f5c8bf09c0d04327b2191053\"\n)\nload(\"@com_google_googleapis//:repository_rules.bzl\", \"switched_rules_by_language\")\nswitched_rules_by_language(name = \"com_google_googleapis_imports\", grpc = True)\n\n##\n# protobuf for the protobuf protos\n#\nhttp_archive(\n  name = \"com_google_protobuf\",\n  sha256 = \"ddd0f5271f31b549efc74eb39061e142132653d5d043071fcec265bd571e73c4\",\n  urls = [\"https://github.com/protocolbuffers/protobuf/archive/v25.2.zip\"],\n  strip_prefix = \"protobuf-25.2\",\n)\nload(\"@com_google_protobuf//:protobuf_deps.bzl\", \"protobuf_deps\")\nprotobuf_deps()\n\nhttp_archive(\n    name = \"bazel_features\",\n    sha256 = \"5d7e4eb0bb17aee392143cd667b67d9044c270a9345776a5e5a3cccbc44aa4b3\",\n    strip_prefix = \"bazel_features-1.13.0\",\n    url = \"https://github.com/bazel-contrib/bazel_features/releases/download/v1.13.0/bazel_features-v1.13.0.tar.gz\",\n)\nload(\"@bazel_features//:deps.bzl\", \"bazel_features_deps\")\nbazel_features_deps()\n\n##\n# rules_proto for the proto_library rule\n#\nhttp_archive(\n    name = \"rules_proto\",\n    sha256 = \"6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295\",\n    # Using a release candidate because the latest stable release is too old for\n    # our needs, and we want to stay closer to the latest without pinning to a\n    # specific commit.\n    strip_prefix = \"rules_proto-6.0.2\",\n    url = \"https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz\",\n)\n\nload(\"@rules_proto//proto:repositories.bzl\", \"rules_proto_dependencies\",\"rules_proto_toolchains\")\nrules_proto_dependencies()\nrules_proto_toolchains()\n"
  },
  {
    "path": "client/auxiliary.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"cloud.google.com/go/longrunning\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\n// SearchBlurbsOperation manages a long-running operation from SearchBlurbs.\ntype SearchBlurbsOperation struct {\n\tlro      *longrunning.Operation\n\tpollPath string\n}\n\n// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.\n//\n// See documentation of Poll for error-handling information.\nfunc (op *SearchBlurbsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) {\n\topts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)\n\tvar resp genprotopb.SearchBlurbsResponse\n\tif err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &resp, nil\n}\n\n// Poll fetches the latest state of the long-running operation.\n//\n// Poll also fetches the latest metadata, which can be retrieved by Metadata.\n//\n// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and\n// the operation has completed with failure, the error is returned and op.Done will return true.\n// If Poll succeeds and the operation has completed successfully,\n// op.Done will return true, and the response of the operation is returned.\n// If Poll succeeds and the operation has not completed, the returned response and error are both nil.\nfunc (op *SearchBlurbsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) {\n\topts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)\n\tvar resp genprotopb.SearchBlurbsResponse\n\tif err := op.lro.Poll(ctx, &resp, opts...); err != nil {\n\t\treturn nil, err\n\t}\n\tif !op.Done() {\n\t\treturn nil, nil\n\t}\n\treturn &resp, nil\n}\n\n// Metadata returns metadata associated with the long-running operation.\n// Metadata itself does not contact the server, but Poll does.\n// To get the latest metadata, call this method after a successful call to Poll.\n// If the metadata is not available, the returned metadata and error are both nil.\nfunc (op *SearchBlurbsOperation) Metadata() (*genprotopb.SearchBlurbsMetadata, error) {\n\tvar meta genprotopb.SearchBlurbsMetadata\n\tif err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {\n\t\treturn nil, nil\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\treturn &meta, nil\n}\n\n// Done reports whether the long-running operation has completed.\nfunc (op *SearchBlurbsOperation) Done() bool {\n\treturn op.lro.Done()\n}\n\n// Name returns the name of the long-running operation.\n// The name is assigned by the server and is unique within the service from which the operation is created.\nfunc (op *SearchBlurbsOperation) Name() string {\n\treturn op.lro.Name()\n}\n\n// WaitOperation manages a long-running operation from Wait.\ntype WaitOperation struct {\n\tlro      *longrunning.Operation\n\tpollPath string\n}\n\n// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.\n//\n// See documentation of Poll for error-handling information.\nfunc (op *WaitOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) {\n\topts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)\n\tvar resp genprotopb.WaitResponse\n\tif err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &resp, nil\n}\n\n// Poll fetches the latest state of the long-running operation.\n//\n// Poll also fetches the latest metadata, which can be retrieved by Metadata.\n//\n// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and\n// the operation has completed with failure, the error is returned and op.Done will return true.\n// If Poll succeeds and the operation has completed successfully,\n// op.Done will return true, and the response of the operation is returned.\n// If Poll succeeds and the operation has not completed, the returned response and error are both nil.\nfunc (op *WaitOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) {\n\topts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)\n\tvar resp genprotopb.WaitResponse\n\tif err := op.lro.Poll(ctx, &resp, opts...); err != nil {\n\t\treturn nil, err\n\t}\n\tif !op.Done() {\n\t\treturn nil, nil\n\t}\n\treturn &resp, nil\n}\n\n// Metadata returns metadata associated with the long-running operation.\n// Metadata itself does not contact the server, but Poll does.\n// To get the latest metadata, call this method after a successful call to Poll.\n// If the metadata is not available, the returned metadata and error are both nil.\nfunc (op *WaitOperation) Metadata() (*genprotopb.WaitMetadata, error) {\n\tvar meta genprotopb.WaitMetadata\n\tif err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {\n\t\treturn nil, nil\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\treturn &meta, nil\n}\n\n// Done reports whether the long-running operation has completed.\nfunc (op *WaitOperation) Done() bool {\n\treturn op.lro.Done()\n}\n\n// Name returns the name of the long-running operation.\n// The name is assigned by the server and is unique within the service from which the operation is created.\nfunc (op *WaitOperation) Name() string {\n\treturn op.lro.Name()\n}\n\n// BlurbIterator manages a stream of *genprotopb.Blurb.\ntype BlurbIterator struct {\n\titems    []*genprotopb.Blurb\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Blurb, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *BlurbIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *BlurbIterator) Next() (*genprotopb.Blurb, error) {\n\tvar item *genprotopb.Blurb\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *BlurbIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *BlurbIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// EchoResponseIterator manages a stream of *genprotopb.EchoResponse.\ntype EchoResponseIterator struct {\n\titems    []*genprotopb.EchoResponse\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.EchoResponse, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *EchoResponseIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *EchoResponseIterator) Next() (*genprotopb.EchoResponse, error) {\n\tvar item *genprotopb.EchoResponse\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *EchoResponseIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *EchoResponseIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// LocationIterator manages a stream of *locationpb.Location.\ntype LocationIterator struct {\n\titems    []*locationpb.Location\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *LocationIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *LocationIterator) Next() (*locationpb.Location, error) {\n\tvar item *locationpb.Location\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *LocationIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *LocationIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// OperationIterator manages a stream of *longrunningpb.Operation.\ntype OperationIterator struct {\n\titems    []*longrunningpb.Operation\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *OperationIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *OperationIterator) Next() (*longrunningpb.Operation, error) {\n\tvar item *longrunningpb.Operation\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *OperationIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *OperationIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// PagedExpandResponseListPair is a holder type for string/*genprotopb.PagedExpandResponseList map entries\ntype PagedExpandResponseListPair struct {\n\tKey   string\n\tValue *genprotopb.PagedExpandResponseList\n}\n\n// PagedExpandResponseListPairIterator manages a stream of PagedExpandResponseListPair.\ntype PagedExpandResponseListPairIterator struct {\n\titems    []PagedExpandResponseListPair\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []PagedExpandResponseListPair, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *PagedExpandResponseListPairIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *PagedExpandResponseListPairIterator) Next() (PagedExpandResponseListPair, error) {\n\tvar item PagedExpandResponseListPair\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *PagedExpandResponseListPairIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *PagedExpandResponseListPairIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// RoomIterator manages a stream of *genprotopb.Room.\ntype RoomIterator struct {\n\titems    []*genprotopb.Room\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Room, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *RoomIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *RoomIterator) Next() (*genprotopb.Room, error) {\n\tvar item *genprotopb.Room\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *RoomIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *RoomIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// SessionIterator manages a stream of *genprotopb.Session.\ntype SessionIterator struct {\n\titems    []*genprotopb.Session\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Session, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *SessionIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *SessionIterator) Next() (*genprotopb.Session, error) {\n\tvar item *genprotopb.Session\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *SessionIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *SessionIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// TestIterator manages a stream of *genprotopb.Test.\ntype TestIterator struct {\n\titems    []*genprotopb.Test\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Test, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *TestIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *TestIterator) Next() (*genprotopb.Test, error) {\n\tvar item *genprotopb.Test\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *TestIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *TestIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n\n// UserIterator manages a stream of *genprotopb.User.\ntype UserIterator struct {\n\titems    []*genprotopb.User\n\tpageInfo *iterator.PageInfo\n\tnextFunc func() error\n\n\t// Response is the raw response for the current page.\n\t// It must be cast to the RPC response type.\n\t// Calling Next() or InternalFetch() updates this value.\n\tResponse interface{}\n\n\t// InternalFetch is for use by the Google Cloud Libraries only.\n\t// It is not part of the stable interface of this package.\n\t//\n\t// InternalFetch returns results from a single call to the underlying RPC.\n\t// The number of results is no greater than pageSize.\n\t// If there are no more results, nextPageToken is empty and err is nil.\n\tInternalFetch func(pageSize int, pageToken string) (results []*genprotopb.User, nextPageToken string, err error)\n}\n\n// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.\nfunc (it *UserIterator) PageInfo() *iterator.PageInfo {\n\treturn it.pageInfo\n}\n\n// Next returns the next result. Its second return value is iterator.Done if there are no more\n// results. Once Next returns Done, all subsequent calls will return Done.\nfunc (it *UserIterator) Next() (*genprotopb.User, error) {\n\tvar item *genprotopb.User\n\tif err := it.nextFunc(); err != nil {\n\t\treturn item, err\n\t}\n\titem = it.items[0]\n\tit.items = it.items[1:]\n\treturn item, nil\n}\n\nfunc (it *UserIterator) bufLen() int {\n\treturn len(it.items)\n}\n\nfunc (it *UserIterator) takeBuf() interface{} {\n\tb := it.items\n\tit.items = nil\n\treturn b\n}\n"
  },
  {
    "path": "client/auxiliary_go123.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client\n\nimport (\n\t\"iter\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gax-go/v2/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *BlurbIterator) All() iter.Seq2[*genprotopb.Blurb, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *EchoResponseIterator) All() iter.Seq2[*genprotopb.EchoResponse, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *PagedExpandResponseListPairIterator) All() iter.Seq2[PagedExpandResponseListPair, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *RoomIterator) All() iter.Seq2[*genprotopb.Room, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *SessionIterator) All() iter.Seq2[*genprotopb.Session, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *TestIterator) All() iter.Seq2[*genprotopb.Test, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n\n// All returns an iterator. If an error is returned by the iterator, the\n// iterator will stop after that iteration.\nfunc (it *UserIterator) All() iter.Seq2[*genprotopb.User, error] {\n\treturn iterator.RangeAdapter(it.Next)\n}\n"
  },
  {
    "path": "client/compliance_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newComplianceClientHook clientHook\n\n// ComplianceCallOptions contains the retry settings for each method of ComplianceClient.\ntype ComplianceCallOptions struct {\n\tRepeatDataBody                 []gax.CallOption\n\tRepeatDataBodyInfo             []gax.CallOption\n\tRepeatDataQuery                []gax.CallOption\n\tRepeatDataSimplePath           []gax.CallOption\n\tRepeatDataPathResource         []gax.CallOption\n\tRepeatDataPathTrailingResource []gax.CallOption\n\tRepeatDataBodyPut              []gax.CallOption\n\tRepeatDataBodyPatch            []gax.CallOption\n\tGetEnum                        []gax.CallOption\n\tVerifyEnum                     []gax.CallOption\n\tListLocations                  []gax.CallOption\n\tGetLocation                    []gax.CallOption\n\tSetIamPolicy                   []gax.CallOption\n\tGetIamPolicy                   []gax.CallOption\n\tTestIamPermissions             []gax.CallOption\n\tListOperations                 []gax.CallOption\n\tGetOperation                   []gax.CallOption\n\tDeleteOperation                []gax.CallOption\n\tCancelOperation                []gax.CallOption\n}\n\nfunc defaultComplianceGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultComplianceCallOptions() *ComplianceCallOptions {\n\treturn &ComplianceCallOptions{\n\t\tRepeatDataBody:                 []gax.CallOption{},\n\t\tRepeatDataBodyInfo:             []gax.CallOption{},\n\t\tRepeatDataQuery:                []gax.CallOption{},\n\t\tRepeatDataSimplePath:           []gax.CallOption{},\n\t\tRepeatDataPathResource:         []gax.CallOption{},\n\t\tRepeatDataPathTrailingResource: []gax.CallOption{},\n\t\tRepeatDataBodyPut:              []gax.CallOption{},\n\t\tRepeatDataBodyPatch:            []gax.CallOption{},\n\t\tGetEnum:                        []gax.CallOption{},\n\t\tVerifyEnum:                     []gax.CallOption{},\n\t\tListLocations:                  []gax.CallOption{},\n\t\tGetLocation:                    []gax.CallOption{},\n\t\tSetIamPolicy:                   []gax.CallOption{},\n\t\tGetIamPolicy:                   []gax.CallOption{},\n\t\tTestIamPermissions:             []gax.CallOption{},\n\t\tListOperations:                 []gax.CallOption{},\n\t\tGetOperation:                   []gax.CallOption{},\n\t\tDeleteOperation:                []gax.CallOption{},\n\t\tCancelOperation:                []gax.CallOption{},\n\t}\n}\n\nfunc defaultComplianceRESTCallOptions() *ComplianceCallOptions {\n\treturn &ComplianceCallOptions{\n\t\tRepeatDataBody:                 []gax.CallOption{},\n\t\tRepeatDataBodyInfo:             []gax.CallOption{},\n\t\tRepeatDataQuery:                []gax.CallOption{},\n\t\tRepeatDataSimplePath:           []gax.CallOption{},\n\t\tRepeatDataPathResource:         []gax.CallOption{},\n\t\tRepeatDataPathTrailingResource: []gax.CallOption{},\n\t\tRepeatDataBodyPut:              []gax.CallOption{},\n\t\tRepeatDataBodyPatch:            []gax.CallOption{},\n\t\tGetEnum:                        []gax.CallOption{},\n\t\tVerifyEnum:                     []gax.CallOption{},\n\t\tListLocations:                  []gax.CallOption{},\n\t\tGetLocation:                    []gax.CallOption{},\n\t\tSetIamPolicy:                   []gax.CallOption{},\n\t\tGetIamPolicy:                   []gax.CallOption{},\n\t\tTestIamPermissions:             []gax.CallOption{},\n\t\tListOperations:                 []gax.CallOption{},\n\t\tGetOperation:                   []gax.CallOption{},\n\t\tDeleteOperation:                []gax.CallOption{},\n\t\tCancelOperation:                []gax.CallOption{},\n\t}\n}\n\n// internalComplianceClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalComplianceClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tRepeatDataBody(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataBodyInfo(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataQuery(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataSimplePath(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataPathResource(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataPathTrailingResource(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataBodyPut(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tRepeatDataBodyPatch(context.Context, *genprotopb.RepeatRequest, ...gax.CallOption) (*genprotopb.RepeatResponse, error)\n\tGetEnum(context.Context, *genprotopb.EnumRequest, ...gax.CallOption) (*genprotopb.EnumResponse, error)\n\tVerifyEnum(context.Context, *genprotopb.EnumResponse, ...gax.CallOption) (*genprotopb.EnumResponse, error)\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// ComplianceClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST format\n// correctly for various types of HTTP annotations, but it also includes verifying that unknown (numeric) enums received by clients can be round-tripped\n// correctly.\ntype ComplianceClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalComplianceClient\n\n\t// The call options for this service.\n\tCallOptions *ComplianceCallOptions\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *ComplianceClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *ComplianceClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *ComplianceClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// RepeatDataBody this method echoes the ComplianceData request. This method exercises\n// sending the entire request object in the REST body.\nfunc (c *ComplianceClient) RepeatDataBody(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataBody(ctx, req, opts...)\n}\n\n// RepeatDataBodyInfo this method echoes the ComplianceData request. This method exercises\n// sending the a message-type field in the REST body. Per AIP-127, only\n// top-level, non-repeated fields can be sent this way.\nfunc (c *ComplianceClient) RepeatDataBodyInfo(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataBodyInfo(ctx, req, opts...)\n}\n\n// RepeatDataQuery this method echoes the ComplianceData request. This method exercises\n// sending all request fields as query parameters.\nfunc (c *ComplianceClient) RepeatDataQuery(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataQuery(ctx, req, opts...)\n}\n\n// RepeatDataSimplePath this method echoes the ComplianceData request. This method exercises\n// sending some parameters as “simple” path variables (i.e., of the form\n// “/bar/{foo}” rather than “/{foo=bar/*}”), and the rest as query parameters.\nfunc (c *ComplianceClient) RepeatDataSimplePath(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataSimplePath(ctx, req, opts...)\n}\n\n// RepeatDataPathResource same as RepeatDataSimplePath, but with a path resource.\nfunc (c *ComplianceClient) RepeatDataPathResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataPathResource(ctx, req, opts...)\n}\n\n// RepeatDataPathTrailingResource same as RepeatDataSimplePath, but with a trailing resource.\nfunc (c *ComplianceClient) RepeatDataPathTrailingResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataPathTrailingResource(ctx, req, opts...)\n}\n\n// RepeatDataBodyPut this method echoes the ComplianceData request, using the HTTP PUT method.\nfunc (c *ComplianceClient) RepeatDataBodyPut(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataBodyPut(ctx, req, opts...)\n}\n\n// RepeatDataBodyPatch this method echoes the ComplianceData request, using the HTTP PATCH method.\nfunc (c *ComplianceClient) RepeatDataBodyPatch(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\treturn c.internalClient.RepeatDataBodyPatch(ctx, req, opts...)\n}\n\n// GetEnum this method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the\n// .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the\n// response from this RPC as the request to VerifyEnum()\n//\n// The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for\n// VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.\nfunc (c *ComplianceClient) GetEnum(ctx context.Context, req *genprotopb.EnumRequest, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\treturn c.internalClient.GetEnum(ctx, req, opts...)\n}\n\n// VerifyEnum this method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()\n// verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds\n// with the same EnumResponse; otherwise, the RPC errors.\n//\n// This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,\n// although they are not guaranteed to be the same across separate Showcase server runs.\nfunc (c *ComplianceClient) VerifyEnum(ctx context.Context, req *genprotopb.EnumResponse, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\treturn c.internalClient.VerifyEnum(ctx, req, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *ComplianceClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *ComplianceClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *ComplianceClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *ComplianceClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *ComplianceClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *ComplianceClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *ComplianceClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *ComplianceClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *ComplianceClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// complianceGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype complianceGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing ComplianceClient\n\tCallOptions **ComplianceCallOptions\n\n\t// The gRPC API client.\n\tcomplianceClient genprotopb.ComplianceClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewComplianceClient creates a new compliance client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST format\n// correctly for various types of HTTP annotations, but it also includes verifying that unknown (numeric) enums received by clients can be round-tripped\n// correctly.\nfunc NewComplianceClient(ctx context.Context, opts ...option.ClientOption) (*ComplianceClient, error) {\n\tclientOpts := defaultComplianceGRPCClientOptions()\n\tif newComplianceClientHook != nil {\n\t\thookOpts, err := newComplianceClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := ComplianceClient{CallOptions: defaultComplianceCallOptions()}\n\n\tc := &complianceGRPCClient{\n\t\tconnPool:         connPool,\n\t\tcomplianceClient: genprotopb.NewComplianceClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *complianceGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *complianceGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *complianceGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype complianceRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing ComplianceClient\n\tCallOptions **ComplianceCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewComplianceRESTClient creates a new compliance rest client.\n//\n// This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST format\n// correctly for various types of HTTP annotations, but it also includes verifying that unknown (numeric) enums received by clients can be round-tripped\n// correctly.\nfunc NewComplianceRESTClient(ctx context.Context, opts ...option.ClientOption) (*ComplianceClient, error) {\n\tclientOpts := append(defaultComplianceRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultComplianceRESTCallOptions()\n\tc := &complianceRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\treturn &ComplianceClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultComplianceRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *complianceRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *complianceRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *complianceRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *complianceGRPCClient) RepeatDataBody(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).RepeatDataBody[0:len((*c.CallOptions).RepeatDataBody):len((*c.CallOptions).RepeatDataBody)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataBody, req, settings.GRPC, c.logger, \"RepeatDataBody\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataBodyInfo(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).RepeatDataBodyInfo[0:len((*c.CallOptions).RepeatDataBodyInfo):len((*c.CallOptions).RepeatDataBodyInfo)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataBodyInfo, req, settings.GRPC, c.logger, \"RepeatDataBodyInfo\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataQuery(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).RepeatDataQuery[0:len((*c.CallOptions).RepeatDataQuery):len((*c.CallOptions).RepeatDataQuery)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataQuery, req, settings.GRPC, c.logger, \"RepeatDataQuery\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataSimplePath(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v&%s=%v&%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_int32\", req.GetInfo().GetFInt32(), \"info.f_double\", url.QueryEscape(fmt.Sprintf(\"%g\", req.GetInfo().GetFDouble())), \"info.f_bool\", req.GetInfo().GetFBool(), \"info.f_kingdom\", genprotopb.ComplianceData_LifeKingdom_name[int32(req.GetInfo().GetFKingdom())])}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataSimplePath[0:len((*c.CallOptions).RepeatDataSimplePath):len((*c.CallOptions).RepeatDataSimplePath)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataSimplePath, req, settings.GRPC, c.logger, \"RepeatDataSimplePath\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataPathResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_child.f_string\", url.QueryEscape(req.GetInfo().GetFChild().GetFString()), \"info.f_bool\", req.GetInfo().GetFBool())}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataPathResource[0:len((*c.CallOptions).RepeatDataPathResource):len((*c.CallOptions).RepeatDataPathResource)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataPathResource, req, settings.GRPC, c.logger, \"RepeatDataPathResource\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataPathTrailingResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_child.f_string\", url.QueryEscape(req.GetInfo().GetFChild().GetFString()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataPathTrailingResource[0:len((*c.CallOptions).RepeatDataPathTrailingResource):len((*c.CallOptions).RepeatDataPathTrailingResource)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataPathTrailingResource, req, settings.GRPC, c.logger, \"RepeatDataPathTrailingResource\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataBodyPut(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).RepeatDataBodyPut[0:len((*c.CallOptions).RepeatDataBodyPut):len((*c.CallOptions).RepeatDataBodyPut)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataBodyPut, req, settings.GRPC, c.logger, \"RepeatDataBodyPut\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) RepeatDataBodyPatch(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).RepeatDataBodyPatch[0:len((*c.CallOptions).RepeatDataBodyPatch):len((*c.CallOptions).RepeatDataBodyPatch)], opts...)\n\tvar resp *genprotopb.RepeatResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.RepeatDataBodyPatch, req, settings.GRPC, c.logger, \"RepeatDataBodyPatch\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) GetEnum(ctx context.Context, req *genprotopb.EnumRequest, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).GetEnum[0:len((*c.CallOptions).GetEnum):len((*c.CallOptions).GetEnum)], opts...)\n\tvar resp *genprotopb.EnumResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.GetEnum, req, settings.GRPC, c.logger, \"GetEnum\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) VerifyEnum(ctx context.Context, req *genprotopb.EnumResponse, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).VerifyEnum[0:len((*c.CallOptions).VerifyEnum):len((*c.CallOptions).VerifyEnum)], opts...)\n\tvar resp *genprotopb.EnumResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.complianceClient.VerifyEnum, req, settings.GRPC, c.logger, \"VerifyEnum\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *complianceGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *complianceGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *complianceGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *complianceGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// RepeatDataBody this method echoes the ComplianceData request. This method exercises\n// sending the entire request object in the REST body.\nfunc (c *complianceRESTClient) RepeatDataBody(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat:body\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataBody[0:len((*c.CallOptions).RepeatDataBody):len((*c.CallOptions).RepeatDataBody)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"RepeatDataBody\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataBodyInfo this method echoes the ComplianceData request. This method exercises\n// sending the a message-type field in the REST body. Per AIP-127, only\n// top-level, non-repeated fields can be sent this way.\nfunc (c *complianceRESTClient) RepeatDataBodyInfo(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetInfo()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat:bodyinfo\")\n\n\tparams := url.Values{}\n\tif req.GetFDouble() != 0 {\n\t\tparams.Add(\"fDouble\", fmt.Sprintf(\"%v\", req.GetFDouble()))\n\t}\n\tif req.GetFInt32() != 0 {\n\t\tparams.Add(\"fInt32\", fmt.Sprintf(\"%v\", req.GetFInt32()))\n\t}\n\tif req.GetFInt64() != 0 {\n\t\tparams.Add(\"fInt64\", fmt.Sprintf(\"%v\", req.GetFInt64()))\n\t}\n\tif req != nil && req.IntendedBindingUri != nil {\n\t\tparams.Add(\"intendedBindingUri\", fmt.Sprintf(\"%v\", req.GetIntendedBindingUri()))\n\t}\n\tif req.GetName() != \"\" {\n\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t}\n\tif req != nil && req.PDouble != nil {\n\t\tparams.Add(\"pDouble\", fmt.Sprintf(\"%v\", req.GetPDouble()))\n\t}\n\tif req != nil && req.PInt32 != nil {\n\t\tparams.Add(\"pInt32\", fmt.Sprintf(\"%v\", req.GetPInt32()))\n\t}\n\tif req != nil && req.PInt64 != nil {\n\t\tparams.Add(\"pInt64\", fmt.Sprintf(\"%v\", req.GetPInt64()))\n\t}\n\tif req.GetServerVerify() {\n\t\tparams.Add(\"serverVerify\", fmt.Sprintf(\"%v\", req.GetServerVerify()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataBodyInfo[0:len((*c.CallOptions).RepeatDataBodyInfo):len((*c.CallOptions).RepeatDataBodyInfo)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"RepeatDataBodyInfo\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataQuery this method echoes the ComplianceData request. This method exercises\n// sending all request fields as query parameters.\nfunc (c *complianceRESTClient) RepeatDataQuery(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat:query\")\n\n\tparams := url.Values{}\n\tif req.GetFDouble() != 0 {\n\t\tparams.Add(\"fDouble\", fmt.Sprintf(\"%v\", req.GetFDouble()))\n\t}\n\tif req.GetFInt32() != 0 {\n\t\tparams.Add(\"fInt32\", fmt.Sprintf(\"%v\", req.GetFInt32()))\n\t}\n\tif req.GetFInt64() != 0 {\n\t\tparams.Add(\"fInt64\", fmt.Sprintf(\"%v\", req.GetFInt64()))\n\t}\n\tif req.GetInfo().GetFBool() {\n\t\tparams.Add(\"info.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBool()))\n\t}\n\tif req.GetInfo().GetFBytes() != nil {\n\t\tparams.Add(\"info.fBytes\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBytes()))\n\t}\n\tif req.GetInfo().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.fChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PBool != nil {\n\t\tparams.Add(\"info.fChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.fChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PDouble != nil {\n\t\tparams.Add(\"info.fChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PFloat != nil {\n\t\tparams.Add(\"info.fChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PString != nil {\n\t\tparams.Add(\"info.fChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPString()))\n\t}\n\tif req.GetInfo().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFFixed32() != 0 {\n\t\tparams.Add(\"info.fFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed32()))\n\t}\n\tif req.GetInfo().GetFFixed64() != 0 {\n\t\tparams.Add(\"info.fFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed64()))\n\t}\n\tif req.GetInfo().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFInt32() != 0 {\n\t\tparams.Add(\"info.fInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt32()))\n\t}\n\tif req.GetInfo().GetFInt64() != 0 {\n\t\tparams.Add(\"info.fInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt64()))\n\t}\n\tif req.GetInfo().GetFKingdom() != 0 {\n\t\tparams.Add(\"info.fKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetFKingdom()))\n\t}\n\tif req.GetInfo().GetFSfixed32() != 0 {\n\t\tparams.Add(\"info.fSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed32()))\n\t}\n\tif req.GetInfo().GetFSfixed64() != 0 {\n\t\tparams.Add(\"info.fSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed64()))\n\t}\n\tif req.GetInfo().GetFSint32() != 0 {\n\t\tparams.Add(\"info.fSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint32()))\n\t}\n\tif req.GetInfo().GetFSint64() != 0 {\n\t\tparams.Add(\"info.fSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint64()))\n\t}\n\tif req.GetInfo().GetFString() != \"\" {\n\t\tparams.Add(\"info.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFString()))\n\t}\n\tif req.GetInfo().GetFUint32() != 0 {\n\t\tparams.Add(\"info.fUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint32()))\n\t}\n\tif req.GetInfo().GetFUint64() != 0 {\n\t\tparams.Add(\"info.fUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PBool != nil {\n\t\tparams.Add(\"info.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.pChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.pChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PBool != nil {\n\t\tparams.Add(\"info.pChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.pChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PDouble != nil {\n\t\tparams.Add(\"info.pChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PFloat != nil {\n\t\tparams.Add(\"info.pChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PString != nil {\n\t\tparams.Add(\"info.pChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PDouble != nil {\n\t\tparams.Add(\"info.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPDouble()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed32 != nil {\n\t\tparams.Add(\"info.pFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed64 != nil {\n\t\tparams.Add(\"info.pFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFloat != nil {\n\t\tparams.Add(\"info.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFloat()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt32 != nil {\n\t\tparams.Add(\"info.pInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt64 != nil {\n\t\tparams.Add(\"info.pInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PKingdom != nil {\n\t\tparams.Add(\"info.pKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetPKingdom()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed32 != nil {\n\t\tparams.Add(\"info.pSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed64 != nil {\n\t\tparams.Add(\"info.pSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint32 != nil {\n\t\tparams.Add(\"info.pSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint64 != nil {\n\t\tparams.Add(\"info.pSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PString != nil {\n\t\tparams.Add(\"info.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint32 != nil {\n\t\tparams.Add(\"info.pUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint64 != nil {\n\t\tparams.Add(\"info.pUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint64()))\n\t}\n\tif req != nil && req.IntendedBindingUri != nil {\n\t\tparams.Add(\"intendedBindingUri\", fmt.Sprintf(\"%v\", req.GetIntendedBindingUri()))\n\t}\n\tif req.GetName() != \"\" {\n\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t}\n\tif req != nil && req.PDouble != nil {\n\t\tparams.Add(\"pDouble\", fmt.Sprintf(\"%v\", req.GetPDouble()))\n\t}\n\tif req != nil && req.PInt32 != nil {\n\t\tparams.Add(\"pInt32\", fmt.Sprintf(\"%v\", req.GetPInt32()))\n\t}\n\tif req != nil && req.PInt64 != nil {\n\t\tparams.Add(\"pInt64\", fmt.Sprintf(\"%v\", req.GetPInt64()))\n\t}\n\tif req.GetServerVerify() {\n\t\tparams.Add(\"serverVerify\", fmt.Sprintf(\"%v\", req.GetServerVerify()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataQuery[0:len((*c.CallOptions).RepeatDataQuery):len((*c.CallOptions).RepeatDataQuery)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"RepeatDataQuery\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataSimplePath this method echoes the ComplianceData request. This method exercises\n// sending some parameters as “simple” path variables (i.e., of the form\n// “/bar/{foo}” rather than “/{foo=bar/*}”), and the rest as query parameters.\nfunc (c *complianceRESTClient) RepeatDataSimplePath(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat/%v/%v/%v/%v/%v:simplepath\", req.GetInfo().GetFString(), req.GetInfo().GetFInt32(), req.GetInfo().GetFDouble(), req.GetInfo().GetFBool(), req.GetInfo().GetFKingdom())\n\n\tparams := url.Values{}\n\tif req.GetFDouble() != 0 {\n\t\tparams.Add(\"fDouble\", fmt.Sprintf(\"%v\", req.GetFDouble()))\n\t}\n\tif req.GetFInt32() != 0 {\n\t\tparams.Add(\"fInt32\", fmt.Sprintf(\"%v\", req.GetFInt32()))\n\t}\n\tif req.GetFInt64() != 0 {\n\t\tparams.Add(\"fInt64\", fmt.Sprintf(\"%v\", req.GetFInt64()))\n\t}\n\tif req.GetInfo().GetFBytes() != nil {\n\t\tparams.Add(\"info.fBytes\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBytes()))\n\t}\n\tif req.GetInfo().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.fChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PBool != nil {\n\t\tparams.Add(\"info.fChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.fChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PDouble != nil {\n\t\tparams.Add(\"info.fChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PFloat != nil {\n\t\tparams.Add(\"info.fChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PString != nil {\n\t\tparams.Add(\"info.fChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPString()))\n\t}\n\tif req.GetInfo().GetFFixed32() != 0 {\n\t\tparams.Add(\"info.fFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed32()))\n\t}\n\tif req.GetInfo().GetFFixed64() != 0 {\n\t\tparams.Add(\"info.fFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed64()))\n\t}\n\tif req.GetInfo().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFInt64() != 0 {\n\t\tparams.Add(\"info.fInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt64()))\n\t}\n\tif req.GetInfo().GetFSfixed32() != 0 {\n\t\tparams.Add(\"info.fSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed32()))\n\t}\n\tif req.GetInfo().GetFSfixed64() != 0 {\n\t\tparams.Add(\"info.fSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed64()))\n\t}\n\tif req.GetInfo().GetFSint32() != 0 {\n\t\tparams.Add(\"info.fSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint32()))\n\t}\n\tif req.GetInfo().GetFSint64() != 0 {\n\t\tparams.Add(\"info.fSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint64()))\n\t}\n\tif req.GetInfo().GetFUint32() != 0 {\n\t\tparams.Add(\"info.fUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint32()))\n\t}\n\tif req.GetInfo().GetFUint64() != 0 {\n\t\tparams.Add(\"info.fUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PBool != nil {\n\t\tparams.Add(\"info.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.pChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.pChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PBool != nil {\n\t\tparams.Add(\"info.pChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.pChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PDouble != nil {\n\t\tparams.Add(\"info.pChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PFloat != nil {\n\t\tparams.Add(\"info.pChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PString != nil {\n\t\tparams.Add(\"info.pChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PDouble != nil {\n\t\tparams.Add(\"info.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPDouble()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed32 != nil {\n\t\tparams.Add(\"info.pFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed64 != nil {\n\t\tparams.Add(\"info.pFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFloat != nil {\n\t\tparams.Add(\"info.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFloat()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt32 != nil {\n\t\tparams.Add(\"info.pInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt64 != nil {\n\t\tparams.Add(\"info.pInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PKingdom != nil {\n\t\tparams.Add(\"info.pKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetPKingdom()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed32 != nil {\n\t\tparams.Add(\"info.pSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed64 != nil {\n\t\tparams.Add(\"info.pSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint32 != nil {\n\t\tparams.Add(\"info.pSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint64 != nil {\n\t\tparams.Add(\"info.pSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PString != nil {\n\t\tparams.Add(\"info.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint32 != nil {\n\t\tparams.Add(\"info.pUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint64 != nil {\n\t\tparams.Add(\"info.pUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint64()))\n\t}\n\tif req != nil && req.IntendedBindingUri != nil {\n\t\tparams.Add(\"intendedBindingUri\", fmt.Sprintf(\"%v\", req.GetIntendedBindingUri()))\n\t}\n\tif req.GetName() != \"\" {\n\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t}\n\tif req != nil && req.PDouble != nil {\n\t\tparams.Add(\"pDouble\", fmt.Sprintf(\"%v\", req.GetPDouble()))\n\t}\n\tif req != nil && req.PInt32 != nil {\n\t\tparams.Add(\"pInt32\", fmt.Sprintf(\"%v\", req.GetPInt32()))\n\t}\n\tif req != nil && req.PInt64 != nil {\n\t\tparams.Add(\"pInt64\", fmt.Sprintf(\"%v\", req.GetPInt64()))\n\t}\n\tif req.GetServerVerify() {\n\t\tparams.Add(\"serverVerify\", fmt.Sprintf(\"%v\", req.GetServerVerify()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v&%s=%v&%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_int32\", req.GetInfo().GetFInt32(), \"info.f_double\", url.QueryEscape(fmt.Sprintf(\"%g\", req.GetInfo().GetFDouble())), \"info.f_bool\", req.GetInfo().GetFBool(), \"info.f_kingdom\", genprotopb.ComplianceData_LifeKingdom_name[int32(req.GetInfo().GetFKingdom())])}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataSimplePath[0:len((*c.CallOptions).RepeatDataSimplePath):len((*c.CallOptions).RepeatDataSimplePath)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"RepeatDataSimplePath\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataPathResource same as RepeatDataSimplePath, but with a path resource.\nfunc (c *complianceRESTClient) RepeatDataPathResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat/%v/%v/bool/%v:pathresource\", req.GetInfo().GetFString(), req.GetInfo().GetFChild().GetFString(), req.GetInfo().GetFBool())\n\n\tparams := url.Values{}\n\tif req.GetFDouble() != 0 {\n\t\tparams.Add(\"fDouble\", fmt.Sprintf(\"%v\", req.GetFDouble()))\n\t}\n\tif req.GetFInt32() != 0 {\n\t\tparams.Add(\"fInt32\", fmt.Sprintf(\"%v\", req.GetFInt32()))\n\t}\n\tif req.GetFInt64() != 0 {\n\t\tparams.Add(\"fInt64\", fmt.Sprintf(\"%v\", req.GetFInt64()))\n\t}\n\tif req.GetInfo().GetFBytes() != nil {\n\t\tparams.Add(\"info.fBytes\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBytes()))\n\t}\n\tif req.GetInfo().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.fChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PBool != nil {\n\t\tparams.Add(\"info.fChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.fChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PDouble != nil {\n\t\tparams.Add(\"info.fChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PFloat != nil {\n\t\tparams.Add(\"info.fChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PString != nil {\n\t\tparams.Add(\"info.fChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPString()))\n\t}\n\tif req.GetInfo().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFFixed32() != 0 {\n\t\tparams.Add(\"info.fFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed32()))\n\t}\n\tif req.GetInfo().GetFFixed64() != 0 {\n\t\tparams.Add(\"info.fFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed64()))\n\t}\n\tif req.GetInfo().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFInt32() != 0 {\n\t\tparams.Add(\"info.fInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt32()))\n\t}\n\tif req.GetInfo().GetFInt64() != 0 {\n\t\tparams.Add(\"info.fInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt64()))\n\t}\n\tif req.GetInfo().GetFKingdom() != 0 {\n\t\tparams.Add(\"info.fKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetFKingdom()))\n\t}\n\tif req.GetInfo().GetFSfixed32() != 0 {\n\t\tparams.Add(\"info.fSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed32()))\n\t}\n\tif req.GetInfo().GetFSfixed64() != 0 {\n\t\tparams.Add(\"info.fSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed64()))\n\t}\n\tif req.GetInfo().GetFSint32() != 0 {\n\t\tparams.Add(\"info.fSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint32()))\n\t}\n\tif req.GetInfo().GetFSint64() != 0 {\n\t\tparams.Add(\"info.fSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint64()))\n\t}\n\tif req.GetInfo().GetFUint32() != 0 {\n\t\tparams.Add(\"info.fUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint32()))\n\t}\n\tif req.GetInfo().GetFUint64() != 0 {\n\t\tparams.Add(\"info.fUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PBool != nil {\n\t\tparams.Add(\"info.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.pChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.pChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PBool != nil {\n\t\tparams.Add(\"info.pChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.pChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PDouble != nil {\n\t\tparams.Add(\"info.pChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PFloat != nil {\n\t\tparams.Add(\"info.pChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PString != nil {\n\t\tparams.Add(\"info.pChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PDouble != nil {\n\t\tparams.Add(\"info.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPDouble()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed32 != nil {\n\t\tparams.Add(\"info.pFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed64 != nil {\n\t\tparams.Add(\"info.pFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFloat != nil {\n\t\tparams.Add(\"info.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFloat()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt32 != nil {\n\t\tparams.Add(\"info.pInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt64 != nil {\n\t\tparams.Add(\"info.pInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PKingdom != nil {\n\t\tparams.Add(\"info.pKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetPKingdom()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed32 != nil {\n\t\tparams.Add(\"info.pSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed64 != nil {\n\t\tparams.Add(\"info.pSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint32 != nil {\n\t\tparams.Add(\"info.pSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint64 != nil {\n\t\tparams.Add(\"info.pSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PString != nil {\n\t\tparams.Add(\"info.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint32 != nil {\n\t\tparams.Add(\"info.pUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint64 != nil {\n\t\tparams.Add(\"info.pUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint64()))\n\t}\n\tif req != nil && req.IntendedBindingUri != nil {\n\t\tparams.Add(\"intendedBindingUri\", fmt.Sprintf(\"%v\", req.GetIntendedBindingUri()))\n\t}\n\tif req.GetName() != \"\" {\n\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t}\n\tif req != nil && req.PDouble != nil {\n\t\tparams.Add(\"pDouble\", fmt.Sprintf(\"%v\", req.GetPDouble()))\n\t}\n\tif req != nil && req.PInt32 != nil {\n\t\tparams.Add(\"pInt32\", fmt.Sprintf(\"%v\", req.GetPInt32()))\n\t}\n\tif req != nil && req.PInt64 != nil {\n\t\tparams.Add(\"pInt64\", fmt.Sprintf(\"%v\", req.GetPInt64()))\n\t}\n\tif req.GetServerVerify() {\n\t\tparams.Add(\"serverVerify\", fmt.Sprintf(\"%v\", req.GetServerVerify()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_child.f_string\", url.QueryEscape(req.GetInfo().GetFChild().GetFString()), \"info.f_bool\", req.GetInfo().GetFBool())}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataPathResource[0:len((*c.CallOptions).RepeatDataPathResource):len((*c.CallOptions).RepeatDataPathResource)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"RepeatDataPathResource\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataPathTrailingResource same as RepeatDataSimplePath, but with a trailing resource.\nfunc (c *complianceRESTClient) RepeatDataPathTrailingResource(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat/%v/%v:pathtrailingresource\", req.GetInfo().GetFString(), req.GetInfo().GetFChild().GetFString())\n\n\tparams := url.Values{}\n\tif req.GetFDouble() != 0 {\n\t\tparams.Add(\"fDouble\", fmt.Sprintf(\"%v\", req.GetFDouble()))\n\t}\n\tif req.GetFInt32() != 0 {\n\t\tparams.Add(\"fInt32\", fmt.Sprintf(\"%v\", req.GetFInt32()))\n\t}\n\tif req.GetFInt64() != 0 {\n\t\tparams.Add(\"fInt64\", fmt.Sprintf(\"%v\", req.GetFInt64()))\n\t}\n\tif req.GetInfo().GetFBool() {\n\t\tparams.Add(\"info.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBool()))\n\t}\n\tif req.GetInfo().GetFBytes() != nil {\n\t\tparams.Add(\"info.fBytes\", fmt.Sprintf(\"%v\", req.GetInfo().GetFBytes()))\n\t}\n\tif req.GetInfo().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.fChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PBool != nil {\n\t\tparams.Add(\"info.fChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.fChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.fChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetFChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.fChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PDouble != nil {\n\t\tparams.Add(\"info.fChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PFloat != nil {\n\t\tparams.Add(\"info.fChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetFChild() != nil && req.GetInfo().GetFChild().PString != nil {\n\t\tparams.Add(\"info.fChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetFChild().GetPString()))\n\t}\n\tif req.GetInfo().GetFDouble() != 0 {\n\t\tparams.Add(\"info.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetFDouble()))\n\t}\n\tif req.GetInfo().GetFFixed32() != 0 {\n\t\tparams.Add(\"info.fFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed32()))\n\t}\n\tif req.GetInfo().GetFFixed64() != 0 {\n\t\tparams.Add(\"info.fFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFixed64()))\n\t}\n\tif req.GetInfo().GetFFloat() != 0 {\n\t\tparams.Add(\"info.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetFFloat()))\n\t}\n\tif req.GetInfo().GetFInt32() != 0 {\n\t\tparams.Add(\"info.fInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt32()))\n\t}\n\tif req.GetInfo().GetFInt64() != 0 {\n\t\tparams.Add(\"info.fInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFInt64()))\n\t}\n\tif req.GetInfo().GetFKingdom() != 0 {\n\t\tparams.Add(\"info.fKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetFKingdom()))\n\t}\n\tif req.GetInfo().GetFSfixed32() != 0 {\n\t\tparams.Add(\"info.fSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed32()))\n\t}\n\tif req.GetInfo().GetFSfixed64() != 0 {\n\t\tparams.Add(\"info.fSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSfixed64()))\n\t}\n\tif req.GetInfo().GetFSint32() != 0 {\n\t\tparams.Add(\"info.fSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint32()))\n\t}\n\tif req.GetInfo().GetFSint64() != 0 {\n\t\tparams.Add(\"info.fSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFSint64()))\n\t}\n\tif req.GetInfo().GetFUint32() != 0 {\n\t\tparams.Add(\"info.fUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint32()))\n\t}\n\tif req.GetInfo().GetFUint64() != 0 {\n\t\tparams.Add(\"info.fUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetFUint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PBool != nil {\n\t\tparams.Add(\"info.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.fChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetFContinent() != 0 {\n\t\tparams.Add(\"info.pChild.fContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFContinent()))\n\t}\n\tif req.GetInfo().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetFFloat() != 0 {\n\t\tparams.Add(\"info.pChild.fFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFFloat()))\n\t}\n\tif req.GetInfo().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PBool != nil {\n\t\tparams.Add(\"info.pChild.pBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFBool() {\n\t\tparams.Add(\"info.pChild.pChild.fBool\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFBool()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFDouble() != 0 {\n\t\tparams.Add(\"info.pChild.pChild.fDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFDouble()))\n\t}\n\tif req.GetInfo().GetPChild().GetPChild().GetFString() != \"\" {\n\t\tparams.Add(\"info.pChild.pChild.fString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPChild().GetFString()))\n\t}\n\tif req.GetInfo().GetPChild().GetPContinent() != 0 {\n\t\tparams.Add(\"info.pChild.pContinent\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPContinent()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PDouble != nil {\n\t\tparams.Add(\"info.pChild.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPDouble()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PFloat != nil {\n\t\tparams.Add(\"info.pChild.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPFloat()))\n\t}\n\tif req.GetInfo().GetPChild() != nil && req.GetInfo().GetPChild().PString != nil {\n\t\tparams.Add(\"info.pChild.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPChild().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PDouble != nil {\n\t\tparams.Add(\"info.pDouble\", fmt.Sprintf(\"%v\", req.GetInfo().GetPDouble()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed32 != nil {\n\t\tparams.Add(\"info.pFixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFixed64 != nil {\n\t\tparams.Add(\"info.pFixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PFloat != nil {\n\t\tparams.Add(\"info.pFloat\", fmt.Sprintf(\"%v\", req.GetInfo().GetPFloat()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt32 != nil {\n\t\tparams.Add(\"info.pInt32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PInt64 != nil {\n\t\tparams.Add(\"info.pInt64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPInt64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PKingdom != nil {\n\t\tparams.Add(\"info.pKingdom\", fmt.Sprintf(\"%v\", req.GetInfo().GetPKingdom()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed32 != nil {\n\t\tparams.Add(\"info.pSfixed32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSfixed64 != nil {\n\t\tparams.Add(\"info.pSfixed64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSfixed64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint32 != nil {\n\t\tparams.Add(\"info.pSint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PSint64 != nil {\n\t\tparams.Add(\"info.pSint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPSint64()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PString != nil {\n\t\tparams.Add(\"info.pString\", fmt.Sprintf(\"%v\", req.GetInfo().GetPString()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint32 != nil {\n\t\tparams.Add(\"info.pUint32\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint32()))\n\t}\n\tif req.GetInfo() != nil && req.GetInfo().PUint64 != nil {\n\t\tparams.Add(\"info.pUint64\", fmt.Sprintf(\"%v\", req.GetInfo().GetPUint64()))\n\t}\n\tif req != nil && req.IntendedBindingUri != nil {\n\t\tparams.Add(\"intendedBindingUri\", fmt.Sprintf(\"%v\", req.GetIntendedBindingUri()))\n\t}\n\tif req.GetName() != \"\" {\n\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t}\n\tif req != nil && req.PDouble != nil {\n\t\tparams.Add(\"pDouble\", fmt.Sprintf(\"%v\", req.GetPDouble()))\n\t}\n\tif req != nil && req.PInt32 != nil {\n\t\tparams.Add(\"pInt32\", fmt.Sprintf(\"%v\", req.GetPInt32()))\n\t}\n\tif req != nil && req.PInt64 != nil {\n\t\tparams.Add(\"pInt64\", fmt.Sprintf(\"%v\", req.GetPInt64()))\n\t}\n\tif req.GetServerVerify() {\n\t\tparams.Add(\"serverVerify\", fmt.Sprintf(\"%v\", req.GetServerVerify()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v&%s=%v\", \"info.f_string\", url.QueryEscape(req.GetInfo().GetFString()), \"info.f_child.f_string\", url.QueryEscape(req.GetInfo().GetFChild().GetFString()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataPathTrailingResource[0:len((*c.CallOptions).RepeatDataPathTrailingResource):len((*c.CallOptions).RepeatDataPathTrailingResource)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"RepeatDataPathTrailingResource\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataBodyPut this method echoes the ComplianceData request, using the HTTP PUT method.\nfunc (c *complianceRESTClient) RepeatDataBodyPut(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat:bodyput\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataBodyPut[0:len((*c.CallOptions).RepeatDataBodyPut):len((*c.CallOptions).RepeatDataBodyPut)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"PUT\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"RepeatDataBodyPut\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// RepeatDataBodyPatch this method echoes the ComplianceData request, using the HTTP PATCH method.\nfunc (c *complianceRESTClient) RepeatDataBodyPatch(ctx context.Context, req *genprotopb.RepeatRequest, opts ...gax.CallOption) (*genprotopb.RepeatResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/repeat:bodypatch\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).RepeatDataBodyPatch[0:len((*c.CallOptions).RepeatDataBodyPatch):len((*c.CallOptions).RepeatDataBodyPatch)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.RepeatResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"PATCH\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"RepeatDataBodyPatch\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetEnum this method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the\n// .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the\n// response from this RPC as the request to VerifyEnum()\n//\n// The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for\n// VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.\nfunc (c *complianceRESTClient) GetEnum(ctx context.Context, req *genprotopb.EnumRequest, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/compliance/enum\")\n\n\tparams := url.Values{}\n\tif req.GetUnknownEnum() {\n\t\tparams.Add(\"unknownEnum\", fmt.Sprintf(\"%v\", req.GetUnknownEnum()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetEnum[0:len((*c.CallOptions).GetEnum):len((*c.CallOptions).GetEnum)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.EnumResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetEnum\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// VerifyEnum this method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()\n// verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds\n// with the same EnumResponse; otherwise, the RPC errors.\n//\n// This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,\n// although they are not guaranteed to be the same across separate Showcase server runs.\nfunc (c *complianceRESTClient) VerifyEnum(ctx context.Context, req *genprotopb.EnumResponse, opts ...gax.CallOption) (*genprotopb.EnumResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/compliance/enum\")\n\n\tparams := url.Values{}\n\tif req.GetContinent() != 0 {\n\t\tparams.Add(\"continent\", fmt.Sprintf(\"%v\", req.GetContinent()))\n\t}\n\tif req.GetRequest().GetUnknownEnum() {\n\t\tparams.Add(\"request.unknownEnum\", fmt.Sprintf(\"%v\", req.GetRequest().GetUnknownEnum()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).VerifyEnum[0:len((*c.CallOptions).VerifyEnum):len((*c.CallOptions).VerifyEnum)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.EnumResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"VerifyEnum\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *complianceRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *complianceRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *complianceRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *complianceRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *complianceRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *complianceRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *complianceRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *complianceRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *complianceRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n"
  },
  {
    "path": "client/compliance_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleComplianceClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleComplianceClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/compliance_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewComplianceClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewComplianceRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleComplianceClient_GetEnum() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.EnumRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumRequest.\n\t}\n\tresp, err := c.GetEnum(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataBody() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataBody(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataBodyInfo() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataBodyInfo(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataBodyPatch() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataBodyPatch(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataBodyPut() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataBodyPut(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataPathResource() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataPathResource(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataPathTrailingResource() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataPathTrailingResource(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataQuery() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataQuery(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_RepeatDataSimplePath() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.RepeatRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest.\n\t}\n\tresp, err := c.RepeatDataSimplePath(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_VerifyEnum() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.EnumResponse{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumResponse.\n\t}\n\tresp, err := c.VerifyEnum(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleComplianceClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleComplianceClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleComplianceClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleComplianceClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewComplianceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "client/doc.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n// Package client is an auto-generated package for the\n// Client Libraries Showcase API.\n//\n// Showcase represents both a model API and an integration testing surface\n// for client library generator consumption.\n//\n// # API Versions\n//\n// The versioned iterations of API service interfaces in this API client package.\n// Each client includes the API version identifier mentioned below in their API calls.\n// Navigate to the product documentation to learn more about the API versions used in this package.\n//\n// All clients in this package use version v1_20240408 of their service interface.\n//\n// # General documentation\n//\n// For information that is relevant for all client libraries please reference\n// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this\n// page includes:\n//\n//   - [Authentication and Authorization]\n//   - [Timeouts and Cancellation]\n//   - [Testing against Client Libraries]\n//   - [Debugging Client Libraries]\n//   - [Inspecting errors]\n//\n// # Example usage\n//\n// To get started with this package, create a client.\n//\n//\t// go get github.com/googleapis/gapic-showcase/client@latest\n//\tctx := context.Background()\n//\t// This snippet has been automatically generated and should be regarded as a code template only.\n//\t// It will require modifications to work:\n//\t// - It may require correct/in-range values for request initialization.\n//\t// - It may require specifying regional endpoints when creating the service client as shown in:\n//\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n//\tc, err := client.NewComplianceClient(ctx)\n//\tif err != nil {\n//\t\t// TODO: Handle error.\n//\t}\n//\tdefer c.Close()\n//\n// The client will use your default application credentials. Clients should be reused instead of created as needed.\n// The methods of Client are safe for concurrent use by multiple goroutines.\n// The returned client must be Closed when it is done being used.\n//\n// # Using the Client\n//\n// The following is an example of making an API call with the newly created client, mentioned above.\n//\n//\treq := &genprotopb.EnumRequest{\n//\t\t// TODO: Fill request struct fields.\n//\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumRequest.\n//\t}\n//\tresp, err := c.GetEnum(ctx, req)\n//\tif err != nil {\n//\t\t// TODO: Handle error.\n//\t}\n//\t// TODO: Use resp.\n//\t_ = resp\n//\n// # Use of Context\n//\n// The ctx passed to NewComplianceClient is used for authentication requests and\n// for creating the underlying connection, but is not used for subsequent calls.\n// Individual methods on the client use the ctx given to them.\n//\n// To close the open connection, use the Close() method.\n//\n// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization\n// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation\n// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing\n// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging\n// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors\npackage client // import \"github.com/googleapis/gapic-showcase/client\"\n"
  },
  {
    "path": "client/echo_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"cloud.google.com/go/longrunning\"\n\tlroauto \"cloud.google.com/go/longrunning/autogen\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/google/uuid\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newEchoClientHook clientHook\n\n// EchoCallOptions contains the retry settings for each method of EchoClient.\ntype EchoCallOptions struct {\n\tEcho                    []gax.CallOption\n\tEchoErrorDetails        []gax.CallOption\n\tFailEchoWithDetails     []gax.CallOption\n\tExpand                  []gax.CallOption\n\tCollect                 []gax.CallOption\n\tChat                    []gax.CallOption\n\tPagedExpand             []gax.CallOption\n\tPagedExpandLegacy       []gax.CallOption\n\tPagedExpandLegacyMapped []gax.CallOption\n\tWait                    []gax.CallOption\n\tBlock                   []gax.CallOption\n\tListLocations           []gax.CallOption\n\tGetLocation             []gax.CallOption\n\tSetIamPolicy            []gax.CallOption\n\tGetIamPolicy            []gax.CallOption\n\tTestIamPermissions      []gax.CallOption\n\tListOperations          []gax.CallOption\n\tGetOperation            []gax.CallOption\n\tDeleteOperation         []gax.CallOption\n\tCancelOperation         []gax.CallOption\n}\n\nfunc defaultEchoGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultEchoCallOptions() *EchoCallOptions {\n\treturn &EchoCallOptions{\n\t\tEcho: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tEchoErrorDetails: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tFailEchoWithDetails: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tExpand: []gax.CallOption{\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tCollect: []gax.CallOption{},\n\t\tChat:    []gax.CallOption{},\n\t\tPagedExpand: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tPagedExpandLegacy: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tPagedExpandLegacyMapped: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tWait: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tBlock: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\nfunc defaultEchoRESTCallOptions() *EchoCallOptions {\n\treturn &EchoCallOptions{\n\t\tEcho: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tEchoErrorDetails: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tFailEchoWithDetails: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tExpand: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tCollect: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tChat: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tPagedExpand: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tPagedExpandLegacy: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tPagedExpandLegacyMapped: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tWait: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tBlock: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\n// internalEchoClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalEchoClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tEcho(context.Context, *genprotopb.EchoRequest, ...gax.CallOption) (*genprotopb.EchoResponse, error)\n\tEchoErrorDetails(context.Context, *genprotopb.EchoErrorDetailsRequest, ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error)\n\tFailEchoWithDetails(context.Context, *genprotopb.FailEchoWithDetailsRequest, ...gax.CallOption) (*genprotopb.FailEchoWithDetailsResponse, error)\n\tExpand(context.Context, *genprotopb.ExpandRequest, ...gax.CallOption) (genprotopb.Echo_ExpandClient, error)\n\tCollect(context.Context, ...gax.CallOption) (genprotopb.Echo_CollectClient, error)\n\tChat(context.Context, ...gax.CallOption) (genprotopb.Echo_ChatClient, error)\n\tPagedExpand(context.Context, *genprotopb.PagedExpandRequest, ...gax.CallOption) *EchoResponseIterator\n\tPagedExpandLegacy(context.Context, *genprotopb.PagedExpandLegacyRequest, ...gax.CallOption) *EchoResponseIterator\n\tPagedExpandLegacyMapped(context.Context, *genprotopb.PagedExpandRequest, ...gax.CallOption) *PagedExpandResponseListPairIterator\n\tWait(context.Context, *genprotopb.WaitRequest, ...gax.CallOption) (*WaitOperation, error)\n\tWaitOperation(name string) *WaitOperation\n\tBlock(context.Context, *genprotopb.BlockRequest, ...gax.CallOption) (*genprotopb.BlockResponse, error)\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// EchoClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// This service is used showcase the four main types of rpcs - unary, server\n// side streaming, client side streaming, and bidirectional streaming. This\n// service also exposes methods that explicitly implement server delay, and\n// paginated calls. Set the ‘showcase-trailer’ metadata key on any method\n// to have the values echoed in the response trailers. Set the\n// ‘x-goog-request-params’ metadata key on any method to have the values\n// echoed in the response headers.\n//\n// This client uses Echo version v1_20240408.\ntype EchoClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalEchoClient\n\n\t// The call options for this service.\n\tCallOptions *EchoCallOptions\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient *lroauto.OperationsClient\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *EchoClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *EchoClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *EchoClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// Echo this method simply echoes the request. This method showcases unary RPCs.\nfunc (c *EchoClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, opts ...gax.CallOption) (*genprotopb.EchoResponse, error) {\n\treturn c.internalClient.Echo(ctx, req, opts...)\n}\n\n// EchoErrorDetails this method returns error details in a repeated “google.protobuf.Any”\n// field. This method showcases handling errors thus encoded, particularly\n// over REST transport. Note that GAPICs only allow the type\n// “google.protobuf.Any” for field paths ending in “error.details”, and, at\n// run-time, the actual types for these fields must be one of the types in\n// google/rpc/error_details.proto.\nfunc (c *EchoClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) {\n\treturn c.internalClient.EchoErrorDetails(ctx, req, opts...)\n}\n\n// FailEchoWithDetails this method always fails with a gRPC “Aborted” error status that contains\n// multiple error details.  These include one instance of each of the standard\n// ones in error_details.proto\n// (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto (at https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto))\n// plus a custom, Showcase-defined PoetryError. The intent of this RPC is to\n// verify that GAPICs can process these various error details and surface them\n// to the user in an idiomatic form.\nfunc (c *EchoClient) FailEchoWithDetails(ctx context.Context, req *genprotopb.FailEchoWithDetailsRequest, opts ...gax.CallOption) (*genprotopb.FailEchoWithDetailsResponse, error) {\n\treturn c.internalClient.FailEchoWithDetails(ctx, req, opts...)\n}\n\n// Expand this method splits the given content into words and will pass each word back\n// through the stream. This method showcases server-side streaming RPCs.\nfunc (c *EchoClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) {\n\treturn c.internalClient.Expand(ctx, req, opts...)\n}\n\n// Collect this method will collect the words given to it. When the stream is closed\n// by the client, this method will return the a concatenation of the strings\n// passed to it. This method showcases client-side streaming RPCs.\n//\n// This method is not supported for the REST transport.\nfunc (c *EchoClient) Collect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_CollectClient, error) {\n\treturn c.internalClient.Collect(ctx, opts...)\n}\n\n// Chat this method, upon receiving a request on the stream, will pass the same\n// content back on the stream. This method showcases bidirectional\n// streaming RPCs.\n//\n// This method is not supported for the REST transport.\nfunc (c *EchoClient) Chat(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_ChatClient, error) {\n\treturn c.internalClient.Chat(ctx, opts...)\n}\n\n// PagedExpand this is similar to the Expand method but instead of returning a stream of\n// expanded words, this method returns a paged list of expanded words.\nfunc (c *EchoClient) PagedExpand(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\treturn c.internalClient.PagedExpand(ctx, req, opts...)\n}\n\n// PagedExpandLegacy this is similar to the PagedExpand except that it uses\n// max_results instead of page_size, as some legacy APIs still\n// do. New APIs should NOT use this pattern.\nfunc (c *EchoClient) PagedExpandLegacy(ctx context.Context, req *genprotopb.PagedExpandLegacyRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\treturn c.internalClient.PagedExpandLegacy(ctx, req, opts...)\n}\n\n// PagedExpandLegacyMapped this method returns a map containing lists of words that appear in the input, keyed by their\n// initial character. The only words returned are the ones included in the current page,\n// as determined by page_token and page_size, which both refer to the word indices in the\n// input. This paging result consisting of a map of lists is a pattern used by some legacy\n// APIs. New APIs should NOT use this pattern.\nfunc (c *EchoClient) PagedExpandLegacyMapped(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *PagedExpandResponseListPairIterator {\n\treturn c.internalClient.PagedExpandLegacyMapped(ctx, req, opts...)\n}\n\n// Wait this method will wait for the requested amount of time and then return.\n// This method showcases how a client handles a request timeout.\nfunc (c *EchoClient) Wait(ctx context.Context, req *genprotopb.WaitRequest, opts ...gax.CallOption) (*WaitOperation, error) {\n\treturn c.internalClient.Wait(ctx, req, opts...)\n}\n\n// WaitOperation returns a new WaitOperation from a given name.\n// The name must be that of a previously created WaitOperation, possibly from a different process.\nfunc (c *EchoClient) WaitOperation(name string) *WaitOperation {\n\treturn c.internalClient.WaitOperation(name)\n}\n\n// Block this method will block (wait) for the requested amount of time\n// and then return the response or error.\n// This method showcases how a client handles delays or retries.\nfunc (c *EchoClient) Block(ctx context.Context, req *genprotopb.BlockRequest, opts ...gax.CallOption) (*genprotopb.BlockResponse, error) {\n\treturn c.internalClient.Block(ctx, req, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *EchoClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *EchoClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *EchoClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *EchoClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *EchoClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *EchoClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *EchoClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *EchoClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *EchoClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// echoGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype echoGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing EchoClient\n\tCallOptions **EchoCallOptions\n\n\t// The gRPC API client.\n\techoClient genprotopb.EchoClient\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient **lroauto.OperationsClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewEchoClient creates a new echo client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// This service is used showcase the four main types of rpcs - unary, server\n// side streaming, client side streaming, and bidirectional streaming. This\n// service also exposes methods that explicitly implement server delay, and\n// paginated calls. Set the ‘showcase-trailer’ metadata key on any method\n// to have the values echoed in the response trailers. Set the\n// ‘x-goog-request-params’ metadata key on any method to have the values\n// echoed in the response headers.\nfunc NewEchoClient(ctx context.Context, opts ...option.ClientOption) (*EchoClient, error) {\n\tclientOpts := defaultEchoGRPCClientOptions()\n\tif newEchoClientHook != nil {\n\t\thookOpts, err := newEchoClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := EchoClient{CallOptions: defaultEchoCallOptions()}\n\n\tc := &echoGRPCClient{\n\t\tconnPool:         connPool,\n\t\techoClient:       genprotopb.NewEchoClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\tclient.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool))\n\tif err != nil {\n\t\t// This error \"should not happen\", since we are just reusing old connection pool\n\t\t// and never actually need to dial.\n\t\t// If this does happen, we could leak connp. However, we cannot close conn:\n\t\t// If the user invoked the constructor with option.WithGRPCConn,\n\t\t// we would close a connection that's still in use.\n\t\t// TODO: investigate error conditions.\n\t\treturn nil, err\n\t}\n\tc.LROClient = &client.LROClient\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *echoGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *echoGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t\t\"x-goog-api-version\", \"v1_20240408\",\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *echoGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype echoRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient **lroauto.OperationsClient\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing EchoClient\n\tCallOptions **EchoCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewEchoRESTClient creates a new echo rest client.\n//\n// This service is used showcase the four main types of rpcs - unary, server\n// side streaming, client side streaming, and bidirectional streaming. This\n// service also exposes methods that explicitly implement server delay, and\n// paginated calls. Set the ‘showcase-trailer’ metadata key on any method\n// to have the values echoed in the response trailers. Set the\n// ‘x-goog-request-params’ metadata key on any method to have the values\n// echoed in the response headers.\nfunc NewEchoRESTClient(ctx context.Context, opts ...option.ClientOption) (*EchoClient, error) {\n\tclientOpts := append(defaultEchoRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultEchoRESTCallOptions()\n\tc := &echoRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\tlroOpts := []option.ClientOption{\n\t\toption.WithHTTPClient(httpClient),\n\t\toption.WithEndpoint(endpoint),\n\t}\n\topClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc.LROClient = &opClient\n\n\treturn &EchoClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultEchoRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *echoRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t\t\"x-goog-api-version\", \"v1_20240408\",\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *echoRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *echoRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *echoGRPCClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, opts ...gax.CallOption) (*genprotopb.EchoResponse, error) {\n\troutingHeaders := \"\"\n\troutingHeadersMap := make(map[string]string)\n\tif reg := regexp.MustCompile(\"(.*)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"header\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<routing_id>.*)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"routing_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<table_name>regions/[^/]+/zones/[^/]+(?:/.*)?)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"table_name\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<super_id>projects/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"super_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<table_name>projects/[^/]+/instances/[^/]+(?:/.*)?)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"table_name\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"projects/[^/]+/(?P<instance_id>instances/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"instance_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<baz>.*)\"); reg.MatchString(req.GetOtherHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"baz\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<qux>projects/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetOtherHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"qux\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])\n\t}\n\tfor headerName, headerValue := range routingHeadersMap {\n\t\troutingHeaders = fmt.Sprintf(\"%s%s=%s&\", routingHeaders, headerName, headerValue)\n\t}\n\troutingHeaders = strings.TrimSuffix(routingHeaders, \"&\")\n\thds := []string{\"x-goog-request-params\", routingHeaders}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\tif req != nil && req.GetRequestId() == \"\" {\n\t\treq.RequestId = uuid.NewString()\n\t}\n\tif req != nil && req.OtherRequestId == nil {\n\t\treq.OtherRequestId = proto.String(uuid.NewString())\n\t}\n\topts = append((*c.CallOptions).Echo[0:len((*c.CallOptions).Echo):len((*c.CallOptions).Echo)], opts...)\n\tvar resp *genprotopb.EchoResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.echoClient.Echo, req, settings.GRPC, c.logger, \"Echo\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).EchoErrorDetails[0:len((*c.CallOptions).EchoErrorDetails):len((*c.CallOptions).EchoErrorDetails)], opts...)\n\tvar resp *genprotopb.EchoErrorDetailsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.echoClient.EchoErrorDetails, req, settings.GRPC, c.logger, \"EchoErrorDetails\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) FailEchoWithDetails(ctx context.Context, req *genprotopb.FailEchoWithDetailsRequest, opts ...gax.CallOption) (*genprotopb.FailEchoWithDetailsResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).FailEchoWithDetails[0:len((*c.CallOptions).FailEchoWithDetails):len((*c.CallOptions).FailEchoWithDetails)], opts...)\n\tvar resp *genprotopb.FailEchoWithDetailsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.echoClient.FailEchoWithDetails, req, settings.GRPC, c.logger, \"FailEchoWithDetails\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).Expand[0:len((*c.CallOptions).Expand):len((*c.CallOptions).Expand)], opts...)\n\tvar resp genprotopb.Echo_ExpandClient\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"Expand\")\n\t\tresp, err = c.echoClient.Expand(ctx, req, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"Expand\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) Collect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_CollectClient, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\tvar resp genprotopb.Echo_CollectClient\n\topts = append((*c.CallOptions).Collect[0:len((*c.CallOptions).Collect):len((*c.CallOptions).Collect)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"Collect\")\n\t\tresp, err = c.echoClient.Collect(ctx, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"Collect\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) Chat(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_ChatClient, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\tvar resp genprotopb.Echo_ChatClient\n\topts = append((*c.CallOptions).Chat[0:len((*c.CallOptions).Chat):len((*c.CallOptions).Chat)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"Chat\")\n\t\tresp, err = c.echoClient.Chat(ctx, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"Chat\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) PagedExpand(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).PagedExpand[0:len((*c.CallOptions).PagedExpand):len((*c.CallOptions).PagedExpand)], opts...)\n\tit := &EchoResponseIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.EchoResponse, string, error) {\n\t\tresp := &genprotopb.PagedExpandResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.echoClient.PagedExpand, req, settings.GRPC, c.logger, \"PagedExpand\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetResponses(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *echoGRPCClient) PagedExpandLegacy(ctx context.Context, req *genprotopb.PagedExpandLegacyRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).PagedExpandLegacy[0:len((*c.CallOptions).PagedExpandLegacy):len((*c.CallOptions).PagedExpandLegacy)], opts...)\n\tit := &EchoResponseIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandLegacyRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.EchoResponse, string, error) {\n\t\tresp := &genprotopb.PagedExpandResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.MaxResults = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.MaxResults = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.echoClient.PagedExpandLegacy, req, settings.GRPC, c.logger, \"PagedExpandLegacy\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetResponses(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetMaxResults())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *echoGRPCClient) PagedExpandLegacyMapped(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *PagedExpandResponseListPairIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).PagedExpandLegacyMapped[0:len((*c.CallOptions).PagedExpandLegacyMapped):len((*c.CallOptions).PagedExpandLegacyMapped)], opts...)\n\tit := &PagedExpandResponseListPairIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]PagedExpandResponseListPair, string, error) {\n\t\tresp := &genprotopb.PagedExpandLegacyMappedResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.echoClient.PagedExpandLegacyMapped, req, settings.GRPC, c.logger, \"PagedExpandLegacyMapped\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\n\t\telems := make([]PagedExpandResponseListPair, 0, len(resp.GetAlphabetized()))\n\t\tfor k, v := range resp.GetAlphabetized() {\n\t\t\telems = append(elems, PagedExpandResponseListPair{k, v})\n\t\t}\n\t\tsort.Slice(elems, func(i, j int) bool { return elems[i].Key < elems[j].Key })\n\n\t\treturn elems, resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *echoGRPCClient) Wait(ctx context.Context, req *genprotopb.WaitRequest, opts ...gax.CallOption) (*WaitOperation, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).Wait[0:len((*c.CallOptions).Wait):len((*c.CallOptions).Wait)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.echoClient.Wait, req, settings.GRPC, c.logger, \"Wait\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &WaitOperation{\n\t\tlro: longrunning.InternalNewOperation(*c.LROClient, resp),\n\t}, nil\n}\n\nfunc (c *echoGRPCClient) Block(ctx context.Context, req *genprotopb.BlockRequest, opts ...gax.CallOption) (*genprotopb.BlockResponse, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).Block[0:len((*c.CallOptions).Block):len((*c.CallOptions).Block)], opts...)\n\tvar resp *genprotopb.BlockResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.echoClient.Block, req, settings.GRPC, c.logger, \"Block\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *echoGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *echoGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *echoGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *echoGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// Echo this method simply echoes the request. This method showcases unary RPCs.\nfunc (c *echoRESTClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, opts ...gax.CallOption) (*genprotopb.EchoResponse, error) {\n\tif req != nil && req.GetRequestId() == \"\" {\n\t\treq.RequestId = uuid.NewString()\n\t}\n\tif req != nil && req.OtherRequestId == nil {\n\t\treq.OtherRequestId = proto.String(uuid.NewString())\n\t}\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:echo\")\n\n\t// Build HTTP headers from client and context metadata.\n\troutingHeaders := \"\"\n\troutingHeadersMap := make(map[string]string)\n\tif reg := regexp.MustCompile(\"(.*)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"header\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<routing_id>.*)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"routing_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<table_name>regions/[^/]+/zones/[^/]+(?:/.*)?)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"table_name\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<super_id>projects/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"super_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<table_name>projects/[^/]+/instances/[^/]+(?:/.*)?)\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"table_name\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"projects/[^/]+/(?P<instance_id>instances/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"instance_id\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<baz>.*)\"); reg.MatchString(req.GetOtherHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"baz\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])\n\t}\n\tif reg := regexp.MustCompile(\"(?P<qux>projects/[^/]+)(?:/.*)?\"); reg.MatchString(req.GetOtherHeader()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])) > 0 {\n\t\troutingHeadersMap[\"qux\"] = url.QueryEscape(reg.FindStringSubmatch(req.GetOtherHeader())[1])\n\t}\n\tfor headerName, headerValue := range routingHeadersMap {\n\t\troutingHeaders = fmt.Sprintf(\"%s%s=%s&\", routingHeaders, headerName, headerValue)\n\t}\n\troutingHeaders = strings.TrimSuffix(routingHeaders, \"&\")\n\thds := []string{\"x-goog-request-params\", routingHeaders}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).Echo[0:len((*c.CallOptions).Echo):len((*c.CallOptions).Echo)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.EchoResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"Echo\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// EchoErrorDetails this method returns error details in a repeated “google.protobuf.Any”\n// field. This method showcases handling errors thus encoded, particularly\n// over REST transport. Note that GAPICs only allow the type\n// “google.protobuf.Any” for field paths ending in “error.details”, and, at\n// run-time, the actual types for these fields must be one of the types in\n// google/rpc/error_details.proto.\nfunc (c *echoRESTClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:error-details\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).EchoErrorDetails[0:len((*c.CallOptions).EchoErrorDetails):len((*c.CallOptions).EchoErrorDetails)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.EchoErrorDetailsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"EchoErrorDetails\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// FailEchoWithDetails this method always fails with a gRPC “Aborted” error status that contains\n// multiple error details.  These include one instance of each of the standard\n// ones in error_details.proto\n// (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto (at https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto))\n// plus a custom, Showcase-defined PoetryError. The intent of this RPC is to\n// verify that GAPICs can process these various error details and surface them\n// to the user in an idiomatic form.\nfunc (c *echoRESTClient) FailEchoWithDetails(ctx context.Context, req *genprotopb.FailEchoWithDetailsRequest, opts ...gax.CallOption) (*genprotopb.FailEchoWithDetailsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:failWithDetails\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).FailEchoWithDetails[0:len((*c.CallOptions).FailEchoWithDetails):len((*c.CallOptions).FailEchoWithDetails)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.FailEchoWithDetailsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"FailEchoWithDetails\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// Expand this method splits the given content into words and will pass each word back\n// through the stream. This method showcases server-side streaming RPCs.\nfunc (c *echoRESTClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:expand\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\tvar streamClient *expandRESTStreamClient\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\thttpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"Expand\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tstreamClient = &expandRESTStreamClient{\n\t\t\tctx:    ctx,\n\t\t\tmd:     metadata.MD(httpRsp.Header),\n\t\t\tstream: gax.NewProtoJSONStreamReader(httpRsp.Body, (&genprotopb.EchoResponse{}).ProtoReflect().Type()),\n\t\t}\n\t\treturn nil\n\t}, opts...)\n\n\treturn streamClient, e\n}\n\n// expandRESTStreamClient is the stream client used to consume the server stream created by\n// the REST implementation of Expand.\ntype expandRESTStreamClient struct {\n\tctx    context.Context\n\tmd     metadata.MD\n\tstream *gax.ProtoJSONStream\n}\n\nfunc (c *expandRESTStreamClient) Recv() (*genprotopb.EchoResponse, error) {\n\tif err := c.ctx.Err(); err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tmsg, err := c.stream.Recv()\n\tif err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tres := msg.(*genprotopb.EchoResponse)\n\treturn res, nil\n}\n\nfunc (c *expandRESTStreamClient) Header() (metadata.MD, error) {\n\treturn c.md, nil\n}\n\nfunc (c *expandRESTStreamClient) Trailer() metadata.MD {\n\treturn c.md\n}\n\nfunc (c *expandRESTStreamClient) CloseSend() error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *expandRESTStreamClient) Context() context.Context {\n\treturn c.ctx\n}\n\nfunc (c *expandRESTStreamClient) SendMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *expandRESTStreamClient) RecvMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented, use Recv\")\n}\n\n// Collect this method will collect the words given to it. When the stream is closed\n// by the client, this method will return the a concatenation of the strings\n// passed to it. This method showcases client-side streaming RPCs.\n//\n// This method is not supported for the REST transport.\nfunc (c *echoRESTClient) Collect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_CollectClient, error) {\n\treturn nil, errors.New(\"Collect not yet supported for REST clients\")\n}\n\n// Chat this method, upon receiving a request on the stream, will pass the same\n// content back on the stream. This method showcases bidirectional\n// streaming RPCs.\n//\n// This method is not supported for the REST transport.\nfunc (c *echoRESTClient) Chat(ctx context.Context, opts ...gax.CallOption) (genprotopb.Echo_ChatClient, error) {\n\treturn nil, errors.New(\"Chat not yet supported for REST clients\")\n}\n\n// PagedExpand this is similar to the Expand method but instead of returning a stream of\n// expanded words, this method returns a paged list of expanded words.\nfunc (c *echoRESTClient) PagedExpand(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\tit := &EchoResponseIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandRequest)\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.EchoResponse, string, error) {\n\t\tresp := &genprotopb.PagedExpandResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tjsonReq, err := m.Marshal(req)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:pagedExpand\")\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"PagedExpand\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetResponses(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// PagedExpandLegacy this is similar to the PagedExpand except that it uses\n// max_results instead of page_size, as some legacy APIs still\n// do. New APIs should NOT use this pattern.\nfunc (c *echoRESTClient) PagedExpandLegacy(ctx context.Context, req *genprotopb.PagedExpandLegacyRequest, opts ...gax.CallOption) *EchoResponseIterator {\n\tit := &EchoResponseIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandLegacyRequest)\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.EchoResponse, string, error) {\n\t\tresp := &genprotopb.PagedExpandResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.MaxResults = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.MaxResults = int32(pageSize)\n\t\t}\n\t\tjsonReq, err := m.Marshal(req)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:pagedExpandLegacy\")\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"PagedExpandLegacy\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetResponses(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetMaxResults())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// PagedExpandLegacyMapped this method returns a map containing lists of words that appear in the input, keyed by their\n// initial character. The only words returned are the ones included in the current page,\n// as determined by page_token and page_size, which both refer to the word indices in the\n// input. This paging result consisting of a map of lists is a pattern used by some legacy\n// APIs. New APIs should NOT use this pattern.\nfunc (c *echoRESTClient) PagedExpandLegacyMapped(ctx context.Context, req *genprotopb.PagedExpandRequest, opts ...gax.CallOption) *PagedExpandResponseListPairIterator {\n\tit := &PagedExpandResponseListPairIterator{}\n\treq = proto.Clone(req).(*genprotopb.PagedExpandRequest)\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]PagedExpandResponseListPair, string, error) {\n\t\tresp := &genprotopb.PagedExpandLegacyMappedResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tjsonReq, err := m.Marshal(req)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:pagedExpandLegacyMapped\")\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"PagedExpandLegacyMapped\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\n\t\telems := make([]PagedExpandResponseListPair, 0, len(resp.GetAlphabetized()))\n\t\tfor k, v := range resp.GetAlphabetized() {\n\t\t\telems = append(elems, PagedExpandResponseListPair{k, v})\n\t\t}\n\t\tsort.Slice(elems, func(i, j int) bool { return elems[i].Key < elems[j].Key })\n\n\t\treturn elems, resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// Wait this method will wait for the requested amount of time and then return.\n// This method showcases how a client handles a request timeout.\nfunc (c *echoRESTClient) Wait(ctx context.Context, req *genprotopb.WaitRequest, opts ...gax.CallOption) (*WaitOperation, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:wait\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"Wait\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\n\toverride := fmt.Sprintf(\"/v1beta1/%s\", resp.GetName())\n\treturn &WaitOperation{\n\t\tlro:      longrunning.InternalNewOperation(*c.LROClient, resp),\n\t\tpollPath: override,\n\t}, nil\n}\n\n// Block this method will block (wait) for the requested amount of time\n// and then return the response or error.\n// This method showcases how a client handles delays or retries.\nfunc (c *echoRESTClient) Block(ctx context.Context, req *genprotopb.BlockRequest, opts ...gax.CallOption) (*genprotopb.BlockResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/echo:block\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).Block[0:len((*c.CallOptions).Block):len((*c.CallOptions).Block)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.BlockResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"Block\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *echoRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *echoRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *echoRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *echoRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *echoRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *echoRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *echoRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *echoRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *echoRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// WaitOperation returns a new WaitOperation from a given name.\n// The name must be that of a previously created WaitOperation, possibly from a different process.\nfunc (c *echoGRPCClient) WaitOperation(name string) *WaitOperation {\n\treturn &WaitOperation{\n\t\tlro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),\n\t}\n}\n\n// WaitOperation returns a new WaitOperation from a given name.\n// The name must be that of a previously created WaitOperation, possibly from a different process.\nfunc (c *echoRESTClient) WaitOperation(name string) *WaitOperation {\n\toverride := fmt.Sprintf(\"/v1beta1/%s\", name)\n\treturn &WaitOperation{\n\t\tlro:      longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),\n\t\tpollPath: override,\n\t}\n}\n"
  },
  {
    "path": "client/echo_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleEchoClient_PagedExpand_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandRequest.\n\t}\n\tfor resp, err := range c.PagedExpand(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleEchoClient_PagedExpandLegacy_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandLegacyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandLegacyRequest.\n\t}\n\tfor resp, err := range c.PagedExpandLegacy(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleEchoClient_PagedExpandLegacyMapped_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandRequest.\n\t}\n\tfor resp, err := range c.PagedExpandLegacyMapped(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleEchoClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleEchoClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/echo_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\t\"io\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewEchoClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewEchoRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleEchoClient_Block() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.BlockRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#BlockRequest.\n\t}\n\tresp, err := c.Block(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_Chat() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\tstream, err := c.Chat(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tgo func() {\n\t\treqs := []*genprotopb.EchoRequest{\n\t\t\t// TODO: Create requests.\n\t\t}\n\t\tfor _, req := range reqs {\n\t\t\tif err := stream.Send(req); err != nil {\n\t\t\t\t// TODO: Handle error.\n\t\t\t}\n\t\t}\n\t\tstream.CloseSend()\n\t}()\n\tfor {\n\t\tresp, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleEchoClient_Echo() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.EchoRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EchoRequest.\n\t}\n\tresp, err := c.Echo(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_EchoErrorDetails() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.EchoErrorDetailsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EchoErrorDetailsRequest.\n\t}\n\tresp, err := c.EchoErrorDetails(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_FailEchoWithDetails() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.FailEchoWithDetailsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#FailEchoWithDetailsRequest.\n\t}\n\tresp, err := c.FailEchoWithDetails(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_PagedExpand() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandRequest.\n\t}\n\tit := c.PagedExpand(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.PagedExpandResponse)\n\t}\n}\n\nfunc ExampleEchoClient_PagedExpandLegacy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandLegacyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandLegacyRequest.\n\t}\n\tit := c.PagedExpandLegacy(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.PagedExpandResponse)\n\t}\n}\n\nfunc ExampleEchoClient_PagedExpandLegacyMapped() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.PagedExpandRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#PagedExpandRequest.\n\t}\n\tit := c.PagedExpandLegacyMapped(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.PagedExpandLegacyMappedResponse)\n\t}\n}\n\nfunc ExampleEchoClient_Wait() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.WaitRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#WaitRequest.\n\t}\n\top, err := c.Wait(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\n\tresp, err := op.Wait(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleEchoClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleEchoClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleEchoClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleEchoClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewEchoClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "client/gapic_metadata.json",
    "content": "{\n  \"schema\": \"1.0\",\n  \"comment\": \"This file maps proto services/RPCs to the corresponding library clients/methods.\",\n  \"language\": \"go\",\n  \"protoPackage\": \"google.showcase.v1beta1\",\n  \"libraryPackage\": \"github.com/googleapis/gapic-showcase/client\",\n  \"services\": {\n    \"Compliance\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"ComplianceClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"GetEnum\": {\n              \"methods\": [\n                \"GetEnum\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"RepeatDataBody\": {\n              \"methods\": [\n                \"RepeatDataBody\"\n              ]\n            },\n            \"RepeatDataBodyInfo\": {\n              \"methods\": [\n                \"RepeatDataBodyInfo\"\n              ]\n            },\n            \"RepeatDataBodyPatch\": {\n              \"methods\": [\n                \"RepeatDataBodyPatch\"\n              ]\n            },\n            \"RepeatDataBodyPut\": {\n              \"methods\": [\n                \"RepeatDataBodyPut\"\n              ]\n            },\n            \"RepeatDataPathResource\": {\n              \"methods\": [\n                \"RepeatDataPathResource\"\n              ]\n            },\n            \"RepeatDataPathTrailingResource\": {\n              \"methods\": [\n                \"RepeatDataPathTrailingResource\"\n              ]\n            },\n            \"RepeatDataQuery\": {\n              \"methods\": [\n                \"RepeatDataQuery\"\n              ]\n            },\n            \"RepeatDataSimplePath\": {\n              \"methods\": [\n                \"RepeatDataSimplePath\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"VerifyEnum\": {\n              \"methods\": [\n                \"VerifyEnum\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"ComplianceClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"GetEnum\": {\n              \"methods\": [\n                \"GetEnum\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"RepeatDataBody\": {\n              \"methods\": [\n                \"RepeatDataBody\"\n              ]\n            },\n            \"RepeatDataBodyInfo\": {\n              \"methods\": [\n                \"RepeatDataBodyInfo\"\n              ]\n            },\n            \"RepeatDataBodyPatch\": {\n              \"methods\": [\n                \"RepeatDataBodyPatch\"\n              ]\n            },\n            \"RepeatDataBodyPut\": {\n              \"methods\": [\n                \"RepeatDataBodyPut\"\n              ]\n            },\n            \"RepeatDataPathResource\": {\n              \"methods\": [\n                \"RepeatDataPathResource\"\n              ]\n            },\n            \"RepeatDataPathTrailingResource\": {\n              \"methods\": [\n                \"RepeatDataPathTrailingResource\"\n              ]\n            },\n            \"RepeatDataQuery\": {\n              \"methods\": [\n                \"RepeatDataQuery\"\n              ]\n            },\n            \"RepeatDataSimplePath\": {\n              \"methods\": [\n                \"RepeatDataSimplePath\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"VerifyEnum\": {\n              \"methods\": [\n                \"VerifyEnum\"\n              ]\n            }\n          }\n        }\n      }\n    },\n    \"Echo\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"EchoClient\",\n          \"rpcs\": {\n            \"Block\": {\n              \"methods\": [\n                \"Block\"\n              ]\n            },\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"Chat\": {\n              \"methods\": [\n                \"Chat\"\n              ]\n            },\n            \"Collect\": {\n              \"methods\": [\n                \"Collect\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"Echo\": {\n              \"methods\": [\n                \"Echo\"\n              ]\n            },\n            \"EchoErrorDetails\": {\n              \"methods\": [\n                \"EchoErrorDetails\"\n              ]\n            },\n            \"Expand\": {\n              \"methods\": [\n                \"Expand\"\n              ]\n            },\n            \"FailEchoWithDetails\": {\n              \"methods\": [\n                \"FailEchoWithDetails\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"PagedExpand\": {\n              \"methods\": [\n                \"PagedExpand\"\n              ]\n            },\n            \"PagedExpandLegacy\": {\n              \"methods\": [\n                \"PagedExpandLegacy\"\n              ]\n            },\n            \"PagedExpandLegacyMapped\": {\n              \"methods\": [\n                \"PagedExpandLegacyMapped\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"Wait\": {\n              \"methods\": [\n                \"Wait\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"EchoClient\",\n          \"rpcs\": {\n            \"Block\": {\n              \"methods\": [\n                \"Block\"\n              ]\n            },\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"Chat\": {\n              \"methods\": [\n                \"Chat\"\n              ]\n            },\n            \"Collect\": {\n              \"methods\": [\n                \"Collect\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"Echo\": {\n              \"methods\": [\n                \"Echo\"\n              ]\n            },\n            \"EchoErrorDetails\": {\n              \"methods\": [\n                \"EchoErrorDetails\"\n              ]\n            },\n            \"Expand\": {\n              \"methods\": [\n                \"Expand\"\n              ]\n            },\n            \"FailEchoWithDetails\": {\n              \"methods\": [\n                \"FailEchoWithDetails\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"PagedExpand\": {\n              \"methods\": [\n                \"PagedExpand\"\n              ]\n            },\n            \"PagedExpandLegacy\": {\n              \"methods\": [\n                \"PagedExpandLegacy\"\n              ]\n            },\n            \"PagedExpandLegacyMapped\": {\n              \"methods\": [\n                \"PagedExpandLegacyMapped\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"Wait\": {\n              \"methods\": [\n                \"Wait\"\n              ]\n            }\n          }\n        }\n      },\n      \"apiVersion\": \"v1_20240408\"\n    },\n    \"Identity\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"IdentityClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateUser\": {\n              \"methods\": [\n                \"CreateUser\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteUser\": {\n              \"methods\": [\n                \"DeleteUser\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetUser\": {\n              \"methods\": [\n                \"GetUser\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListUsers\": {\n              \"methods\": [\n                \"ListUsers\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"UpdateUser\": {\n              \"methods\": [\n                \"UpdateUser\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"IdentityClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateUser\": {\n              \"methods\": [\n                \"CreateUser\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteUser\": {\n              \"methods\": [\n                \"DeleteUser\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetUser\": {\n              \"methods\": [\n                \"GetUser\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListUsers\": {\n              \"methods\": [\n                \"ListUsers\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"UpdateUser\": {\n              \"methods\": [\n                \"UpdateUser\"\n              ]\n            }\n          }\n        }\n      }\n    },\n    \"Messaging\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"MessagingClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"Connect\": {\n              \"methods\": [\n                \"Connect\"\n              ]\n            },\n            \"CreateBlurb\": {\n              \"methods\": [\n                \"CreateBlurb\"\n              ]\n            },\n            \"CreateRoom\": {\n              \"methods\": [\n                \"CreateRoom\"\n              ]\n            },\n            \"DeleteBlurb\": {\n              \"methods\": [\n                \"DeleteBlurb\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteRoom\": {\n              \"methods\": [\n                \"DeleteRoom\"\n              ]\n            },\n            \"GetBlurb\": {\n              \"methods\": [\n                \"GetBlurb\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetRoom\": {\n              \"methods\": [\n                \"GetRoom\"\n              ]\n            },\n            \"ListBlurbs\": {\n              \"methods\": [\n                \"ListBlurbs\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListRooms\": {\n              \"methods\": [\n                \"ListRooms\"\n              ]\n            },\n            \"SearchBlurbs\": {\n              \"methods\": [\n                \"SearchBlurbs\"\n              ]\n            },\n            \"SendBlurbs\": {\n              \"methods\": [\n                \"SendBlurbs\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"StreamBlurbs\": {\n              \"methods\": [\n                \"StreamBlurbs\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"UpdateBlurb\": {\n              \"methods\": [\n                \"UpdateBlurb\"\n              ]\n            },\n            \"UpdateRoom\": {\n              \"methods\": [\n                \"UpdateRoom\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"MessagingClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"Connect\": {\n              \"methods\": [\n                \"Connect\"\n              ]\n            },\n            \"CreateBlurb\": {\n              \"methods\": [\n                \"CreateBlurb\"\n              ]\n            },\n            \"CreateRoom\": {\n              \"methods\": [\n                \"CreateRoom\"\n              ]\n            },\n            \"DeleteBlurb\": {\n              \"methods\": [\n                \"DeleteBlurb\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteRoom\": {\n              \"methods\": [\n                \"DeleteRoom\"\n              ]\n            },\n            \"GetBlurb\": {\n              \"methods\": [\n                \"GetBlurb\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetRoom\": {\n              \"methods\": [\n                \"GetRoom\"\n              ]\n            },\n            \"ListBlurbs\": {\n              \"methods\": [\n                \"ListBlurbs\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListRooms\": {\n              \"methods\": [\n                \"ListRooms\"\n              ]\n            },\n            \"SearchBlurbs\": {\n              \"methods\": [\n                \"SearchBlurbs\"\n              ]\n            },\n            \"SendBlurbs\": {\n              \"methods\": [\n                \"SendBlurbs\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"StreamBlurbs\": {\n              \"methods\": [\n                \"StreamBlurbs\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"UpdateBlurb\": {\n              \"methods\": [\n                \"UpdateBlurb\"\n              ]\n            },\n            \"UpdateRoom\": {\n              \"methods\": [\n                \"UpdateRoom\"\n              ]\n            }\n          }\n        }\n      }\n    },\n    \"SequenceService\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"SequenceClient\",\n          \"rpcs\": {\n            \"AttemptSequence\": {\n              \"methods\": [\n                \"AttemptSequence\"\n              ]\n            },\n            \"AttemptStreamingSequence\": {\n              \"methods\": [\n                \"AttemptStreamingSequence\"\n              ]\n            },\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateSequence\": {\n              \"methods\": [\n                \"CreateSequence\"\n              ]\n            },\n            \"CreateStreamingSequence\": {\n              \"methods\": [\n                \"CreateStreamingSequence\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetSequenceReport\": {\n              \"methods\": [\n                \"GetSequenceReport\"\n              ]\n            },\n            \"GetStreamingSequenceReport\": {\n              \"methods\": [\n                \"GetStreamingSequenceReport\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"SequenceClient\",\n          \"rpcs\": {\n            \"AttemptSequence\": {\n              \"methods\": [\n                \"AttemptSequence\"\n              ]\n            },\n            \"AttemptStreamingSequence\": {\n              \"methods\": [\n                \"AttemptStreamingSequence\"\n              ]\n            },\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateSequence\": {\n              \"methods\": [\n                \"CreateSequence\"\n              ]\n            },\n            \"CreateStreamingSequence\": {\n              \"methods\": [\n                \"CreateStreamingSequence\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetSequenceReport\": {\n              \"methods\": [\n                \"GetSequenceReport\"\n              ]\n            },\n            \"GetStreamingSequenceReport\": {\n              \"methods\": [\n                \"GetStreamingSequenceReport\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            }\n          }\n        }\n      }\n    },\n    \"Testing\": {\n      \"clients\": {\n        \"grpc\": {\n          \"libraryClient\": \"TestingClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateSession\": {\n              \"methods\": [\n                \"CreateSession\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteSession\": {\n              \"methods\": [\n                \"DeleteSession\"\n              ]\n            },\n            \"DeleteTest\": {\n              \"methods\": [\n                \"DeleteTest\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetSession\": {\n              \"methods\": [\n                \"GetSession\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListSessions\": {\n              \"methods\": [\n                \"ListSessions\"\n              ]\n            },\n            \"ListTests\": {\n              \"methods\": [\n                \"ListTests\"\n              ]\n            },\n            \"ReportSession\": {\n              \"methods\": [\n                \"ReportSession\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"VerifyTest\": {\n              \"methods\": [\n                \"VerifyTest\"\n              ]\n            }\n          }\n        },\n        \"rest\": {\n          \"libraryClient\": \"TestingClient\",\n          \"rpcs\": {\n            \"CancelOperation\": {\n              \"methods\": [\n                \"CancelOperation\"\n              ]\n            },\n            \"CreateSession\": {\n              \"methods\": [\n                \"CreateSession\"\n              ]\n            },\n            \"DeleteOperation\": {\n              \"methods\": [\n                \"DeleteOperation\"\n              ]\n            },\n            \"DeleteSession\": {\n              \"methods\": [\n                \"DeleteSession\"\n              ]\n            },\n            \"DeleteTest\": {\n              \"methods\": [\n                \"DeleteTest\"\n              ]\n            },\n            \"GetIamPolicy\": {\n              \"methods\": [\n                \"GetIamPolicy\"\n              ]\n            },\n            \"GetLocation\": {\n              \"methods\": [\n                \"GetLocation\"\n              ]\n            },\n            \"GetOperation\": {\n              \"methods\": [\n                \"GetOperation\"\n              ]\n            },\n            \"GetSession\": {\n              \"methods\": [\n                \"GetSession\"\n              ]\n            },\n            \"ListLocations\": {\n              \"methods\": [\n                \"ListLocations\"\n              ]\n            },\n            \"ListOperations\": {\n              \"methods\": [\n                \"ListOperations\"\n              ]\n            },\n            \"ListSessions\": {\n              \"methods\": [\n                \"ListSessions\"\n              ]\n            },\n            \"ListTests\": {\n              \"methods\": [\n                \"ListTests\"\n              ]\n            },\n            \"ReportSession\": {\n              \"methods\": [\n                \"ReportSession\"\n              ]\n            },\n            \"SetIamPolicy\": {\n              \"methods\": [\n                \"SetIamPolicy\"\n              ]\n            },\n            \"TestIamPermissions\": {\n              \"methods\": [\n                \"TestIamPermissions\"\n              ]\n            },\n            \"VerifyTest\": {\n              \"methods\": [\n                \"VerifyTest\"\n              ]\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "client/helpers.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\n\t\"github.com/googleapis/gax-go/v2/internallog\"\n\t\"github.com/googleapis/gax-go/v2/internallog/grpclog\"\n\t\"google.golang.org/api/googleapi\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\nconst serviceName = \"showcase.googleapis.com\"\n\nvar protoVersion = fmt.Sprintf(\"1.%d\", protoimpl.MaxVersion)\n\n// For more information on implementing a client constructor hook, see\n// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors.\ntype clientHookParams struct{}\ntype clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error)\n\nvar versionClient string\n\nfunc getVersionClient() string {\n\tif versionClient == \"\" {\n\t\treturn \"UNKNOWN\"\n\t}\n\treturn versionClient\n}\n\n// DefaultAuthScopes reports the default set of authentication scopes to use with this package.\nfunc DefaultAuthScopes() []string {\n\treturn []string{}\n}\n\nfunc executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) {\n\tlogger.DebugContext(ctx, \"api request\", \"serviceName\", serviceName, \"rpcName\", rpc, \"request\", internallog.HTTPRequest(req, body))\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer resp.Body.Close()\n\tbuf, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tlogger.DebugContext(ctx, \"api response\", \"serviceName\", serviceName, \"rpcName\", rpc, \"response\", internallog.HTTPResponse(resp, buf))\n\tif err = googleapi.CheckResponseWithBody(resp, buf); err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn buf, resp, nil\n}\n\nfunc executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) {\n\tbuf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc)\n\treturn buf, err\n}\n\nfunc executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) {\n\tlogger.DebugContext(ctx, \"api request\", \"serviceName\", serviceName, \"rpcName\", rpc, \"request\", internallog.HTTPRequest(req, body))\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogger.DebugContext(ctx, \"api response\", \"serviceName\", serviceName, \"rpcName\", rpc, \"response\", internallog.HTTPResponse(resp, nil))\n\tif err = googleapi.CheckResponse(resp); err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) {\n\tvar zero O\n\tlogger.DebugContext(ctx, \"api request\", \"serviceName\", serviceName, \"rpcName\", rpc, \"request\", grpclog.ProtoMessageRequest(ctx, req))\n\tresp, err := fn(ctx, req, opts...)\n\tif err != nil {\n\t\treturn zero, err\n\t}\n\tlogger.DebugContext(ctx, \"api response\", \"serviceName\", serviceName, \"rpcName\", rpc, \"response\", grpclog.ProtoMessageResponse(resp))\n\treturn resp, err\n}\n"
  },
  {
    "path": "client/identity_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newIdentityClientHook clientHook\n\n// IdentityCallOptions contains the retry settings for each method of IdentityClient.\ntype IdentityCallOptions struct {\n\tCreateUser         []gax.CallOption\n\tGetUser            []gax.CallOption\n\tUpdateUser         []gax.CallOption\n\tDeleteUser         []gax.CallOption\n\tListUsers          []gax.CallOption\n\tListLocations      []gax.CallOption\n\tGetLocation        []gax.CallOption\n\tSetIamPolicy       []gax.CallOption\n\tGetIamPolicy       []gax.CallOption\n\tTestIamPermissions []gax.CallOption\n\tListOperations     []gax.CallOption\n\tGetOperation       []gax.CallOption\n\tDeleteOperation    []gax.CallOption\n\tCancelOperation    []gax.CallOption\n}\n\nfunc defaultIdentityGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultIdentityCallOptions() *IdentityCallOptions {\n\treturn &IdentityCallOptions{\n\t\tCreateUser: []gax.CallOption{},\n\t\tGetUser: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    200 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tUpdateUser: []gax.CallOption{},\n\t\tDeleteUser: []gax.CallOption{},\n\t\tListUsers: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    200 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\nfunc defaultIdentityRESTCallOptions() *IdentityCallOptions {\n\treturn &IdentityCallOptions{\n\t\tCreateUser: []gax.CallOption{},\n\t\tGetUser: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    200 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tUpdateUser: []gax.CallOption{},\n\t\tDeleteUser: []gax.CallOption{},\n\t\tListUsers: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    200 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\n// internalIdentityClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalIdentityClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tCreateUser(context.Context, *genprotopb.CreateUserRequest, ...gax.CallOption) (*genprotopb.User, error)\n\tGetUser(context.Context, *genprotopb.GetUserRequest, ...gax.CallOption) (*genprotopb.User, error)\n\tUpdateUser(context.Context, *genprotopb.UpdateUserRequest, ...gax.CallOption) (*genprotopb.User, error)\n\tDeleteUser(context.Context, *genprotopb.DeleteUserRequest, ...gax.CallOption) error\n\tListUsers(context.Context, *genprotopb.ListUsersRequest, ...gax.CallOption) *UserIterator\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// IdentityClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// A simple identity service.\ntype IdentityClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalIdentityClient\n\n\t// The call options for this service.\n\tCallOptions *IdentityCallOptions\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *IdentityClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *IdentityClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *IdentityClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// CreateUser creates a user.\nfunc (c *IdentityClient) CreateUser(ctx context.Context, req *genprotopb.CreateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\treturn c.internalClient.CreateUser(ctx, req, opts...)\n}\n\n// GetUser retrieves the User with the given uri.\nfunc (c *IdentityClient) GetUser(ctx context.Context, req *genprotopb.GetUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\treturn c.internalClient.GetUser(ctx, req, opts...)\n}\n\n// UpdateUser updates a user.\nfunc (c *IdentityClient) UpdateUser(ctx context.Context, req *genprotopb.UpdateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\treturn c.internalClient.UpdateUser(ctx, req, opts...)\n}\n\n// DeleteUser deletes a user, their profile, and all of their authored messages.\nfunc (c *IdentityClient) DeleteUser(ctx context.Context, req *genprotopb.DeleteUserRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteUser(ctx, req, opts...)\n}\n\n// ListUsers lists all users.\nfunc (c *IdentityClient) ListUsers(ctx context.Context, req *genprotopb.ListUsersRequest, opts ...gax.CallOption) *UserIterator {\n\treturn c.internalClient.ListUsers(ctx, req, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *IdentityClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *IdentityClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *IdentityClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *IdentityClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *IdentityClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *IdentityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *IdentityClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *IdentityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *IdentityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// identityGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype identityGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing IdentityClient\n\tCallOptions **IdentityCallOptions\n\n\t// The gRPC API client.\n\tidentityClient genprotopb.IdentityClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewIdentityClient creates a new identity client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// A simple identity service.\nfunc NewIdentityClient(ctx context.Context, opts ...option.ClientOption) (*IdentityClient, error) {\n\tclientOpts := defaultIdentityGRPCClientOptions()\n\tif newIdentityClientHook != nil {\n\t\thookOpts, err := newIdentityClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := IdentityClient{CallOptions: defaultIdentityCallOptions()}\n\n\tc := &identityGRPCClient{\n\t\tconnPool:         connPool,\n\t\tidentityClient:   genprotopb.NewIdentityClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *identityGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *identityGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *identityGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype identityRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing IdentityClient\n\tCallOptions **IdentityCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewIdentityRESTClient creates a new identity rest client.\n//\n// A simple identity service.\nfunc NewIdentityRESTClient(ctx context.Context, opts ...option.ClientOption) (*IdentityClient, error) {\n\tclientOpts := append(defaultIdentityRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultIdentityRESTCallOptions()\n\tc := &identityRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\treturn &IdentityClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultIdentityRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *identityRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *identityRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *identityRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *identityGRPCClient) CreateUser(ctx context.Context, req *genprotopb.CreateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).CreateUser[0:len((*c.CallOptions).CreateUser):len((*c.CallOptions).CreateUser)], opts...)\n\tvar resp *genprotopb.User\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.identityClient.CreateUser, req, settings.GRPC, c.logger, \"CreateUser\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) GetUser(ctx context.Context, req *genprotopb.GetUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetUser[0:len((*c.CallOptions).GetUser):len((*c.CallOptions).GetUser)], opts...)\n\tvar resp *genprotopb.User\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.identityClient.GetUser, req, settings.GRPC, c.logger, \"GetUser\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) UpdateUser(ctx context.Context, req *genprotopb.UpdateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"user.name\", url.QueryEscape(req.GetUser().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateUser[0:len((*c.CallOptions).UpdateUser):len((*c.CallOptions).UpdateUser)], opts...)\n\tvar resp *genprotopb.User\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.identityClient.UpdateUser, req, settings.GRPC, c.logger, \"UpdateUser\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) DeleteUser(ctx context.Context, req *genprotopb.DeleteUserRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteUser[0:len((*c.CallOptions).DeleteUser):len((*c.CallOptions).DeleteUser)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.identityClient.DeleteUser, req, settings.GRPC, c.logger, \"DeleteUser\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *identityGRPCClient) ListUsers(ctx context.Context, req *genprotopb.ListUsersRequest, opts ...gax.CallOption) *UserIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListUsers[0:len((*c.CallOptions).ListUsers):len((*c.CallOptions).ListUsers)], opts...)\n\tit := &UserIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListUsersRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.User, string, error) {\n\t\tresp := &genprotopb.ListUsersResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.identityClient.ListUsers, req, settings.GRPC, c.logger, \"ListUsers\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetUsers(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *identityGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *identityGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *identityGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *identityGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *identityGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// CreateUser creates a user.\nfunc (c *identityRESTClient) CreateUser(ctx context.Context, req *genprotopb.CreateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/users\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateUser[0:len((*c.CallOptions).CreateUser):len((*c.CallOptions).CreateUser)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.User{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateUser\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetUser retrieves the User with the given uri.\nfunc (c *identityRESTClient) GetUser(ctx context.Context, req *genprotopb.GetUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetUser[0:len((*c.CallOptions).GetUser):len((*c.CallOptions).GetUser)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.User{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetUser\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// UpdateUser updates a user.\nfunc (c *identityRESTClient) UpdateUser(ctx context.Context, req *genprotopb.UpdateUserRequest, opts ...gax.CallOption) (*genprotopb.User, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetUser()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetUser().GetName())\n\n\tparams := url.Values{}\n\tif req.GetUpdateMask() != nil {\n\t\tfield, err := protojson.Marshal(req.GetUpdateMask())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tparams.Add(\"updateMask\", string(field[1:len(field)-1]))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"user.name\", url.QueryEscape(req.GetUser().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateUser[0:len((*c.CallOptions).UpdateUser):len((*c.CallOptions).UpdateUser)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.User{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"PATCH\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"UpdateUser\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteUser deletes a user, their profile, and all of their authored messages.\nfunc (c *identityRESTClient) DeleteUser(ctx context.Context, req *genprotopb.DeleteUserRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteUser\")\n\t\treturn err\n\t}, opts...)\n}\n\n// ListUsers lists all users.\nfunc (c *identityRESTClient) ListUsers(ctx context.Context, req *genprotopb.ListUsersRequest, opts ...gax.CallOption) *UserIterator {\n\tit := &UserIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListUsersRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.User, string, error) {\n\t\tresp := &genprotopb.ListUsersResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/users\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListUsers\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetUsers(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *identityRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *identityRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *identityRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *identityRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *identityRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *identityRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *identityRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *identityRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *identityRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n"
  },
  {
    "path": "client/identity_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleIdentityClient_ListUsers_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListUsersRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListUsersRequest.\n\t}\n\tfor resp, err := range c.ListUsers(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleIdentityClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleIdentityClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/identity_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewIdentityClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewIdentityRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleIdentityClient_CreateUser() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateUserRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateUserRequest.\n\t}\n\tresp, err := c.CreateUser(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_DeleteUser() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.DeleteUserRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteUserRequest.\n\t}\n\terr = c.DeleteUser(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleIdentityClient_GetUser() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetUserRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetUserRequest.\n\t}\n\tresp, err := c.GetUser(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_ListUsers() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListUsersRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListUsersRequest.\n\t}\n\tit := c.ListUsers(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.ListUsersResponse)\n\t}\n}\n\nfunc ExampleIdentityClient_UpdateUser() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.UpdateUserRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateUserRequest.\n\t}\n\tresp, err := c.UpdateUser(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleIdentityClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleIdentityClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleIdentityClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleIdentityClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewIdentityClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "client/messaging_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"cloud.google.com/go/longrunning\"\n\tlroauto \"cloud.google.com/go/longrunning/autogen\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newMessagingClientHook clientHook\n\n// MessagingCallOptions contains the retry settings for each method of MessagingClient.\ntype MessagingCallOptions struct {\n\tCreateRoom         []gax.CallOption\n\tGetRoom            []gax.CallOption\n\tUpdateRoom         []gax.CallOption\n\tDeleteRoom         []gax.CallOption\n\tListRooms          []gax.CallOption\n\tCreateBlurb        []gax.CallOption\n\tGetBlurb           []gax.CallOption\n\tUpdateBlurb        []gax.CallOption\n\tDeleteBlurb        []gax.CallOption\n\tListBlurbs         []gax.CallOption\n\tSearchBlurbs       []gax.CallOption\n\tStreamBlurbs       []gax.CallOption\n\tSendBlurbs         []gax.CallOption\n\tConnect            []gax.CallOption\n\tListLocations      []gax.CallOption\n\tGetLocation        []gax.CallOption\n\tSetIamPolicy       []gax.CallOption\n\tGetIamPolicy       []gax.CallOption\n\tTestIamPermissions []gax.CallOption\n\tListOperations     []gax.CallOption\n\tGetOperation       []gax.CallOption\n\tDeleteOperation    []gax.CallOption\n\tCancelOperation    []gax.CallOption\n}\n\nfunc defaultMessagingGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultMessagingCallOptions() *MessagingCallOptions {\n\treturn &MessagingCallOptions{\n\t\tCreateRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tUpdateRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tDeleteRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListRooms: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tCreateBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tUpdateBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tDeleteBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tSearchBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tStreamBlurbs: []gax.CallOption{},\n\t\tSendBlurbs:   []gax.CallOption{},\n\t\tConnect: []gax.CallOption{\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\nfunc defaultMessagingRESTCallOptions() *MessagingCallOptions {\n\treturn &MessagingCallOptions{\n\t\tCreateRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tUpdateRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tDeleteRoom: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListRooms: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tCreateBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tUpdateBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tDeleteBlurb: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tSearchBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tStreamBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tSendBlurbs: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tConnect: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\n// internalMessagingClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalMessagingClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tCreateRoom(context.Context, *genprotopb.CreateRoomRequest, ...gax.CallOption) (*genprotopb.Room, error)\n\tGetRoom(context.Context, *genprotopb.GetRoomRequest, ...gax.CallOption) (*genprotopb.Room, error)\n\tUpdateRoom(context.Context, *genprotopb.UpdateRoomRequest, ...gax.CallOption) (*genprotopb.Room, error)\n\tDeleteRoom(context.Context, *genprotopb.DeleteRoomRequest, ...gax.CallOption) error\n\tListRooms(context.Context, *genprotopb.ListRoomsRequest, ...gax.CallOption) *RoomIterator\n\tCreateBlurb(context.Context, *genprotopb.CreateBlurbRequest, ...gax.CallOption) (*genprotopb.Blurb, error)\n\tGetBlurb(context.Context, *genprotopb.GetBlurbRequest, ...gax.CallOption) (*genprotopb.Blurb, error)\n\tUpdateBlurb(context.Context, *genprotopb.UpdateBlurbRequest, ...gax.CallOption) (*genprotopb.Blurb, error)\n\tDeleteBlurb(context.Context, *genprotopb.DeleteBlurbRequest, ...gax.CallOption) error\n\tListBlurbs(context.Context, *genprotopb.ListBlurbsRequest, ...gax.CallOption) *BlurbIterator\n\tSearchBlurbs(context.Context, *genprotopb.SearchBlurbsRequest, ...gax.CallOption) (*SearchBlurbsOperation, error)\n\tSearchBlurbsOperation(name string) *SearchBlurbsOperation\n\tStreamBlurbs(context.Context, *genprotopb.StreamBlurbsRequest, ...gax.CallOption) (genprotopb.Messaging_StreamBlurbsClient, error)\n\tSendBlurbs(context.Context, ...gax.CallOption) (genprotopb.Messaging_SendBlurbsClient, error)\n\tConnect(context.Context, ...gax.CallOption) (genprotopb.Messaging_ConnectClient, error)\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// MessagingClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// A simple messaging service that implements chat rooms and profile posts.\n//\n// This messaging service showcases the features that API clients\n// generated by gapic-generators implement.\ntype MessagingClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalMessagingClient\n\n\t// The call options for this service.\n\tCallOptions *MessagingCallOptions\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient *lroauto.OperationsClient\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *MessagingClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *MessagingClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *MessagingClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// CreateRoom creates a room.\nfunc (c *MessagingClient) CreateRoom(ctx context.Context, req *genprotopb.CreateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\treturn c.internalClient.CreateRoom(ctx, req, opts...)\n}\n\n// GetRoom retrieves the Room with the given resource name.\nfunc (c *MessagingClient) GetRoom(ctx context.Context, req *genprotopb.GetRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\treturn c.internalClient.GetRoom(ctx, req, opts...)\n}\n\n// UpdateRoom updates a room.\nfunc (c *MessagingClient) UpdateRoom(ctx context.Context, req *genprotopb.UpdateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\treturn c.internalClient.UpdateRoom(ctx, req, opts...)\n}\n\n// DeleteRoom deletes a room and all of its blurbs.\nfunc (c *MessagingClient) DeleteRoom(ctx context.Context, req *genprotopb.DeleteRoomRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteRoom(ctx, req, opts...)\n}\n\n// ListRooms lists all chat rooms.\nfunc (c *MessagingClient) ListRooms(ctx context.Context, req *genprotopb.ListRoomsRequest, opts ...gax.CallOption) *RoomIterator {\n\treturn c.internalClient.ListRooms(ctx, req, opts...)\n}\n\n// CreateBlurb creates a blurb. If the parent is a room, the blurb is understood to be a\n// message in that room. If the parent is a profile, the blurb is understood\n// to be a post on the profile.\nfunc (c *MessagingClient) CreateBlurb(ctx context.Context, req *genprotopb.CreateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\treturn c.internalClient.CreateBlurb(ctx, req, opts...)\n}\n\n// GetBlurb retrieves the Blurb with the given resource name.\nfunc (c *MessagingClient) GetBlurb(ctx context.Context, req *genprotopb.GetBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\treturn c.internalClient.GetBlurb(ctx, req, opts...)\n}\n\n// UpdateBlurb updates a blurb.\nfunc (c *MessagingClient) UpdateBlurb(ctx context.Context, req *genprotopb.UpdateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\treturn c.internalClient.UpdateBlurb(ctx, req, opts...)\n}\n\n// DeleteBlurb deletes a blurb.\nfunc (c *MessagingClient) DeleteBlurb(ctx context.Context, req *genprotopb.DeleteBlurbRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteBlurb(ctx, req, opts...)\n}\n\n// ListBlurbs lists blurbs for a specific chat room or user profile depending on the\n// parent resource name.\nfunc (c *MessagingClient) ListBlurbs(ctx context.Context, req *genprotopb.ListBlurbsRequest, opts ...gax.CallOption) *BlurbIterator {\n\treturn c.internalClient.ListBlurbs(ctx, req, opts...)\n}\n\n// SearchBlurbs this method searches through all blurbs across all rooms and profiles\n// for blurbs containing to words found in the query. Only posts that\n// contain an exact match of a queried word will be returned.\nfunc (c *MessagingClient) SearchBlurbs(ctx context.Context, req *genprotopb.SearchBlurbsRequest, opts ...gax.CallOption) (*SearchBlurbsOperation, error) {\n\treturn c.internalClient.SearchBlurbs(ctx, req, opts...)\n}\n\n// SearchBlurbsOperation returns a new SearchBlurbsOperation from a given name.\n// The name must be that of a previously created SearchBlurbsOperation, possibly from a different process.\nfunc (c *MessagingClient) SearchBlurbsOperation(name string) *SearchBlurbsOperation {\n\treturn c.internalClient.SearchBlurbsOperation(name)\n}\n\n// StreamBlurbs this returns a stream that emits the blurbs that are created for a\n// particular chat room or user profile.\nfunc (c *MessagingClient) StreamBlurbs(ctx context.Context, req *genprotopb.StreamBlurbsRequest, opts ...gax.CallOption) (genprotopb.Messaging_StreamBlurbsClient, error) {\n\treturn c.internalClient.StreamBlurbs(ctx, req, opts...)\n}\n\n// SendBlurbs this is a stream to create multiple blurbs. If an invalid blurb is\n// requested to be created, the stream will close with an error.\n//\n// This method is not supported for the REST transport.\nfunc (c *MessagingClient) SendBlurbs(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_SendBlurbsClient, error) {\n\treturn c.internalClient.SendBlurbs(ctx, opts...)\n}\n\n// Connect this method starts a bidirectional stream that receives all blurbs that\n// are being created after the stream has started and sends requests to create\n// blurbs. If an invalid blurb is requested to be created, the stream will\n// close with an error.\n//\n// This method is not supported for the REST transport.\nfunc (c *MessagingClient) Connect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_ConnectClient, error) {\n\treturn c.internalClient.Connect(ctx, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *MessagingClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *MessagingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *MessagingClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *MessagingClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *MessagingClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *MessagingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *MessagingClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *MessagingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *MessagingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// messagingGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype messagingGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing MessagingClient\n\tCallOptions **MessagingCallOptions\n\n\t// The gRPC API client.\n\tmessagingClient genprotopb.MessagingClient\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient **lroauto.OperationsClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewMessagingClient creates a new messaging client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// A simple messaging service that implements chat rooms and profile posts.\n//\n// This messaging service showcases the features that API clients\n// generated by gapic-generators implement.\nfunc NewMessagingClient(ctx context.Context, opts ...option.ClientOption) (*MessagingClient, error) {\n\tclientOpts := defaultMessagingGRPCClientOptions()\n\tif newMessagingClientHook != nil {\n\t\thookOpts, err := newMessagingClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := MessagingClient{CallOptions: defaultMessagingCallOptions()}\n\n\tc := &messagingGRPCClient{\n\t\tconnPool:         connPool,\n\t\tmessagingClient:  genprotopb.NewMessagingClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\tclient.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool))\n\tif err != nil {\n\t\t// This error \"should not happen\", since we are just reusing old connection pool\n\t\t// and never actually need to dial.\n\t\t// If this does happen, we could leak connp. However, we cannot close conn:\n\t\t// If the user invoked the constructor with option.WithGRPCConn,\n\t\t// we would close a connection that's still in use.\n\t\t// TODO: investigate error conditions.\n\t\treturn nil, err\n\t}\n\tc.LROClient = &client.LROClient\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *messagingGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *messagingGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *messagingGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype messagingRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// LROClient is used internally to handle long-running operations.\n\t// It is exposed so that its CallOptions can be modified if required.\n\t// Users should not Close this client.\n\tLROClient **lroauto.OperationsClient\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing MessagingClient\n\tCallOptions **MessagingCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewMessagingRESTClient creates a new messaging rest client.\n//\n// A simple messaging service that implements chat rooms and profile posts.\n//\n// This messaging service showcases the features that API clients\n// generated by gapic-generators implement.\nfunc NewMessagingRESTClient(ctx context.Context, opts ...option.ClientOption) (*MessagingClient, error) {\n\tclientOpts := append(defaultMessagingRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultMessagingRESTCallOptions()\n\tc := &messagingRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\tlroOpts := []option.ClientOption{\n\t\toption.WithHTTPClient(httpClient),\n\t\toption.WithEndpoint(endpoint),\n\t}\n\topClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc.LROClient = &opClient\n\n\treturn &MessagingClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultMessagingRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *messagingRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *messagingRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *messagingRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *messagingGRPCClient) CreateRoom(ctx context.Context, req *genprotopb.CreateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).CreateRoom[0:len((*c.CallOptions).CreateRoom):len((*c.CallOptions).CreateRoom)], opts...)\n\tvar resp *genprotopb.Room\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.CreateRoom, req, settings.GRPC, c.logger, \"CreateRoom\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) GetRoom(ctx context.Context, req *genprotopb.GetRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetRoom[0:len((*c.CallOptions).GetRoom):len((*c.CallOptions).GetRoom)], opts...)\n\tvar resp *genprotopb.Room\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.GetRoom, req, settings.GRPC, c.logger, \"GetRoom\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) UpdateRoom(ctx context.Context, req *genprotopb.UpdateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"room.name\", url.QueryEscape(req.GetRoom().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateRoom[0:len((*c.CallOptions).UpdateRoom):len((*c.CallOptions).UpdateRoom)], opts...)\n\tvar resp *genprotopb.Room\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.UpdateRoom, req, settings.GRPC, c.logger, \"UpdateRoom\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) DeleteRoom(ctx context.Context, req *genprotopb.DeleteRoomRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteRoom[0:len((*c.CallOptions).DeleteRoom):len((*c.CallOptions).DeleteRoom)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.messagingClient.DeleteRoom, req, settings.GRPC, c.logger, \"DeleteRoom\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *messagingGRPCClient) ListRooms(ctx context.Context, req *genprotopb.ListRoomsRequest, opts ...gax.CallOption) *RoomIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListRooms[0:len((*c.CallOptions).ListRooms):len((*c.CallOptions).ListRooms)], opts...)\n\tit := &RoomIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListRoomsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Room, string, error) {\n\t\tresp := &genprotopb.ListRoomsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.messagingClient.ListRooms, req, settings.GRPC, c.logger, \"ListRooms\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetRooms(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *messagingGRPCClient) CreateBlurb(ctx context.Context, req *genprotopb.CreateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CreateBlurb[0:len((*c.CallOptions).CreateBlurb):len((*c.CallOptions).CreateBlurb)], opts...)\n\tvar resp *genprotopb.Blurb\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.CreateBlurb, req, settings.GRPC, c.logger, \"CreateBlurb\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) GetBlurb(ctx context.Context, req *genprotopb.GetBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetBlurb[0:len((*c.CallOptions).GetBlurb):len((*c.CallOptions).GetBlurb)], opts...)\n\tvar resp *genprotopb.Blurb\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.GetBlurb, req, settings.GRPC, c.logger, \"GetBlurb\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) UpdateBlurb(ctx context.Context, req *genprotopb.UpdateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"blurb.name\", url.QueryEscape(req.GetBlurb().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateBlurb[0:len((*c.CallOptions).UpdateBlurb):len((*c.CallOptions).UpdateBlurb)], opts...)\n\tvar resp *genprotopb.Blurb\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.UpdateBlurb, req, settings.GRPC, c.logger, \"UpdateBlurb\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) DeleteBlurb(ctx context.Context, req *genprotopb.DeleteBlurbRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteBlurb[0:len((*c.CallOptions).DeleteBlurb):len((*c.CallOptions).DeleteBlurb)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.messagingClient.DeleteBlurb, req, settings.GRPC, c.logger, \"DeleteBlurb\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *messagingGRPCClient) ListBlurbs(ctx context.Context, req *genprotopb.ListBlurbsRequest, opts ...gax.CallOption) *BlurbIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListBlurbs[0:len((*c.CallOptions).ListBlurbs):len((*c.CallOptions).ListBlurbs)], opts...)\n\tit := &BlurbIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListBlurbsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Blurb, string, error) {\n\t\tresp := &genprotopb.ListBlurbsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.messagingClient.ListBlurbs, req, settings.GRPC, c.logger, \"ListBlurbs\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetBlurbs(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *messagingGRPCClient) SearchBlurbs(ctx context.Context, req *genprotopb.SearchBlurbsRequest, opts ...gax.CallOption) (*SearchBlurbsOperation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SearchBlurbs[0:len((*c.CallOptions).SearchBlurbs):len((*c.CallOptions).SearchBlurbs)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.messagingClient.SearchBlurbs, req, settings.GRPC, c.logger, \"SearchBlurbs\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &SearchBlurbsOperation{\n\t\tlro: longrunning.InternalNewOperation(*c.LROClient, resp),\n\t}, nil\n}\n\nfunc (c *messagingGRPCClient) StreamBlurbs(ctx context.Context, req *genprotopb.StreamBlurbsRequest, opts ...gax.CallOption) (genprotopb.Messaging_StreamBlurbsClient, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).StreamBlurbs[0:len((*c.CallOptions).StreamBlurbs):len((*c.CallOptions).StreamBlurbs)], opts...)\n\tvar resp genprotopb.Messaging_StreamBlurbsClient\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"StreamBlurbs\")\n\t\tresp, err = c.messagingClient.StreamBlurbs(ctx, req, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"StreamBlurbs\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) SendBlurbs(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_SendBlurbsClient, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\tvar resp genprotopb.Messaging_SendBlurbsClient\n\topts = append((*c.CallOptions).SendBlurbs[0:len((*c.CallOptions).SendBlurbs):len((*c.CallOptions).SendBlurbs)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"SendBlurbs\")\n\t\tresp, err = c.messagingClient.SendBlurbs(ctx, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"SendBlurbs\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) Connect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_ConnectClient, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\tvar resp genprotopb.Messaging_ConnectClient\n\topts = append((*c.CallOptions).Connect[0:len((*c.CallOptions).Connect):len((*c.CallOptions).Connect)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"Connect\")\n\t\tresp, err = c.messagingClient.Connect(ctx, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"Connect\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *messagingGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *messagingGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *messagingGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *messagingGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// CreateRoom creates a room.\nfunc (c *messagingRESTClient) CreateRoom(ctx context.Context, req *genprotopb.CreateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/rooms\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateRoom[0:len((*c.CallOptions).CreateRoom):len((*c.CallOptions).CreateRoom)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Room{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateRoom\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetRoom retrieves the Room with the given resource name.\nfunc (c *messagingRESTClient) GetRoom(ctx context.Context, req *genprotopb.GetRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetRoom[0:len((*c.CallOptions).GetRoom):len((*c.CallOptions).GetRoom)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Room{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetRoom\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// UpdateRoom updates a room.\nfunc (c *messagingRESTClient) UpdateRoom(ctx context.Context, req *genprotopb.UpdateRoomRequest, opts ...gax.CallOption) (*genprotopb.Room, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetRoom()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetRoom().GetName())\n\n\tparams := url.Values{}\n\tif req.GetUpdateMask() != nil {\n\t\tfield, err := protojson.Marshal(req.GetUpdateMask())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tparams.Add(\"updateMask\", string(field[1:len(field)-1]))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"room.name\", url.QueryEscape(req.GetRoom().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateRoom[0:len((*c.CallOptions).UpdateRoom):len((*c.CallOptions).UpdateRoom)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Room{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"PATCH\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"UpdateRoom\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteRoom deletes a room and all of its blurbs.\nfunc (c *messagingRESTClient) DeleteRoom(ctx context.Context, req *genprotopb.DeleteRoomRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteRoom\")\n\t\treturn err\n\t}, opts...)\n}\n\n// ListRooms lists all chat rooms.\nfunc (c *messagingRESTClient) ListRooms(ctx context.Context, req *genprotopb.ListRoomsRequest, opts ...gax.CallOption) *RoomIterator {\n\tit := &RoomIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListRoomsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Room, string, error) {\n\t\tresp := &genprotopb.ListRoomsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/rooms\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListRooms\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetRooms(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// CreateBlurb creates a blurb. If the parent is a room, the blurb is understood to be a\n// message in that room. If the parent is a profile, the blurb is understood\n// to be a post on the profile.\nfunc (c *messagingRESTClient) CreateBlurb(ctx context.Context, req *genprotopb.CreateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/blurbs\", req.GetParent())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateBlurb[0:len((*c.CallOptions).CreateBlurb):len((*c.CallOptions).CreateBlurb)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Blurb{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateBlurb\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetBlurb retrieves the Blurb with the given resource name.\nfunc (c *messagingRESTClient) GetBlurb(ctx context.Context, req *genprotopb.GetBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetBlurb[0:len((*c.CallOptions).GetBlurb):len((*c.CallOptions).GetBlurb)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Blurb{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetBlurb\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// UpdateBlurb updates a blurb.\nfunc (c *messagingRESTClient) UpdateBlurb(ctx context.Context, req *genprotopb.UpdateBlurbRequest, opts ...gax.CallOption) (*genprotopb.Blurb, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetBlurb()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetBlurb().GetName())\n\n\tparams := url.Values{}\n\tif req.GetUpdateMask() != nil {\n\t\tfield, err := protojson.Marshal(req.GetUpdateMask())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tparams.Add(\"updateMask\", string(field[1:len(field)-1]))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"blurb.name\", url.QueryEscape(req.GetBlurb().GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).UpdateBlurb[0:len((*c.CallOptions).UpdateBlurb):len((*c.CallOptions).UpdateBlurb)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Blurb{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"PATCH\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"UpdateBlurb\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteBlurb deletes a blurb.\nfunc (c *messagingRESTClient) DeleteBlurb(ctx context.Context, req *genprotopb.DeleteBlurbRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteBlurb\")\n\t\treturn err\n\t}, opts...)\n}\n\n// ListBlurbs lists blurbs for a specific chat room or user profile depending on the\n// parent resource name.\nfunc (c *messagingRESTClient) ListBlurbs(ctx context.Context, req *genprotopb.ListBlurbsRequest, opts ...gax.CallOption) *BlurbIterator {\n\tit := &BlurbIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListBlurbsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Blurb, string, error) {\n\t\tresp := &genprotopb.ListBlurbsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/blurbs\", req.GetParent())\n\n\t\tparams := url.Values{}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListBlurbs\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetBlurbs(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// SearchBlurbs this method searches through all blurbs across all rooms and profiles\n// for blurbs containing to words found in the query. Only posts that\n// contain an exact match of a queried word will be returned.\nfunc (c *messagingRESTClient) SearchBlurbs(ctx context.Context, req *genprotopb.SearchBlurbsRequest, opts ...gax.CallOption) (*SearchBlurbsOperation, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/blurbs:search\", req.GetParent())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SearchBlurbs\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\n\toverride := fmt.Sprintf(\"/v1beta1/%s\", resp.GetName())\n\treturn &SearchBlurbsOperation{\n\t\tlro:      longrunning.InternalNewOperation(*c.LROClient, resp),\n\t\tpollPath: override,\n\t}, nil\n}\n\n// StreamBlurbs this returns a stream that emits the blurbs that are created for a\n// particular chat room or user profile.\nfunc (c *messagingRESTClient) StreamBlurbs(ctx context.Context, req *genprotopb.StreamBlurbsRequest, opts ...gax.CallOption) (genprotopb.Messaging_StreamBlurbsClient, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/blurbs:stream\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\tvar streamClient *streamBlurbsRESTStreamClient\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\thttpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"StreamBlurbs\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tstreamClient = &streamBlurbsRESTStreamClient{\n\t\t\tctx:    ctx,\n\t\t\tmd:     metadata.MD(httpRsp.Header),\n\t\t\tstream: gax.NewProtoJSONStreamReader(httpRsp.Body, (&genprotopb.StreamBlurbsResponse{}).ProtoReflect().Type()),\n\t\t}\n\t\treturn nil\n\t}, opts...)\n\n\treturn streamClient, e\n}\n\n// streamBlurbsRESTStreamClient is the stream client used to consume the server stream created by\n// the REST implementation of StreamBlurbs.\ntype streamBlurbsRESTStreamClient struct {\n\tctx    context.Context\n\tmd     metadata.MD\n\tstream *gax.ProtoJSONStream\n}\n\nfunc (c *streamBlurbsRESTStreamClient) Recv() (*genprotopb.StreamBlurbsResponse, error) {\n\tif err := c.ctx.Err(); err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tmsg, err := c.stream.Recv()\n\tif err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tres := msg.(*genprotopb.StreamBlurbsResponse)\n\treturn res, nil\n}\n\nfunc (c *streamBlurbsRESTStreamClient) Header() (metadata.MD, error) {\n\treturn c.md, nil\n}\n\nfunc (c *streamBlurbsRESTStreamClient) Trailer() metadata.MD {\n\treturn c.md\n}\n\nfunc (c *streamBlurbsRESTStreamClient) CloseSend() error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *streamBlurbsRESTStreamClient) Context() context.Context {\n\treturn c.ctx\n}\n\nfunc (c *streamBlurbsRESTStreamClient) SendMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *streamBlurbsRESTStreamClient) RecvMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented, use Recv\")\n}\n\n// SendBlurbs this is a stream to create multiple blurbs. If an invalid blurb is\n// requested to be created, the stream will close with an error.\n//\n// This method is not supported for the REST transport.\nfunc (c *messagingRESTClient) SendBlurbs(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_SendBlurbsClient, error) {\n\treturn nil, errors.New(\"SendBlurbs not yet supported for REST clients\")\n}\n\n// Connect this method starts a bidirectional stream that receives all blurbs that\n// are being created after the stream has started and sends requests to create\n// blurbs. If an invalid blurb is requested to be created, the stream will\n// close with an error.\n//\n// This method is not supported for the REST transport.\nfunc (c *messagingRESTClient) Connect(ctx context.Context, opts ...gax.CallOption) (genprotopb.Messaging_ConnectClient, error) {\n\treturn nil, errors.New(\"Connect not yet supported for REST clients\")\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *messagingRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *messagingRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *messagingRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *messagingRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *messagingRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *messagingRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *messagingRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *messagingRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *messagingRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// SearchBlurbsOperation returns a new SearchBlurbsOperation from a given name.\n// The name must be that of a previously created SearchBlurbsOperation, possibly from a different process.\nfunc (c *messagingGRPCClient) SearchBlurbsOperation(name string) *SearchBlurbsOperation {\n\treturn &SearchBlurbsOperation{\n\t\tlro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),\n\t}\n}\n\n// SearchBlurbsOperation returns a new SearchBlurbsOperation from a given name.\n// The name must be that of a previously created SearchBlurbsOperation, possibly from a different process.\nfunc (c *messagingRESTClient) SearchBlurbsOperation(name string) *SearchBlurbsOperation {\n\toverride := fmt.Sprintf(\"/v1beta1/%s\", name)\n\treturn &SearchBlurbsOperation{\n\t\tlro:      longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),\n\t\tpollPath: override,\n\t}\n}\n"
  },
  {
    "path": "client/messaging_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleMessagingClient_ListBlurbs_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListBlurbsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListBlurbsRequest.\n\t}\n\tfor resp, err := range c.ListBlurbs(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleMessagingClient_ListRooms_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListRoomsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListRoomsRequest.\n\t}\n\tfor resp, err := range c.ListRooms(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleMessagingClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleMessagingClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/messaging_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\t\"io\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewMessagingClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewMessagingRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleMessagingClient_Connect() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\tstream, err := c.Connect(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tgo func() {\n\t\treqs := []*genprotopb.ConnectRequest{\n\t\t\t// TODO: Create requests.\n\t\t}\n\t\tfor _, req := range reqs {\n\t\t\tif err := stream.Send(req); err != nil {\n\t\t\t\t// TODO: Handle error.\n\t\t\t}\n\t\t}\n\t\tstream.CloseSend()\n\t}()\n\tfor {\n\t\tresp, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleMessagingClient_CreateBlurb() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateBlurbRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateBlurbRequest.\n\t}\n\tresp, err := c.CreateBlurb(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_CreateRoom() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateRoomRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateRoomRequest.\n\t}\n\tresp, err := c.CreateRoom(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_DeleteBlurb() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.DeleteBlurbRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteBlurbRequest.\n\t}\n\terr = c.DeleteBlurb(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleMessagingClient_DeleteRoom() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.DeleteRoomRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteRoomRequest.\n\t}\n\terr = c.DeleteRoom(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleMessagingClient_GetBlurb() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetBlurbRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetBlurbRequest.\n\t}\n\tresp, err := c.GetBlurb(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_GetRoom() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetRoomRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetRoomRequest.\n\t}\n\tresp, err := c.GetRoom(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_ListBlurbs() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListBlurbsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListBlurbsRequest.\n\t}\n\tit := c.ListBlurbs(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.ListBlurbsResponse)\n\t}\n}\n\nfunc ExampleMessagingClient_ListRooms() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListRoomsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListRoomsRequest.\n\t}\n\tit := c.ListRooms(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.ListRoomsResponse)\n\t}\n}\n\nfunc ExampleMessagingClient_SearchBlurbs() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.SearchBlurbsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#SearchBlurbsRequest.\n\t}\n\top, err := c.SearchBlurbs(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\n\tresp, err := op.Wait(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_UpdateBlurb() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.UpdateBlurbRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateBlurbRequest.\n\t}\n\tresp, err := c.UpdateBlurb(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_UpdateRoom() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.UpdateRoomRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateRoomRequest.\n\t}\n\tresp, err := c.UpdateRoom(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleMessagingClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleMessagingClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleMessagingClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleMessagingClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewMessagingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "client/sequence_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newSequenceClientHook clientHook\n\n// SequenceCallOptions contains the retry settings for each method of SequenceClient.\ntype SequenceCallOptions struct {\n\tCreateSequence             []gax.CallOption\n\tCreateStreamingSequence    []gax.CallOption\n\tGetSequenceReport          []gax.CallOption\n\tGetStreamingSequenceReport []gax.CallOption\n\tAttemptSequence            []gax.CallOption\n\tAttemptStreamingSequence   []gax.CallOption\n\tListLocations              []gax.CallOption\n\tGetLocation                []gax.CallOption\n\tSetIamPolicy               []gax.CallOption\n\tGetIamPolicy               []gax.CallOption\n\tTestIamPermissions         []gax.CallOption\n\tListOperations             []gax.CallOption\n\tGetOperation               []gax.CallOption\n\tDeleteOperation            []gax.CallOption\n\tCancelOperation            []gax.CallOption\n}\n\nfunc defaultSequenceGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultSequenceCallOptions() *SequenceCallOptions {\n\treturn &SequenceCallOptions{\n\t\tCreateSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tCreateStreamingSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetSequenceReport: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetStreamingSequenceReport: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tAttemptSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnCodes([]codes.Code{\n\t\t\t\t\tcodes.Unavailable,\n\t\t\t\t\tcodes.Unknown,\n\t\t\t\t}, gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t})\n\t\t\t}),\n\t\t},\n\t\tAttemptStreamingSequence: []gax.CallOption{},\n\t\tListLocations:            []gax.CallOption{},\n\t\tGetLocation:              []gax.CallOption{},\n\t\tSetIamPolicy:             []gax.CallOption{},\n\t\tGetIamPolicy:             []gax.CallOption{},\n\t\tTestIamPermissions:       []gax.CallOption{},\n\t\tListOperations:           []gax.CallOption{},\n\t\tGetOperation:             []gax.CallOption{},\n\t\tDeleteOperation:          []gax.CallOption{},\n\t\tCancelOperation:          []gax.CallOption{},\n\t}\n}\n\nfunc defaultSequenceRESTCallOptions() *SequenceCallOptions {\n\treturn &SequenceCallOptions{\n\t\tCreateSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tCreateStreamingSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetSequenceReport: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tGetStreamingSequenceReport: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tAttemptSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(10000 * time.Millisecond),\n\t\t\tgax.WithRetry(func() gax.Retryer {\n\t\t\t\treturn gax.OnHTTPCodes(gax.Backoff{\n\t\t\t\t\tInitial:    100 * time.Millisecond,\n\t\t\t\t\tMax:        3000 * time.Millisecond,\n\t\t\t\t\tMultiplier: 2.00,\n\t\t\t\t},\n\t\t\t\t\thttp.StatusServiceUnavailable,\n\t\t\t\t\thttp.StatusInternalServerError)\n\t\t\t}),\n\t\t},\n\t\tAttemptStreamingSequence: []gax.CallOption{\n\t\t\tgax.WithTimeout(5000 * time.Millisecond),\n\t\t},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\n// internalSequenceClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalSequenceClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tCreateSequence(context.Context, *genprotopb.CreateSequenceRequest, ...gax.CallOption) (*genprotopb.Sequence, error)\n\tCreateStreamingSequence(context.Context, *genprotopb.CreateStreamingSequenceRequest, ...gax.CallOption) (*genprotopb.StreamingSequence, error)\n\tGetSequenceReport(context.Context, *genprotopb.GetSequenceReportRequest, ...gax.CallOption) (*genprotopb.SequenceReport, error)\n\tGetStreamingSequenceReport(context.Context, *genprotopb.GetStreamingSequenceReportRequest, ...gax.CallOption) (*genprotopb.StreamingSequenceReport, error)\n\tAttemptSequence(context.Context, *genprotopb.AttemptSequenceRequest, ...gax.CallOption) error\n\tAttemptStreamingSequence(context.Context, *genprotopb.AttemptStreamingSequenceRequest, ...gax.CallOption) (genprotopb.SequenceService_AttemptStreamingSequenceClient, error)\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// SequenceClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// A service that enables testing of unary and server streaming calls\n// by specifying a specific, predictable sequence of responses from the service\ntype SequenceClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalSequenceClient\n\n\t// The call options for this service.\n\tCallOptions *SequenceCallOptions\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *SequenceClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *SequenceClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *SequenceClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// CreateSequence create a sequence of responses to be returned as unary calls\nfunc (c *SequenceClient) CreateSequence(ctx context.Context, req *genprotopb.CreateSequenceRequest, opts ...gax.CallOption) (*genprotopb.Sequence, error) {\n\treturn c.internalClient.CreateSequence(ctx, req, opts...)\n}\n\n// CreateStreamingSequence creates a sequence of responses to be returned in a server streaming call\nfunc (c *SequenceClient) CreateStreamingSequence(ctx context.Context, req *genprotopb.CreateStreamingSequenceRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequence, error) {\n\treturn c.internalClient.CreateStreamingSequence(ctx, req, opts...)\n}\n\n// GetSequenceReport retrieves a sequence report which can be used to retrieve information about a\n// sequence of unary calls.\nfunc (c *SequenceClient) GetSequenceReport(ctx context.Context, req *genprotopb.GetSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.SequenceReport, error) {\n\treturn c.internalClient.GetSequenceReport(ctx, req, opts...)\n}\n\n// GetStreamingSequenceReport retrieves a sequence report which can be used to retrieve information\n// about a sequences of responses in a server streaming call.\nfunc (c *SequenceClient) GetStreamingSequenceReport(ctx context.Context, req *genprotopb.GetStreamingSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequenceReport, error) {\n\treturn c.internalClient.GetStreamingSequenceReport(ctx, req, opts...)\n}\n\n// AttemptSequence attempts a sequence of unary responses.\nfunc (c *SequenceClient) AttemptSequence(ctx context.Context, req *genprotopb.AttemptSequenceRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.AttemptSequence(ctx, req, opts...)\n}\n\n// AttemptStreamingSequence attempts a server streaming call with a sequence of responses\n// Can be used to test retries and stream resumption logic\n// May not function as expected in HTTP mode due to when http statuses are sent\n// See https://github.com/googleapis/gapic-showcase/issues/1377 (at https://github.com/googleapis/gapic-showcase/issues/1377) for more details\nfunc (c *SequenceClient) AttemptStreamingSequence(ctx context.Context, req *genprotopb.AttemptStreamingSequenceRequest, opts ...gax.CallOption) (genprotopb.SequenceService_AttemptStreamingSequenceClient, error) {\n\treturn c.internalClient.AttemptStreamingSequence(ctx, req, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *SequenceClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *SequenceClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *SequenceClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *SequenceClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *SequenceClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *SequenceClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *SequenceClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *SequenceClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *SequenceClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// sequenceGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype sequenceGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing SequenceClient\n\tCallOptions **SequenceCallOptions\n\n\t// The gRPC API client.\n\tsequenceClient genprotopb.SequenceServiceClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewSequenceClient creates a new sequence service client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// A service that enables testing of unary and server streaming calls\n// by specifying a specific, predictable sequence of responses from the service\nfunc NewSequenceClient(ctx context.Context, opts ...option.ClientOption) (*SequenceClient, error) {\n\tclientOpts := defaultSequenceGRPCClientOptions()\n\tif newSequenceClientHook != nil {\n\t\thookOpts, err := newSequenceClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := SequenceClient{CallOptions: defaultSequenceCallOptions()}\n\n\tc := &sequenceGRPCClient{\n\t\tconnPool:         connPool,\n\t\tsequenceClient:   genprotopb.NewSequenceServiceClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *sequenceGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *sequenceGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *sequenceGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype sequenceRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing SequenceClient\n\tCallOptions **SequenceCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewSequenceRESTClient creates a new sequence service rest client.\n//\n// A service that enables testing of unary and server streaming calls\n// by specifying a specific, predictable sequence of responses from the service\nfunc NewSequenceRESTClient(ctx context.Context, opts ...option.ClientOption) (*SequenceClient, error) {\n\tclientOpts := append(defaultSequenceRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultSequenceRESTCallOptions()\n\tc := &sequenceRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\treturn &SequenceClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultSequenceRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *sequenceRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *sequenceRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *sequenceRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *sequenceGRPCClient) CreateSequence(ctx context.Context, req *genprotopb.CreateSequenceRequest, opts ...gax.CallOption) (*genprotopb.Sequence, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).CreateSequence[0:len((*c.CallOptions).CreateSequence):len((*c.CallOptions).CreateSequence)], opts...)\n\tvar resp *genprotopb.Sequence\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.sequenceClient.CreateSequence, req, settings.GRPC, c.logger, \"CreateSequence\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) CreateStreamingSequence(ctx context.Context, req *genprotopb.CreateStreamingSequenceRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequence, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).CreateStreamingSequence[0:len((*c.CallOptions).CreateStreamingSequence):len((*c.CallOptions).CreateStreamingSequence)], opts...)\n\tvar resp *genprotopb.StreamingSequence\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.sequenceClient.CreateStreamingSequence, req, settings.GRPC, c.logger, \"CreateStreamingSequence\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) GetSequenceReport(ctx context.Context, req *genprotopb.GetSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.SequenceReport, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetSequenceReport[0:len((*c.CallOptions).GetSequenceReport):len((*c.CallOptions).GetSequenceReport)], opts...)\n\tvar resp *genprotopb.SequenceReport\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.sequenceClient.GetSequenceReport, req, settings.GRPC, c.logger, \"GetSequenceReport\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) GetStreamingSequenceReport(ctx context.Context, req *genprotopb.GetStreamingSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequenceReport, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetStreamingSequenceReport[0:len((*c.CallOptions).GetStreamingSequenceReport):len((*c.CallOptions).GetStreamingSequenceReport)], opts...)\n\tvar resp *genprotopb.StreamingSequenceReport\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.sequenceClient.GetStreamingSequenceReport, req, settings.GRPC, c.logger, \"GetStreamingSequenceReport\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) AttemptSequence(ctx context.Context, req *genprotopb.AttemptSequenceRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).AttemptSequence[0:len((*c.CallOptions).AttemptSequence):len((*c.CallOptions).AttemptSequence)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.sequenceClient.AttemptSequence, req, settings.GRPC, c.logger, \"AttemptSequence\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *sequenceGRPCClient) AttemptStreamingSequence(ctx context.Context, req *genprotopb.AttemptStreamingSequenceRequest, opts ...gax.CallOption) (genprotopb.SequenceService_AttemptStreamingSequenceClient, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).AttemptStreamingSequence[0:len((*c.CallOptions).AttemptStreamingSequence):len((*c.CallOptions).AttemptStreamingSequence)], opts...)\n\tvar resp genprotopb.SequenceService_AttemptStreamingSequenceClient\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tc.logger.DebugContext(ctx, \"api streaming client request\", \"serviceName\", serviceName, \"rpcName\", \"AttemptStreamingSequence\")\n\t\tresp, err = c.sequenceClient.AttemptStreamingSequence(ctx, req, settings.GRPC...)\n\t\tc.logger.DebugContext(ctx, \"api streaming client response\", \"serviceName\", serviceName, \"rpcName\", \"AttemptStreamingSequence\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *sequenceGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *sequenceGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *sequenceGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *sequenceGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// CreateSequence create a sequence of responses to be returned as unary calls\nfunc (c *sequenceRESTClient) CreateSequence(ctx context.Context, req *genprotopb.CreateSequenceRequest, opts ...gax.CallOption) (*genprotopb.Sequence, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetSequence()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/sequences\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateSequence[0:len((*c.CallOptions).CreateSequence):len((*c.CallOptions).CreateSequence)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Sequence{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateSequence\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// CreateStreamingSequence creates a sequence of responses to be returned in a server streaming call\nfunc (c *sequenceRESTClient) CreateStreamingSequence(ctx context.Context, req *genprotopb.CreateStreamingSequenceRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequence, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetStreamingSequence()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/streamingSequences\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateStreamingSequence[0:len((*c.CallOptions).CreateStreamingSequence):len((*c.CallOptions).CreateStreamingSequence)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.StreamingSequence{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateStreamingSequence\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetSequenceReport retrieves a sequence report which can be used to retrieve information about a\n// sequence of unary calls.\nfunc (c *sequenceRESTClient) GetSequenceReport(ctx context.Context, req *genprotopb.GetSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.SequenceReport, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetSequenceReport[0:len((*c.CallOptions).GetSequenceReport):len((*c.CallOptions).GetSequenceReport)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.SequenceReport{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetSequenceReport\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetStreamingSequenceReport retrieves a sequence report which can be used to retrieve information\n// about a sequences of responses in a server streaming call.\nfunc (c *sequenceRESTClient) GetStreamingSequenceReport(ctx context.Context, req *genprotopb.GetStreamingSequenceReportRequest, opts ...gax.CallOption) (*genprotopb.StreamingSequenceReport, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetStreamingSequenceReport[0:len((*c.CallOptions).GetStreamingSequenceReport):len((*c.CallOptions).GetStreamingSequenceReport)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.StreamingSequenceReport{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetStreamingSequenceReport\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// AttemptSequence attempts a sequence of unary responses.\nfunc (c *sequenceRESTClient) AttemptSequence(ctx context.Context, req *genprotopb.AttemptSequenceRequest, opts ...gax.CallOption) error {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"AttemptSequence\")\n\t\treturn err\n\t}, opts...)\n}\n\n// AttemptStreamingSequence attempts a server streaming call with a sequence of responses\n// Can be used to test retries and stream resumption logic\n// May not function as expected in HTTP mode due to when http statuses are sent\n// See https://github.com/googleapis/gapic-showcase/issues/1377 (at https://github.com/googleapis/gapic-showcase/issues/1377) for more details\nfunc (c *sequenceRESTClient) AttemptStreamingSequence(ctx context.Context, req *genprotopb.AttemptStreamingSequenceRequest, opts ...gax.CallOption) (genprotopb.SequenceService_AttemptStreamingSequenceClient, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:stream\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\tvar streamClient *attemptStreamingSequenceRESTStreamClient\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\thttpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"AttemptStreamingSequence\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tstreamClient = &attemptStreamingSequenceRESTStreamClient{\n\t\t\tctx:    ctx,\n\t\t\tmd:     metadata.MD(httpRsp.Header),\n\t\t\tstream: gax.NewProtoJSONStreamReader(httpRsp.Body, (&genprotopb.AttemptStreamingSequenceResponse{}).ProtoReflect().Type()),\n\t\t}\n\t\treturn nil\n\t}, opts...)\n\n\treturn streamClient, e\n}\n\n// attemptStreamingSequenceRESTStreamClient is the stream client used to consume the server stream created by\n// the REST implementation of AttemptStreamingSequence.\ntype attemptStreamingSequenceRESTStreamClient struct {\n\tctx    context.Context\n\tmd     metadata.MD\n\tstream *gax.ProtoJSONStream\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) Recv() (*genprotopb.AttemptStreamingSequenceResponse, error) {\n\tif err := c.ctx.Err(); err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tmsg, err := c.stream.Recv()\n\tif err != nil {\n\t\tdefer c.stream.Close()\n\t\treturn nil, err\n\t}\n\tres := msg.(*genprotopb.AttemptStreamingSequenceResponse)\n\treturn res, nil\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) Header() (metadata.MD, error) {\n\treturn c.md, nil\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) Trailer() metadata.MD {\n\treturn c.md\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) CloseSend() error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) Context() context.Context {\n\treturn c.ctx\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) SendMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented for a server-stream\")\n}\n\nfunc (c *attemptStreamingSequenceRESTStreamClient) RecvMsg(m interface{}) error {\n\t// This is a no-op to fulfill the interface.\n\treturn errors.New(\"this method is not implemented, use Recv\")\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *sequenceRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *sequenceRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *sequenceRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *sequenceRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *sequenceRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *sequenceRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *sequenceRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *sequenceRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *sequenceRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n"
  },
  {
    "path": "client/sequence_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleSequenceClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleSequenceClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/sequence_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewSequenceClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewSequenceRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleSequenceClient_AttemptSequence() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.AttemptSequenceRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#AttemptSequenceRequest.\n\t}\n\terr = c.AttemptSequence(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleSequenceClient_CreateSequence() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateSequenceRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateSequenceRequest.\n\t}\n\tresp, err := c.CreateSequence(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_CreateStreamingSequence() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateStreamingSequenceRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateStreamingSequenceRequest.\n\t}\n\tresp, err := c.CreateStreamingSequence(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_GetSequenceReport() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetSequenceReportRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSequenceReportRequest.\n\t}\n\tresp, err := c.GetSequenceReport(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_GetStreamingSequenceReport() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetStreamingSequenceReportRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetStreamingSequenceReportRequest.\n\t}\n\tresp, err := c.GetStreamingSequenceReport(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleSequenceClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleSequenceClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleSequenceClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleSequenceClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewSequenceClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "client/testing_client.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tgax \"github.com/googleapis/gax-go/v2\"\n\t\"google.golang.org/api/iterator\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/api/option/internaloption\"\n\tgtransport \"google.golang.org/api/transport/grpc\"\n\thttptransport \"google.golang.org/api/transport/http\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar newTestingClientHook clientHook\n\n// TestingCallOptions contains the retry settings for each method of TestingClient.\ntype TestingCallOptions struct {\n\tCreateSession      []gax.CallOption\n\tGetSession         []gax.CallOption\n\tListSessions       []gax.CallOption\n\tDeleteSession      []gax.CallOption\n\tReportSession      []gax.CallOption\n\tListTests          []gax.CallOption\n\tDeleteTest         []gax.CallOption\n\tVerifyTest         []gax.CallOption\n\tListLocations      []gax.CallOption\n\tGetLocation        []gax.CallOption\n\tSetIamPolicy       []gax.CallOption\n\tGetIamPolicy       []gax.CallOption\n\tTestIamPermissions []gax.CallOption\n\tListOperations     []gax.CallOption\n\tGetOperation       []gax.CallOption\n\tDeleteOperation    []gax.CallOption\n\tCancelOperation    []gax.CallOption\n}\n\nfunc defaultTestingGRPCClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableJwtWithScope(),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t\toption.WithGRPCDialOption(grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(math.MaxInt32))),\n\t}\n}\n\nfunc defaultTestingCallOptions() *TestingCallOptions {\n\treturn &TestingCallOptions{\n\t\tCreateSession:      []gax.CallOption{},\n\t\tGetSession:         []gax.CallOption{},\n\t\tListSessions:       []gax.CallOption{},\n\t\tDeleteSession:      []gax.CallOption{},\n\t\tReportSession:      []gax.CallOption{},\n\t\tListTests:          []gax.CallOption{},\n\t\tDeleteTest:         []gax.CallOption{},\n\t\tVerifyTest:         []gax.CallOption{},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\nfunc defaultTestingRESTCallOptions() *TestingCallOptions {\n\treturn &TestingCallOptions{\n\t\tCreateSession:      []gax.CallOption{},\n\t\tGetSession:         []gax.CallOption{},\n\t\tListSessions:       []gax.CallOption{},\n\t\tDeleteSession:      []gax.CallOption{},\n\t\tReportSession:      []gax.CallOption{},\n\t\tListTests:          []gax.CallOption{},\n\t\tDeleteTest:         []gax.CallOption{},\n\t\tVerifyTest:         []gax.CallOption{},\n\t\tListLocations:      []gax.CallOption{},\n\t\tGetLocation:        []gax.CallOption{},\n\t\tSetIamPolicy:       []gax.CallOption{},\n\t\tGetIamPolicy:       []gax.CallOption{},\n\t\tTestIamPermissions: []gax.CallOption{},\n\t\tListOperations:     []gax.CallOption{},\n\t\tGetOperation:       []gax.CallOption{},\n\t\tDeleteOperation:    []gax.CallOption{},\n\t\tCancelOperation:    []gax.CallOption{},\n\t}\n}\n\n// internalTestingClient is an interface that defines the methods available from Client Libraries Showcase API.\ntype internalTestingClient interface {\n\tClose() error\n\tsetGoogleClientInfo(...string)\n\tConnection() *grpc.ClientConn\n\tCreateSession(context.Context, *genprotopb.CreateSessionRequest, ...gax.CallOption) (*genprotopb.Session, error)\n\tGetSession(context.Context, *genprotopb.GetSessionRequest, ...gax.CallOption) (*genprotopb.Session, error)\n\tListSessions(context.Context, *genprotopb.ListSessionsRequest, ...gax.CallOption) *SessionIterator\n\tDeleteSession(context.Context, *genprotopb.DeleteSessionRequest, ...gax.CallOption) error\n\tReportSession(context.Context, *genprotopb.ReportSessionRequest, ...gax.CallOption) (*genprotopb.ReportSessionResponse, error)\n\tListTests(context.Context, *genprotopb.ListTestsRequest, ...gax.CallOption) *TestIterator\n\tDeleteTest(context.Context, *genprotopb.DeleteTestRequest, ...gax.CallOption) error\n\tVerifyTest(context.Context, *genprotopb.VerifyTestRequest, ...gax.CallOption) (*genprotopb.VerifyTestResponse, error)\n\tListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator\n\tGetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)\n\tSetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tGetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)\n\tTestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)\n\tListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator\n\tGetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)\n\tDeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error\n\tCancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error\n}\n\n// TestingClient is a client for interacting with Client Libraries Showcase API.\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\n//\n// A service to facilitate running discrete sets of tests\n// against Showcase.\n// Adding this comment with special characters for comment formatting tests:\n//\n// (abra->kadabra->alakazam)\n//\n// Nonsense: pokemon/*/psychic/*\ntype TestingClient struct {\n\t// The internal transport-dependent client.\n\tinternalClient internalTestingClient\n\n\t// The call options for this service.\n\tCallOptions *TestingCallOptions\n}\n\n// Wrapper methods routed to the internal client.\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *TestingClient) Close() error {\n\treturn c.internalClient.Close()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *TestingClient) setGoogleClientInfo(keyval ...string) {\n\tc.internalClient.setGoogleClientInfo(keyval...)\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *TestingClient) Connection() *grpc.ClientConn {\n\treturn c.internalClient.Connection()\n}\n\n// CreateSession creates a new testing session.\n// Adding this comment with special characters for comment formatting tests:\n//\n// (abra->kadabra->alakazam)\n//\n// Nonsense: pokemon/*/psychic/*\nfunc (c *TestingClient) CreateSession(ctx context.Context, req *genprotopb.CreateSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\treturn c.internalClient.CreateSession(ctx, req, opts...)\n}\n\n// GetSession gets a testing session.\nfunc (c *TestingClient) GetSession(ctx context.Context, req *genprotopb.GetSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\treturn c.internalClient.GetSession(ctx, req, opts...)\n}\n\n// ListSessions lists the current test sessions.\nfunc (c *TestingClient) ListSessions(ctx context.Context, req *genprotopb.ListSessionsRequest, opts ...gax.CallOption) *SessionIterator {\n\treturn c.internalClient.ListSessions(ctx, req, opts...)\n}\n\n// DeleteSession delete a test session.\nfunc (c *TestingClient) DeleteSession(ctx context.Context, req *genprotopb.DeleteSessionRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteSession(ctx, req, opts...)\n}\n\n// ReportSession report on the status of a session.\n// This generates a report detailing which tests have been completed,\n// and an overall rollup.\nfunc (c *TestingClient) ReportSession(ctx context.Context, req *genprotopb.ReportSessionRequest, opts ...gax.CallOption) (*genprotopb.ReportSessionResponse, error) {\n\treturn c.internalClient.ReportSession(ctx, req, opts...)\n}\n\n// ListTests list the tests of a sessesion.\nfunc (c *TestingClient) ListTests(ctx context.Context, req *genprotopb.ListTestsRequest, opts ...gax.CallOption) *TestIterator {\n\treturn c.internalClient.ListTests(ctx, req, opts...)\n}\n\n// DeleteTest explicitly decline to implement a test.\n//\n// This removes the test from subsequent ListTests calls, and\n// attempting to do the test will error.\n//\n// This method will error if attempting to delete a required test.\nfunc (c *TestingClient) DeleteTest(ctx context.Context, req *genprotopb.DeleteTestRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteTest(ctx, req, opts...)\n}\n\n// VerifyTest register a response to a test.\n//\n// In cases where a test involves registering a final answer at the\n// end of the test, this method provides the means to do so.\nfunc (c *TestingClient) VerifyTest(ctx context.Context, req *genprotopb.VerifyTestRequest, opts ...gax.CallOption) (*genprotopb.VerifyTestResponse, error) {\n\treturn c.internalClient.VerifyTest(ctx, req, opts...)\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *TestingClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\treturn c.internalClient.ListLocations(ctx, req, opts...)\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *TestingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\treturn c.internalClient.GetLocation(ctx, req, opts...)\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *TestingClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.SetIamPolicy(ctx, req, opts...)\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *TestingClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\treturn c.internalClient.GetIamPolicy(ctx, req, opts...)\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *TestingClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\treturn c.internalClient.TestIamPermissions(ctx, req, opts...)\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *TestingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\treturn c.internalClient.ListOperations(ctx, req, opts...)\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *TestingClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\treturn c.internalClient.GetOperation(ctx, req, opts...)\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *TestingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.DeleteOperation(ctx, req, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *TestingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\treturn c.internalClient.CancelOperation(ctx, req, opts...)\n}\n\n// testingGRPCClient is a client for interacting with Client Libraries Showcase API over gRPC transport.\n//\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype testingGRPCClient struct {\n\t// Connection pool of gRPC connections to the service.\n\tconnPool gtransport.ConnPool\n\n\t// Points back to the CallOptions field of the containing TestingClient\n\tCallOptions **TestingCallOptions\n\n\t// The gRPC API client.\n\ttestingClient genprotopb.TestingClient\n\n\toperationsClient longrunningpb.OperationsClient\n\n\tiamPolicyClient iampb.IAMPolicyClient\n\n\tlocationsClient locationpb.LocationsClient\n\n\t// The x-goog-* metadata to be sent with each request.\n\txGoogHeaders []string\n\n\tlogger *slog.Logger\n}\n\n// NewTestingClient creates a new testing client based on gRPC.\n// The returned client must be Closed when it is done being used to clean up its underlying connections.\n//\n// A service to facilitate running discrete sets of tests\n// against Showcase.\n// Adding this comment with special characters for comment formatting tests:\n//\n// (abra->kadabra->alakazam)\n//\n// Nonsense: pokemon/*/psychic/*\nfunc NewTestingClient(ctx context.Context, opts ...option.ClientOption) (*TestingClient, error) {\n\tclientOpts := defaultTestingGRPCClientOptions()\n\tif newTestingClientHook != nil {\n\t\thookOpts, err := newTestingClientHook(ctx, clientHookParams{})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tclientOpts = append(clientOpts, hookOpts...)\n\t}\n\n\tconnPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := TestingClient{CallOptions: defaultTestingCallOptions()}\n\n\tc := &testingGRPCClient{\n\t\tconnPool:         connPool,\n\t\ttestingClient:    genprotopb.NewTestingClient(connPool),\n\t\tCallOptions:      &client.CallOptions,\n\t\tlogger:           internaloption.GetLogger(opts),\n\t\toperationsClient: longrunningpb.NewOperationsClient(connPool),\n\t\tiamPolicyClient:  iampb.NewIAMPolicyClient(connPool),\n\t\tlocationsClient:  locationpb.NewLocationsClient(connPool),\n\t}\n\tc.setGoogleClientInfo()\n\n\tclient.internalClient = c\n\n\treturn &client, nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: Connections are now pooled so this method does not always\n// return the same resource.\nfunc (c *testingGRPCClient) Connection() *grpc.ClientConn {\n\treturn c.connPool.Conn()\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *testingGRPCClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"grpc\", grpc.Version, \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *testingGRPCClient) Close() error {\n\treturn c.connPool.Close()\n}\n\n// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.\ntype testingRESTClient struct {\n\t// The http endpoint to connect to.\n\tendpoint string\n\n\t// The http client.\n\thttpClient *http.Client\n\n\t// The x-goog-* headers to be sent with each request.\n\txGoogHeaders []string\n\n\t// Points back to the CallOptions field of the containing TestingClient\n\tCallOptions **TestingCallOptions\n\n\tlogger *slog.Logger\n}\n\n// NewTestingRESTClient creates a new testing rest client.\n//\n// A service to facilitate running discrete sets of tests\n// against Showcase.\n// Adding this comment with special characters for comment formatting tests:\n//\n// (abra->kadabra->alakazam)\n//\n// Nonsense: pokemon/*/psychic/*\nfunc NewTestingRESTClient(ctx context.Context, opts ...option.ClientOption) (*TestingClient, error) {\n\tclientOpts := append(defaultTestingRESTClientOptions(), opts...)\n\thttpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallOpts := defaultTestingRESTCallOptions()\n\tc := &testingRESTClient{\n\t\tendpoint:    endpoint,\n\t\thttpClient:  httpClient,\n\t\tCallOptions: &callOpts,\n\t\tlogger:      internaloption.GetLogger(opts),\n\t}\n\tc.setGoogleClientInfo()\n\n\treturn &TestingClient{internalClient: c, CallOptions: callOpts}, nil\n}\n\nfunc defaultTestingRESTClientOptions() []option.ClientOption {\n\treturn []option.ClientOption{\n\t\tinternaloption.WithDefaultEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultEndpointTemplate(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultMTLSEndpoint(\"https://localhost:7469\"),\n\t\tinternaloption.WithDefaultUniverseDomain(\"googleapis.com\"),\n\t\tinternaloption.WithDefaultAudience(\"https://localhost/\"),\n\t\tinternaloption.WithDefaultScopes(DefaultAuthScopes()...),\n\t\tinternaloption.EnableNewAuthLibrary(),\n\t}\n}\n\n// setGoogleClientInfo sets the name and version of the application in\n// the `x-goog-api-client` header passed on each request. Intended for\n// use by Google-written clients.\nfunc (c *testingRESTClient) setGoogleClientInfo(keyval ...string) {\n\tkv := append([]string{\"gl-go\", gax.GoVersion}, keyval...)\n\tkv = append(kv, \"gapic\", getVersionClient(), \"gax\", gax.Version, \"rest\", \"UNKNOWN\", \"pb\", protoVersion)\n\tc.xGoogHeaders = []string{\n\t\t\"x-goog-api-client\", gax.XGoogHeader(kv...),\n\t}\n}\n\n// Close closes the connection to the API service. The user should invoke this when\n// the client is no longer required.\nfunc (c *testingRESTClient) Close() error {\n\t// Replace httpClient with nil to force cleanup.\n\tc.httpClient = nil\n\treturn nil\n}\n\n// Connection returns a connection to the API service.\n//\n// Deprecated: This method always returns nil.\nfunc (c *testingRESTClient) Connection() *grpc.ClientConn {\n\treturn nil\n}\nfunc (c *testingGRPCClient) CreateSession(ctx context.Context, req *genprotopb.CreateSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).CreateSession[0:len((*c.CallOptions).CreateSession):len((*c.CallOptions).CreateSession)], opts...)\n\tvar resp *genprotopb.Session\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.testingClient.CreateSession, req, settings.GRPC, c.logger, \"CreateSession\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) GetSession(ctx context.Context, req *genprotopb.GetSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetSession[0:len((*c.CallOptions).GetSession):len((*c.CallOptions).GetSession)], opts...)\n\tvar resp *genprotopb.Session\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.testingClient.GetSession, req, settings.GRPC, c.logger, \"GetSession\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) ListSessions(ctx context.Context, req *genprotopb.ListSessionsRequest, opts ...gax.CallOption) *SessionIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListSessions[0:len((*c.CallOptions).ListSessions):len((*c.CallOptions).ListSessions)], opts...)\n\tit := &SessionIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListSessionsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Session, string, error) {\n\t\tresp := &genprotopb.ListSessionsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.testingClient.ListSessions, req, settings.GRPC, c.logger, \"ListSessions\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetSessions(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *testingGRPCClient) DeleteSession(ctx context.Context, req *genprotopb.DeleteSessionRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteSession[0:len((*c.CallOptions).DeleteSession):len((*c.CallOptions).DeleteSession)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.testingClient.DeleteSession, req, settings.GRPC, c.logger, \"DeleteSession\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *testingGRPCClient) ReportSession(ctx context.Context, req *genprotopb.ReportSessionRequest, opts ...gax.CallOption) (*genprotopb.ReportSessionResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ReportSession[0:len((*c.CallOptions).ReportSession):len((*c.CallOptions).ReportSession)], opts...)\n\tvar resp *genprotopb.ReportSessionResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.testingClient.ReportSession, req, settings.GRPC, c.logger, \"ReportSession\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) ListTests(ctx context.Context, req *genprotopb.ListTestsRequest, opts ...gax.CallOption) *TestIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"parent\", url.QueryEscape(req.GetParent()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListTests[0:len((*c.CallOptions).ListTests):len((*c.CallOptions).ListTests)], opts...)\n\tit := &TestIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListTestsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Test, string, error) {\n\t\tresp := &genprotopb.ListTestsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.testingClient.ListTests, req, settings.GRPC, c.logger, \"ListTests\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetTests(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *testingGRPCClient) DeleteTest(ctx context.Context, req *genprotopb.DeleteTestRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteTest[0:len((*c.CallOptions).DeleteTest):len((*c.CallOptions).DeleteTest)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.testingClient.DeleteTest, req, settings.GRPC, c.logger, \"DeleteTest\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *testingGRPCClient) VerifyTest(ctx context.Context, req *genprotopb.VerifyTestRequest, opts ...gax.CallOption) (*genprotopb.VerifyTestResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).VerifyTest[0:len((*c.CallOptions).VerifyTest):len((*c.CallOptions).VerifyTest)], opts...)\n\tvar resp *genprotopb.VerifyTestResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.testingClient.VerifyTest, req, settings.GRPC, c.logger, \"VerifyTest\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...)\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, \"ListLocations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *testingGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tvar resp *locationpb.Location\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, \"GetLocation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, \"SetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tvar resp *iampb.Policy\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, \"GetIamPolicy\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tvar resp *iampb.TestIamPermissionsResponse\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, \"TestIamPermissions\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...)\n\topts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...)\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tvar err error\n\t\t\tresp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, \"ListOperations\")\n\t\t\treturn err\n\t\t}, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\nfunc (c *testingGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tvar resp *longrunningpb.Operation\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\tresp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, \"GetOperation\")\n\t\treturn err\n\t}, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\nfunc (c *testingGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\nfunc (c *testingGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\tctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)\n\topts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...)\n\terr := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tvar err error\n\t\t_, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n\treturn err\n}\n\n// CreateSession creates a new testing session.\n// Adding this comment with special characters for comment formatting tests:\n//\n// (abra->kadabra->alakazam)\n//\n// Nonsense: pokemon/*/psychic/*\nfunc (c *testingRESTClient) CreateSession(ctx context.Context, req *genprotopb.CreateSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tbody := req.GetSession()\n\tjsonReq, err := m.Marshal(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/sessions\")\n\n\t// Build HTTP headers from client and context metadata.\n\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).CreateSession[0:len((*c.CallOptions).CreateSession):len((*c.CallOptions).CreateSession)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Session{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"CreateSession\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetSession gets a testing session.\nfunc (c *testingRESTClient) GetSession(ctx context.Context, req *genprotopb.GetSessionRequest, opts ...gax.CallOption) (*genprotopb.Session, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetSession[0:len((*c.CallOptions).GetSession):len((*c.CallOptions).GetSession)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.Session{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetSession\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListSessions lists the current test sessions.\nfunc (c *testingRESTClient) ListSessions(ctx context.Context, req *genprotopb.ListSessionsRequest, opts ...gax.CallOption) *SessionIterator {\n\tit := &SessionIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListSessionsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Session, string, error) {\n\t\tresp := &genprotopb.ListSessionsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/sessions\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListSessions\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetSessions(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// DeleteSession delete a test session.\nfunc (c *testingRESTClient) DeleteSession(ctx context.Context, req *genprotopb.DeleteSessionRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteSession\")\n\t\treturn err\n\t}, opts...)\n}\n\n// ReportSession report on the status of a session.\n// This generates a report detailing which tests have been completed,\n// and an overall rollup.\nfunc (c *testingRESTClient) ReportSession(ctx context.Context, req *genprotopb.ReportSessionRequest, opts ...gax.CallOption) (*genprotopb.ReportSessionResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:report\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).ReportSession[0:len((*c.CallOptions).ReportSession):len((*c.CallOptions).ReportSession)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.ReportSessionResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ReportSession\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListTests list the tests of a sessesion.\nfunc (c *testingRESTClient) ListTests(ctx context.Context, req *genprotopb.ListTestsRequest, opts ...gax.CallOption) *TestIterator {\n\tit := &TestIterator{}\n\treq = proto.Clone(req).(*genprotopb.ListTestsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*genprotopb.Test, string, error) {\n\t\tresp := &genprotopb.ListTestsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/tests\", req.GetParent())\n\n\t\tparams := url.Values{}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListTests\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetTests(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// DeleteTest explicitly decline to implement a test.\n//\n// This removes the test from subsequent ListTests calls, and\n// attempting to do the test will error.\n//\n// This method will error if attempting to delete a required test.\nfunc (c *testingRESTClient) DeleteTest(ctx context.Context, req *genprotopb.DeleteTestRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteTest\")\n\t\treturn err\n\t}, opts...)\n}\n\n// VerifyTest register a response to a test.\n//\n// In cases where a test involves registering a final answer at the\n// end of the test, this method provides the means to do so.\nfunc (c *testingRESTClient) VerifyTest(ctx context.Context, req *genprotopb.VerifyTestRequest, opts ...gax.CallOption) (*genprotopb.VerifyTestResponse, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:check\", req.GetName())\n\n\tparams := url.Values{}\n\tif req.GetAnswer() != nil {\n\t\tparams.Add(\"answer\", fmt.Sprintf(\"%v\", req.GetAnswer()))\n\t}\n\tif items := req.GetAnswers(); len(items) > 0 {\n\t\tfor _, item := range items {\n\t\t\tparams.Add(\"answers\", fmt.Sprintf(\"%v\", item))\n\t\t}\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).VerifyTest[0:len((*c.CallOptions).VerifyTest):len((*c.CallOptions).VerifyTest)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &genprotopb.VerifyTestResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"VerifyTest\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListLocations is a utility method from google.cloud.location.Locations.\nfunc (c *testingRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {\n\tit := &LocationIterator{}\n\treq = proto.Clone(req).(*locationpb.ListLocationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) {\n\t\tresp := &locationpb.ListLocationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v/locations\", req.GetName())\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListLocations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetLocations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetLocation is a utility method from google.cloud.location.Locations.\nfunc (c *testingRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &locationpb.Location{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetLocation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// SetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *testingRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:setIamPolicy\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"SetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// GetIamPolicy is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *testingRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:getIamPolicy\", req.GetResource())\n\n\tparams := url.Values{}\n\tif req.GetOptions().GetRequestedPolicyVersion() != 0 {\n\t\tparams.Add(\"options.requestedPolicyVersion\", fmt.Sprintf(\"%v\", req.GetOptions().GetRequestedPolicyVersion()))\n\t}\n\n\tbaseUrl.RawQuery = params.Encode()\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.Policy{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetIamPolicy\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// TestIamPermissions is a utility method from google.iam.v1.IAMPolicy.\nfunc (c *testingRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {\n\tm := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}\n\tjsonReq, err := m.Marshal(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:testIamPermissions\", req.GetResource())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"resource\", url.QueryEscape(req.GetResource()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &iampb.TestIamPermissionsResponse{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), bytes.NewReader(jsonReq))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, \"TestIamPermissions\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// ListOperations is a utility method from google.longrunning.Operations.\nfunc (c *testingRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {\n\tit := &OperationIterator{}\n\treq = proto.Clone(req).(*longrunningpb.ListOperationsRequest)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tit.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) {\n\t\tresp := &longrunningpb.ListOperationsResponse{}\n\t\tif pageToken != \"\" {\n\t\t\treq.PageToken = pageToken\n\t\t}\n\t\tif pageSize > math.MaxInt32 {\n\t\t\treq.PageSize = math.MaxInt32\n\t\t} else if pageSize != 0 {\n\t\t\treq.PageSize = int32(pageSize)\n\t\t}\n\t\tbaseUrl, err := url.Parse(c.endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/operations\")\n\n\t\tparams := url.Values{}\n\t\tif req.GetFilter() != \"\" {\n\t\t\tparams.Add(\"filter\", fmt.Sprintf(\"%v\", req.GetFilter()))\n\t\t}\n\t\tif req.GetName() != \"\" {\n\t\t\tparams.Add(\"name\", fmt.Sprintf(\"%v\", req.GetName()))\n\t\t}\n\t\tif req.GetPageSize() != 0 {\n\t\t\tparams.Add(\"pageSize\", fmt.Sprintf(\"%v\", req.GetPageSize()))\n\t\t}\n\t\tif req.GetPageToken() != \"\" {\n\t\t\tparams.Add(\"pageToken\", fmt.Sprintf(\"%v\", req.GetPageToken()))\n\t\t}\n\t\tif req.GetReturnPartialSuccess() {\n\t\t\tparams.Add(\"returnPartialSuccess\", fmt.Sprintf(\"%v\", req.GetReturnPartialSuccess()))\n\t\t}\n\n\t\tbaseUrl.RawQuery = params.Encode()\n\n\t\t// Build HTTP headers from client and context metadata.\n\t\thds := append(c.xGoogHeaders, \"Content-Type\", \"application/json\")\n\t\theaders := gax.BuildHeaders(ctx, hds...)\n\t\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\t\tif settings.Path != \"\" {\n\t\t\t\tbaseUrl.Path = settings.Path\n\t\t\t}\n\t\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\thttpReq.Header = headers\n\n\t\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"ListOperations\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}, opts...)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", e\n\t\t}\n\t\tit.Response = resp\n\t\treturn resp.GetOperations(), resp.GetNextPageToken(), nil\n\t}\n\n\tfetch := func(pageSize int, pageToken string) (string, error) {\n\t\titems, nextPageToken, err := it.InternalFetch(pageSize, pageToken)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tit.items = append(it.items, items...)\n\t\treturn nextPageToken, nil\n\t}\n\n\tit.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)\n\tit.pageInfo.MaxSize = int(req.GetPageSize())\n\tit.pageInfo.Token = req.GetPageToken()\n\n\treturn it\n}\n\n// GetOperation is a utility method from google.longrunning.Operations.\nfunc (c *testingRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\topts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...)\n\tunm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}\n\tresp := &longrunningpb.Operation{}\n\te := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"GET\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\tbuf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"GetOperation\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := unm.Unmarshal(buf, resp); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}, opts...)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn resp, nil\n}\n\n// DeleteOperation is a utility method from google.longrunning.Operations.\nfunc (c *testingRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"DELETE\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"DeleteOperation\")\n\t\treturn err\n\t}, opts...)\n}\n\n// CancelOperation is a utility method from google.longrunning.Operations.\nfunc (c *testingRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {\n\tbaseUrl, err := url.Parse(c.endpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbaseUrl.Path += fmt.Sprintf(\"/v1beta1/%v:cancel\", req.GetName())\n\n\t// Build HTTP headers from client and context metadata.\n\thds := []string{\"x-goog-request-params\", fmt.Sprintf(\"%s=%v\", \"name\", url.QueryEscape(req.GetName()))}\n\n\thds = append(c.xGoogHeaders, hds...)\n\thds = append(hds, \"Content-Type\", \"application/json\")\n\theaders := gax.BuildHeaders(ctx, hds...)\n\treturn gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {\n\t\tif settings.Path != \"\" {\n\t\t\tbaseUrl.Path = settings.Path\n\t\t}\n\t\thttpReq, err := http.NewRequest(\"POST\", baseUrl.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thttpReq = httpReq.WithContext(ctx)\n\t\thttpReq.Header = headers\n\n\t\t_, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, \"CancelOperation\")\n\t\treturn err\n\t}, opts...)\n}\n"
  },
  {
    "path": "client/testing_client_example_go123_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\n//go:build go1.23\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleTestingClient_ListSessions_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListSessionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListSessionsRequest.\n\t}\n\tfor resp, err := range c.ListSessions(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleTestingClient_ListTests_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListTestsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListTestsRequest.\n\t}\n\tfor resp, err := range c.ListTests(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleTestingClient_ListLocations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tfor resp, err := range c.ListLocations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n\nfunc ExampleTestingClient_ListOperations_all() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tfor resp, err := range c.ListOperations(ctx, req).All() {\n\t\tif err != nil {\n\t\t\t// TODO: Handle error and break/return/continue. Iteration will stop after any error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\t}\n}\n"
  },
  {
    "path": "client/testing_client_example_test.go",
    "content": "// Copyright 2026 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//     https://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\n// Code generated by protoc-gen-go_gapic. DO NOT EDIT.\n\npackage client_test\n\nimport (\n\t\"context\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tclient \"github.com/googleapis/gapic-showcase/client\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/api/iterator\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n)\n\nfunc ExampleNewTestingClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleNewTestingRESTClient() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingRESTClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\t// TODO: Use client.\n\t_ = c\n}\n\nfunc ExampleTestingClient_CreateSession() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.CreateSessionRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateSessionRequest.\n\t}\n\tresp, err := c.CreateSession(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_DeleteSession() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.DeleteSessionRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteSessionRequest.\n\t}\n\terr = c.DeleteSession(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleTestingClient_DeleteTest() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.DeleteTestRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteTestRequest.\n\t}\n\terr = c.DeleteTest(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleTestingClient_GetSession() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.GetSessionRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSessionRequest.\n\t}\n\tresp, err := c.GetSession(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_ListSessions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListSessionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListSessionsRequest.\n\t}\n\tit := c.ListSessions(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.ListSessionsResponse)\n\t}\n}\n\nfunc ExampleTestingClient_ListTests() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ListTestsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListTestsRequest.\n\t}\n\tit := c.ListTests(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*genprotopb.ListTestsResponse)\n\t}\n}\n\nfunc ExampleTestingClient_ReportSession() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.ReportSessionRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ReportSessionRequest.\n\t}\n\tresp, err := c.ReportSession(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_VerifyTest() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &genprotopb.VerifyTestRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#VerifyTestRequest.\n\t}\n\tresp, err := c.VerifyTest(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_ListLocations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.ListLocationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.\n\t}\n\tit := c.ListLocations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*locationpb.ListLocationsResponse)\n\t}\n}\n\nfunc ExampleTestingClient_GetLocation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &locationpb.GetLocationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.\n\t}\n\tresp, err := c.GetLocation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_SetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.SetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.\n\t}\n\tresp, err := c.SetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_GetIamPolicy() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.GetIamPolicyRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.\n\t}\n\tresp, err := c.GetIamPolicy(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_TestIamPermissions() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &iampb.TestIamPermissionsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.\n\t}\n\tresp, err := c.TestIamPermissions(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_ListOperations() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.ListOperationsRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.\n\t}\n\tit := c.ListOperations(ctx, req)\n\tfor {\n\t\tresp, err := it.Next()\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\t// TODO: Handle error.\n\t\t}\n\t\t// TODO: Use resp.\n\t\t_ = resp\n\n\t\t// If you need to access the underlying RPC response,\n\t\t// you can do so by casting the `Response` as below.\n\t\t// Otherwise, remove this line. Only populated after\n\t\t// first call to Next(). Not safe for concurrent access.\n\t\t_ = it.Response.(*longrunningpb.ListOperationsResponse)\n\t}\n}\n\nfunc ExampleTestingClient_GetOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.GetOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.\n\t}\n\tresp, err := c.GetOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\t// TODO: Use resp.\n\t_ = resp\n}\n\nfunc ExampleTestingClient_DeleteOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.DeleteOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.\n\t}\n\terr = c.DeleteOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n\nfunc ExampleTestingClient_CancelOperation() {\n\tctx := context.Background()\n\t// This snippet has been automatically generated and should be regarded as a code template only.\n\t// It will require modifications to work:\n\t// - It may require correct/in-range values for request initialization.\n\t// - It may require specifying regional endpoints when creating the service client as shown in:\n\t//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options\n\tc, err := client.NewTestingClient(ctx)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n\tdefer c.Close()\n\n\treq := &longrunningpb.CancelOperationRequest{\n\t\t// TODO: Fill request struct fields.\n\t\t// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.\n\t}\n\terr = c.CancelOperation(ctx, req)\n\tif err != nil {\n\t\t// TODO: Handle error.\n\t}\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/README.md",
    "content": "# gapic-showcase\nThis directory contains the command line interface (CLI) used to run the\nShowcase API server as well as make requests to the Showcase API.\n\n## Installation\n```sh\n$ go install github.com/googleapis/gapic-showcase/cmd/gapic-showcase\n```\n\n## Usage\n```sh\n$ gapic-showcase --help\n\n> Root command of gapic-showcase\n>\n> Usage:\n>   gapic-showcase [command]\n>\n> Available Commands:\n>   completion  Emits bash a completion for gapic-showcase\n>   echo        This service is used showcase the four main types...\n>   help        Help about any command\n>   identity    A simple identity service.\n>   messaging   A simple messaging service that implements chat...\n>   run         Runs the showcase server\n>   testing     A service to facilitate running discrete sets of...\n>\n> Flags:\n>   -h, --help      help for gapic-showcase\n>   -j, --json      Print JSON output\n>   -v, --verbose   Print verbose output\n>       --version   version for gapic-showcase\n>\n> Use \"gapic-showcase [command] --help\" for more information about a command.\n```\n\n### Running the server\n```sh\n$ gapic-showcase run --help\n\n> Runs the showcase server\n>\n> Usage:\n>   gapic-showcase run [flags]\n>\n> Flags:\n>   -h, --help          help for run\n>   -p, --port string   The port that showcase will be served on. (default \":7469\")\n>\n> Global Flags:\n>   -j, --json      Print JSON output\n>   -v, --verbose   Print verbose output\n\n\n$ gapic-showcase run --port 1234\n\n> 2019/04/01 12:36:35 Showcase listening on port: :1234\n```\n\n### Making a request\nA request can also be made to the Showcase API using this CLI. The command to make a request\nis done by using a service's subcommand, the method's subcommand and passing the request values\nas flags as shown below.\n```\n$ gapic-showcase {service_name} {method_name} --{request_field_name} {value}\n```\n\n#### Example\n```sh\n$ gapic-showcase identity --help\n\n> A simple identity service.\n>\n> Usage:\n>   gapic-showcase identity [command]\n>\n> Available Commands:\n>   create-user Creates a user.\n>   delete-user Deletes a user, their profile, and all of their...\n>   get-user    Retrieves the User with the given uri.\n>   list-users  Lists all users.\n>   update-user Updates a user.\n>\n> Flags:\n>       --address string   Set API address used by client. Or use GAPIC-SHOWCASE_IDENTITY_ADDRESS.\n>       --api_key string   Set API Key used by the client. Or use GAPIC-SHOWCASE_IDENTITY_API_KEY.\n>   -h, --help             help for identity\n>       --insecure         Make insecure client connection. Or use GAPIC-SHOWCASE_IDENTITY_INSECURE. Must be used with \"address\" option\n>       --token string     Set Bearer token used by the client. Or use GAPIC-SHOWCASE_IDENTITY_TOKEN.\n>\n> Global Flags:\n>   -j, --json      Print JSON output\n>   -v, --verbose   Print verbose output\n>\n> Use \"gapic-showcase identity [command] --help\" for more information about a command.\n\n\n$ gapic-showcase identity create-user --help\n\n> Creates a user.\n>\n> Usage:\n>   gapic-showcase identity create-user [flags]\n>\n> Flags:\n>       --from_file string               Absolute path to JSON file containing request payload\n>   -h, --help                           help for create-user\n>       --user.create_time.nanos int32\n>       --user.create_time.seconds int\n>       --user.display_name string\n>       --user.email string\n>       --user.name string\n>       --user.update_time.nanos int32\n>       --user.update_time.seconds int\n>\n> Global Flags:\n>       --address string   Set API address used by client. Or use GAPIC-SHOWCASE_IDENTITY_ADDRESS.\n>       --api_key string   Set API Key used by the client. Or use GAPIC-SHOWCASE_IDENTITY_API_KEY.\n>       --insecure         Make insecure client connection. Or use GAPIC-SHOWCASE_IDENTITY_INSECURE. Must be used with \"address\" option\n>   -j, --json             Print JSON output\n>       --token string     Set Bearer token used by the client. Or use GAPIC-SHOWCASE_IDENTITY_TOKEN.\n>   -v, --verbose          Print verbose output\n\n\n$ gapic-showcase identity create-user --user.display_name Rumble --user.email rumble@goodboi.com\n\n> name:\"users/0\" display_name:\"Rumble\" email:\"rumble@goodboi.com\" create_time:<seconds:1554144706 nanos:304080000 > update_time:<seconds:1554144706 nanos:304080000 >\n```\n\n## Development\nMost of the files in this directory are generated by the\n[go_cli](https://github.com/googleapis/gapic-generator-go/tree/main/cmd/protoc-gen-go_cli)\nprotoc plug-in (invoked in `util/cmd/compile_protos/main.go` from\n`.circlec1/config.yml`) as sub-commands to allow interacting with the various\nShowcase services via the `showcase` command. The other files\n(`grep -L \"DO NOT EDIT\" *`) are authored manually. In particular, these include\n`run.go`, which runs the Showcase API servers.\n"
  },
  {
    "path": "cmd/gapic-showcase/attempt-sequence.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar AttemptSequenceInput genprotopb.AttemptSequenceRequest\n\nvar AttemptSequenceFromFile string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(AttemptSequenceCmd)\n\n\tAttemptSequenceCmd.Flags().StringVar(&AttemptSequenceInput.Name, \"name\", \"\", \"Required. \")\n\n\tAttemptSequenceCmd.Flags().StringVar(&AttemptSequenceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar AttemptSequenceCmd = &cobra.Command{\n\tUse:   \"attempt-sequence\",\n\tShort: \"Attempts a sequence of unary responses.\",\n\tLong:  \"Attempts a sequence of unary responses.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif AttemptSequenceFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif AttemptSequenceFromFile != \"\" {\n\t\t\tin, err = os.Open(AttemptSequenceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &AttemptSequenceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"AttemptSequence\", &AttemptSequenceInput)\n\t\t}\n\t\terr = SequenceClient.AttemptSequence(ctx, &AttemptSequenceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/attempt-streaming-sequence.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"io\"\n\n\t\"os\"\n)\n\nvar AttemptStreamingSequenceInput genprotopb.AttemptStreamingSequenceRequest\n\nvar AttemptStreamingSequenceFromFile string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(AttemptStreamingSequenceCmd)\n\n\tAttemptStreamingSequenceCmd.Flags().StringVar(&AttemptStreamingSequenceInput.Name, \"name\", \"\", \"Required. \")\n\n\tAttemptStreamingSequenceCmd.Flags().Int32Var(&AttemptStreamingSequenceInput.LastFailIndex, \"last_fail_index\", 0, \"used to send the index of the last failed message...\")\n\n\tAttemptStreamingSequenceCmd.Flags().StringVar(&AttemptStreamingSequenceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar AttemptStreamingSequenceCmd = &cobra.Command{\n\tUse:   \"attempt-streaming-sequence\",\n\tShort: \"Attempts a server streaming call with a sequence...\",\n\tLong:  \"Attempts a server streaming call with a sequence of responses  Can be used to test retries and stream resumption logic  May not function as expected...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif AttemptStreamingSequenceFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif AttemptStreamingSequenceFromFile != \"\" {\n\t\t\tin, err = os.Open(AttemptStreamingSequenceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &AttemptStreamingSequenceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"AttemptStreamingSequence\", &AttemptStreamingSequenceInput)\n\t\t}\n\t\tresp, err := SequenceClient.AttemptStreamingSequence(ctx, &AttemptStreamingSequenceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar item *genprotopb.AttemptStreamingSequenceResponse\n\t\tfor {\n\t\t\titem, err = resp.Recv()\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\t\t\tprintMessage(item)\n\t\t}\n\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/block.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\tstatuspb \"google.golang.org/genproto/googleapis/rpc/status\"\n)\n\nvar BlockInput genprotopb.BlockRequest\n\nvar BlockFromFile string\n\nvar BlockInputResponse string\n\nvar BlockInputResponseError genprotopb.BlockRequest_Error\n\nvar BlockInputResponseSuccess genprotopb.BlockRequest_Success\n\nvar BlockInputResponseErrorDetails []string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(BlockCmd)\n\n\tBlockInput.ResponseDelay = new(durationpb.Duration)\n\n\tBlockInputResponseError.Error = new(statuspb.Status)\n\n\tBlockInputResponseSuccess.Success = new(genprotopb.BlockResponse)\n\n\tBlockCmd.Flags().Int64Var(&BlockInput.ResponseDelay.Seconds, \"response_delay.seconds\", 0, \"Signed seconds of the span of time. Must be from...\")\n\n\tBlockCmd.Flags().Int32Var(&BlockInput.ResponseDelay.Nanos, \"response_delay.nanos\", 0, \"Signed fractions of a second at nanosecond...\")\n\n\tBlockCmd.Flags().Int32Var(&BlockInputResponseError.Error.Code, \"response.error.code\", 0, \"The status code, which should be an enum value of...\")\n\n\tBlockCmd.Flags().StringVar(&BlockInputResponseError.Error.Message, \"response.error.message\", \"\", \"A developer-facing error message, which should be...\")\n\n\tBlockCmd.Flags().StringArrayVar(&BlockInputResponseErrorDetails, \"response.error.details\", []string{}, \"A list of messages that carry the error details. ...\")\n\n\tBlockCmd.Flags().StringVar(&BlockInputResponseSuccess.Success.Content, \"response.success.content\", \"\", \"This content can contain anything, the server...\")\n\n\tBlockCmd.Flags().StringVar(&BlockInputResponse, \"response\", \"\", \"Choices: error, success\")\n\n\tBlockCmd.Flags().StringVar(&BlockFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar BlockCmd = &cobra.Command{\n\tUse:   \"block\",\n\tShort: \"This method will block (wait) for the requested...\",\n\tLong:  \"This method will block (wait) for the requested amount of time  and then return the response or error.  This method showcases how a client handles...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif BlockFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"response\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif BlockFromFile != \"\" {\n\t\t\tin, err = os.Open(BlockFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &BlockInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tswitch BlockInputResponse {\n\n\t\t\tcase \"error\":\n\t\t\t\tBlockInput.Response = &BlockInputResponseError\n\n\t\t\tcase \"success\":\n\t\t\t\tBlockInput.Response = &BlockInputResponseSuccess\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for response\")\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range BlockInputResponseErrorDetails {\n\t\t\ttmp := anypb.Any{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tBlockInputResponseError.Error.Details = append(BlockInputResponseError.Error.Details, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"Block\", &BlockInput)\n\t\t}\n\t\tresp, err := EchoClient.Block(ctx, &BlockInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/chat.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"bufio\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar ChatFromFile string\n\nvar ChatOutFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(ChatCmd)\n\n\tChatCmd.Flags().StringVar(&ChatFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n\tChatCmd.Flags().StringVar(&ChatOutFile, \"out_file\", \"\", \"Absolute path to a file to pipe output to\")\n\tChatCmd.MarkFlagRequired(\"out_file\")\n\n}\n\nvar ChatCmd = &cobra.Command{\n\tUse:   \"chat\",\n\tShort: \"This method, upon receiving a request on the...\",\n\tLong:  \"This method, upon receiving a request on the stream, will pass the same  content back on the stream. This method showcases bidirectional  streaming...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ChatFromFile != \"\" {\n\t\t\tin, err = os.Open(ChatFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t}\n\n\t\tstream, err := EchoClient.Chat(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tout, err := os.OpenFile(ChatOutFile, os.O_APPEND|os.O_WRONLY, os.ModeAppend)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// start background stream receive\n\t\tgo func() {\n\t\t\tvar res *genprotopb.EchoResponse\n\t\t\tfor {\n\t\t\t\tres, err = stream.Recv()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tstr := res.String()\n\t\t\t\tif OutputJSON {\n\t\t\t\t\tstr, _ = marshaler.MarshalToString(res)\n\t\t\t\t}\n\t\t\t\tfmt.Fprintln(out, str)\n\t\t\t}\n\t\t}()\n\n\t\tif Verbose {\n\t\t\tfmt.Println(\"Client stream open. Close with ctrl+D.\")\n\t\t}\n\n\t\tvar ChatInput genprotopb.EchoRequest\n\t\tscanner := bufio.NewScanner(in)\n\t\tfor scanner.Scan() {\n\t\t\tinput := scanner.Text()\n\t\t\tif input == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr = jsonpb.UnmarshalString(input, &ChatInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = stream.Send(&ChatInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err = scanner.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\terr = stream.CloseSend()\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/collect.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"bufio\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CollectFromFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(CollectCmd)\n\n\tCollectCmd.Flags().StringVar(&CollectFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CollectCmd = &cobra.Command{\n\tUse:   \"collect\",\n\tShort: \"This method will collect the words given to it....\",\n\tLong:  \"This method will collect the words given to it. When the stream is closed  by the client, this method will return the a concatenation of the strings ...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CollectFromFile != \"\" {\n\t\t\tin, err = os.Open(CollectFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t}\n\n\t\tstream, err := EchoClient.Collect(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Println(\"Client stream open. Close with ctrl+D.\")\n\t\t}\n\n\t\tvar CollectInput genprotopb.EchoRequest\n\t\tscanner := bufio.NewScanner(in)\n\t\tfor scanner.Scan() {\n\t\t\tinput := scanner.Text()\n\t\t\tif input == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr = jsonpb.UnmarshalString(input, &CollectInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = stream.Send(&CollectInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err = scanner.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tresp, err := stream.CloseAndRecv()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/completion.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n)\n\nfunc init() {\n\trootCmd.AddCommand(completionCmd)\n}\n\n// completionCmd represents the completion command\nvar completionCmd = &cobra.Command{\n\tUse:   \"completion\",\n\tShort: \"Emits bash a completion for gapic-showcase\",\n\tLong: `Enable bash completion like so:\n\t\tLinux:\n\t\t\tsource <(gapic-showcase completion)\n\t\tMac:\n\t\t\tbrew install bash-completion\n\t\t\tgapic-showcase completion > $(brew --prefix)/etc/bash_completion.d/gapic-showcase`,\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\trootCmd.GenBashCompletion(os.Stdout)\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/compliance_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar ComplianceConfig *viper.Viper\nvar ComplianceClient *gapic.ComplianceClient\nvar ComplianceSubCommands []string = []string{\n\t\"repeat-data-body\",\n\t\"repeat-data-body-info\",\n\t\"repeat-data-query\",\n\t\"repeat-data-simple-path\",\n\t\"repeat-data-path-resource\",\n\t\"repeat-data-path-trailing-resource\",\n\t\"repeat-data-body-put\",\n\t\"repeat-data-body-patch\",\n\t\"get-enum\",\n\t\"verify-enum\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(ComplianceServiceCmd)\n\n\tComplianceConfig = viper.New()\n\tComplianceConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_COMPLIANCE\")\n\tComplianceConfig.AutomaticEnv()\n\n\tComplianceServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_COMPLIANCE_INSECURE. Must be used with \\\"address\\\" option\")\n\tComplianceConfig.BindPFlag(\"insecure\", ComplianceServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tComplianceConfig.BindEnv(\"insecure\")\n\n\tComplianceServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_COMPLIANCE_ADDRESS.\")\n\tComplianceConfig.BindPFlag(\"address\", ComplianceServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tComplianceConfig.BindEnv(\"address\")\n\n\tComplianceServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_COMPLIANCE_TOKEN.\")\n\tComplianceConfig.BindPFlag(\"token\", ComplianceServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tComplianceConfig.BindEnv(\"token\")\n\n\tComplianceServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_COMPLIANCE_API_KEY.\")\n\tComplianceConfig.BindPFlag(\"api_key\", ComplianceServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tComplianceConfig.BindEnv(\"api_key\")\n}\n\nvar ComplianceServiceCmd = &cobra.Command{\n\tUse:       \"compliance\",\n\tShort:     \"This service is used to test that GAPICs...\",\n\tLong:      \"This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST...\",\n\tValidArgs: ComplianceSubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := ComplianceConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif ComplianceConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := ComplianceConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := ComplianceConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tComplianceClient, err = gapic.NewComplianceClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/compliance_suite_errors_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/googleapis/gapic-showcase/server/genproto\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/server/services\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\n// TestComplianceSuiteErrors checks for non-spec-compliant HTTP requests. Not all of these\n// conditions necessarily generate a server error in a real service, but the behavior is often\n// ill-defined. We want Showcase to require the generators be strict in the transcoding format they\n// use.\nfunc TestComplianceSuiteErrors(t *testing.T) {\n\tmasterSuite, server, err := complianceSuiteTestSetup()\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tserver.Start()\n\tdefer server.Close()\n\n\trestRPCs := map[string][]prepRepeatDataNegativeTestFunc{\n\t\t\"Compliance.RepeatDataBodyInfo\": {\n\t\t\tprepRepeatDataBodyInfoNegativeTestInvalidFields,\n\t\t\tprepRepeatDataBodyInfoNegativeTestSnakeCasedFieldNames,\n\t\t},\n\t\t\"Compliance.RepeatDataQuery\": {\n\t\t\tprepRepeatDataQueryNegativeTestSnakeCasedFieldNames,\n\t\t},\n\t}\n\n\tfor groupIdx, group := range masterSuite.GetGroup() {\n\t\trpcsToTest := group.GetRpcs()\n\t\tfor requestIdx, masterProto := range group.GetRequests() {\n\t\t\tfor rpcIdx, rpcName := range rpcsToTest {\n\t\t\t\terrorPrefix := fmt.Sprintf(\"[request %d/%q: rpc %q/%d/%q]\",\n\t\t\t\t\trequestIdx, masterProto.GetName(), group.Name, rpcIdx, rpcName)\n\n\t\t\t\t// Ensure that we issue only the RPCs the test suite is expecting.\n\t\t\t\trestTest, ok := restRPCs[rpcName]\n\t\t\t\tif !ok {\n\t\t\t\t\t// we don't have a negative test for this RPC\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tfor _, rpcPrep := range restTest {\n\t\t\t\t\t// since these tests may modify the request protos, get a\n\t\t\t\t\t// clean request every time as the starting point, in order\n\t\t\t\t\t// to prevent previous modifications from affecting the\n\t\t\t\t\t// current test case\n\t\t\t\t\tsuite, err := getCleanComplianceSuite()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tt.Fatal(err)\n\t\t\t\t\t}\n\t\t\t\t\trequestProto := suite.GetGroup()[groupIdx].GetRequests()[requestIdx]\n\n\t\t\t\t\tprepName, verb, path, requestBody, failure, err := rpcPrep(requestProto)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tt.Errorf(\"%s error: %s\", errorPrefix, err)\n\t\t\t\t\t}\n\t\t\t\t\tif got, want := prepName, rpcName; !strings.HasPrefix(prepName, rpcName) {\n\t\t\t\t\t\tt.Errorf(\"%s retrieved mismatched prep function: got %q, want %q\", errorPrefix, got, want)\n\t\t\t\t\t}\n\n\t\t\t\t\tcheckExpectedFailure(t, verb, server.URL+path, requestBody, failure, errorPrefix, prepName)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TestComplianceSuiteUnexpectedFieldPresence checks that we detect erroneous presence/absence of\n// optional fields.\nfunc TestComplianceSuiteUnexpectedFieldPresence(t *testing.T) {\n\tsuite, server, err := complianceSuiteTestSetup()\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tserver.Start()\n\tdefer server.Close()\n\n\tindexedSuite, err := services.IndexComplianceSuite(suite)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\trequestsModified := map[string]bool{}\n\tfor idx, testCase := range []struct {\n\t\tname        string\n\t\trequestName string\n\t\tmodify      requestModifier\n\t\tsubCases    map[string]prepRepeatDataTestFunc\n\t\tfailureMode string\n\t}{\n\t\t{\n\t\t\tname:        \"detecting requests not included in test suite\",\n\t\t\trequestName: \"Zero values for all fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\trequest.Name = \"modified name\"\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestNotFoundError)\",\n\t\t},\n\n\t\t{\n\t\t\tname:        \"detecting set optional bool field erroneously not sent\",\n\t\t\trequestName: \"Zero values for all fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\trequest.GetInfo().PBool = nil\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\t\t{\n\t\t\tname:        \"detecting unset optional bool field erroneously sent\",\n\t\t\trequestName: \"Basic types, no optional fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\tmyFalse := false\n\t\t\t\trequest.GetInfo().PBool = &myFalse\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\n\t\t{\n\t\t\tname:        \"detecting set optional string field erroneously not sent\",\n\t\t\trequestName: \"Zero values for all fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\trequest.GetInfo().PString = nil\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\t\t{\n\t\t\tname:        \"detecting unset optional string field erroneously sent\",\n\t\t\trequestName: \"Basic types, no optional fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\tmyEmpty := \"\"\n\t\t\t\trequest.GetInfo().PString = &myEmpty\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\n\t\t{\n\t\t\tname:        \"detecting set optional int32 field erroneously not sent\",\n\t\t\trequestName: \"Zero values for all fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\trequest.GetInfo().PInt32 = nil\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\t\t{\n\t\t\tname:        \"detecting unset optional int32 field erroneously sent\",\n\t\t\trequestName: \"Basic types, no optional fields\",\n\t\t\tmodify: func(request *pb.RepeatRequest) {\n\t\t\t\tmyInt := int32(0)\n\t\t\t\trequest.GetInfo().PInt32 = &myInt\n\t\t\t},\n\t\t\tsubCases: map[string]prepRepeatDataTestFunc{\n\t\t\t\t\"body\":  prepRepeatDataBodyTest,\n\t\t\t\t\"query\": prepRepeatDataQueryTest,\n\t\t\t},\n\t\t\tfailureMode: \"(ComplianceSuiteRequestMismatchError)\",\n\t\t},\n\t} {\n\t\tif _, done := requestsModified[testCase.requestName]; done {\n\t\t\tif suite, err = getCleanComplianceSuite(); err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tif indexedSuite, err = services.IndexComplianceSuite(suite); err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\trequestsModified = map[string]bool{}\n\t\t}\n\t\trequestsModified[testCase.requestName] = true\n\n\t\trequest, ok := indexedSuite[testCase.requestName]\n\t\tif !ok {\n\t\t\tt.Fatalf(\"could not find request by name: %q\", testCase.requestName)\n\t\t}\n\t\ttestCase.modify(request)\n\n\t\tfor subCaseName, prep := range testCase.subCases {\n\t\t\tprefix := fmt.Sprintf(\"[case %d: %s: %s]\", idx, testCase.name, subCaseName)\n\t\t\tverb, prepName, path, body, error := prep(request)\n\t\t\tif error != nil {\n\t\t\t\tt.Fatalf(\"%s could not construct request: %s\", prefix, err)\n\t\t\t}\n\t\t\tcheckExpectedFailure(t, verb, server.URL+path, body, testCase.failureMode, prefix, prepName)\n\t\t}\n\t}\n}\n\ntype prepRepeatDataNegativeTestFunc func(request *genproto.RepeatRequest) (verb string, name string, path string, body string, expect string, err error)\n\nfunc prepRepeatDataBodyInfoNegativeTestInvalidFields(request *genproto.RepeatRequest) (verb string, name string, path string, body string, expect string, err error) {\n\tresttools.JSONMarshaler.Replace(nil)\n\tdefer resttools.JSONMarshaler.Restore()\n\n\tname = \"Compliance.RepeatDataBodyInfo#NegativeTestInvalidFields\"\n\tbodyBytes, err := resttools.ToJSON().Marshal(request.Info)\n\tqueryString := prepRepeatDataTestsQueryString(request, nil) // purposefully repeats query params, which should cause an error\n\treturn name, \"POST\", \"/v1beta1/repeat:bodyinfo\" + queryString, string(bodyBytes), \"(QueryParamsInvalidFieldError)\", err\n}\n\nfunc prepRepeatDataBodyInfoNegativeTestSnakeCasedFieldNames(request *genproto.RepeatRequest) (verb string, name string, path string, body string, expect string, err error) {\n\tresttools.JSONMarshaler.Replace(&protojson.MarshalOptions{\n\t\tMultiline:       true,\n\t\tAllowPartial:    false,\n\t\tUseEnumNumbers:  false,\n\t\tEmitUnpopulated: true,\n\t\tUseProtoNames:   true, // this should cause an error\n\t})\n\tdefer resttools.JSONMarshaler.Restore()\n\n\tname = \"Compliance.RepeatDataBodyInfo#NegativeTestSnakeCasedFieldNames\"\n\trequest.Info.FString += name\n\tbodyBytes, err := resttools.ToJSON().Marshal(request.Info)\n\treturn name, \"POST\", \"/v1beta1/repeat:bodyinfo\", string(bodyBytes), \"(BodyFieldNameIncorrectlyCasedError)\", err\n}\n\nfunc prepRepeatDataQueryNegativeTestSnakeCasedFieldNames(request *genproto.RepeatRequest) (verb string, name string, path string, body string, expect string, err error) {\n\tname = \"Compliance.RepeatDataQuery#NegativeTestSnakeCasedFieldNames\"\n\tqueryParams := prepRepeatDataTestsQueryParams(request, nil, queryStringSnakeCaser) // this should cause an error\n\tqueryString := prepQueryString(queryParams)\n\treturn name, \"GET\", \"/v1beta1/repeat:query\" + queryString, body, \"(QueryParameterNameIncorrectlyCasedError)\", err\n}\n\n// checkExpectedFailure issues a request using the specified verb, URL, and request body. It expects\n// a failing HTTP code and a response message containing the substring in `failure`. Test errors are\n// reported using the given errorPrefix and the name prepName of the prepping function.\nfunc checkExpectedFailure(t *testing.T, verb, url, requestBody, failure, errorPrefix, prepName string) {\n\t// Issue the request\n\thttpRequest, err := http.NewRequest(verb, url, strings.NewReader(requestBody))\n\tif err != nil {\n\t\tt.Errorf(\"%s error creating request: %s\", errorPrefix, err)\n\t\treturn\n\t}\n\tresttools.PopulateRequestHeaders(httpRequest)\n\thttpResponse, err := http.DefaultClient.Do(httpRequest)\n\tif err != nil {\n\t\tt.Errorf(\"%s error issuing call: %s\", errorPrefix, err)\n\t\treturn\n\t}\n\n\t// Check for unsuccessful response.\n\tif got, notWant := httpResponse.StatusCode, http.StatusOK; got == notWant {\n\t\tt.Errorf(\"%s response code: got %d, notWant %d  name:%q\\n   %s %s\\nrequest body: %s\\n----------------------------------------\\n\",\n\t\t\terrorPrefix, got, notWant, prepName, verb, url, requestBody)\n\t\treturn\n\t}\n\n\tbody, err := io.ReadAll(httpResponse.Body)\n\thttpResponse.Body.Close()\n\tif err != nil {\n\t\tt.Fatalf(\"%s could not read response body: %s\", errorPrefix, err)\n\t}\n\tif got, want := string(body), failure; !strings.Contains(got, want) {\n\t\tt.Errorf(\"%s response body: wanted response to include %q, but instead got: %q   (status %d) header: %v name:%q\\n   %s %s\\nrequest body: %s\\n----------------------------------------\\n\",\n\t\t\terrorPrefix, want, got, httpResponse.StatusCode, httpResponse.Header, prepName, verb, url, requestBody)\n\t}\n\n}\n\n// requestModifer is a function that modifies a request in-place.\ntype requestModifier func(*pb.RepeatRequest)\n"
  },
  {
    "path": "cmd/gapic-showcase/compliance_suite_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/googleapis/gapic-showcase/server/genproto\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/server/services\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\t\"github.com/iancoleman/strcase\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// TestComplianceSuite ensures the REST test suite that we require GAPIC generators to pass works\n// correctly. GAPIC generators should generate GAPICs for the Showcase API and issue the unary calls\n// defined in the test suite using the GAPIC surface. The generators' test should follow the\n// high-level logic below, as described in the comments.\nfunc TestComplianceSuite(t *testing.T) {\n\tsuite, server, err := complianceSuiteTestSetup()\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tserver.Start()\n\tdefer server.Close()\n\n\tresttools.JSONMarshaler.Replace(nil)\n\tdefer resttools.JSONMarshaler.Restore()\n\n\t// Set handlers for each test case. When GAPIC generator tests do this, they should have\n\t// each of their handlers invoking the correct GAPIC library method for the Showcase API.\n\trestRPCs := map[string]prepRepeatDataTestFunc{\n\t\t\"Compliance.RepeatDataBody\":                 prepRepeatDataBodyTest,\n\t\t\"Compliance.RepeatDataBodyPut\":              prepRepeatDataBodyPutTest,\n\t\t\"Compliance.RepeatDataBodyPatch\":            prepRepeatDataBodyPatchTest,\n\t\t\"Compliance.RepeatDataBodyInfo\":             prepRepeatDataBodyInfoTest,\n\t\t\"Compliance.RepeatDataQuery\":                prepRepeatDataQueryTest,\n\t\t\"Compliance.RepeatDataSimplePath\":           prepRepeatDataSimplePathTest,\n\t\t\"Compliance.RepeatDataPathResource\":         prepRepeatDataPathResourceTest,\n\t\t\"Compliance.RepeatDataPathTrailingResource\": prepRepeatDataPathTrailingResourceTest,\n\t}\n\n\tfor _, group := range suite.GetGroup() {\n\t\trpcsToTest := group.GetRpcs()\n\t\tfor requestIdx, requestProto := range group.GetRequests() {\n\t\t\tfor rpcIdx, rpcName := range rpcsToTest {\n\t\t\t\terrorPrefix := fmt.Sprintf(\"[request %d/%q: rpc %q/%d/%q]\",\n\t\t\t\t\trequestIdx, requestProto.GetName(), group.Name, rpcIdx, rpcName)\n\n\t\t\t\t// Ensure that we issue only the RPCs the test suite is expecting.\n\t\t\t\trpcPrep, ok := restRPCs[rpcName]\n\t\t\t\tif !ok {\n\t\t\t\t\tt.Errorf(\"%s could not find prep function for this RPC\", errorPrefix)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tverb, prepName, path, requestBody, err := rpcPrep(requestProto)\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Errorf(\"%s error: %s\", errorPrefix, err)\n\t\t\t\t}\n\t\t\t\tif got, want := prepName, rpcName; got != want {\n\t\t\t\t\tt.Errorf(\"%s retrieved mismatched prep function: got %q, want %q\", errorPrefix, got, want)\n\t\t\t\t}\n\n\t\t\t\t// Issue the request. When GAPIC generator tests do this, they should simply\n\t\t\t\t// invoke the correct GAPIC library method for the Showcase API.\n\t\t\t\thttpRequest, err := http.NewRequest(verb, server.URL+path, strings.NewReader(requestBody))\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Errorf(\"%s error creating request: %s\", errorPrefix, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tresttools.PopulateRequestHeaders(httpRequest)\n\n\t\t\t\thttpResponse, err := http.DefaultClient.Do(httpRequest)\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Errorf(\"%s error issuing call: %s\", errorPrefix, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Check for successful response.\n\t\t\t\tif got, want := httpResponse.StatusCode, http.StatusOK; got != want {\n\t\t\t\t\tt.Errorf(\"%s response code: got %d, want %d\\n   %s %s\\n\\n\",\n\t\t\t\t\t\terrorPrefix, got, want, verb, server.URL+path)\n\t\t\t\t}\n\n\t\t\t\t// Unmarshal httpResponse body, interpreted as JSON.\n\t\t\t\t// should do this.\n\t\t\t\tresponseBody, err := io.ReadAll(httpResponse.Body)\n\t\t\t\thttpResponse.Body.Close()\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Errorf(\"%s could not read httpResponse body: %s\", errorPrefix, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tvar response genproto.RepeatResponse\n\t\t\t\tif err := protojson.Unmarshal(responseBody, &response); err != nil {\n\t\t\t\t\tt.Errorf(\"%s could not unmarshal httpResponse body: %s\\n   response body: %s\\n   request: %s\\n\",\n\t\t\t\t\t\terrorPrefix, err, string(responseBody), requestBody)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Check for expected response.\n\t\t\t\tif diff := cmp.Diff(response.GetRequest(), requestProto, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\t\t\t\tt.Errorf(\"%s unexpected response: got=-, want=+:%s\\n   %s %s\\n------------------------------\\n\",\n\t\t\t\t\t\terrorPrefix, diff, verb, server.URL+path)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestComplianceSuiteLoadedf(t *testing.T) {\n\tif services.ComplianceSuiteStatus != services.ComplianceSuiteLoaded {\n\t\tt.Fatalf(\"embedded compliance suite was not loaded: status %#v %s\", services.ComplianceSuiteStatus, services.ComplianceSuiteStatusMessage)\n\t}\n\n\tsuite, err := getCleanComplianceSuite()\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif diff := cmp.Diff(suite, services.ComplianceSuite, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\tt.Errorf(\"embedded compliance suite does not match released suite at %q\", complianceSuiteFileName)\n\t}\n}\n\n// The following are helpers for TestComplianceSuite, since Showcase doesn't intrinsically define a\n// REST client. Each GAPIC generator should instead use the GAPIC it generated for the Showcase\n// API.\n\ntype prepRepeatDataTestFunc func(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error)\n\nfunc prepRepeatDataBodyTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataBody\"\n\tbodyBytes, err := resttools.ToJSON().Marshal(request)\n\treturn \"POST\", name, \"/v1beta1/repeat:body\", string(bodyBytes), err\n}\n\nfunc prepRepeatDataBodyPutTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\t_, _, path, body, err = prepRepeatDataBodyTest(request)\n\treturn \"PUT\", \"Compliance.RepeatDataBodyPut\", path + \"put\", body, err\n}\n\nfunc prepRepeatDataBodyPatchTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\t_, _, path, body, err = prepRepeatDataBodyTest(request)\n\treturn \"PATCH\", \"Compliance.RepeatDataBodyPatch\", path + \"patch\", body, err\n}\n\nfunc prepRepeatDataBodyInfoTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataBodyInfo\"\n\tbodyBytes, err := resttools.ToJSON().Marshal(request.Info)\n\tqueryString := prepRepeatDataTestsQueryString(request, map[string]bool{\"info\": true})\n\t_ = bodyBytes\n\treturn \"POST\", name, \"/v1beta1/repeat:bodyinfo\" + queryString, string(bodyBytes), err\n}\n\nfunc prepRepeatDataQueryTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataQuery\"\n\tqueryString := prepRepeatDataTestsQueryString(request, nil)\n\treturn \"GET\", name, \"/v1beta1/repeat:query\" + queryString, body, err\n}\n\nfunc prepRepeatDataSimplePathTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataSimplePath\"\n\tinfo := request.GetInfo()\n\n\t// TODO: Determine behavior for a string field path param whose value is empty. This should be\n\t// a failure, probably, in which case we need to augment the ComplianceGroup to allow\n\t// specifying expected errors.\n\n\tpathParts := []string{}\n\tnonQueryParamNames := map[string]bool{}\n\n\tfor _, part := range []struct {\n\t\tname   string\n\t\tformat string\n\t\tvalue  interface{}\n\t}{\n\t\t{\"f_string\", \"%s\", info.GetFString()},\n\t\t{\"f_int32\", \"%d\", info.GetFInt32()},\n\t\t{\"f_double\", \"%g\", info.GetFDouble()},\n\t\t{\"f_bool\", \"%t\", info.GetFBool()},\n\t\t{\"f_kingdom\", \"%s\", info.GetFKingdom()},\n\t} {\n\t\tpathParts = append(pathParts, url.PathEscape(fmt.Sprintf(part.format, part.value)))\n\t\tnonQueryParamNames[\"info.\"+part.name] = true\n\t}\n\tpath = fmt.Sprintf(\"/v1beta1/repeat/%s:simplepath\", strings.Join(pathParts, \"/\"))\n\n\tqueryString := prepRepeatDataTestsQueryString(request, nonQueryParamNames)\n\treturn \"GET\", name, path + queryString, body, err\n}\n\nfunc prepRepeatDataPathResourceTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataPathResource\"\n\tinfo := request.GetInfo()\n\n\tif strings.HasPrefix(info.GetFString(), \"first/\") {\n\t\treturn prepRepeatDataPathResourceTestFirstBinding(request)\n\t} else {\n\t\treturn prepRepeatDataPathResourceTestSecondBinding(request)\n\t}\n}\n\nfunc prepRepeatDataPathResourceTestFirstBinding(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataPathResource\"\n\tinfo := request.GetInfo()\n\tpathParts := []string{}\n\tnonQueryParamNames := map[string]bool{}\n\n\tfor _, part := range []struct {\n\t\tname           string\n\t\tformat         string\n\t\tvalue          interface{}\n\t\trequiredPrefix string\n\t}{\n\t\t{\"f_string\", \"%s\", info.GetFString(), \"first/\"},\n\t\t{\"f_child.f_string\", \"%s\", info.GetFChild().GetFString(), \"second/\"},\n\t\t{\"f_bool\", \"bool/%t\", info.GetFBool(), \"\"},\n\t} {\n\t\tif len(part.requiredPrefix) > 0 && !strings.HasPrefix(part.value.(string), part.requiredPrefix) {\n\t\t\terr = fmt.Errorf(\"expected value of %q to begin with %q; got %q\", part.name, part.requiredPrefix, part.value)\n\t\t\treturn\n\t\t}\n\t\tpathParts = append(pathParts, url.PathEscape(fmt.Sprintf(part.format, part.value)))\n\t\tnonQueryParamNames[\"info.\"+part.name] = true\n\t}\n\tpath = fmt.Sprintf(\"/v1beta1/repeat/%s:pathresource\", strings.Join(pathParts, \"/\"))\n\n\tqueryString := prepRepeatDataTestsQueryString(request, nonQueryParamNames)\n\treturn \"GET\", name, path + queryString, body, err\n}\n\nfunc prepRepeatDataPathResourceTestSecondBinding(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataPathResource\"\n\tinfo := request.GetInfo()\n\tpathParts := []string{}\n\tnonQueryParamNames := map[string]bool{}\n\n\tfor _, part := range []struct {\n\t\tname           string\n\t\tformat         string\n\t\tvalue          interface{}\n\t\trequiredPrefix string\n\t}{\n\t\t{\"f_child.f_string\", \"%s\", info.GetFChild().GetFString(), \"first/\"},\n\t\t{\"f_string\", \"%s\", info.GetFString(), \"second/\"},\n\t\t{\"f_bool\", \"bool/%t\", info.GetFBool(), \"\"},\n\t} {\n\t\tif len(part.requiredPrefix) > 0 && !strings.HasPrefix(part.value.(string), part.requiredPrefix) {\n\t\t\terr = fmt.Errorf(\"expected value of %q to begin with %q; got %q\", part.name, part.requiredPrefix, part.value)\n\t\t\treturn\n\t\t}\n\t\tpathParts = append(pathParts, url.PathEscape(fmt.Sprintf(part.format, part.value)))\n\t\tnonQueryParamNames[\"info.\"+part.name] = true\n\t}\n\tpath = fmt.Sprintf(\"/v1beta1/repeat/%s:childfirstpathresource\", strings.Join(pathParts, \"/\"))\n\n\tqueryString := prepRepeatDataTestsQueryString(request, nonQueryParamNames)\n\treturn \"GET\", name, path + queryString, body, err\n}\n\nfunc prepRepeatDataPathTrailingResourceTest(request *genproto.RepeatRequest) (verb string, name string, path string, body string, err error) {\n\tname = \"Compliance.RepeatDataPathTrailingResource\"\n\tinfo := request.GetInfo()\n\n\tpathParts := []string{}\n\tnonQueryParamNames := map[string]bool{}\n\n\tfor _, part := range []struct {\n\t\tname           string\n\t\tformat         string\n\t\tvalue          interface{}\n\t\trequiredPrefix string\n\t}{\n\t\t{\"f_string\", \"%s\", info.GetFString(), \"first/\"},\n\t\t{\"f_child.f_string\", \"%s\", info.GetFChild().GetFString(), \"second/\"},\n\t} {\n\t\tif len(part.requiredPrefix) > 0 && !strings.HasPrefix(part.value.(string), part.requiredPrefix) {\n\t\t\terr = fmt.Errorf(\"expected value of %q to begin with %q; got %q\", part.name, part.requiredPrefix, part.value)\n\t\t\treturn\n\t\t}\n\t\tpathParts = append(pathParts, url.PathEscape(fmt.Sprintf(part.format, part.value)))\n\t\tnonQueryParamNames[\"info.\"+part.name] = true\n\t}\n\tpath = fmt.Sprintf(\"/v1beta1/repeat/%s:pathtrailingresource\", strings.Join(pathParts, \"/\"))\n\n\tqueryString := prepRepeatDataTestsQueryString(request, nonQueryParamNames)\n\treturn \"GET\", name, path + queryString, body, err\n}\n\n// prepRepeatDataTestsQueryString returns the query string containing all fields in `request.info`\n// except for those whose proto name (relative to request.info) are present in the `exclude` map\n// with a value of `true`.\nfunc prepRepeatDataTestsQueryString(request *genproto.RepeatRequest, exclude map[string]bool) string {\n\treturn prepQueryString(prepRepeatDataTestsQueryParams(request, exclude, queryStringLowerCamelCaser))\n}\n\n// prepRepeatDataTestsQueryParams returns the list of key=value query params based on the contents\n// of request, excluding the fields in `exclude` and using the indicated caser.\nfunc prepRepeatDataTestsQueryParams(request *genproto.RepeatRequest, exclude map[string]bool, caser queryStringCaser) []string {\n\tinfo := request.GetInfo()\n\tqueryParams := []string{}\n\taddParam := func(key string, condition bool, value string) {\n\t\tif (exclude[\"info\"] && strings.HasPrefix(key, \"info.\")) || exclude[key] || !condition {\n\t\t\treturn\n\t\t}\n\t\tqueryParams = append(queryParams, fmt.Sprintf(\"%s=%s\", caser(key), value))\n\t}\n\n\t// Top-level fields\n\taddParam(\"server_verify\", request.GetServerVerify(), \"true\")\n\taddParam(\"name\", len(request.GetName()) > 0, url.QueryEscape(request.GetName()))\n\taddParam(\"intended_binding_uri\", request.IntendedBindingUri != nil, url.QueryEscape(request.GetIntendedBindingUri()))\n\n\taddParam(\"f_int32\", request.GetFInt32() != 0, fmt.Sprintf(\"%d\", request.GetFInt32()))\n\taddParam(\"f_int64\", request.GetFInt64() != 0, fmt.Sprintf(\"%d\", request.GetFInt64()))\n\taddParam(\"f_double\", request.GetFDouble() != 0, url.QueryEscape(fmt.Sprintf(\"%g\", request.GetFDouble())))\n\n\taddParam(\"p_int32\", request.PInt32 != nil, fmt.Sprintf(\"%d\", request.GetPInt32()))\n\taddParam(\"p_int64\", request.PInt64 != nil, fmt.Sprintf(\"%d\", request.GetPInt64()))\n\taddParam(\"p_double\", request.PDouble != nil, url.QueryEscape(fmt.Sprintf(\"%g\", request.GetPDouble())))\n\n\t// info.* fields\n\taddParam(\"info.f_string\", len(info.GetFString()) > 0, url.QueryEscape(info.GetFString()))\n\taddParam(\"info.f_int32\", info.GetFInt32() != 0, fmt.Sprintf(\"%d\", info.GetFInt32()))\n\taddParam(\"info.f_sint32\", info.GetFSint32() != 0, fmt.Sprintf(\"%d\", info.GetFSint32()))\n\taddParam(\"info.f_sfixed32\", info.GetFSfixed32() != 0, fmt.Sprintf(\"%d\", info.GetFSfixed32()))\n\taddParam(\"info.f_uint32\", info.GetFUint32() != 0, fmt.Sprintf(\"%d\", info.GetFUint32()))\n\taddParam(\"info.f_fixed32\", info.GetFFixed32() != 0, fmt.Sprintf(\"%d\", info.GetFFixed32()))\n\taddParam(\"info.f_int64\", info.GetFInt64() != 0, fmt.Sprintf(\"%d\", info.GetFInt64()))\n\taddParam(\"info.f_sint64\", info.GetFSint64() != 0, fmt.Sprintf(\"%d\", info.GetFSint64()))\n\taddParam(\"info.f_sfixed64\", info.GetFSfixed64() != 0, fmt.Sprintf(\"%d\", info.GetFSfixed64()))\n\taddParam(\"info.f_uint64\", info.GetFUint64() != 0, fmt.Sprintf(\"%d\", info.GetFUint64()))\n\taddParam(\"info.f_fixed64\", info.GetFFixed64() != 0, fmt.Sprintf(\"%d\", info.GetFFixed64()))\n\n\taddParam(\"info.f_double\", info.GetFDouble() != 0, url.QueryEscape(fmt.Sprintf(\"%g\", info.GetFDouble())))\n\taddParam(\"info.f_float\", info.GetFFloat() != 0, url.QueryEscape(fmt.Sprintf(\"%g\", info.GetFFloat())))\n\taddParam(\"info.f_bool\", info.GetFBool(), \"true\")\n\taddParam(\"info.f_bytes\", len(info.GetFBytes()) > 0, url.QueryEscape(string(info.GetFBytes()))) // TODO: Check this is correct, given runes in strings\n\taddParam(\"info.f_kingdom\", info.GetFKingdom() != pb.ComplianceData_LIFE_KINGDOM_UNSPECIFIED, info.GetFKingdom().String())\n\n\taddParam(\"info.p_string\", info.PString != nil, url.QueryEscape(info.GetPString()))\n\taddParam(\"info.p_int32\", info.PInt32 != nil, fmt.Sprintf(\"%d\", info.GetPInt32()))\n\taddParam(\"info.p_double\", info.PDouble != nil, url.QueryEscape(fmt.Sprintf(\"%g\", info.GetPDouble())))\n\taddParam(\"info.p_bool\", info.PBool != nil, fmt.Sprintf(\"%t\", info.GetPBool()))\n\taddParam(\"info.p_kingdom\", info.PKingdom != nil, info.GetPKingdom().String())\n\n\taddParam(\"info.f_child.f_string\", len(info.GetFChild().GetFString()) > 0, url.QueryEscape(info.GetFChild().GetFString()))\n\taddParam(\"info.f_child.f_float\", info.GetFChild().GetFFloat() != 0, url.QueryEscape(fmt.Sprintf(\"%g\", info.GetFChild().GetFFloat())))\n\taddParam(\"info.f_child.f_double\", info.GetFChild().GetFDouble() != 0, url.QueryEscape(fmt.Sprintf(\"%g\", info.GetFChild().GetFDouble())))\n\taddParam(\"info.f_child.f_bool\", info.GetFChild().GetFBool(), \"true\")\n\n\t// If needed for test cases, we'll have to add remaining nested message fields.\n\n\treturn queryParams\n}\n\nfunc prepQueryString(queryParams []string) string {\n\tvar queryString string\n\tif len(queryParams) > 0 {\n\t\tqueryString = fmt.Sprintf(\"?%s\", strings.Join(queryParams, \"&\"))\n\t}\n\n\treturn queryString\n}\n\n// complianceSuiteTestSetup sets up the compliance suite test cases configuring the servers.\nfunc complianceSuiteTestSetup() (suite *pb.ComplianceSuite, server *httptest.Server, err error) {\n\t// Run the Showcase REST server locally.\n\tserver = httptest.NewUnstartedServer(nil)\n\tbackend := createBackends()\n\trestServer := newEndpointREST(nil, backend)\n\tserver.Config = restServer.server\n\n\tsuite, err = getCleanComplianceSuite()\n\n\treturn suite, server, err\n}\n\n// getCleanComplianceSuite returns a clean copy of the compliance suite as parsed from the JSON\n// complianceSuiteFileName. This is needed because some negative tests modify requests, so we want to\n// always start with a fresh copy.\nfunc getCleanComplianceSuite() (*pb.ComplianceSuite, error) {\n\tif err := loadComplianceSuiteFile(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tsuite := &pb.ComplianceSuite{}\n\tif err := protojson.Unmarshal(complianceSuiteJSON, suite); err != nil {\n\t\treturn nil, fmt.Errorf(\"error unmarshalling from json %s:\\n   file: %s\\n   input was: %s\", err, complianceSuiteFileName, complianceSuiteJSON)\n\t}\n\treturn suite, nil\n}\n\n// loadComplianceSuiteFile loads the exported compliance_suite.json file (under schema/) to\n// complianceSuiteJSON if it hasn't been loaded already. This is done lazily at run-time rather than\n// in init() so we can report errors.\nfunc loadComplianceSuiteFile() (err error) {\n\tif len(complianceSuiteJSON) > 0 {\n\t\t// already loaded\n\t\treturn nil\n\t}\n\n\t// Locate, load\n\t_, thisFile, _, _ := runtime.Caller(0)\n\tcomplianceSuiteFileName = filepath.Join(filepath.Dir(thisFile), \"../../schema/google/showcase/v1beta1/compliance_suite.json\")\n\tcomplianceSuiteJSON, err = os.ReadFile(complianceSuiteFileName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not open suite file %q\", complianceSuiteFileName)\n\t}\n\treturn nil\n}\n\n// queryStringCaser is a convenience function type taking a string and returning its representation\n// under a particular casing scheme.\ntype queryStringCaser func(string) string\n\nvar queryStringLowerCamelCaser, queryStringSnakeCaser queryStringCaser\n\nvar (\n\tcomplianceSuiteJSON     []byte // the contents of the suite file\n\tcomplianceSuiteFileName string // the name of the suite file\n)\n\nfunc init() {\n\tqueryStringLowerCamelCaser = resttools.ToDottedLowerCamel\n\tqueryStringSnakeCaser = strcase.ToSnake\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/connect.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"bufio\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar ConnectFromFile string\n\nvar ConnectOutFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(ConnectCmd)\n\n\tConnectCmd.Flags().StringVar(&ConnectFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n\tConnectCmd.Flags().StringVar(&ConnectOutFile, \"out_file\", \"\", \"Absolute path to a file to pipe output to\")\n\tConnectCmd.MarkFlagRequired(\"out_file\")\n\n}\n\nvar ConnectCmd = &cobra.Command{\n\tUse:   \"connect\",\n\tShort: \"This method starts a bidirectional stream that...\",\n\tLong:  \"This method starts a bidirectional stream that receives all blurbs that  are being created after the stream has started and sends requests to create ...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ConnectFromFile != \"\" {\n\t\t\tin, err = os.Open(ConnectFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t}\n\n\t\tstream, err := MessagingClient.Connect(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tout, err := os.OpenFile(ConnectOutFile, os.O_APPEND|os.O_WRONLY, os.ModeAppend)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// start background stream receive\n\t\tgo func() {\n\t\t\tvar res *genprotopb.StreamBlurbsResponse\n\t\t\tfor {\n\t\t\t\tres, err = stream.Recv()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tstr := res.String()\n\t\t\t\tif OutputJSON {\n\t\t\t\t\tstr, _ = marshaler.MarshalToString(res)\n\t\t\t\t}\n\t\t\t\tfmt.Fprintln(out, str)\n\t\t\t}\n\t\t}()\n\n\t\tif Verbose {\n\t\t\tfmt.Println(\"Client stream open. Close with ctrl+D.\")\n\t\t}\n\n\t\tvar ConnectInput genprotopb.ConnectRequest\n\t\tscanner := bufio.NewScanner(in)\n\t\tfor scanner.Scan() {\n\t\t\tinput := scanner.Text()\n\t\t\tif input == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr = jsonpb.UnmarshalString(input, &ConnectInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = stream.Send(&ConnectInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err = scanner.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\terr = stream.CloseSend()\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-blurb.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CreateBlurbInput genprotopb.CreateBlurbRequest\n\nvar CreateBlurbFromFile string\n\nvar CreateBlurbInputBlurbContent string\n\nvar CreateBlurbInputBlurbContentImage genprotopb.Blurb_Image\n\nvar CreateBlurbInputBlurbContentText genprotopb.Blurb_Text\n\nvar CreateBlurbInputBlurbLegacyId string\n\nvar CreateBlurbInputBlurbLegacyIdLegacyRoomId genprotopb.Blurb_LegacyRoomId\n\nvar CreateBlurbInputBlurbLegacyIdLegacyUserId genprotopb.Blurb_LegacyUserId\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(CreateBlurbCmd)\n\n\tCreateBlurbInput.Blurb = new(genprotopb.Blurb)\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInput.Parent, \"parent\", \"\", \"Required. The resource name of the chat room or user...\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInput.Blurb.Name, \"blurb.name\", \"\", \"The resource name of the chat room.\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInput.Blurb.User, \"blurb.user\", \"\", \"Required. The resource name of the blurb's author.\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInputBlurbContentText.Text, \"blurb.content.text\", \"\", \"The textual content of this blurb.\")\n\n\tCreateBlurbCmd.Flags().BytesHexVar(&CreateBlurbInputBlurbContentImage.Image, \"blurb.content.image\", []byte{}, \"The image content of this blurb.\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInputBlurbLegacyIdLegacyRoomId.LegacyRoomId, \"blurb.legacy_id.legacy_room_id\", \"\", \"The legacy id of the room. This field is used to...\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInputBlurbLegacyIdLegacyUserId.LegacyUserId, \"blurb.legacy_id.legacy_user_id\", \"\", \"The legacy id of the user. This field is used to...\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInputBlurbContent, \"blurb.content\", \"\", \"Choices: text, image\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbInputBlurbLegacyId, \"blurb.legacy_id\", \"\", \"Choices: legacy_room_id, legacy_user_id\")\n\n\tCreateBlurbCmd.Flags().StringVar(&CreateBlurbFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateBlurbCmd = &cobra.Command{\n\tUse:   \"create-blurb\",\n\tShort: \"Creates a blurb. If the parent is a room, the...\",\n\tLong:  \"Creates a blurb. If the parent is a room, the blurb is understood to be a  message in that room. If the parent is a profile, the blurb is understood ...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateBlurbFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"parent\")\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.user\")\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.content\")\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.legacy_id\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateBlurbFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateBlurbFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateBlurbInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tswitch CreateBlurbInputBlurbContent {\n\n\t\t\tcase \"image\":\n\t\t\t\tCreateBlurbInput.Blurb.Content = &CreateBlurbInputBlurbContentImage\n\n\t\t\tcase \"text\":\n\t\t\t\tCreateBlurbInput.Blurb.Content = &CreateBlurbInputBlurbContentText\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for blurb.content\")\n\t\t\t}\n\n\t\t\tswitch CreateBlurbInputBlurbLegacyId {\n\n\t\t\tcase \"legacy_room_id\":\n\t\t\t\tCreateBlurbInput.Blurb.LegacyId = &CreateBlurbInputBlurbLegacyIdLegacyRoomId\n\n\t\t\tcase \"legacy_user_id\":\n\t\t\t\tCreateBlurbInput.Blurb.LegacyId = &CreateBlurbInputBlurbLegacyIdLegacyUserId\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for blurb.legacy_id\")\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"CreateBlurb\", &CreateBlurbInput)\n\t\t}\n\t\tresp, err := MessagingClient.CreateBlurb(ctx, &CreateBlurbInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-room.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CreateRoomInput genprotopb.CreateRoomRequest\n\nvar CreateRoomFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(CreateRoomCmd)\n\n\tCreateRoomInput.Room = new(genprotopb.Room)\n\n\tCreateRoomCmd.Flags().StringVar(&CreateRoomInput.Room.Name, \"room.name\", \"\", \"The resource name of the chat room.\")\n\n\tCreateRoomCmd.Flags().StringVar(&CreateRoomInput.Room.DisplayName, \"room.display_name\", \"\", \"Required. The human readable name of the chat room.\")\n\n\tCreateRoomCmd.Flags().StringVar(&CreateRoomInput.Room.Description, \"room.description\", \"\", \"The description of the chat room.\")\n\n\tCreateRoomCmd.Flags().StringVar(&CreateRoomFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateRoomCmd = &cobra.Command{\n\tUse:   \"create-room\",\n\tShort: \"Creates a room.\",\n\tLong:  \"Creates a room.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateRoomFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"room.display_name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateRoomFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateRoomFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateRoomInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"CreateRoom\", &CreateRoomInput)\n\t\t}\n\t\tresp, err := MessagingClient.CreateRoom(ctx, &CreateRoomInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-sequence.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CreateSequenceInput genprotopb.CreateSequenceRequest\n\nvar CreateSequenceFromFile string\n\nvar CreateSequenceInputSequenceResponses []string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(CreateSequenceCmd)\n\n\tCreateSequenceInput.Sequence = new(genprotopb.Sequence)\n\n\tCreateSequenceCmd.Flags().StringArrayVar(&CreateSequenceInputSequenceResponses, \"sequence.responses\", []string{}, \"Sequence of responses to return in order for each...\")\n\n\tCreateSequenceCmd.Flags().StringVar(&CreateSequenceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateSequenceCmd = &cobra.Command{\n\tUse:   \"create-sequence\",\n\tShort: \"Create a sequence of responses to be returned as...\",\n\tLong:  \"Create a sequence of responses to be returned as unary calls\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateSequenceFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateSequenceFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateSequenceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateSequenceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range CreateSequenceInputSequenceResponses {\n\t\t\ttmp := genprotopb.Sequence_Response{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tCreateSequenceInput.Sequence.Responses = append(CreateSequenceInput.Sequence.Responses, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"CreateSequence\", &CreateSequenceInput)\n\t\t}\n\t\tresp, err := SequenceClient.CreateSequence(ctx, &CreateSequenceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-session.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar CreateSessionInput genprotopb.CreateSessionRequest\n\nvar CreateSessionFromFile string\n\nvar CreateSessionInputSessionVersion string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(CreateSessionCmd)\n\n\tCreateSessionInput.Session = new(genprotopb.Session)\n\n\tCreateSessionCmd.Flags().StringVar(&CreateSessionInput.Session.Name, \"session.name\", \"\", \"The name of the session. The ID must conform to...\")\n\n\tCreateSessionCmd.Flags().StringVar(&CreateSessionInputSessionVersion, \"session.version\", \"\", \"Required. The version this session is using.\")\n\n\tCreateSessionCmd.Flags().StringVar(&CreateSessionFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateSessionCmd = &cobra.Command{\n\tUse:   \"create-session\",\n\tShort: \"Creates a new testing session.  Adding this...\",\n\tLong:  \"Creates a new testing session.  Adding this comment with special characters for comment formatting tests:  1. (abra->kadabra->alakazam)  2)...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateSessionFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateSessionFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateSessionFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateSessionInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tCreateSessionInput.Session.Version = genprotopb.Session_Version(genprotopb.Session_Version_value[strings.ToUpper(CreateSessionInputSessionVersion)])\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"CreateSession\", &CreateSessionInput)\n\t\t}\n\t\tresp, err := TestingClient.CreateSession(ctx, &CreateSessionInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-streaming-sequence.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CreateStreamingSequenceInput genprotopb.CreateStreamingSequenceRequest\n\nvar CreateStreamingSequenceFromFile string\n\nvar CreateStreamingSequenceInputStreamingSequenceResponses []string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(CreateStreamingSequenceCmd)\n\n\tCreateStreamingSequenceInput.StreamingSequence = new(genprotopb.StreamingSequence)\n\n\tCreateStreamingSequenceCmd.Flags().StringVar(&CreateStreamingSequenceInput.StreamingSequence.Content, \"streaming_sequence.content\", \"\", \"The content that the stream will send  this was...\")\n\n\tCreateStreamingSequenceCmd.Flags().StringArrayVar(&CreateStreamingSequenceInputStreamingSequenceResponses, \"streaming_sequence.responses\", []string{}, \"Sequence of responses to return in order for each...\")\n\n\tCreateStreamingSequenceCmd.Flags().StringVar(&CreateStreamingSequenceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateStreamingSequenceCmd = &cobra.Command{\n\tUse:   \"create-streaming-sequence\",\n\tShort: \"Creates a sequence of responses to be returned in...\",\n\tLong:  \"Creates a sequence of responses to be returned in a server streaming call\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateStreamingSequenceFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateStreamingSequenceFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateStreamingSequenceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateStreamingSequenceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range CreateStreamingSequenceInputStreamingSequenceResponses {\n\t\t\ttmp := genprotopb.StreamingSequence_Response{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tCreateStreamingSequenceInput.StreamingSequence.Responses = append(CreateStreamingSequenceInput.StreamingSequence.Responses, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"CreateStreamingSequence\", &CreateStreamingSequenceInput)\n\t\t}\n\t\tresp, err := SequenceClient.CreateStreamingSequence(ctx, &CreateStreamingSequenceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/create-user.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar CreateUserInput genprotopb.CreateUserRequest\n\nvar CreateUserFromFile string\n\nvar createUserInputUserAge int32\n\nvar createUserInputUserHeightFeet float64\n\nvar createUserInputUserNickname string\n\nvar createUserInputUserEnableNotifications bool\n\nfunc init() {\n\tIdentityServiceCmd.AddCommand(CreateUserCmd)\n\n\tCreateUserInput.User = new(genprotopb.User)\n\n\tCreateUserCmd.Flags().StringVar(&CreateUserInput.User.Name, \"user.name\", \"\", \"The resource name of the user.\")\n\n\tCreateUserCmd.Flags().StringVar(&CreateUserInput.User.DisplayName, \"user.display_name\", \"\", \"Required. The display_name of the user.\")\n\n\tCreateUserCmd.Flags().StringVar(&CreateUserInput.User.Email, \"user.email\", \"\", \"Required. The email address of the user.\")\n\n\tCreateUserCmd.Flags().Int32Var(&createUserInputUserAge, \"user.age\", 0, \"The age of the user in years.\")\n\n\tCreateUserCmd.Flags().Float64Var(&createUserInputUserHeightFeet, \"user.height_feet\", 0.0, \"The height of the user in feet.\")\n\n\tCreateUserCmd.Flags().StringVar(&createUserInputUserNickname, \"user.nickname\", \"\", \"The nickname of the user.   (--...\")\n\n\tCreateUserCmd.Flags().BoolVar(&createUserInputUserEnableNotifications, \"user.enable_notifications\", false, \"Enables the receiving of notifications. The...\")\n\n\tCreateUserCmd.Flags().StringVar(&CreateUserFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar CreateUserCmd = &cobra.Command{\n\tUse:   \"create-user\",\n\tShort: \"Creates a user.\",\n\tLong:  \"Creates a user.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif CreateUserFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"user.display_name\")\n\n\t\t\tcmd.MarkFlagRequired(\"user.email\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif CreateUserFromFile != \"\" {\n\t\t\tin, err = os.Open(CreateUserFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &CreateUserInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif cmd.Flags().Changed(\"user.age\") {\n\t\t\t\tCreateUserInput.User.Age = &createUserInputUserAge\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.height_feet\") {\n\t\t\t\tCreateUserInput.User.HeightFeet = &createUserInputUserHeightFeet\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.nickname\") {\n\t\t\t\tCreateUserInput.User.Nickname = &createUserInputUserNickname\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.enable_notifications\") {\n\t\t\t\tCreateUserInput.User.EnableNotifications = &createUserInputUserEnableNotifications\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Identity\", \"CreateUser\", &CreateUserInput)\n\t\t}\n\t\tresp, err := IdentityClient.CreateUser(ctx, &CreateUserInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/defaults.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc init() {\n\t// Since the showcase server is locally ran, the default address needs to be set\n\t// since the go gapic assumes port :443.\n\tservices := []string{\"ECHO\", \"IDENTITY\", \"MESSAGING\", \"TESTING\", \"SEQUENCE\"}\n\tenvVars := map[string]string{\n\t\t\"ADDRESS\":  \"localhost:7469\",\n\t\t\"INSECURE\": \"true\",\n\t}\n\tfor _, service := range services {\n\t\tfor key, value := range envVars {\n\t\t\tenvName := fmt.Sprintf(\"GAPIC-SHOWCASE_%s_%s\", service, key)\n\t\t\tif os.Getenv(envName) == \"\" {\n\t\t\t\tos.Setenv(envName, value)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/delete-blurb.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar DeleteBlurbInput genprotopb.DeleteBlurbRequest\n\nvar DeleteBlurbFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(DeleteBlurbCmd)\n\n\tDeleteBlurbCmd.Flags().StringVar(&DeleteBlurbInput.Name, \"name\", \"\", \"Required. The resource name of the requested blurb.\")\n\n\tDeleteBlurbCmd.Flags().StringVar(&DeleteBlurbFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar DeleteBlurbCmd = &cobra.Command{\n\tUse:   \"delete-blurb\",\n\tShort: \"Deletes a blurb.\",\n\tLong:  \"Deletes a blurb.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif DeleteBlurbFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif DeleteBlurbFromFile != \"\" {\n\t\t\tin, err = os.Open(DeleteBlurbFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &DeleteBlurbInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"DeleteBlurb\", &DeleteBlurbInput)\n\t\t}\n\t\terr = MessagingClient.DeleteBlurb(ctx, &DeleteBlurbInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/delete-room.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar DeleteRoomInput genprotopb.DeleteRoomRequest\n\nvar DeleteRoomFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(DeleteRoomCmd)\n\n\tDeleteRoomCmd.Flags().StringVar(&DeleteRoomInput.Name, \"name\", \"\", \"Required. The resource name of the requested room.\")\n\n\tDeleteRoomCmd.Flags().StringVar(&DeleteRoomFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar DeleteRoomCmd = &cobra.Command{\n\tUse:   \"delete-room\",\n\tShort: \"Deletes a room and all of its blurbs.\",\n\tLong:  \"Deletes a room and all of its blurbs.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif DeleteRoomFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif DeleteRoomFromFile != \"\" {\n\t\t\tin, err = os.Open(DeleteRoomFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &DeleteRoomInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"DeleteRoom\", &DeleteRoomInput)\n\t\t}\n\t\terr = MessagingClient.DeleteRoom(ctx, &DeleteRoomInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/delete-session.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar DeleteSessionInput genprotopb.DeleteSessionRequest\n\nvar DeleteSessionFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(DeleteSessionCmd)\n\n\tDeleteSessionCmd.Flags().StringVar(&DeleteSessionInput.Name, \"name\", \"\", \"The session to be deleted.\")\n\n\tDeleteSessionCmd.Flags().StringVar(&DeleteSessionFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar DeleteSessionCmd = &cobra.Command{\n\tUse:   \"delete-session\",\n\tShort: \"Delete a test session.\",\n\tLong:  \"Delete a test session.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif DeleteSessionFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif DeleteSessionFromFile != \"\" {\n\t\t\tin, err = os.Open(DeleteSessionFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &DeleteSessionInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"DeleteSession\", &DeleteSessionInput)\n\t\t}\n\t\terr = TestingClient.DeleteSession(ctx, &DeleteSessionInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/delete-test.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar DeleteTestInput genprotopb.DeleteTestRequest\n\nvar DeleteTestFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(DeleteTestCmd)\n\n\tDeleteTestCmd.Flags().StringVar(&DeleteTestInput.Name, \"name\", \"\", \"The test to be deleted.\")\n\n\tDeleteTestCmd.Flags().StringVar(&DeleteTestFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar DeleteTestCmd = &cobra.Command{\n\tUse:   \"delete-test\",\n\tShort: \"Explicitly decline to implement a test.   This...\",\n\tLong:  \"Explicitly decline to implement a test.   This removes the test from subsequent `ListTests` calls, and  attempting to do the test will error.   This...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif DeleteTestFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif DeleteTestFromFile != \"\" {\n\t\t\tin, err = os.Open(DeleteTestFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &DeleteTestInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"DeleteTest\", &DeleteTestInput)\n\t\t}\n\t\terr = TestingClient.DeleteTest(ctx, &DeleteTestInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/delete-user.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar DeleteUserInput genprotopb.DeleteUserRequest\n\nvar DeleteUserFromFile string\n\nfunc init() {\n\tIdentityServiceCmd.AddCommand(DeleteUserCmd)\n\n\tDeleteUserCmd.Flags().StringVar(&DeleteUserInput.Name, \"name\", \"\", \"Required. The resource name of the user to delete.\")\n\n\tDeleteUserCmd.Flags().StringVar(&DeleteUserFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar DeleteUserCmd = &cobra.Command{\n\tUse:   \"delete-user\",\n\tShort: \"Deletes a user, their profile, and all of their...\",\n\tLong:  \"Deletes a user, their profile, and all of their authored messages.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif DeleteUserFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif DeleteUserFromFile != \"\" {\n\t\t\tin, err = os.Open(DeleteUserFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &DeleteUserInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Identity\", \"DeleteUser\", &DeleteUserInput)\n\t\t}\n\t\terr = IdentityClient.DeleteUser(ctx, &DeleteUserInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/echo-error-details.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar EchoErrorDetailsInput genprotopb.EchoErrorDetailsRequest\n\nvar EchoErrorDetailsFromFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(EchoErrorDetailsCmd)\n\n\tEchoErrorDetailsCmd.Flags().StringVar(&EchoErrorDetailsInput.SingleDetailText, \"single_detail_text\", \"\", \"Content to return in a singular `*.error.details`...\")\n\n\tEchoErrorDetailsCmd.Flags().StringSliceVar(&EchoErrorDetailsInput.MultiDetailText, \"multi_detail_text\", []string{}, \"Content to return in a repeated `*.error.details`...\")\n\n\tEchoErrorDetailsCmd.Flags().StringVar(&EchoErrorDetailsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar EchoErrorDetailsCmd = &cobra.Command{\n\tUse:   \"echo-error-details\",\n\tShort: \"This method returns error details in a repeated...\",\n\tLong:  \"This method returns error details in a repeated 'google.protobuf.Any'  field. This method showcases handling errors thus encoded, particularly  over...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif EchoErrorDetailsFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif EchoErrorDetailsFromFile != \"\" {\n\t\t\tin, err = os.Open(EchoErrorDetailsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &EchoErrorDetailsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"EchoErrorDetails\", &EchoErrorDetailsInput)\n\t\t}\n\t\tresp, err := EchoClient.EchoErrorDetails(ctx, &EchoErrorDetailsInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/echo.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\tstatuspb \"google.golang.org/genproto/googleapis/rpc/status\"\n\n\t\"strings\"\n)\n\nvar EchoInput genprotopb.EchoRequest\n\nvar EchoFromFile string\n\nvar EchoInputResponse string\n\nvar EchoInputResponseContent genprotopb.EchoRequest_Content\n\nvar EchoInputResponseError genprotopb.EchoRequest_Error\n\nvar EchoInputResponseErrorDetails []string\n\nvar EchoInputSeverity string\n\nvar echoInputOtherRequestId string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(EchoCmd)\n\n\tEchoInputResponseError.Error = new(statuspb.Status)\n\n\tEchoCmd.Flags().StringVar(&EchoInputResponseContent.Content, \"response.content\", \"\", \"The content to be echoed by the server.\")\n\n\tEchoCmd.Flags().Int32Var(&EchoInputResponseError.Error.Code, \"response.error.code\", 0, \"The status code, which should be an enum value of...\")\n\n\tEchoCmd.Flags().StringVar(&EchoInputResponseError.Error.Message, \"response.error.message\", \"\", \"A developer-facing error message, which should be...\")\n\n\tEchoCmd.Flags().StringArrayVar(&EchoInputResponseErrorDetails, \"response.error.details\", []string{}, \"A list of messages that carry the error details. ...\")\n\n\tEchoCmd.Flags().StringVar(&EchoInputSeverity, \"severity\", \"\", \"The severity to be echoed by the server.\")\n\n\tEchoCmd.Flags().StringVar(&EchoInput.Header, \"header\", \"\", \"Optional. This field can be set to test the...\")\n\n\tEchoCmd.Flags().StringVar(&EchoInput.OtherHeader, \"other_header\", \"\", \"Optional. This field can be set to test the...\")\n\n\tEchoCmd.Flags().StringVar(&EchoInput.RequestId, \"request_id\", \"\", \"To facilitate testing of...\")\n\n\tEchoCmd.Flags().StringVar(&echoInputOtherRequestId, \"other_request_id\", \"\", \"To facilitate testing of...\")\n\n\tEchoCmd.Flags().StringVar(&EchoInputResponse, \"response\", \"\", \"Choices: content, error\")\n\n\tEchoCmd.Flags().StringVar(&EchoFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar EchoCmd = &cobra.Command{\n\tUse:   \"echo\",\n\tShort: \"This method simply echoes the request. This...\",\n\tLong:  \"This method simply echoes the request. This method showcases unary RPCs.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif EchoFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"response\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif EchoFromFile != \"\" {\n\t\t\tin, err = os.Open(EchoFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &EchoInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tswitch EchoInputResponse {\n\n\t\t\tcase \"content\":\n\t\t\t\tEchoInput.Response = &EchoInputResponseContent\n\n\t\t\tcase \"error\":\n\t\t\t\tEchoInput.Response = &EchoInputResponseError\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for response\")\n\t\t\t}\n\n\t\t\tEchoInput.Severity = genprotopb.Severity(genprotopb.Severity_value[strings.ToUpper(EchoInputSeverity)])\n\n\t\t\tif cmd.Flags().Changed(\"other_request_id\") {\n\t\t\t\tEchoInput.OtherRequestId = &echoInputOtherRequestId\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range EchoInputResponseErrorDetails {\n\t\t\ttmp := anypb.Any{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tEchoInputResponseError.Error.Details = append(EchoInputResponseError.Error.Details, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"Echo\", &EchoInput)\n\t\t}\n\t\tresp, err := EchoClient.Echo(ctx, &EchoInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/echo_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar EchoConfig *viper.Viper\nvar EchoClient *gapic.EchoClient\nvar EchoSubCommands []string = []string{\n\t\"echo\",\n\t\"echo-error-details\",\n\t\"fail-echo-with-details\",\n\t\"expand\",\n\t\"collect\",\n\t\"chat\",\n\t\"paged-expand\",\n\t\"paged-expand-legacy\",\n\t\"paged-expand-legacy-mapped\",\n\t\"wait\",\n\t\"poll-wait\", \"block\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(EchoServiceCmd)\n\n\tEchoConfig = viper.New()\n\tEchoConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_ECHO\")\n\tEchoConfig.AutomaticEnv()\n\n\tEchoServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_ECHO_INSECURE. Must be used with \\\"address\\\" option\")\n\tEchoConfig.BindPFlag(\"insecure\", EchoServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tEchoConfig.BindEnv(\"insecure\")\n\n\tEchoServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_ECHO_ADDRESS.\")\n\tEchoConfig.BindPFlag(\"address\", EchoServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tEchoConfig.BindEnv(\"address\")\n\n\tEchoServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_ECHO_TOKEN.\")\n\tEchoConfig.BindPFlag(\"token\", EchoServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tEchoConfig.BindEnv(\"token\")\n\n\tEchoServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_ECHO_API_KEY.\")\n\tEchoConfig.BindPFlag(\"api_key\", EchoServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tEchoConfig.BindEnv(\"api_key\")\n}\n\nvar EchoServiceCmd = &cobra.Command{\n\tUse:       \"echo\",\n\tShort:     \"This service is used showcase the four main types...\",\n\tLong:      \"This service is used showcase the four main types of rpcs - unary, server  side streaming, client side streaming, and bidirectional streaming. This ...\",\n\tValidArgs: EchoSubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := EchoConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif EchoConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := EchoConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := EchoConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tEchoClient, err = gapic.NewEchoClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/endpoint.go",
    "content": "// Copyright 2020 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//     https://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\npackage main\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/server/genrest\"\n\t\"github.com/googleapis/gapic-showcase/server/services\"\n\tfallback \"github.com/googleapis/grpc-fallback-go/server\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"github.com/soheilhy/cmux\"\n\t\"golang.org/x/sync/errgroup\"\n\tlocpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/reflection\"\n)\n\n// RuntimeConfig has the run-time settings necessary to run the\n// Showcase servers.\ntype RuntimeConfig struct {\n\tport         string\n\tfallbackPort string\n\ttlsCaCert    string\n\ttlsCert      string\n\ttlsKey       string\n}\n\n// Endpoint defines common operations for any of the various types of\n// transport-specific network endpoints Showcase supports\ntype Endpoint interface {\n\t// Serve beings the listen-and-serve loop for this\n\t// Endpoint. It typically blocks until the server is shut\n\t// down. The error it returns depends on the underlying\n\t// implementation.\n\tServe() error\n\n\t// Shutdown causes the currently running Endpoint to\n\t// terminate. The error it returns depends on the underlying\n\t// implementation.\n\tShutdown() error\n}\n\n// CreateAllEndpoints returns an Endpoint that can serve gRPC and\n// HTTP/REST connections (on config.port) and gRPC-fallback\n// connections (on config.fallbackPort)\nfunc CreateAllEndpoints(config RuntimeConfig) Endpoint {\n\t// Ensure port is of the right form.\n\tif !strings.HasPrefix(config.port, \":\") {\n\t\tconfig.port = \":\" + config.port\n\t}\n\n\t// Start listening.\n\tlis, err := net.Listen(\"tcp\", config.port)\n\tif err != nil {\n\t\tlog.Fatalf(\"Showcase failed to listen on port '%s': %v\", config.port, err)\n\t}\n\tstdLog.Printf(\"Showcase listening on port: %s\", config.port)\n\n\tm := cmux.New(lis)\n\thttpListener := m.Match(cmux.HTTP1())\n\t// cmux.Any() is needed below to get mTLS to work for\n\t// gRPC, and that in turn means the order of the matchers matters. See\n\t// https://github.com/open-telemetry/opentelemetry-collector/issues/2732\n\tgrpcListener := m.Match(cmux.Any())\n\n\tbackend := createBackends()\n\tgRPCServer := newEndpointGRPC(grpcListener, config, backend)\n\trestServer := newEndpointREST(httpListener, backend)\n\tcmuxServer := newEndpointMux(m, gRPCServer, restServer)\n\treturn cmuxServer\n}\n\n// endpointMux is an Endpoint for cmux, the connection multiplexer\n// allowing different types of connections on the same port.\n//\n// We choose not to use grpc.Server.ServeHTTP because it is\n// experimental and does not support some gRPC features available\n// through grpc.Server.Serve. (cf\n// https://godoc.org/google.golang.org/grpc#Server.ServeHTTP)\ntype endpointMux struct {\n\tendpoints []Endpoint\n\tcmux      cmux.CMux\n\tmux       sync.Mutex\n}\n\nfunc newEndpointMux(cmuxEndpoint cmux.CMux, endpoints ...Endpoint) Endpoint {\n\treturn &endpointMux{\n\t\tendpoints: endpoints,\n\t\tcmux:      cmuxEndpoint,\n\t}\n}\n\nfunc (em *endpointMux) String() string {\n\treturn \"endpoint multiplexer\"\n}\n\nfunc (em *endpointMux) Serve() error {\n\tg := new(errgroup.Group)\n\tfor idx, endpt := range em.endpoints {\n\t\tif endpt != nil {\n\t\t\tstdLog.Printf(\"Starting endpoint %d: %s\", idx, endpt)\n\t\t\tendpoint := endpt\n\t\t\tg.Go(func() error {\n\t\t\t\terr := endpoint.Serve()\n\t\t\t\terr2 := em.Shutdown()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\treturn err2\n\t\t\t})\n\t\t}\n\t}\n\tif em.cmux != nil {\n\t\tstdLog.Printf(\"Starting %s\", em)\n\n\t\tg.Go(func() error {\n\t\t\terr := em.cmux.Serve()\n\t\t\terr2 := em.Shutdown()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treturn err2\n\n\t\t})\n\t}\n\treturn g.Wait()\n}\n\nfunc (em *endpointMux) Shutdown() error {\n\tem.mux.Lock()\n\tdefer em.mux.Unlock()\n\n\tvar err error\n\tif em.cmux != nil {\n\t\t// TODO: Wait for https://github.com/soheilhy/cmux/pull/69 (due to\n\t\t// https://github.com/soheilhy/cmux/pull/69#issuecomment-712928041.)\n\t\t//\n\t\t// err = em.mux.Close()\n\t\tem.cmux = nil\n\t}\n\n\tfor idx, endpt := range em.endpoints {\n\t\tif endpt != nil {\n\t\t\t// TODO: Wait for https://github.com/soheilhy/cmux/pull/69\n\t\t\t// newErr := endpt.Shutdown()\n\t\t\t// if err==nil {\n\t\t\t// \terr = newErr\n\t\t\t// }\n\t\t\tem.endpoints[idx] = nil\n\t\t}\n\t}\n\treturn err\n}\n\n// endpointGRPC is an Endpoint for gRPC connections to the Showcase\n// server.\ntype endpointGRPC struct {\n\tserver         *grpc.Server\n\tfallbackServer *fallback.FallbackServer\n\tlistener       net.Listener\n\tmux            sync.Mutex\n}\n\n// createBackends creates services used by both the gRPC and REST servers.\nfunc createBackends() *services.Backend {\n\tlogger := &loggerObserver{}\n\tobserverRegistry := server.ShowcaseObserverRegistry()\n\tobserverRegistry.RegisterUnaryObserver(logger)\n\tobserverRegistry.RegisterStreamRequestObserver(logger)\n\tobserverRegistry.RegisterStreamResponseObserver(logger)\n\n\tidentityServer := services.NewIdentityServer()\n\tmessagingServer := services.NewMessagingServer(identityServer)\n\treturn &services.Backend{\n\t\tEchoServer:            services.NewEchoServer(),\n\t\tSequenceServiceServer: services.NewSequenceServer(),\n\t\tIdentityServer:        identityServer,\n\t\tMessagingServer:       messagingServer,\n\t\tComplianceServer:      services.NewComplianceServer(),\n\t\tTestingServer:         services.NewTestingServer(observerRegistry),\n\t\tOperationsServer:      services.NewOperationsServer(messagingServer),\n\t\tLocationsServer:       services.NewLocationsServer(),\n\t\tIAMPolicyServer:       services.NewIAMPolicyServer(),\n\t\tStdLog:                stdLog,\n\t\tErrLog:                errLog,\n\t\tObserverRegistry:      observerRegistry,\n\t}\n}\n\nfunc newEndpointGRPC(lis net.Listener, config RuntimeConfig, backend *services.Backend) Endpoint {\n\topts := []grpc.ServerOption{\n\t\tgrpc.StreamInterceptor(backend.ObserverRegistry.StreamInterceptor),\n\t\tgrpc.UnaryInterceptor(backend.ObserverRegistry.UnaryInterceptor),\n\t}\n\n\t// load mutual TLS cert/key and root CA cert\n\tif config.tlsCaCert != \"\" && config.tlsCert != \"\" && config.tlsKey != \"\" {\n\t\tkeyPair, err := tls.LoadX509KeyPair(config.tlsCert, config.tlsKey)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Failed to load server TLS cert/key with error:%v\", err)\n\t\t}\n\n\t\tcert, err := os.ReadFile(config.tlsCaCert)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Failed to load root CA cert file with error:%v\", err)\n\t\t}\n\n\t\tpool := x509.NewCertPool()\n\t\tpool.AppendCertsFromPEM(cert)\n\n\t\tta := credentials.NewTLS(&tls.Config{\n\t\t\tCertificates: []tls.Certificate{keyPair},\n\t\t\tClientCAs:    pool,\n\t\t\tClientAuth:   tls.RequireAndVerifyClientCert,\n\t\t})\n\n\t\topts = append(opts, grpc.Creds(ta))\n\t}\n\ts := grpc.NewServer(opts...)\n\n\t// Register Services to the server.\n\tpb.RegisterEchoServer(s, backend.EchoServer)\n\tpb.RegisterSequenceServiceServer(s, backend.SequenceServiceServer)\n\tpb.RegisterIdentityServer(s, backend.IdentityServer)\n\tpb.RegisterMessagingServer(s, backend.MessagingServer)\n\tpb.RegisterComplianceServer(s, backend.ComplianceServer)\n\tpb.RegisterTestingServer(s, backend.TestingServer)\n\tlropb.RegisterOperationsServer(s, backend.OperationsServer)\n\tlocpb.RegisterLocationsServer(s, backend.LocationsServer)\n\tiampb.RegisterIAMPolicyServer(s, backend.IAMPolicyServer)\n\n\tfb := fallback.NewServer(config.fallbackPort, \"localhost\"+config.port)\n\n\t// Register reflection service on gRPC server.\n\treflection.Register(s)\n\n\treturn &endpointGRPC{\n\t\tserver:         s,\n\t\tfallbackServer: fb,\n\t\tlistener:       lis,\n\t}\n}\n\nfunc (eg *endpointGRPC) String() string {\n\treturn \"gRPC endpoint\"\n}\n\nfunc (eg *endpointGRPC) Serve() error {\n\tdefer eg.Shutdown()\n\tif eg.fallbackServer != nil {\n\t\tstdLog.Printf(\"Listening for gRPC-fallback connections\")\n\t\teg.fallbackServer.StartBackground()\n\t}\n\tif eg.server != nil {\n\t\tstdLog.Printf(\"Listening for gRPC connections\")\n\t\treturn eg.server.Serve(eg.listener)\n\t}\n\treturn fmt.Errorf(\"gRPC server not set up\")\n}\n\nfunc (eg *endpointGRPC) Shutdown() error {\n\teg.mux.Lock()\n\tdefer eg.mux.Unlock()\n\n\tif eg.fallbackServer != nil {\n\t\tstdLog.Printf(\"Stopping gRPC-fallback connections\")\n\t\teg.fallbackServer.Shutdown()\n\t\teg.fallbackServer = nil\n\t}\n\n\tif eg.server != nil {\n\t\tstdLog.Printf(\"Stopping gRPC connections\")\n\t\teg.server.GracefulStop()\n\t\teg.server = nil\n\t}\n\tstdLog.Printf(\"Stopped gRPC\")\n\treturn nil\n}\n\n// endpointREST is an Endpoint for HTTP/REST connections to the Showcase\n// server.\ntype endpointREST struct {\n\tserver   *http.Server\n\tlistener net.Listener\n\tmux      sync.Mutex\n}\n\nfunc newEndpointREST(lis net.Listener, backend *services.Backend) *endpointREST {\n\trouter := gmux.NewRouter()\n\trouter.HandleFunc(\"/hello\", func(w http.ResponseWriter, _ *http.Request) {\n\t\tw.Write([]byte(\"GAPIC Showcase: HTTP/REST endpoint using gorilla/mux\\n\"))\n\t})\n\tgenrest.RegisterHandlers(router, backend)\n\treturn &endpointREST{\n\t\tserver:   &http.Server{Handler: router},\n\t\tlistener: lis,\n\t}\n}\n\nfunc (er *endpointREST) String() string {\n\treturn \"HTTP/REST endpoint\"\n}\n\nfunc (er *endpointREST) Serve() error {\n\tdefer er.Shutdown()\n\tif er.server != nil {\n\t\tstdLog.Printf(\"Listening for REST connections\")\n\t\treturn er.server.Serve(er.listener)\n\t}\n\treturn fmt.Errorf(\"REST server not set up\")\n}\n\nfunc (er *endpointREST) Shutdown() error {\n\ter.mux.Lock()\n\tdefer er.mux.Unlock()\n\tvar err error\n\tif er.server != nil {\n\t\tstdLog.Printf(\"Stopping REST connections\")\n\t\terr = er.server.Shutdown(context.Background())\n\t\ter.server = nil\n\t}\n\tstdLog.Printf(\"Stopped REST\")\n\treturn err\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/endpoint_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\n// TestRESTCalls tests that arbitrary rest calls received by the Showcase REST server are handled\n// correctly.\nfunc TestRESTCalls(t *testing.T) {\n\tserver := httptest.NewUnstartedServer(nil)\n\tbackend := createBackends()\n\trestServer := newEndpointREST(nil, backend)\n\n\tserver.Config = restServer.server\n\tserver.Start()\n\tdefer server.Close()\n\n\tfor idx, testCase := range []struct {\n\t\tverb       string\n\t\tpath       string\n\t\tbody       string\n\t\tfullJSON   bool\n\t\twant       string\n\t\tstatusCode int // 0 taken to mean 200 for simplicity\n\t}{\n\t\t{\n\t\t\tverb: \"GET\",\n\t\t\tpath: \"/hello\",\n\t\t\twant: \"GAPIC Showcase: HTTP/REST endpoint using gorilla/mux\\n\",\n\t\t},\n\t\t{\n\t\t\tverb: \"POST\",\n\t\t\tpath: \"/v1beta1/repeat:body\",\n\t\t\tbody: `{\"info\":{\"fString\":\"jonas^ mila\"}}`,\n\t\t\twant: `{\"request\":{\"info\":{\"fString\":\"jonas^ mila\"}}, \"bindingUri\":\"/v1beta1/repeat:body\"}`,\n\t\t},\n\t\t{\n\t\t\tverb: \"GET\",\n\t\t\tpath: \"/v1beta1/repeat:query?info.fString=jonas+mila\",\n\t\t\twant: `{\"request\":{\"info\":{\"fString\":\"jonas mila\"}}, \"bindingUri\":\"/v1beta1/repeat:query\"}`,\n\t\t},\n\t\t{\n\t\t\tverb: \"GET\",\n\t\t\tpath: \"/v1beta1/repeat:query?info.fString=jonas^mila\",\n\n\t\t\t// TODO: Fix so that this returns an error, because `^` is not URL-escaped\n\t\t\tstatusCode: 200,\n\t\t\twant:       `{\"request\":{\"info\":{\"fString\":\"jonas^mila\"}}, \"bindingUri\":\"/v1beta1/repeat:query\"}`,\n\t\t},\n\t\t{\n\t\t\tverb:       \"GET\",\n\t\t\tpath:       \"/v1beta1/repeat:query?info.fString=jonas mila\",\n\t\t\tstatusCode: 400, // unescaped space in query param\n\t\t},\n\t\t{\n\t\t\tverb:       \"GET\",\n\t\t\tpath:       \"/v1beta1/repeat:query?info.p_kingdom=EXTRATERRESTRIAL\",\n\t\t\tstatusCode: 400, // unknown enum value symbol\n\t\t},\n\t\t{\n\t\t\tverb:       \"GET\",\n\t\t\tpath:       \"/v1beta1/repeat:query?info.p_kingdom=ANIMALIA\",\n\t\t\tstatusCode: 400, // non-camel-cased field name\n\t\t},\n\t\t{\n\t\t\tverb:       \"GET\",\n\t\t\tpath:       \"/v1beta1/repeat:query?info.PKingdom=ANIMALIA\",\n\t\t\tstatusCode: 400, // non-lower-camel-cased field name\n\t\t},\n\n\t\t{\n\t\t\t// Test sending an enum as a number in the query parameter\n\t\t\tverb: \"GET\",\n\t\t\tpath: \"/v1beta1/repeat:query?info.pKingdom=1\",\n\t\t\twant: `{\n                          \"request\":{\n                            \"info\":{\n                              \"pKingdom\":\"ARCHAEBACTERIA\"\n                             }\n                            },\n                          \"bindingUri\":\"/v1beta1/repeat:query\"\n                          }`,\n\t\t},\n\t\t{\n\t\t\t// Test sending an enum as a number in the body\n\t\t\tverb: \"POST\",\n\t\t\tpath: \"/v1beta1/repeat:body\",\n\t\t\tbody: `{\"info\":{\"pKingdom\": 1}}`,\n\t\t\twant: `{\n                          \"request\":{\n                            \"info\":{\n                              \"pKingdom\":\"ARCHAEBACTERIA\"\n                             }\n                            },\n                          \"bindingUri\":\"/v1beta1/repeat:body\"\n                          }`,\n\t\t},\n\t\t{\n\t\t\t// Test responses:\n\t\t\t//   1. unset optional field absent\n\t\t\t//   2. zero-set optional field present\n\t\t\t//   3. unset non-optional field present\n\t\t\t//   4. enum field is symbolic rather than numeric\n\t\t\tverb:     \"POST\",\n\t\t\tpath:     \"/v1beta1/repeat:body\",\n\t\t\tbody:     `{\"info\":{\"fString\":\"jonas^ mila\", \"pDouble\": 0}}`,\n\t\t\tfullJSON: true,\n\t\t\twant: `{\n                          \"request\": {\n                            \"name\": \"\",\n                            \"info\": {\n                              \"fString\": \"jonas^ mila\",\n                              \"fInt32\": 0,\n                              \"fSint32\": 0,\n                              \"fSfixed32\": 0,\n                              \"fUint32\": 0,\n                              \"fFixed32\": 0,\n                              \"fInt64\": \"0\",\n                              \"fSint64\": \"0\",\n                              \"fSfixed64\": \"0\",\n                              \"fUint64\": \"0\",\n                              \"fFixed64\": \"0\",\n                              \"fDouble\": 0,\n                              \"fFloat\": 0,\n                              \"fBool\": false,\n                              \"fBytes\": \"\",\n                              \"fKingdom\": \"LIFE_KINGDOM_UNSPECIFIED\",\n                              \"fChild\": null,\n                              \"pDouble\": 0\n                            },\n                            \"serverVerify\": false,\n                            \"fInt32\": 0,\n                            \"fInt64\": \"0\",\n                            \"fDouble\": 0\n                          },\n                          \"bindingUri\":\"/v1beta1/repeat:body\"\n                        }\n                      `,\n\t\t},\n\t} {\n\n\t\tvar jsonOptions *resttools.JSONMarshalOptions\n\t\tif testCase.fullJSON {\n\t\t\tjsonOptions = allowFullJSON()\n\t\t} else {\n\t\t\tjsonOptions = allowCompactJSON()\n\t\t}\n\n\t\trequest, err := http.NewRequest(testCase.verb, server.URL+testCase.path, strings.NewReader(testCase.body))\n\t\tif err != nil {\n\t\t\tjsonOptions.Restore()\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\tresttools.PopulateRequestHeaders(request)\n\n\t\tresponse, err := http.DefaultClient.Do(request)\n\t\tif err != nil {\n\t\t\tjsonOptions.Restore()\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\twant := testCase.statusCode\n\t\tif want == 0 {\n\t\t\twant = 200\n\t\t}\n\t\tif got := response.StatusCode; got != want {\n\t\t\tt.Errorf(\"testcase %2d: status code: got %d, want %d\", idx, got, want)\n\t\t\tt.Errorf(\"  request: %v\", request)\n\t\t} else if want != 200 {\n\t\t\t// we got the expected error\n\t\t\tjsonOptions.Restore()\n\t\t\tcontinue\n\t\t}\n\n\t\tbody, err := io.ReadAll(response.Body)\n\t\tresponse.Body.Close()\n\t\tif err != nil {\n\t\t\tjsonOptions.Restore()\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tif got, want := string(body), testCase.want; noSpace(got) != noSpace(want) {\n\t\t\tt.Errorf(\"testcase %2d: body: got %q, want %q\", idx, noSpace(got), noSpace(want))\n\t\t\tt.Errorf(\"  request: %v\", request)\n\t\t}\n\t\tjsonOptions.Restore()\n\t}\n\n}\n\n// allowCompactJSON ensures that resttools JSONMarshaler uses the compact representation until\n// explicitly restored; this makes some tests shorter to configure and easier to understand.\nfunc allowCompactJSON() *resttools.JSONMarshalOptions {\n\tresttools.JSONMarshaler.Replace(&protojson.MarshalOptions{\n\t\tMultiline:       false,\n\t\tAllowPartial:    false,\n\t\tUseEnumNumbers:  false,\n\t\tEmitUnpopulated: false,\n\t\tUseProtoNames:   false, // we want lower-camel-cased field names\n\t})\n\treturn &resttools.JSONMarshaler\n}\n\n// allowFullJSON ensures that resttools JSONMarshaler uses the production configuration until\n// explicitly restored.\nfunc allowFullJSON() *resttools.JSONMarshalOptions {\n\tresttools.JSONMarshaler.Replace(nil)\n\treturn &resttools.JSONMarshaler\n}\n\n// noSpace removes whitespace from src. This is useful for processing formatted responses or\n// expected values without having to worry about whitespace matches.\nfunc noSpace(src string) string {\n\tstr := strings.ReplaceAll(src, \"\\n\", \"\")\n\treturn strings.ReplaceAll(str, \" \", \"\")\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/expand.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"io\"\n\n\t\"os\"\n\n\tstatuspb \"google.golang.org/genproto/googleapis/rpc/status\"\n)\n\nvar ExpandInput genprotopb.ExpandRequest\n\nvar ExpandFromFile string\n\nvar ExpandInputErrorDetails []string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(ExpandCmd)\n\n\tExpandInput.Error = new(statuspb.Status)\n\n\tExpandInput.StreamWaitTime = new(durationpb.Duration)\n\n\tExpandCmd.Flags().StringVar(&ExpandInput.Content, \"content\", \"\", \"The content that will be split into words and...\")\n\n\tExpandCmd.Flags().Int32Var(&ExpandInput.Error.Code, \"error.code\", 0, \"The status code, which should be an enum value of...\")\n\n\tExpandCmd.Flags().StringVar(&ExpandInput.Error.Message, \"error.message\", \"\", \"A developer-facing error message, which should be...\")\n\n\tExpandCmd.Flags().StringArrayVar(&ExpandInputErrorDetails, \"error.details\", []string{}, \"A list of messages that carry the error details. ...\")\n\n\tExpandCmd.Flags().Int64Var(&ExpandInput.StreamWaitTime.Seconds, \"stream_wait_time.seconds\", 0, \"Signed seconds of the span of time. Must be from...\")\n\n\tExpandCmd.Flags().Int32Var(&ExpandInput.StreamWaitTime.Nanos, \"stream_wait_time.nanos\", 0, \"Signed fractions of a second at nanosecond...\")\n\n\tExpandCmd.Flags().StringVar(&ExpandFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ExpandCmd = &cobra.Command{\n\tUse:   \"expand\",\n\tShort: \"This method splits the given content into words...\",\n\tLong:  \"This method splits the given content into words and will pass each word back  through the stream. This method showcases server-side streaming RPCs.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ExpandFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ExpandFromFile != \"\" {\n\t\t\tin, err = os.Open(ExpandFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ExpandInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range ExpandInputErrorDetails {\n\t\t\ttmp := anypb.Any{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tExpandInput.Error.Details = append(ExpandInput.Error.Details, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"Expand\", &ExpandInput)\n\t\t}\n\t\tresp, err := EchoClient.Expand(ctx, &ExpandInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar item *genprotopb.EchoResponse\n\t\tfor {\n\t\t\titem, err = resp.Recv()\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\t\t\tprintMessage(item)\n\t\t}\n\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/fail-echo-with-details.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar FailEchoWithDetailsInput genprotopb.FailEchoWithDetailsRequest\n\nvar FailEchoWithDetailsFromFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(FailEchoWithDetailsCmd)\n\n\tFailEchoWithDetailsCmd.Flags().StringVar(&FailEchoWithDetailsInput.Message, \"message\", \"\", \"Optional message to echo back in the PoetryError....\")\n\n\tFailEchoWithDetailsCmd.Flags().StringVar(&FailEchoWithDetailsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar FailEchoWithDetailsCmd = &cobra.Command{\n\tUse:   \"fail-echo-with-details\",\n\tShort: \"This method always fails with a gRPC 'Aborted'...\",\n\tLong:  \"This method always fails with a gRPC 'Aborted' error status that contains  multiple error details.  These include one instance of each of the...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif FailEchoWithDetailsFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif FailEchoWithDetailsFromFile != \"\" {\n\t\t\tin, err = os.Open(FailEchoWithDetailsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &FailEchoWithDetailsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"FailEchoWithDetails\", &FailEchoWithDetailsInput)\n\t\t}\n\t\tresp, err := EchoClient.FailEchoWithDetails(ctx, &FailEchoWithDetailsInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/gapic-showcase.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\t\"github.com/golang/protobuf/proto\"\n\t\"github.com/spf13/cobra\"\n)\n\nvar Verbose, OutputJSON bool\nvar ctx = context.Background()\nvar marshaler = &jsonpb.Marshaler{Indent: \"  \"}\n\nfunc init() {\n\trootCmd.PersistentFlags().BoolVarP(&Verbose, \"verbose\", \"v\", false, \"Print verbose output\")\n\trootCmd.PersistentFlags().BoolVarP(&OutputJSON, \"json\", \"j\", false, \"Print JSON output\")\n}\n\nvar rootCmd = &cobra.Command{\n\tUse:   \"gapic-showcase\",\n\tShort: \"Root command of gapic-showcase\",\n}\n\nfunc Execute() {\n\tif err := rootCmd.Execute(); err != nil {\n\t\tfmt.Println(err)\n\t\tos.Exit(1)\n\t}\n}\n\nfunc main() {\n\tExecute()\n}\n\nfunc printVerboseInput(srv, mthd string, data interface{}) {\n\tfmt.Println(\"Service:\", srv)\n\tfmt.Println(\"Method:\", mthd)\n\tfmt.Print(\"Input: \")\n\tprintMessage(data)\n}\n\nfunc printMessage(data interface{}) {\n\tvar s string\n\n\tif msg, ok := data.(proto.Message); ok {\n\t\ts = msg.String()\n\t\tif OutputJSON {\n\t\t\tvar b bytes.Buffer\n\t\t\tmarshaler.Marshal(&b, msg)\n\t\t\ts = b.String()\n\t\t}\n\t}\n\n\tfmt.Println(s)\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-blurb.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetBlurbInput genprotopb.GetBlurbRequest\n\nvar GetBlurbFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(GetBlurbCmd)\n\n\tGetBlurbCmd.Flags().StringVar(&GetBlurbInput.Name, \"name\", \"\", \"Required. The resource name of the requested blurb.\")\n\n\tGetBlurbCmd.Flags().StringVar(&GetBlurbFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetBlurbCmd = &cobra.Command{\n\tUse:   \"get-blurb\",\n\tShort: \"Retrieves the Blurb with the given resource name.\",\n\tLong:  \"Retrieves the Blurb with the given resource name.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetBlurbFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetBlurbFromFile != \"\" {\n\t\t\tin, err = os.Open(GetBlurbFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetBlurbInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"GetBlurb\", &GetBlurbInput)\n\t\t}\n\t\tresp, err := MessagingClient.GetBlurb(ctx, &GetBlurbInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-enum.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetEnumInput genprotopb.EnumRequest\n\nvar GetEnumFromFile string\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(GetEnumCmd)\n\n\tGetEnumCmd.Flags().BoolVar(&GetEnumInput.UnknownEnum, \"unknown_enum\", false, \"Whether the client is requesting a new, unknown...\")\n\n\tGetEnumCmd.Flags().StringVar(&GetEnumFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetEnumCmd = &cobra.Command{\n\tUse:   \"get-enum\",\n\tShort: \"This method requests an enum value from the...\",\n\tLong:  \"This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetEnumFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetEnumFromFile != \"\" {\n\t\t\tin, err = os.Open(GetEnumFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetEnumInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"GetEnum\", &GetEnumInput)\n\t\t}\n\t\tresp, err := ComplianceClient.GetEnum(ctx, &GetEnumInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-room.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetRoomInput genprotopb.GetRoomRequest\n\nvar GetRoomFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(GetRoomCmd)\n\n\tGetRoomCmd.Flags().StringVar(&GetRoomInput.Name, \"name\", \"\", \"Required. The resource name of the requested room.\")\n\n\tGetRoomCmd.Flags().StringVar(&GetRoomFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetRoomCmd = &cobra.Command{\n\tUse:   \"get-room\",\n\tShort: \"Retrieves the Room with the given resource name.\",\n\tLong:  \"Retrieves the Room with the given resource name.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetRoomFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetRoomFromFile != \"\" {\n\t\t\tin, err = os.Open(GetRoomFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetRoomInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"GetRoom\", &GetRoomInput)\n\t\t}\n\t\tresp, err := MessagingClient.GetRoom(ctx, &GetRoomInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-sequence-report.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetSequenceReportInput genprotopb.GetSequenceReportRequest\n\nvar GetSequenceReportFromFile string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(GetSequenceReportCmd)\n\n\tGetSequenceReportCmd.Flags().StringVar(&GetSequenceReportInput.Name, \"name\", \"\", \"Required. \")\n\n\tGetSequenceReportCmd.Flags().StringVar(&GetSequenceReportFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetSequenceReportCmd = &cobra.Command{\n\tUse:   \"get-sequence-report\",\n\tShort: \"Retrieves a sequence report which can be used to...\",\n\tLong:  \"Retrieves a sequence report which can be used to retrieve information about a  sequence of unary calls.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetSequenceReportFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetSequenceReportFromFile != \"\" {\n\t\t\tin, err = os.Open(GetSequenceReportFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetSequenceReportInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"GetSequenceReport\", &GetSequenceReportInput)\n\t\t}\n\t\tresp, err := SequenceClient.GetSequenceReport(ctx, &GetSequenceReportInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-session.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetSessionInput genprotopb.GetSessionRequest\n\nvar GetSessionFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(GetSessionCmd)\n\n\tGetSessionCmd.Flags().StringVar(&GetSessionInput.Name, \"name\", \"\", \"The session to be retrieved.\")\n\n\tGetSessionCmd.Flags().StringVar(&GetSessionFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetSessionCmd = &cobra.Command{\n\tUse:   \"get-session\",\n\tShort: \"Gets a testing session.\",\n\tLong:  \"Gets a testing session.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetSessionFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetSessionFromFile != \"\" {\n\t\t\tin, err = os.Open(GetSessionFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetSessionInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"GetSession\", &GetSessionInput)\n\t\t}\n\t\tresp, err := TestingClient.GetSession(ctx, &GetSessionInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-streaming-sequence-report.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetStreamingSequenceReportInput genprotopb.GetStreamingSequenceReportRequest\n\nvar GetStreamingSequenceReportFromFile string\n\nfunc init() {\n\tSequenceServiceCmd.AddCommand(GetStreamingSequenceReportCmd)\n\n\tGetStreamingSequenceReportCmd.Flags().StringVar(&GetStreamingSequenceReportInput.Name, \"name\", \"\", \"Required. \")\n\n\tGetStreamingSequenceReportCmd.Flags().StringVar(&GetStreamingSequenceReportFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetStreamingSequenceReportCmd = &cobra.Command{\n\tUse:   \"get-streaming-sequence-report\",\n\tShort: \"Retrieves a sequence report which can be used to...\",\n\tLong:  \"Retrieves a sequence report which can be used to retrieve information  about a sequences of responses in a server streaming call.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetStreamingSequenceReportFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetStreamingSequenceReportFromFile != \"\" {\n\t\t\tin, err = os.Open(GetStreamingSequenceReportFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetStreamingSequenceReportInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Sequence\", \"GetStreamingSequenceReport\", &GetStreamingSequenceReportInput)\n\t\t}\n\t\tresp, err := SequenceClient.GetStreamingSequenceReport(ctx, &GetStreamingSequenceReportInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/get-user.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar GetUserInput genprotopb.GetUserRequest\n\nvar GetUserFromFile string\n\nfunc init() {\n\tIdentityServiceCmd.AddCommand(GetUserCmd)\n\n\tGetUserCmd.Flags().StringVar(&GetUserInput.Name, \"name\", \"\", \"Required. The resource name of the requested user.\")\n\n\tGetUserCmd.Flags().StringVar(&GetUserFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar GetUserCmd = &cobra.Command{\n\tUse:   \"get-user\",\n\tShort: \"Retrieves the User with the given uri.\",\n\tLong:  \"Retrieves the User with the given uri.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif GetUserFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif GetUserFromFile != \"\" {\n\t\t\tin, err = os.Open(GetUserFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &GetUserInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Identity\", \"GetUser\", &GetUserInput)\n\t\t}\n\t\tresp, err := IdentityClient.GetUser(ctx, &GetUserInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/identity_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar IdentityConfig *viper.Viper\nvar IdentityClient *gapic.IdentityClient\nvar IdentitySubCommands []string = []string{\n\t\"create-user\",\n\t\"get-user\",\n\t\"update-user\",\n\t\"delete-user\",\n\t\"list-users\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(IdentityServiceCmd)\n\n\tIdentityConfig = viper.New()\n\tIdentityConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_IDENTITY\")\n\tIdentityConfig.AutomaticEnv()\n\n\tIdentityServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_IDENTITY_INSECURE. Must be used with \\\"address\\\" option\")\n\tIdentityConfig.BindPFlag(\"insecure\", IdentityServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tIdentityConfig.BindEnv(\"insecure\")\n\n\tIdentityServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_IDENTITY_ADDRESS.\")\n\tIdentityConfig.BindPFlag(\"address\", IdentityServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tIdentityConfig.BindEnv(\"address\")\n\n\tIdentityServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_IDENTITY_TOKEN.\")\n\tIdentityConfig.BindPFlag(\"token\", IdentityServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tIdentityConfig.BindEnv(\"token\")\n\n\tIdentityServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_IDENTITY_API_KEY.\")\n\tIdentityConfig.BindPFlag(\"api_key\", IdentityServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tIdentityConfig.BindEnv(\"api_key\")\n}\n\nvar IdentityServiceCmd = &cobra.Command{\n\tUse:       \"identity\",\n\tShort:     \"A simple identity service.\",\n\tLong:      \"A simple identity service.\",\n\tValidArgs: IdentitySubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := IdentityConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif IdentityConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := IdentityConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := IdentityConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tIdentityClient, err = gapic.NewIdentityClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/list-blurbs.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar ListBlurbsInput genprotopb.ListBlurbsRequest\n\nvar ListBlurbsFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(ListBlurbsCmd)\n\n\tListBlurbsCmd.Flags().StringVar(&ListBlurbsInput.Parent, \"parent\", \"\", \"Required. The resource name of the requested room or...\")\n\n\tListBlurbsCmd.Flags().Int32Var(&ListBlurbsInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of blurbs to return. Server...\")\n\n\tListBlurbsCmd.Flags().StringVar(&ListBlurbsInput.PageToken, \"page_token\", \"\", \"The value of...\")\n\n\tListBlurbsCmd.Flags().StringVar(&ListBlurbsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ListBlurbsCmd = &cobra.Command{\n\tUse:   \"list-blurbs\",\n\tShort: \"Lists blurbs for a specific chat room or user...\",\n\tLong:  \"Lists blurbs for a specific chat room or user profile depending on the  parent resource name.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ListBlurbsFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"parent\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ListBlurbsFromFile != \"\" {\n\t\t\tin, err = os.Open(ListBlurbsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ListBlurbsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"ListBlurbs\", &ListBlurbsInput)\n\t\t}\n\t\titer := MessagingClient.ListBlurbs(ctx, &ListBlurbsInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/list-rooms.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar ListRoomsInput genprotopb.ListRoomsRequest\n\nvar ListRoomsFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(ListRoomsCmd)\n\n\tListRoomsCmd.Flags().Int32Var(&ListRoomsInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of rooms return. Server may...\")\n\n\tListRoomsCmd.Flags().StringVar(&ListRoomsInput.PageToken, \"page_token\", \"\", \"The value of...\")\n\n\tListRoomsCmd.Flags().StringVar(&ListRoomsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ListRoomsCmd = &cobra.Command{\n\tUse:   \"list-rooms\",\n\tShort: \"Lists all chat rooms.\",\n\tLong:  \"Lists all chat rooms.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ListRoomsFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ListRoomsFromFile != \"\" {\n\t\t\tin, err = os.Open(ListRoomsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ListRoomsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"ListRooms\", &ListRoomsInput)\n\t\t}\n\t\titer := MessagingClient.ListRooms(ctx, &ListRoomsInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/list-sessions.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar ListSessionsInput genprotopb.ListSessionsRequest\n\nvar ListSessionsFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(ListSessionsCmd)\n\n\tListSessionsCmd.Flags().Int32Var(&ListSessionsInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of sessions to return per page.\")\n\n\tListSessionsCmd.Flags().StringVar(&ListSessionsInput.PageToken, \"page_token\", \"\", \"The page token, for retrieving subsequent pages.\")\n\n\tListSessionsCmd.Flags().StringVar(&ListSessionsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ListSessionsCmd = &cobra.Command{\n\tUse:   \"list-sessions\",\n\tShort: \"Lists the current test sessions.\",\n\tLong:  \"Lists the current test sessions.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ListSessionsFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ListSessionsFromFile != \"\" {\n\t\t\tin, err = os.Open(ListSessionsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ListSessionsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"ListSessions\", &ListSessionsInput)\n\t\t}\n\t\titer := TestingClient.ListSessions(ctx, &ListSessionsInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/list-tests.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar ListTestsInput genprotopb.ListTestsRequest\n\nvar ListTestsFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(ListTestsCmd)\n\n\tListTestsCmd.Flags().StringVar(&ListTestsInput.Parent, \"parent\", \"\", \"The session.\")\n\n\tListTestsCmd.Flags().Int32Var(&ListTestsInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of tests to return per page.\")\n\n\tListTestsCmd.Flags().StringVar(&ListTestsInput.PageToken, \"page_token\", \"\", \"The page token, for retrieving subsequent pages.\")\n\n\tListTestsCmd.Flags().StringVar(&ListTestsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ListTestsCmd = &cobra.Command{\n\tUse:   \"list-tests\",\n\tShort: \"List the tests of a sessesion.\",\n\tLong:  \"List the tests of a sessesion.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ListTestsFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ListTestsFromFile != \"\" {\n\t\t\tin, err = os.Open(ListTestsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ListTestsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"ListTests\", &ListTestsInput)\n\t\t}\n\t\titer := TestingClient.ListTests(ctx, &ListTestsInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/list-users.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar ListUsersInput genprotopb.ListUsersRequest\n\nvar ListUsersFromFile string\n\nfunc init() {\n\tIdentityServiceCmd.AddCommand(ListUsersCmd)\n\n\tListUsersCmd.Flags().Int32Var(&ListUsersInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of users to return. Server may...\")\n\n\tListUsersCmd.Flags().StringVar(&ListUsersInput.PageToken, \"page_token\", \"\", \"The value of...\")\n\n\tListUsersCmd.Flags().StringVar(&ListUsersFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ListUsersCmd = &cobra.Command{\n\tUse:   \"list-users\",\n\tShort: \"Lists all users.\",\n\tLong:  \"Lists all users.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ListUsersFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ListUsersFromFile != \"\" {\n\t\t\tin, err = os.Open(ListUsersFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ListUsersInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Identity\", \"ListUsers\", &ListUsersInput)\n\t\t}\n\t\titer := IdentityClient.ListUsers(ctx, &ListUsersInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/loggers.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nvar stdLog, errLog *log.Logger\n\nfunc init() {\n\tstdLog = log.New(os.Stdout, \"\", log.Ldate|log.Ltime)\n\terrLog = log.New(os.Stderr, \"\", log.Ldate|log.Ltime)\n}\n\ntype loggerObserver struct{}\n\nfunc (l *loggerObserver) GetName() string { return \"loggerObserver\" }\n\nfunc dumpIncomingHeaders(ctx context.Context) {\n\tmd, ok := metadata.FromIncomingContext(ctx)\n\tif !ok {\n\t\tstdLog.Printf(\"Cannot get metadata from the context.\")\n\t\treturn\n\t}\n\n\tstdLog.Printf(\"    Request headers:\")\n\tfor key, values := range md {\n\t\tfor _, value := range values {\n\t\t\tstdLog.Printf(\"      %s: %s\\n\", key, value)\n\t\t}\n\t}\n}\n\nfunc (l *loggerObserver) ObserveUnary(\n\tctx context.Context,\n\treq interface{},\n\tresp interface{},\n\tinfo *grpc.UnaryServerInfo,\n\terr error) {\n\tstdLog.Printf(\"Received Unary Request for Method: %s\\n\", info.FullMethod)\n\tif Verbose {\n\t\tdumpIncomingHeaders(ctx)\n\t}\n\tstdLog.Printf(\"    Request:  %+v\\n\", req)\n\tif err == nil {\n\t\tstdLog.Printf(\"    Returning Response: %+v\\n\", resp)\n\t} else {\n\t\tstdLog.Printf(\"    Returning Error: %+v\\n\", err)\n\t}\n\tstdLog.Println(\"\")\n}\n\nfunc (l *loggerObserver) ObserveStreamRequest(\n\tctx context.Context,\n\treq interface{},\n\tinfo *grpc.StreamServerInfo,\n\t_ error) {\n\tstdLog.Printf(\"%s Stream for Method: %s\\n\", streamType(info), info.FullMethod)\n\tif Verbose {\n\t\tdumpIncomingHeaders(ctx)\n\t}\n\tstdLog.Printf(\"    Receiving Message:  %v\\n\", req)\n\tstdLog.Println(\"\")\n}\n\nfunc (l *loggerObserver) ObserveStreamResponse(\n\t_ context.Context,\n\tresp interface{},\n\tinfo *grpc.StreamServerInfo,\n\t_ error) {\n\tstdLog.Printf(\"%s Stream for Method: %s\\n\", streamType(info), info.FullMethod)\n\tstdLog.Printf(\"    Sending Message:  %+v\\n\", resp)\n\tstdLog.Println(\"\")\n}\n\nfunc streamType(info *grpc.StreamServerInfo) string {\n\tif info.IsClientStream && info.IsServerStream {\n\t\treturn \"Bi-directional\"\n\t} else if info.IsClientStream {\n\t\treturn \"Client\"\n\t}\n\treturn \"Server\"\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/messaging_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar MessagingConfig *viper.Viper\nvar MessagingClient *gapic.MessagingClient\nvar MessagingSubCommands []string = []string{\n\t\"create-room\",\n\t\"get-room\",\n\t\"update-room\",\n\t\"delete-room\",\n\t\"list-rooms\",\n\t\"create-blurb\",\n\t\"get-blurb\",\n\t\"update-blurb\",\n\t\"delete-blurb\",\n\t\"list-blurbs\",\n\t\"search-blurbs\",\n\t\"poll-search-blurbs\", \"stream-blurbs\",\n\t\"send-blurbs\",\n\t\"connect\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(MessagingServiceCmd)\n\n\tMessagingConfig = viper.New()\n\tMessagingConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_MESSAGING\")\n\tMessagingConfig.AutomaticEnv()\n\n\tMessagingServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_MESSAGING_INSECURE. Must be used with \\\"address\\\" option\")\n\tMessagingConfig.BindPFlag(\"insecure\", MessagingServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tMessagingConfig.BindEnv(\"insecure\")\n\n\tMessagingServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_MESSAGING_ADDRESS.\")\n\tMessagingConfig.BindPFlag(\"address\", MessagingServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tMessagingConfig.BindEnv(\"address\")\n\n\tMessagingServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_MESSAGING_TOKEN.\")\n\tMessagingConfig.BindPFlag(\"token\", MessagingServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tMessagingConfig.BindEnv(\"token\")\n\n\tMessagingServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_MESSAGING_API_KEY.\")\n\tMessagingConfig.BindPFlag(\"api_key\", MessagingServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tMessagingConfig.BindEnv(\"api_key\")\n}\n\nvar MessagingServiceCmd = &cobra.Command{\n\tUse:       \"messaging\",\n\tShort:     \"A simple messaging service that implements chat...\",\n\tLong:      \"A simple messaging service that implements chat rooms and profile posts.   This messaging service showcases the features that API clients  generated...\",\n\tValidArgs: MessagingSubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := MessagingConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif MessagingConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := MessagingConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := MessagingConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tMessagingClient, err = gapic.NewMessagingClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/paged-expand-legacy-mapped.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar PagedExpandLegacyMappedInput genprotopb.PagedExpandRequest\n\nvar PagedExpandLegacyMappedFromFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(PagedExpandLegacyMappedCmd)\n\n\tPagedExpandLegacyMappedCmd.Flags().StringVar(&PagedExpandLegacyMappedInput.Content, \"content\", \"\", \"Required. The string to expand.\")\n\n\tPagedExpandLegacyMappedCmd.Flags().Int32Var(&PagedExpandLegacyMappedInput.PageSize, \"page_size\", 10, \"Default is 10. The number of words to returned in each page.\")\n\n\tPagedExpandLegacyMappedCmd.Flags().StringVar(&PagedExpandLegacyMappedInput.PageToken, \"page_token\", \"\", \"The position of the page to be returned.\")\n\n\tPagedExpandLegacyMappedCmd.Flags().StringVar(&PagedExpandLegacyMappedFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar PagedExpandLegacyMappedCmd = &cobra.Command{\n\tUse:   \"paged-expand-legacy-mapped\",\n\tShort: \"This method returns a map containing lists of...\",\n\tLong:  \"This method returns a map containing lists of words that appear in the input, keyed by their  initial character. The only words returned are the ones...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif PagedExpandLegacyMappedFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"content\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif PagedExpandLegacyMappedFromFile != \"\" {\n\t\t\tin, err = os.Open(PagedExpandLegacyMappedFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &PagedExpandLegacyMappedInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"PagedExpandLegacyMapped\", &PagedExpandLegacyMappedInput)\n\t\t}\n\t\titer := EchoClient.PagedExpandLegacyMapped(ctx, &PagedExpandLegacyMappedInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/paged-expand.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"google.golang.org/api/iterator\"\n\n\t\"os\"\n)\n\nvar PagedExpandInput genprotopb.PagedExpandRequest\n\nvar PagedExpandFromFile string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(PagedExpandCmd)\n\n\tPagedExpandCmd.Flags().StringVar(&PagedExpandInput.Content, \"content\", \"\", \"Required. The string to expand.\")\n\n\tPagedExpandCmd.Flags().Int32Var(&PagedExpandInput.PageSize, \"page_size\", 10, \"Default is 10. The number of words to returned in each page.\")\n\n\tPagedExpandCmd.Flags().StringVar(&PagedExpandInput.PageToken, \"page_token\", \"\", \"The position of the page to be returned.\")\n\n\tPagedExpandCmd.Flags().StringVar(&PagedExpandFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar PagedExpandCmd = &cobra.Command{\n\tUse:   \"paged-expand\",\n\tShort: \"This is similar to the Expand method but instead...\",\n\tLong:  \"This is similar to the Expand method but instead of returning a stream of  expanded words, this method returns a paged list of expanded words.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif PagedExpandFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"content\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif PagedExpandFromFile != \"\" {\n\t\t\tin, err = os.Open(PagedExpandFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &PagedExpandInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"PagedExpand\", &PagedExpandInput)\n\t\t}\n\t\titer := EchoClient.PagedExpand(ctx, &PagedExpandInput)\n\n\t\t// populate iterator with a page\n\t\t_, err = iter.Next()\n\t\tif err != nil && err != iterator.Done {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(iter.Response)\n\n\t\tif err == iterator.Done {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-body-info.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataBodyInfoInput genprotopb.RepeatRequest\n\nvar RepeatDataBodyInfoFromFile string\n\nvar RepeatDataBodyInfoInputInfoFKingdom string\n\nvar RepeatDataBodyInfoInputInfoFChildFContinent string\n\nvar repeatDataBodyInfoInputInfoFChildPString string\n\nvar repeatDataBodyInfoInputInfoFChildPFloat float32\n\nvar repeatDataBodyInfoInputInfoFChildPDouble float64\n\nvar repeatDataBodyInfoInputInfoFChildPBool bool\n\nvar RepeatDataBodyInfoInputInfoFChildPContinent string\n\nvar repeatDataBodyInfoInputInfoPString string\n\nvar repeatDataBodyInfoInputInfoPInt32 int32\n\nvar repeatDataBodyInfoInputInfoPSint32 int32\n\nvar repeatDataBodyInfoInputInfoPSfixed32 int32\n\nvar repeatDataBodyInfoInputInfoPUint32 uint32\n\nvar repeatDataBodyInfoInputInfoPFixed32 uint32\n\nvar repeatDataBodyInfoInputInfoPInt64 int64\n\nvar repeatDataBodyInfoInputInfoPSint64 int64\n\nvar repeatDataBodyInfoInputInfoPSfixed64 int64\n\nvar repeatDataBodyInfoInputInfoPUint64 uint64\n\nvar repeatDataBodyInfoInputInfoPFixed64 uint64\n\nvar repeatDataBodyInfoInputInfoPFloat float32\n\nvar repeatDataBodyInfoInputInfoPDouble float64\n\nvar repeatDataBodyInfoInputInfoPBool bool\n\nvar RepeatDataBodyInfoInputInfoPKingdom string\n\nvar RepeatDataBodyInfoInputInfoPChildFContinent string\n\nvar repeatDataBodyInfoInputInfoPChildPString string\n\nvar repeatDataBodyInfoInputInfoPChildPFloat float32\n\nvar repeatDataBodyInfoInputInfoPChildPDouble float64\n\nvar repeatDataBodyInfoInputInfoPChildPBool bool\n\nvar RepeatDataBodyInfoInputInfoPChildPContinent string\n\nvar repeatDataBodyInfoInputIntendedBindingUri string\n\nvar repeatDataBodyInfoInputPInt32 int32\n\nvar repeatDataBodyInfoInputPInt64 int64\n\nvar repeatDataBodyInfoInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataBodyInfoCmd)\n\n\tRepeatDataBodyInfoInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataBodyInfoInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyInfoInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInfoInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInfoInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyInfoInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInfoInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&RepeatDataBodyInfoInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&RepeatDataBodyInfoInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&RepeatDataBodyInfoInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint32Var(&RepeatDataBodyInfoInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint32Var(&RepeatDataBodyInfoInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&RepeatDataBodyInfoInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&RepeatDataBodyInfoInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&RepeatDataBodyInfoInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint64Var(&RepeatDataBodyInfoInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint64Var(&RepeatDataBodyInfoInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&RepeatDataBodyInfoInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BytesHexVar(&RepeatDataBodyInfoInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&RepeatDataBodyInfoInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&repeatDataBodyInfoInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&repeatDataBodyInfoInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&repeatDataBodyInfoInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&repeatDataBodyInfoInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&repeatDataBodyInfoInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&repeatDataBodyInfoInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&repeatDataBodyInfoInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&repeatDataBodyInfoInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint32Var(&repeatDataBodyInfoInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint32Var(&repeatDataBodyInfoInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&repeatDataBodyInfoInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&repeatDataBodyInfoInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&repeatDataBodyInfoInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint64Var(&repeatDataBodyInfoInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Uint64Var(&repeatDataBodyInfoInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&repeatDataBodyInfoInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&repeatDataBodyInfoInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&repeatDataBodyInfoInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&RepeatDataBodyInfoInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&repeatDataBodyInfoInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float32Var(&repeatDataBodyInfoInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&repeatDataBodyInfoInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&repeatDataBodyInfoInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().BoolVar(&RepeatDataBodyInfoInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&repeatDataBodyInfoInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&RepeatDataBodyInfoInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&RepeatDataBodyInfoInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&RepeatDataBodyInfoInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int32Var(&repeatDataBodyInfoInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Int64Var(&repeatDataBodyInfoInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().Float64Var(&repeatDataBodyInfoInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataBodyInfoCmd.Flags().StringVar(&RepeatDataBodyInfoFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataBodyInfoCmd = &cobra.Command{\n\tUse:   \"repeat-data-body-info\",\n\tShort: \"This method echoes the ComplianceData request....\",\n\tLong:  \"This method echoes the ComplianceData request. This method exercises  sending the a message-type field in the REST body. Per AIP-127, only ...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataBodyInfoFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataBodyInfoFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataBodyInfoFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataBodyInfoInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataBodyInfoInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyInfoInputInfoFKingdom)])\n\n\t\t\tRepeatDataBodyInfoInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInfoInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataBodyInfoInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInfoInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyInfoInputInfoPKingdom)])\n\t\t\t\tRepeatDataBodyInfoInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataBodyInfoInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInfoInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataBodyInfoInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInfoInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.FChild.PString = &repeatDataBodyInfoInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.FChild.PFloat = &repeatDataBodyInfoInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.FChild.PDouble = &repeatDataBodyInfoInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.FChild.PBool = &repeatDataBodyInfoInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PString = &repeatDataBodyInfoInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PInt32 = &repeatDataBodyInfoInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PSint32 = &repeatDataBodyInfoInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PSfixed32 = &repeatDataBodyInfoInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PUint32 = &repeatDataBodyInfoInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PFixed32 = &repeatDataBodyInfoInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PInt64 = &repeatDataBodyInfoInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PSint64 = &repeatDataBodyInfoInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PSfixed64 = &repeatDataBodyInfoInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PUint64 = &repeatDataBodyInfoInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PFixed64 = &repeatDataBodyInfoInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PFloat = &repeatDataBodyInfoInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PDouble = &repeatDataBodyInfoInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PBool = &repeatDataBodyInfoInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PChild.PString = &repeatDataBodyInfoInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PChild.PFloat = &repeatDataBodyInfoInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PChild.PDouble = &repeatDataBodyInfoInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataBodyInfoInput.Info.PChild.PBool = &repeatDataBodyInfoInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataBodyInfoInput.IntendedBindingUri = &repeatDataBodyInfoInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataBodyInfoInput.PInt32 = &repeatDataBodyInfoInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataBodyInfoInput.PInt64 = &repeatDataBodyInfoInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataBodyInfoInput.PDouble = &repeatDataBodyInfoInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataBodyInfo\", &RepeatDataBodyInfoInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataBodyInfo(ctx, &RepeatDataBodyInfoInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-body-patch.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataBodyPatchInput genprotopb.RepeatRequest\n\nvar RepeatDataBodyPatchFromFile string\n\nvar RepeatDataBodyPatchInputInfoFKingdom string\n\nvar RepeatDataBodyPatchInputInfoFChildFContinent string\n\nvar repeatDataBodyPatchInputInfoFChildPString string\n\nvar repeatDataBodyPatchInputInfoFChildPFloat float32\n\nvar repeatDataBodyPatchInputInfoFChildPDouble float64\n\nvar repeatDataBodyPatchInputInfoFChildPBool bool\n\nvar RepeatDataBodyPatchInputInfoFChildPContinent string\n\nvar repeatDataBodyPatchInputInfoPString string\n\nvar repeatDataBodyPatchInputInfoPInt32 int32\n\nvar repeatDataBodyPatchInputInfoPSint32 int32\n\nvar repeatDataBodyPatchInputInfoPSfixed32 int32\n\nvar repeatDataBodyPatchInputInfoPUint32 uint32\n\nvar repeatDataBodyPatchInputInfoPFixed32 uint32\n\nvar repeatDataBodyPatchInputInfoPInt64 int64\n\nvar repeatDataBodyPatchInputInfoPSint64 int64\n\nvar repeatDataBodyPatchInputInfoPSfixed64 int64\n\nvar repeatDataBodyPatchInputInfoPUint64 uint64\n\nvar repeatDataBodyPatchInputInfoPFixed64 uint64\n\nvar repeatDataBodyPatchInputInfoPFloat float32\n\nvar repeatDataBodyPatchInputInfoPDouble float64\n\nvar repeatDataBodyPatchInputInfoPBool bool\n\nvar RepeatDataBodyPatchInputInfoPKingdom string\n\nvar RepeatDataBodyPatchInputInfoPChildFContinent string\n\nvar repeatDataBodyPatchInputInfoPChildPString string\n\nvar repeatDataBodyPatchInputInfoPChildPFloat float32\n\nvar repeatDataBodyPatchInputInfoPChildPDouble float64\n\nvar repeatDataBodyPatchInputInfoPChildPBool bool\n\nvar RepeatDataBodyPatchInputInfoPChildPContinent string\n\nvar repeatDataBodyPatchInputIntendedBindingUri string\n\nvar repeatDataBodyPatchInputPInt32 int32\n\nvar repeatDataBodyPatchInputPInt64 int64\n\nvar repeatDataBodyPatchInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataBodyPatchCmd)\n\n\tRepeatDataBodyPatchInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataBodyPatchInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyPatchInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPatchInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPatchInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyPatchInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPatchInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&RepeatDataBodyPatchInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&RepeatDataBodyPatchInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&RepeatDataBodyPatchInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint32Var(&RepeatDataBodyPatchInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint32Var(&RepeatDataBodyPatchInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&RepeatDataBodyPatchInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&RepeatDataBodyPatchInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&RepeatDataBodyPatchInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint64Var(&RepeatDataBodyPatchInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint64Var(&RepeatDataBodyPatchInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&RepeatDataBodyPatchInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BytesHexVar(&RepeatDataBodyPatchInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&RepeatDataBodyPatchInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&repeatDataBodyPatchInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&repeatDataBodyPatchInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&repeatDataBodyPatchInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&repeatDataBodyPatchInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&repeatDataBodyPatchInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&repeatDataBodyPatchInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&repeatDataBodyPatchInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&repeatDataBodyPatchInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint32Var(&repeatDataBodyPatchInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint32Var(&repeatDataBodyPatchInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&repeatDataBodyPatchInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&repeatDataBodyPatchInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&repeatDataBodyPatchInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint64Var(&repeatDataBodyPatchInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Uint64Var(&repeatDataBodyPatchInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&repeatDataBodyPatchInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&repeatDataBodyPatchInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&repeatDataBodyPatchInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&RepeatDataBodyPatchInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&repeatDataBodyPatchInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float32Var(&repeatDataBodyPatchInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&repeatDataBodyPatchInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&repeatDataBodyPatchInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().BoolVar(&RepeatDataBodyPatchInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&repeatDataBodyPatchInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&RepeatDataBodyPatchInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&RepeatDataBodyPatchInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&RepeatDataBodyPatchInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int32Var(&repeatDataBodyPatchInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Int64Var(&repeatDataBodyPatchInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().Float64Var(&repeatDataBodyPatchInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPatchCmd.Flags().StringVar(&RepeatDataBodyPatchFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataBodyPatchCmd = &cobra.Command{\n\tUse:   \"repeat-data-body-patch\",\n\tShort: \"This method echoes the ComplianceData request,...\",\n\tLong:  \"This method echoes the ComplianceData request, using the HTTP PATCH method.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataBodyPatchFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataBodyPatchFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataBodyPatchFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataBodyPatchInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataBodyPatchInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyPatchInputInfoFKingdom)])\n\n\t\t\tRepeatDataBodyPatchInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPatchInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataBodyPatchInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPatchInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyPatchInputInfoPKingdom)])\n\t\t\t\tRepeatDataBodyPatchInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataBodyPatchInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPatchInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataBodyPatchInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPatchInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.FChild.PString = &repeatDataBodyPatchInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.FChild.PFloat = &repeatDataBodyPatchInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.FChild.PDouble = &repeatDataBodyPatchInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.FChild.PBool = &repeatDataBodyPatchInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PString = &repeatDataBodyPatchInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PInt32 = &repeatDataBodyPatchInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PSint32 = &repeatDataBodyPatchInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PSfixed32 = &repeatDataBodyPatchInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PUint32 = &repeatDataBodyPatchInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PFixed32 = &repeatDataBodyPatchInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PInt64 = &repeatDataBodyPatchInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PSint64 = &repeatDataBodyPatchInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PSfixed64 = &repeatDataBodyPatchInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PUint64 = &repeatDataBodyPatchInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PFixed64 = &repeatDataBodyPatchInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PFloat = &repeatDataBodyPatchInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PDouble = &repeatDataBodyPatchInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PBool = &repeatDataBodyPatchInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PChild.PString = &repeatDataBodyPatchInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PChild.PFloat = &repeatDataBodyPatchInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PChild.PDouble = &repeatDataBodyPatchInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataBodyPatchInput.Info.PChild.PBool = &repeatDataBodyPatchInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataBodyPatchInput.IntendedBindingUri = &repeatDataBodyPatchInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataBodyPatchInput.PInt32 = &repeatDataBodyPatchInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataBodyPatchInput.PInt64 = &repeatDataBodyPatchInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataBodyPatchInput.PDouble = &repeatDataBodyPatchInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataBodyPatch\", &RepeatDataBodyPatchInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataBodyPatch(ctx, &RepeatDataBodyPatchInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-body-put.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataBodyPutInput genprotopb.RepeatRequest\n\nvar RepeatDataBodyPutFromFile string\n\nvar RepeatDataBodyPutInputInfoFKingdom string\n\nvar RepeatDataBodyPutInputInfoFChildFContinent string\n\nvar repeatDataBodyPutInputInfoFChildPString string\n\nvar repeatDataBodyPutInputInfoFChildPFloat float32\n\nvar repeatDataBodyPutInputInfoFChildPDouble float64\n\nvar repeatDataBodyPutInputInfoFChildPBool bool\n\nvar RepeatDataBodyPutInputInfoFChildPContinent string\n\nvar repeatDataBodyPutInputInfoPString string\n\nvar repeatDataBodyPutInputInfoPInt32 int32\n\nvar repeatDataBodyPutInputInfoPSint32 int32\n\nvar repeatDataBodyPutInputInfoPSfixed32 int32\n\nvar repeatDataBodyPutInputInfoPUint32 uint32\n\nvar repeatDataBodyPutInputInfoPFixed32 uint32\n\nvar repeatDataBodyPutInputInfoPInt64 int64\n\nvar repeatDataBodyPutInputInfoPSint64 int64\n\nvar repeatDataBodyPutInputInfoPSfixed64 int64\n\nvar repeatDataBodyPutInputInfoPUint64 uint64\n\nvar repeatDataBodyPutInputInfoPFixed64 uint64\n\nvar repeatDataBodyPutInputInfoPFloat float32\n\nvar repeatDataBodyPutInputInfoPDouble float64\n\nvar repeatDataBodyPutInputInfoPBool bool\n\nvar RepeatDataBodyPutInputInfoPKingdom string\n\nvar RepeatDataBodyPutInputInfoPChildFContinent string\n\nvar repeatDataBodyPutInputInfoPChildPString string\n\nvar repeatDataBodyPutInputInfoPChildPFloat float32\n\nvar repeatDataBodyPutInputInfoPChildPDouble float64\n\nvar repeatDataBodyPutInputInfoPChildPBool bool\n\nvar RepeatDataBodyPutInputInfoPChildPContinent string\n\nvar repeatDataBodyPutInputIntendedBindingUri string\n\nvar repeatDataBodyPutInputPInt32 int32\n\nvar repeatDataBodyPutInputPInt64 int64\n\nvar repeatDataBodyPutInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataBodyPutCmd)\n\n\tRepeatDataBodyPutInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataBodyPutInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyPutInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPutInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPutInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyPutInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPutInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&RepeatDataBodyPutInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&RepeatDataBodyPutInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&RepeatDataBodyPutInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint32Var(&RepeatDataBodyPutInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint32Var(&RepeatDataBodyPutInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&RepeatDataBodyPutInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&RepeatDataBodyPutInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&RepeatDataBodyPutInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint64Var(&RepeatDataBodyPutInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint64Var(&RepeatDataBodyPutInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&RepeatDataBodyPutInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BytesHexVar(&RepeatDataBodyPutInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&RepeatDataBodyPutInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&repeatDataBodyPutInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&repeatDataBodyPutInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&repeatDataBodyPutInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&repeatDataBodyPutInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&repeatDataBodyPutInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&repeatDataBodyPutInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&repeatDataBodyPutInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&repeatDataBodyPutInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint32Var(&repeatDataBodyPutInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint32Var(&repeatDataBodyPutInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&repeatDataBodyPutInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&repeatDataBodyPutInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&repeatDataBodyPutInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint64Var(&repeatDataBodyPutInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Uint64Var(&repeatDataBodyPutInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&repeatDataBodyPutInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&repeatDataBodyPutInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&repeatDataBodyPutInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&RepeatDataBodyPutInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&repeatDataBodyPutInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float32Var(&repeatDataBodyPutInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&repeatDataBodyPutInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&repeatDataBodyPutInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().BoolVar(&RepeatDataBodyPutInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&repeatDataBodyPutInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&RepeatDataBodyPutInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&RepeatDataBodyPutInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&RepeatDataBodyPutInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int32Var(&repeatDataBodyPutInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Int64Var(&repeatDataBodyPutInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().Float64Var(&repeatDataBodyPutInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataBodyPutCmd.Flags().StringVar(&RepeatDataBodyPutFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataBodyPutCmd = &cobra.Command{\n\tUse:   \"repeat-data-body-put\",\n\tShort: \"This method echoes the ComplianceData request,...\",\n\tLong:  \"This method echoes the ComplianceData request, using the HTTP PUT method.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataBodyPutFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataBodyPutFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataBodyPutFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataBodyPutInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataBodyPutInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyPutInputInfoFKingdom)])\n\n\t\t\tRepeatDataBodyPutInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPutInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataBodyPutInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPutInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyPutInputInfoPKingdom)])\n\t\t\t\tRepeatDataBodyPutInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataBodyPutInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPutInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataBodyPutInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyPutInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.FChild.PString = &repeatDataBodyPutInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.FChild.PFloat = &repeatDataBodyPutInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.FChild.PDouble = &repeatDataBodyPutInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.FChild.PBool = &repeatDataBodyPutInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PString = &repeatDataBodyPutInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PInt32 = &repeatDataBodyPutInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PSint32 = &repeatDataBodyPutInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PSfixed32 = &repeatDataBodyPutInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PUint32 = &repeatDataBodyPutInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PFixed32 = &repeatDataBodyPutInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PInt64 = &repeatDataBodyPutInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PSint64 = &repeatDataBodyPutInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PSfixed64 = &repeatDataBodyPutInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PUint64 = &repeatDataBodyPutInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PFixed64 = &repeatDataBodyPutInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PFloat = &repeatDataBodyPutInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PDouble = &repeatDataBodyPutInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PBool = &repeatDataBodyPutInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PChild.PString = &repeatDataBodyPutInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PChild.PFloat = &repeatDataBodyPutInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PChild.PDouble = &repeatDataBodyPutInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataBodyPutInput.Info.PChild.PBool = &repeatDataBodyPutInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataBodyPutInput.IntendedBindingUri = &repeatDataBodyPutInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataBodyPutInput.PInt32 = &repeatDataBodyPutInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataBodyPutInput.PInt64 = &repeatDataBodyPutInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataBodyPutInput.PDouble = &repeatDataBodyPutInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataBodyPut\", &RepeatDataBodyPutInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataBodyPut(ctx, &RepeatDataBodyPutInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-body.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataBodyInput genprotopb.RepeatRequest\n\nvar RepeatDataBodyFromFile string\n\nvar RepeatDataBodyInputInfoFKingdom string\n\nvar RepeatDataBodyInputInfoFChildFContinent string\n\nvar repeatDataBodyInputInfoFChildPString string\n\nvar repeatDataBodyInputInfoFChildPFloat float32\n\nvar repeatDataBodyInputInfoFChildPDouble float64\n\nvar repeatDataBodyInputInfoFChildPBool bool\n\nvar RepeatDataBodyInputInfoFChildPContinent string\n\nvar repeatDataBodyInputInfoPString string\n\nvar repeatDataBodyInputInfoPInt32 int32\n\nvar repeatDataBodyInputInfoPSint32 int32\n\nvar repeatDataBodyInputInfoPSfixed32 int32\n\nvar repeatDataBodyInputInfoPUint32 uint32\n\nvar repeatDataBodyInputInfoPFixed32 uint32\n\nvar repeatDataBodyInputInfoPInt64 int64\n\nvar repeatDataBodyInputInfoPSint64 int64\n\nvar repeatDataBodyInputInfoPSfixed64 int64\n\nvar repeatDataBodyInputInfoPUint64 uint64\n\nvar repeatDataBodyInputInfoPFixed64 uint64\n\nvar repeatDataBodyInputInfoPFloat float32\n\nvar repeatDataBodyInputInfoPDouble float64\n\nvar repeatDataBodyInputInfoPBool bool\n\nvar RepeatDataBodyInputInfoPKingdom string\n\nvar RepeatDataBodyInputInfoPChildFContinent string\n\nvar repeatDataBodyInputInfoPChildPString string\n\nvar repeatDataBodyInputInfoPChildPFloat float32\n\nvar repeatDataBodyInputInfoPChildPDouble float64\n\nvar repeatDataBodyInputInfoPChildPBool bool\n\nvar RepeatDataBodyInputInfoPChildPContinent string\n\nvar repeatDataBodyInputIntendedBindingUri string\n\nvar repeatDataBodyInputPInt32 int32\n\nvar repeatDataBodyInputPInt64 int64\n\nvar repeatDataBodyInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataBodyCmd)\n\n\tRepeatDataBodyInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataBodyInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataBodyInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&RepeatDataBodyInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&RepeatDataBodyInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&RepeatDataBodyInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint32Var(&RepeatDataBodyInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint32Var(&RepeatDataBodyInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&RepeatDataBodyInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&RepeatDataBodyInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&RepeatDataBodyInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint64Var(&RepeatDataBodyInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint64Var(&RepeatDataBodyInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&RepeatDataBodyInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().BytesHexVar(&RepeatDataBodyInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&RepeatDataBodyInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&repeatDataBodyInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&repeatDataBodyInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&repeatDataBodyInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&repeatDataBodyInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&repeatDataBodyInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&repeatDataBodyInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&repeatDataBodyInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&repeatDataBodyInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint32Var(&repeatDataBodyInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint32Var(&repeatDataBodyInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&repeatDataBodyInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&repeatDataBodyInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&repeatDataBodyInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint64Var(&repeatDataBodyInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Uint64Var(&repeatDataBodyInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&repeatDataBodyInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&repeatDataBodyInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&repeatDataBodyInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&RepeatDataBodyInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&repeatDataBodyInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float32Var(&repeatDataBodyInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&repeatDataBodyInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&repeatDataBodyInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataBodyCmd.Flags().BoolVar(&RepeatDataBodyInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&repeatDataBodyInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&RepeatDataBodyInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&RepeatDataBodyInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&RepeatDataBodyInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int32Var(&repeatDataBodyInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Int64Var(&repeatDataBodyInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataBodyCmd.Flags().Float64Var(&repeatDataBodyInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataBodyCmd.Flags().StringVar(&RepeatDataBodyFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataBodyCmd = &cobra.Command{\n\tUse:   \"repeat-data-body\",\n\tShort: \"This method echoes the ComplianceData request....\",\n\tLong:  \"This method echoes the ComplianceData request. This method exercises  sending the entire request object in the REST body.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataBodyFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataBodyFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataBodyFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataBodyInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataBodyInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyInputInfoFKingdom)])\n\n\t\t\tRepeatDataBodyInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataBodyInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataBodyInputInfoPKingdom)])\n\t\t\t\tRepeatDataBodyInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataBodyInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataBodyInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataBodyInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataBodyInput.Info.FChild.PString = &repeatDataBodyInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataBodyInput.Info.FChild.PFloat = &repeatDataBodyInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataBodyInput.Info.FChild.PDouble = &repeatDataBodyInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataBodyInput.Info.FChild.PBool = &repeatDataBodyInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataBodyInput.Info.PString = &repeatDataBodyInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataBodyInput.Info.PInt32 = &repeatDataBodyInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataBodyInput.Info.PSint32 = &repeatDataBodyInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataBodyInput.Info.PSfixed32 = &repeatDataBodyInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataBodyInput.Info.PUint32 = &repeatDataBodyInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataBodyInput.Info.PFixed32 = &repeatDataBodyInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataBodyInput.Info.PInt64 = &repeatDataBodyInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataBodyInput.Info.PSint64 = &repeatDataBodyInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataBodyInput.Info.PSfixed64 = &repeatDataBodyInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataBodyInput.Info.PUint64 = &repeatDataBodyInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataBodyInput.Info.PFixed64 = &repeatDataBodyInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataBodyInput.Info.PFloat = &repeatDataBodyInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataBodyInput.Info.PDouble = &repeatDataBodyInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataBodyInput.Info.PBool = &repeatDataBodyInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataBodyInput.Info.PChild.PString = &repeatDataBodyInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataBodyInput.Info.PChild.PFloat = &repeatDataBodyInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataBodyInput.Info.PChild.PDouble = &repeatDataBodyInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataBodyInput.Info.PChild.PBool = &repeatDataBodyInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataBodyInput.IntendedBindingUri = &repeatDataBodyInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataBodyInput.PInt32 = &repeatDataBodyInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataBodyInput.PInt64 = &repeatDataBodyInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataBodyInput.PDouble = &repeatDataBodyInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataBody\", &RepeatDataBodyInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataBody(ctx, &RepeatDataBodyInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-path-resource.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataPathResourceInput genprotopb.RepeatRequest\n\nvar RepeatDataPathResourceFromFile string\n\nvar RepeatDataPathResourceInputInfoFKingdom string\n\nvar RepeatDataPathResourceInputInfoFChildFContinent string\n\nvar repeatDataPathResourceInputInfoFChildPString string\n\nvar repeatDataPathResourceInputInfoFChildPFloat float32\n\nvar repeatDataPathResourceInputInfoFChildPDouble float64\n\nvar repeatDataPathResourceInputInfoFChildPBool bool\n\nvar RepeatDataPathResourceInputInfoFChildPContinent string\n\nvar repeatDataPathResourceInputInfoPString string\n\nvar repeatDataPathResourceInputInfoPInt32 int32\n\nvar repeatDataPathResourceInputInfoPSint32 int32\n\nvar repeatDataPathResourceInputInfoPSfixed32 int32\n\nvar repeatDataPathResourceInputInfoPUint32 uint32\n\nvar repeatDataPathResourceInputInfoPFixed32 uint32\n\nvar repeatDataPathResourceInputInfoPInt64 int64\n\nvar repeatDataPathResourceInputInfoPSint64 int64\n\nvar repeatDataPathResourceInputInfoPSfixed64 int64\n\nvar repeatDataPathResourceInputInfoPUint64 uint64\n\nvar repeatDataPathResourceInputInfoPFixed64 uint64\n\nvar repeatDataPathResourceInputInfoPFloat float32\n\nvar repeatDataPathResourceInputInfoPDouble float64\n\nvar repeatDataPathResourceInputInfoPBool bool\n\nvar RepeatDataPathResourceInputInfoPKingdom string\n\nvar RepeatDataPathResourceInputInfoPChildFContinent string\n\nvar repeatDataPathResourceInputInfoPChildPString string\n\nvar repeatDataPathResourceInputInfoPChildPFloat float32\n\nvar repeatDataPathResourceInputInfoPChildPDouble float64\n\nvar repeatDataPathResourceInputInfoPChildPBool bool\n\nvar RepeatDataPathResourceInputInfoPChildPContinent string\n\nvar repeatDataPathResourceInputIntendedBindingUri string\n\nvar repeatDataPathResourceInputPInt32 int32\n\nvar repeatDataPathResourceInputPInt64 int64\n\nvar repeatDataPathResourceInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataPathResourceCmd)\n\n\tRepeatDataPathResourceInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataPathResourceInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataPathResourceInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathResourceInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathResourceInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataPathResourceInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathResourceInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&RepeatDataPathResourceInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&RepeatDataPathResourceInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&RepeatDataPathResourceInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint32Var(&RepeatDataPathResourceInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint32Var(&RepeatDataPathResourceInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&RepeatDataPathResourceInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&RepeatDataPathResourceInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&RepeatDataPathResourceInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint64Var(&RepeatDataPathResourceInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint64Var(&RepeatDataPathResourceInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&RepeatDataPathResourceInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BytesHexVar(&RepeatDataPathResourceInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&RepeatDataPathResourceInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&repeatDataPathResourceInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&repeatDataPathResourceInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&repeatDataPathResourceInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&repeatDataPathResourceInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&repeatDataPathResourceInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&repeatDataPathResourceInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&repeatDataPathResourceInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&repeatDataPathResourceInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint32Var(&repeatDataPathResourceInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint32Var(&repeatDataPathResourceInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&repeatDataPathResourceInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&repeatDataPathResourceInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&repeatDataPathResourceInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint64Var(&repeatDataPathResourceInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Uint64Var(&repeatDataPathResourceInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&repeatDataPathResourceInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&repeatDataPathResourceInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&repeatDataPathResourceInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&RepeatDataPathResourceInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&repeatDataPathResourceInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float32Var(&repeatDataPathResourceInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&repeatDataPathResourceInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&repeatDataPathResourceInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().BoolVar(&RepeatDataPathResourceInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&repeatDataPathResourceInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&RepeatDataPathResourceInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&RepeatDataPathResourceInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&RepeatDataPathResourceInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int32Var(&repeatDataPathResourceInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Int64Var(&repeatDataPathResourceInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().Float64Var(&repeatDataPathResourceInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataPathResourceCmd.Flags().StringVar(&RepeatDataPathResourceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataPathResourceCmd = &cobra.Command{\n\tUse:   \"repeat-data-path-resource\",\n\tShort: \"Same as RepeatDataSimplePath, but with a path...\",\n\tLong:  \"Same as RepeatDataSimplePath, but with a path resource.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataPathResourceFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataPathResourceFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataPathResourceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataPathResourceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataPathResourceInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataPathResourceInputInfoFKingdom)])\n\n\t\t\tRepeatDataPathResourceInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathResourceInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataPathResourceInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathResourceInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataPathResourceInputInfoPKingdom)])\n\t\t\t\tRepeatDataPathResourceInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataPathResourceInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathResourceInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataPathResourceInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathResourceInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.FChild.PString = &repeatDataPathResourceInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.FChild.PFloat = &repeatDataPathResourceInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.FChild.PDouble = &repeatDataPathResourceInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.FChild.PBool = &repeatDataPathResourceInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PString = &repeatDataPathResourceInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PInt32 = &repeatDataPathResourceInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PSint32 = &repeatDataPathResourceInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PSfixed32 = &repeatDataPathResourceInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PUint32 = &repeatDataPathResourceInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PFixed32 = &repeatDataPathResourceInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PInt64 = &repeatDataPathResourceInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PSint64 = &repeatDataPathResourceInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PSfixed64 = &repeatDataPathResourceInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PUint64 = &repeatDataPathResourceInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PFixed64 = &repeatDataPathResourceInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PFloat = &repeatDataPathResourceInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PDouble = &repeatDataPathResourceInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PBool = &repeatDataPathResourceInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PChild.PString = &repeatDataPathResourceInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PChild.PFloat = &repeatDataPathResourceInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PChild.PDouble = &repeatDataPathResourceInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataPathResourceInput.Info.PChild.PBool = &repeatDataPathResourceInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataPathResourceInput.IntendedBindingUri = &repeatDataPathResourceInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataPathResourceInput.PInt32 = &repeatDataPathResourceInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataPathResourceInput.PInt64 = &repeatDataPathResourceInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataPathResourceInput.PDouble = &repeatDataPathResourceInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataPathResource\", &RepeatDataPathResourceInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataPathResource(ctx, &RepeatDataPathResourceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-path-trailing-resource.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataPathTrailingResourceInput genprotopb.RepeatRequest\n\nvar RepeatDataPathTrailingResourceFromFile string\n\nvar RepeatDataPathTrailingResourceInputInfoFKingdom string\n\nvar RepeatDataPathTrailingResourceInputInfoFChildFContinent string\n\nvar repeatDataPathTrailingResourceInputInfoFChildPString string\n\nvar repeatDataPathTrailingResourceInputInfoFChildPFloat float32\n\nvar repeatDataPathTrailingResourceInputInfoFChildPDouble float64\n\nvar repeatDataPathTrailingResourceInputInfoFChildPBool bool\n\nvar RepeatDataPathTrailingResourceInputInfoFChildPContinent string\n\nvar repeatDataPathTrailingResourceInputInfoPString string\n\nvar repeatDataPathTrailingResourceInputInfoPInt32 int32\n\nvar repeatDataPathTrailingResourceInputInfoPSint32 int32\n\nvar repeatDataPathTrailingResourceInputInfoPSfixed32 int32\n\nvar repeatDataPathTrailingResourceInputInfoPUint32 uint32\n\nvar repeatDataPathTrailingResourceInputInfoPFixed32 uint32\n\nvar repeatDataPathTrailingResourceInputInfoPInt64 int64\n\nvar repeatDataPathTrailingResourceInputInfoPSint64 int64\n\nvar repeatDataPathTrailingResourceInputInfoPSfixed64 int64\n\nvar repeatDataPathTrailingResourceInputInfoPUint64 uint64\n\nvar repeatDataPathTrailingResourceInputInfoPFixed64 uint64\n\nvar repeatDataPathTrailingResourceInputInfoPFloat float32\n\nvar repeatDataPathTrailingResourceInputInfoPDouble float64\n\nvar repeatDataPathTrailingResourceInputInfoPBool bool\n\nvar RepeatDataPathTrailingResourceInputInfoPKingdom string\n\nvar RepeatDataPathTrailingResourceInputInfoPChildFContinent string\n\nvar repeatDataPathTrailingResourceInputInfoPChildPString string\n\nvar repeatDataPathTrailingResourceInputInfoPChildPFloat float32\n\nvar repeatDataPathTrailingResourceInputInfoPChildPDouble float64\n\nvar repeatDataPathTrailingResourceInputInfoPChildPBool bool\n\nvar RepeatDataPathTrailingResourceInputInfoPChildPContinent string\n\nvar repeatDataPathTrailingResourceInputIntendedBindingUri string\n\nvar repeatDataPathTrailingResourceInputPInt32 int32\n\nvar repeatDataPathTrailingResourceInputPInt64 int64\n\nvar repeatDataPathTrailingResourceInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataPathTrailingResourceCmd)\n\n\tRepeatDataPathTrailingResourceInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataPathTrailingResourceInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataPathTrailingResourceInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathTrailingResourceInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathTrailingResourceInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataPathTrailingResourceInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathTrailingResourceInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&RepeatDataPathTrailingResourceInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&RepeatDataPathTrailingResourceInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&RepeatDataPathTrailingResourceInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint32Var(&RepeatDataPathTrailingResourceInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint32Var(&RepeatDataPathTrailingResourceInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&RepeatDataPathTrailingResourceInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&RepeatDataPathTrailingResourceInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&RepeatDataPathTrailingResourceInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint64Var(&RepeatDataPathTrailingResourceInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint64Var(&RepeatDataPathTrailingResourceInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&RepeatDataPathTrailingResourceInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BytesHexVar(&RepeatDataPathTrailingResourceInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&RepeatDataPathTrailingResourceInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&repeatDataPathTrailingResourceInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&repeatDataPathTrailingResourceInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&repeatDataPathTrailingResourceInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&repeatDataPathTrailingResourceInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&repeatDataPathTrailingResourceInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&repeatDataPathTrailingResourceInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&repeatDataPathTrailingResourceInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&repeatDataPathTrailingResourceInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint32Var(&repeatDataPathTrailingResourceInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint32Var(&repeatDataPathTrailingResourceInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&repeatDataPathTrailingResourceInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&repeatDataPathTrailingResourceInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&repeatDataPathTrailingResourceInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint64Var(&repeatDataPathTrailingResourceInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Uint64Var(&repeatDataPathTrailingResourceInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&repeatDataPathTrailingResourceInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&repeatDataPathTrailingResourceInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&repeatDataPathTrailingResourceInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&RepeatDataPathTrailingResourceInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&repeatDataPathTrailingResourceInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float32Var(&repeatDataPathTrailingResourceInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&repeatDataPathTrailingResourceInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&repeatDataPathTrailingResourceInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().BoolVar(&RepeatDataPathTrailingResourceInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&repeatDataPathTrailingResourceInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&RepeatDataPathTrailingResourceInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&RepeatDataPathTrailingResourceInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&RepeatDataPathTrailingResourceInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int32Var(&repeatDataPathTrailingResourceInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Int64Var(&repeatDataPathTrailingResourceInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().Float64Var(&repeatDataPathTrailingResourceInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataPathTrailingResourceCmd.Flags().StringVar(&RepeatDataPathTrailingResourceFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataPathTrailingResourceCmd = &cobra.Command{\n\tUse:   \"repeat-data-path-trailing-resource\",\n\tShort: \"Same as RepeatDataSimplePath, but with a trailing...\",\n\tLong:  \"Same as RepeatDataSimplePath, but with a trailing resource.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataPathTrailingResourceFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataPathTrailingResourceFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataPathTrailingResourceFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataPathTrailingResourceInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataPathTrailingResourceInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoFKingdom)])\n\n\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoPKingdom)])\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataPathTrailingResourceInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.PString = &repeatDataPathTrailingResourceInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.PFloat = &repeatDataPathTrailingResourceInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.PDouble = &repeatDataPathTrailingResourceInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.FChild.PBool = &repeatDataPathTrailingResourceInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PString = &repeatDataPathTrailingResourceInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PInt32 = &repeatDataPathTrailingResourceInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PSint32 = &repeatDataPathTrailingResourceInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PSfixed32 = &repeatDataPathTrailingResourceInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PUint32 = &repeatDataPathTrailingResourceInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PFixed32 = &repeatDataPathTrailingResourceInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PInt64 = &repeatDataPathTrailingResourceInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PSint64 = &repeatDataPathTrailingResourceInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PSfixed64 = &repeatDataPathTrailingResourceInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PUint64 = &repeatDataPathTrailingResourceInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PFixed64 = &repeatDataPathTrailingResourceInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PFloat = &repeatDataPathTrailingResourceInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PDouble = &repeatDataPathTrailingResourceInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PBool = &repeatDataPathTrailingResourceInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.PString = &repeatDataPathTrailingResourceInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.PFloat = &repeatDataPathTrailingResourceInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.PDouble = &repeatDataPathTrailingResourceInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.Info.PChild.PBool = &repeatDataPathTrailingResourceInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.IntendedBindingUri = &repeatDataPathTrailingResourceInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.PInt32 = &repeatDataPathTrailingResourceInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.PInt64 = &repeatDataPathTrailingResourceInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataPathTrailingResourceInput.PDouble = &repeatDataPathTrailingResourceInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataPathTrailingResource\", &RepeatDataPathTrailingResourceInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataPathTrailingResource(ctx, &RepeatDataPathTrailingResourceInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-query.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataQueryInput genprotopb.RepeatRequest\n\nvar RepeatDataQueryFromFile string\n\nvar RepeatDataQueryInputInfoFKingdom string\n\nvar RepeatDataQueryInputInfoFChildFContinent string\n\nvar repeatDataQueryInputInfoFChildPString string\n\nvar repeatDataQueryInputInfoFChildPFloat float32\n\nvar repeatDataQueryInputInfoFChildPDouble float64\n\nvar repeatDataQueryInputInfoFChildPBool bool\n\nvar RepeatDataQueryInputInfoFChildPContinent string\n\nvar repeatDataQueryInputInfoPString string\n\nvar repeatDataQueryInputInfoPInt32 int32\n\nvar repeatDataQueryInputInfoPSint32 int32\n\nvar repeatDataQueryInputInfoPSfixed32 int32\n\nvar repeatDataQueryInputInfoPUint32 uint32\n\nvar repeatDataQueryInputInfoPFixed32 uint32\n\nvar repeatDataQueryInputInfoPInt64 int64\n\nvar repeatDataQueryInputInfoPSint64 int64\n\nvar repeatDataQueryInputInfoPSfixed64 int64\n\nvar repeatDataQueryInputInfoPUint64 uint64\n\nvar repeatDataQueryInputInfoPFixed64 uint64\n\nvar repeatDataQueryInputInfoPFloat float32\n\nvar repeatDataQueryInputInfoPDouble float64\n\nvar repeatDataQueryInputInfoPBool bool\n\nvar RepeatDataQueryInputInfoPKingdom string\n\nvar RepeatDataQueryInputInfoPChildFContinent string\n\nvar repeatDataQueryInputInfoPChildPString string\n\nvar repeatDataQueryInputInfoPChildPFloat float32\n\nvar repeatDataQueryInputInfoPChildPDouble float64\n\nvar repeatDataQueryInputInfoPChildPBool bool\n\nvar RepeatDataQueryInputInfoPChildPContinent string\n\nvar repeatDataQueryInputIntendedBindingUri string\n\nvar repeatDataQueryInputPInt32 int32\n\nvar repeatDataQueryInputPInt64 int64\n\nvar repeatDataQueryInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataQueryCmd)\n\n\tRepeatDataQueryInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataQueryInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataQueryInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataQueryInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataQueryInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataQueryInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataQueryInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&RepeatDataQueryInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&RepeatDataQueryInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&RepeatDataQueryInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint32Var(&RepeatDataQueryInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint32Var(&RepeatDataQueryInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&RepeatDataQueryInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&RepeatDataQueryInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&RepeatDataQueryInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint64Var(&RepeatDataQueryInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint64Var(&RepeatDataQueryInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&RepeatDataQueryInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().BytesHexVar(&RepeatDataQueryInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&RepeatDataQueryInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&repeatDataQueryInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&repeatDataQueryInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&repeatDataQueryInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&repeatDataQueryInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&repeatDataQueryInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&repeatDataQueryInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&repeatDataQueryInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&repeatDataQueryInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint32Var(&repeatDataQueryInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint32Var(&repeatDataQueryInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&repeatDataQueryInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&repeatDataQueryInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&repeatDataQueryInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint64Var(&repeatDataQueryInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Uint64Var(&repeatDataQueryInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&repeatDataQueryInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&repeatDataQueryInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&repeatDataQueryInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&RepeatDataQueryInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&repeatDataQueryInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float32Var(&repeatDataQueryInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&repeatDataQueryInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&repeatDataQueryInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataQueryCmd.Flags().BoolVar(&RepeatDataQueryInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&repeatDataQueryInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&RepeatDataQueryInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&RepeatDataQueryInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&RepeatDataQueryInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int32Var(&repeatDataQueryInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Int64Var(&repeatDataQueryInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataQueryCmd.Flags().Float64Var(&repeatDataQueryInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataQueryCmd.Flags().StringVar(&RepeatDataQueryFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataQueryCmd = &cobra.Command{\n\tUse:   \"repeat-data-query\",\n\tShort: \"This method echoes the ComplianceData request....\",\n\tLong:  \"This method echoes the ComplianceData request. This method exercises  sending all request fields as query parameters.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataQueryFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataQueryFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataQueryFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataQueryInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataQueryInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataQueryInputInfoFKingdom)])\n\n\t\t\tRepeatDataQueryInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataQueryInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataQueryInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataQueryInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataQueryInputInfoPKingdom)])\n\t\t\t\tRepeatDataQueryInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataQueryInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataQueryInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataQueryInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataQueryInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataQueryInput.Info.FChild.PString = &repeatDataQueryInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataQueryInput.Info.FChild.PFloat = &repeatDataQueryInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataQueryInput.Info.FChild.PDouble = &repeatDataQueryInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataQueryInput.Info.FChild.PBool = &repeatDataQueryInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataQueryInput.Info.PString = &repeatDataQueryInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataQueryInput.Info.PInt32 = &repeatDataQueryInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataQueryInput.Info.PSint32 = &repeatDataQueryInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataQueryInput.Info.PSfixed32 = &repeatDataQueryInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataQueryInput.Info.PUint32 = &repeatDataQueryInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataQueryInput.Info.PFixed32 = &repeatDataQueryInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataQueryInput.Info.PInt64 = &repeatDataQueryInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataQueryInput.Info.PSint64 = &repeatDataQueryInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataQueryInput.Info.PSfixed64 = &repeatDataQueryInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataQueryInput.Info.PUint64 = &repeatDataQueryInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataQueryInput.Info.PFixed64 = &repeatDataQueryInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataQueryInput.Info.PFloat = &repeatDataQueryInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataQueryInput.Info.PDouble = &repeatDataQueryInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataQueryInput.Info.PBool = &repeatDataQueryInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataQueryInput.Info.PChild.PString = &repeatDataQueryInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataQueryInput.Info.PChild.PFloat = &repeatDataQueryInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataQueryInput.Info.PChild.PDouble = &repeatDataQueryInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataQueryInput.Info.PChild.PBool = &repeatDataQueryInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataQueryInput.IntendedBindingUri = &repeatDataQueryInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataQueryInput.PInt32 = &repeatDataQueryInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataQueryInput.PInt64 = &repeatDataQueryInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataQueryInput.PDouble = &repeatDataQueryInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataQuery\", &RepeatDataQueryInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataQuery(ctx, &RepeatDataQueryInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/repeat-data-simple-path.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar RepeatDataSimplePathInput genprotopb.RepeatRequest\n\nvar RepeatDataSimplePathFromFile string\n\nvar RepeatDataSimplePathInputInfoFKingdom string\n\nvar RepeatDataSimplePathInputInfoFChildFContinent string\n\nvar repeatDataSimplePathInputInfoFChildPString string\n\nvar repeatDataSimplePathInputInfoFChildPFloat float32\n\nvar repeatDataSimplePathInputInfoFChildPDouble float64\n\nvar repeatDataSimplePathInputInfoFChildPBool bool\n\nvar RepeatDataSimplePathInputInfoFChildPContinent string\n\nvar repeatDataSimplePathInputInfoPString string\n\nvar repeatDataSimplePathInputInfoPInt32 int32\n\nvar repeatDataSimplePathInputInfoPSint32 int32\n\nvar repeatDataSimplePathInputInfoPSfixed32 int32\n\nvar repeatDataSimplePathInputInfoPUint32 uint32\n\nvar repeatDataSimplePathInputInfoPFixed32 uint32\n\nvar repeatDataSimplePathInputInfoPInt64 int64\n\nvar repeatDataSimplePathInputInfoPSint64 int64\n\nvar repeatDataSimplePathInputInfoPSfixed64 int64\n\nvar repeatDataSimplePathInputInfoPUint64 uint64\n\nvar repeatDataSimplePathInputInfoPFixed64 uint64\n\nvar repeatDataSimplePathInputInfoPFloat float32\n\nvar repeatDataSimplePathInputInfoPDouble float64\n\nvar repeatDataSimplePathInputInfoPBool bool\n\nvar RepeatDataSimplePathInputInfoPKingdom string\n\nvar RepeatDataSimplePathInputInfoPChildFContinent string\n\nvar repeatDataSimplePathInputInfoPChildPString string\n\nvar repeatDataSimplePathInputInfoPChildPFloat float32\n\nvar repeatDataSimplePathInputInfoPChildPDouble float64\n\nvar repeatDataSimplePathInputInfoPChildPBool bool\n\nvar RepeatDataSimplePathInputInfoPChildPContinent string\n\nvar repeatDataSimplePathInputIntendedBindingUri string\n\nvar repeatDataSimplePathInputPInt32 int32\n\nvar repeatDataSimplePathInputPInt64 int64\n\nvar repeatDataSimplePathInputPDouble float64\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(RepeatDataSimplePathCmd)\n\n\tRepeatDataSimplePathInput.Info = new(genprotopb.ComplianceData)\n\n\tRepeatDataSimplePathInput.Info.FChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataSimplePathInput.Info.FChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataSimplePathInput.Info.FChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataSimplePathInput.Info.PChild = new(genprotopb.ComplianceDataChild)\n\n\tRepeatDataSimplePathInput.Info.PChild.FChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataSimplePathInput.Info.PChild.PChild = new(genprotopb.ComplianceDataGrandchild)\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Name, \"name\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.FString, \"info.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&RepeatDataSimplePathInput.Info.FInt32, \"info.f_int32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&RepeatDataSimplePathInput.Info.FSint32, \"info.f_sint32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&RepeatDataSimplePathInput.Info.FSfixed32, \"info.f_sfixed32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint32Var(&RepeatDataSimplePathInput.Info.FUint32, \"info.f_uint32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint32Var(&RepeatDataSimplePathInput.Info.FFixed32, \"info.f_fixed32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&RepeatDataSimplePathInput.Info.FInt64, \"info.f_int64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&RepeatDataSimplePathInput.Info.FSint64, \"info.f_sint64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&RepeatDataSimplePathInput.Info.FSfixed64, \"info.f_sfixed64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint64Var(&RepeatDataSimplePathInput.Info.FUint64, \"info.f_uint64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint64Var(&RepeatDataSimplePathInput.Info.FFixed64, \"info.f_fixed64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.FDouble, \"info.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&RepeatDataSimplePathInput.Info.FFloat, \"info.f_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.FBool, \"info.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BytesHexVar(&RepeatDataSimplePathInput.Info.FBytes, \"info.f_bytes\", []byte{}, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoFKingdom, \"info.f_kingdom\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.FChild.FString, \"info.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&RepeatDataSimplePathInput.Info.FChild.FFloat, \"info.f_child.f_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.FChild.FDouble, \"info.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.FChild.FBool, \"info.f_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoFChildFContinent, \"info.f_child.f_continent\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.FChild.FChild.FString, \"info.f_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.FChild.FChild.FDouble, \"info.f_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.FChild.FChild.FBool, \"info.f_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&repeatDataSimplePathInputInfoFChildPString, \"info.f_child.p_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&repeatDataSimplePathInputInfoFChildPFloat, \"info.f_child.p_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&repeatDataSimplePathInputInfoFChildPDouble, \"info.f_child.p_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&repeatDataSimplePathInputInfoFChildPBool, \"info.f_child.p_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoFChildPContinent, \"info.f_child.p_continent\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.FChild.PChild.FString, \"info.f_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.FChild.PChild.FDouble, \"info.f_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.FChild.PChild.FBool, \"info.f_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&repeatDataSimplePathInputInfoPString, \"info.p_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&repeatDataSimplePathInputInfoPInt32, \"info.p_int32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&repeatDataSimplePathInputInfoPSint32, \"info.p_sint32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&repeatDataSimplePathInputInfoPSfixed32, \"info.p_sfixed32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint32Var(&repeatDataSimplePathInputInfoPUint32, \"info.p_uint32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint32Var(&repeatDataSimplePathInputInfoPFixed32, \"info.p_fixed32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&repeatDataSimplePathInputInfoPInt64, \"info.p_int64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&repeatDataSimplePathInputInfoPSint64, \"info.p_sint64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&repeatDataSimplePathInputInfoPSfixed64, \"info.p_sfixed64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint64Var(&repeatDataSimplePathInputInfoPUint64, \"info.p_uint64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Uint64Var(&repeatDataSimplePathInputInfoPFixed64, \"info.p_fixed64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&repeatDataSimplePathInputInfoPFloat, \"info.p_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&repeatDataSimplePathInputInfoPDouble, \"info.p_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&repeatDataSimplePathInputInfoPBool, \"info.p_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoPKingdom, \"info.p_kingdom\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.PChild.FString, \"info.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&RepeatDataSimplePathInput.Info.PChild.FFloat, \"info.p_child.f_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.PChild.FDouble, \"info.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.PChild.FBool, \"info.p_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoPChildFContinent, \"info.p_child.f_continent\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.PChild.FChild.FString, \"info.p_child.f_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.PChild.FChild.FDouble, \"info.p_child.f_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.PChild.FChild.FBool, \"info.p_child.f_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&repeatDataSimplePathInputInfoPChildPString, \"info.p_child.p_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float32Var(&repeatDataSimplePathInputInfoPChildPFloat, \"info.p_child.p_float\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&repeatDataSimplePathInputInfoPChildPDouble, \"info.p_child.p_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&repeatDataSimplePathInputInfoPChildPBool, \"info.p_child.p_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInputInfoPChildPContinent, \"info.p_child.p_continent\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathInput.Info.PChild.PChild.FString, \"info.p_child.p_child.f_string\", \"\", \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.Info.PChild.PChild.FDouble, \"info.p_child.p_child.f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.Info.PChild.PChild.FBool, \"info.p_child.p_child.f_bool\", false, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().BoolVar(&RepeatDataSimplePathInput.ServerVerify, \"server_verify\", false, \"If true, the server will verify that the received...\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&repeatDataSimplePathInputIntendedBindingUri, \"intended_binding_uri\", \"\", \"The URI template this request is expected to be...\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&RepeatDataSimplePathInput.FInt32, \"f_int32\", 0, \"Some top level fields, to test that these are...\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&RepeatDataSimplePathInput.FInt64, \"f_int64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&RepeatDataSimplePathInput.FDouble, \"f_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int32Var(&repeatDataSimplePathInputPInt32, \"p_int32\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Int64Var(&repeatDataSimplePathInputPInt64, \"p_int64\", 0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().Float64Var(&repeatDataSimplePathInputPDouble, \"p_double\", 0.0, \"\")\n\n\tRepeatDataSimplePathCmd.Flags().StringVar(&RepeatDataSimplePathFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar RepeatDataSimplePathCmd = &cobra.Command{\n\tUse:   \"repeat-data-simple-path\",\n\tShort: \"This method echoes the ComplianceData request....\",\n\tLong:  \"This method echoes the ComplianceData request. This method exercises  sending some parameters as 'simple' path variables (i.e., of the form ...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif RepeatDataSimplePathFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif RepeatDataSimplePathFromFile != \"\" {\n\t\t\tin, err = os.Open(RepeatDataSimplePathFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &RepeatDataSimplePathInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tRepeatDataSimplePathInput.Info.FKingdom = genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataSimplePathInputInfoFKingdom)])\n\n\t\t\tRepeatDataSimplePathInput.Info.FChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataSimplePathInputInfoFChildFContinent)])\n\n\t\t\tRepeatDataSimplePathInput.Info.FChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataSimplePathInputInfoFChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.p_kingdom\") {\n\t\t\t\te := genprotopb.ComplianceData_LifeKingdom(genprotopb.ComplianceData_LifeKingdom_value[strings.ToUpper(RepeatDataSimplePathInputInfoPKingdom)])\n\t\t\t\tRepeatDataSimplePathInput.Info.PKingdom = &e\n\t\t\t}\n\n\t\t\tRepeatDataSimplePathInput.Info.PChild.FContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataSimplePathInputInfoPChildFContinent)])\n\n\t\t\tRepeatDataSimplePathInput.Info.PChild.PContinent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(RepeatDataSimplePathInputInfoPChildPContinent)])\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_string\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.FChild.PString = &repeatDataSimplePathInputInfoFChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_float\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.FChild.PFloat = &repeatDataSimplePathInputInfoFChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_double\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.FChild.PDouble = &repeatDataSimplePathInputInfoFChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.f_child.p_bool\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.FChild.PBool = &repeatDataSimplePathInputInfoFChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_string\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PString = &repeatDataSimplePathInputInfoPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int32\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PInt32 = &repeatDataSimplePathInputInfoPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint32\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PSint32 = &repeatDataSimplePathInputInfoPSint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed32\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PSfixed32 = &repeatDataSimplePathInputInfoPSfixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint32\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PUint32 = &repeatDataSimplePathInputInfoPUint32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed32\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PFixed32 = &repeatDataSimplePathInputInfoPFixed32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_int64\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PInt64 = &repeatDataSimplePathInputInfoPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sint64\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PSint64 = &repeatDataSimplePathInputInfoPSint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_sfixed64\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PSfixed64 = &repeatDataSimplePathInputInfoPSfixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_uint64\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PUint64 = &repeatDataSimplePathInputInfoPUint64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_fixed64\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PFixed64 = &repeatDataSimplePathInputInfoPFixed64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_float\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PFloat = &repeatDataSimplePathInputInfoPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_double\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PDouble = &repeatDataSimplePathInputInfoPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_bool\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PBool = &repeatDataSimplePathInputInfoPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_string\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PChild.PString = &repeatDataSimplePathInputInfoPChildPString\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_float\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PChild.PFloat = &repeatDataSimplePathInputInfoPChildPFloat\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_double\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PChild.PDouble = &repeatDataSimplePathInputInfoPChildPDouble\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"info.p_child.p_bool\") {\n\t\t\t\tRepeatDataSimplePathInput.Info.PChild.PBool = &repeatDataSimplePathInputInfoPChildPBool\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"intended_binding_uri\") {\n\t\t\t\tRepeatDataSimplePathInput.IntendedBindingUri = &repeatDataSimplePathInputIntendedBindingUri\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int32\") {\n\t\t\t\tRepeatDataSimplePathInput.PInt32 = &repeatDataSimplePathInputPInt32\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_int64\") {\n\t\t\t\tRepeatDataSimplePathInput.PInt64 = &repeatDataSimplePathInputPInt64\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"p_double\") {\n\t\t\t\tRepeatDataSimplePathInput.PDouble = &repeatDataSimplePathInputPDouble\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"RepeatDataSimplePath\", &RepeatDataSimplePathInput)\n\t\t}\n\t\tresp, err := ComplianceClient.RepeatDataSimplePath(ctx, &RepeatDataSimplePathInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/report-session.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar ReportSessionInput genprotopb.ReportSessionRequest\n\nvar ReportSessionFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(ReportSessionCmd)\n\n\tReportSessionCmd.Flags().StringVar(&ReportSessionInput.Name, \"name\", \"\", \"The session to be reported on.\")\n\n\tReportSessionCmd.Flags().StringVar(&ReportSessionFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar ReportSessionCmd = &cobra.Command{\n\tUse:   \"report-session\",\n\tShort: \"Report on the status of a session.  This...\",\n\tLong:  \"Report on the status of a session.  This generates a report detailing which tests have been completed,  and an overall rollup.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif ReportSessionFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif ReportSessionFromFile != \"\" {\n\t\t\tin, err = os.Open(ReportSessionFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &ReportSessionInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"ReportSession\", &ReportSessionInput)\n\t\t}\n\t\tresp, err := TestingClient.ReportSession(ctx, &ReportSessionInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/run.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"github.com/spf13/cobra\"\n)\n\nfunc message(err error) string {\n\tif err == nil {\n\t\treturn \"ok\"\n\t}\n\treturn err.Error()\n}\n\nfunc init() {\n\tconfig := RuntimeConfig{}\n\trunCmd := &cobra.Command{\n\t\tUse:   \"run\",\n\t\tShort: \"Runs the showcase server\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\tcmuxServer := CreateAllEndpoints(config)\n\n\t\t\tdone := make(chan os.Signal, 2)\n\t\t\tsignal.Notify(done, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGHUP)\n\t\t\tgo func() {\n\t\t\t\tsig := <-done\n\t\t\t\tstdLog.Printf(\"Got signal %q\", sig)\n\t\t\t\tstdLog.Printf(\"Shutting down server: %s\", message(cmuxServer.Shutdown()))\n\n\t\t\t\t// TODO: Delete the following line once this PR is\n\t\t\t\t// merged: https://github.com/soheilhy/cmux/pull/69. The issue is\n\t\t\t\t// that the user cannot Ctrl-C the main binary, probably due to\n\t\t\t\t// https://github.com/soheilhy/cmux/pull/69#issuecomment-712928041.\n\t\t\t\tos.Exit(1)\n\t\t\t}()\n\n\t\t\tstdLog.Printf(\"Server finished: %s\", message(cmuxServer.Serve()))\n\t\t},\n\t}\n\trootCmd.AddCommand(runCmd)\n\trunCmd.Flags().StringVarP(\n\t\t&config.port,\n\t\t\"port\",\n\t\t\"p\",\n\t\t\":7469\",\n\t\t\"The port that showcase will be served on.\")\n\trunCmd.Flags().StringVarP(\n\t\t&config.fallbackPort,\n\t\t\"fallback-port\",\n\t\t\"f\",\n\t\t\":1337\",\n\t\t\"The port that the fallback-proxy will be served on.\")\n\trunCmd.Flags().StringVar(\n\t\t&config.tlsCaCert,\n\t\t\"mtls-ca-cert\",\n\t\t\"\",\n\t\t\"The Root CA certificate path for custom mutual TLS channel.\")\n\trunCmd.Flags().StringVar(\n\t\t&config.tlsCert,\n\t\t\"mtls-cert\",\n\t\t\"\",\n\t\t\"The server certificate path for custom mutual TLS channel.\")\n\trunCmd.Flags().StringVar(\n\t\t&config.tlsKey,\n\t\t\"mtls-key\",\n\t\t\"\",\n\t\t\"The server private key path for custom mutual TLS channel.\")\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/search-blurbs.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar SearchBlurbsInput genprotopb.SearchBlurbsRequest\n\nvar SearchBlurbsFromFile string\n\nvar SearchBlurbsFollow bool\n\nvar SearchBlurbsPollOperation string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(SearchBlurbsCmd)\n\n\tSearchBlurbsCmd.Flags().StringVar(&SearchBlurbsInput.Query, \"query\", \"\", \"Required. The query used to search for blurbs containing to...\")\n\n\tSearchBlurbsCmd.Flags().StringVar(&SearchBlurbsInput.Parent, \"parent\", \"\", \"The rooms or profiles to search. If unset,...\")\n\n\tSearchBlurbsCmd.Flags().Int32Var(&SearchBlurbsInput.PageSize, \"page_size\", 10, \"Default is 10. The maximum number of blurbs return. Server may...\")\n\n\tSearchBlurbsCmd.Flags().StringVar(&SearchBlurbsInput.PageToken, \"page_token\", \"\", \"The value of ...\")\n\n\tSearchBlurbsCmd.Flags().StringVar(&SearchBlurbsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n\tSearchBlurbsCmd.Flags().BoolVar(&SearchBlurbsFollow, \"follow\", false, \"Block until the long running operation completes\")\n\n\tMessagingServiceCmd.AddCommand(SearchBlurbsPollCmd)\n\n\tSearchBlurbsPollCmd.Flags().BoolVar(&SearchBlurbsFollow, \"follow\", false, \"Block until the long running operation completes\")\n\n\tSearchBlurbsPollCmd.Flags().StringVar(&SearchBlurbsPollOperation, \"operation\", \"\", \"Required. Operation name to poll for\")\n\n\tSearchBlurbsPollCmd.MarkFlagRequired(\"operation\")\n\n}\n\nvar SearchBlurbsCmd = &cobra.Command{\n\tUse:   \"search-blurbs\",\n\tShort: \"This method searches through all blurbs across...\",\n\tLong:  \"This method searches through all blurbs across all rooms and profiles  for blurbs containing to words found in the query. Only posts that  contain an...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif SearchBlurbsFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"query\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif SearchBlurbsFromFile != \"\" {\n\t\t\tin, err = os.Open(SearchBlurbsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &SearchBlurbsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"SearchBlurbs\", &SearchBlurbsInput)\n\t\t}\n\t\tresp, err := MessagingClient.SearchBlurbs(ctx, &SearchBlurbsInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif !SearchBlurbsFollow {\n\t\t\tvar s interface{}\n\t\t\ts = resp.Name()\n\n\t\t\tif OutputJSON {\n\t\t\t\td := make(map[string]string)\n\t\t\t\td[\"operation\"] = resp.Name()\n\t\t\t\ts = d\n\t\t\t}\n\n\t\t\tprintMessage(s)\n\t\t\treturn err\n\t\t}\n\n\t\tresult, err := resp.Wait(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(result)\n\n\t\treturn err\n\t},\n}\n\nvar SearchBlurbsPollCmd = &cobra.Command{\n\tUse:   \"poll-search-blurbs\",\n\tShort: \"Poll the status of a SearchBlurbsOperation by name\",\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\top := MessagingClient.SearchBlurbsOperation(SearchBlurbsPollOperation)\n\n\t\tif SearchBlurbsFollow {\n\t\t\tresp, err := op.Wait(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\t\t\tprintMessage(resp)\n\t\t\treturn err\n\t\t}\n\n\t\tresp, err := op.Poll(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if resp != nil {\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\n\t\t\tprintMessage(resp)\n\t\t\treturn\n\t\t}\n\n\t\tif op.Done() {\n\t\t\tfmt.Println(fmt.Sprintf(\"Operation %s is done\", op.Name()))\n\t\t} else {\n\t\t\tfmt.Println(fmt.Sprintf(\"Operation %s not done\", op.Name()))\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/send-blurbs.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"bufio\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar SendBlurbsFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(SendBlurbsCmd)\n\n\tSendBlurbsCmd.Flags().StringVar(&SendBlurbsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar SendBlurbsCmd = &cobra.Command{\n\tUse:   \"send-blurbs\",\n\tShort: \"This is a stream to create multiple blurbs. If an...\",\n\tLong:  \"This is a stream to create multiple blurbs. If an invalid blurb is  requested to be created, the stream will close with an error.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif SendBlurbsFromFile != \"\" {\n\t\t\tin, err = os.Open(SendBlurbsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t}\n\n\t\tstream, err := MessagingClient.SendBlurbs(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Println(\"Client stream open. Close with ctrl+D.\")\n\t\t}\n\n\t\tvar SendBlurbsInput genprotopb.CreateBlurbRequest\n\t\tscanner := bufio.NewScanner(in)\n\t\tfor scanner.Scan() {\n\t\t\tinput := scanner.Text()\n\t\t\tif input == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr = jsonpb.UnmarshalString(input, &SendBlurbsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = stream.Send(&SendBlurbsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err = scanner.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tresp, err := stream.CloseAndRecv()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/sequence_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar SequenceConfig *viper.Viper\nvar SequenceClient *gapic.SequenceClient\nvar SequenceSubCommands []string = []string{\n\t\"create-sequence\",\n\t\"create-streaming-sequence\",\n\t\"get-sequence-report\",\n\t\"get-streaming-sequence-report\",\n\t\"attempt-sequence\",\n\t\"attempt-streaming-sequence\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(SequenceServiceCmd)\n\n\tSequenceConfig = viper.New()\n\tSequenceConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_SEQUENCE\")\n\tSequenceConfig.AutomaticEnv()\n\n\tSequenceServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_SEQUENCE_INSECURE. Must be used with \\\"address\\\" option\")\n\tSequenceConfig.BindPFlag(\"insecure\", SequenceServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tSequenceConfig.BindEnv(\"insecure\")\n\n\tSequenceServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_SEQUENCE_ADDRESS.\")\n\tSequenceConfig.BindPFlag(\"address\", SequenceServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tSequenceConfig.BindEnv(\"address\")\n\n\tSequenceServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_SEQUENCE_TOKEN.\")\n\tSequenceConfig.BindPFlag(\"token\", SequenceServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tSequenceConfig.BindEnv(\"token\")\n\n\tSequenceServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_SEQUENCE_API_KEY.\")\n\tSequenceConfig.BindPFlag(\"api_key\", SequenceServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tSequenceConfig.BindEnv(\"api_key\")\n}\n\nvar SequenceServiceCmd = &cobra.Command{\n\tUse:       \"sequence\",\n\tShort:     \"A service that enables testing of unary and...\",\n\tLong:      \"A service that enables testing of unary and server streaming calls  by specifying a specific, predictable sequence of responses from the service\",\n\tValidArgs: SequenceSubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := SequenceConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif SequenceConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := SequenceConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := SequenceConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tSequenceClient, err = gapic.NewSequenceClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/stream-blurbs.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"io\"\n\n\t\"os\"\n\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n)\n\nvar StreamBlurbsInput genprotopb.StreamBlurbsRequest\n\nvar StreamBlurbsFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(StreamBlurbsCmd)\n\n\tStreamBlurbsInput.ExpireTime = new(timestamppb.Timestamp)\n\n\tStreamBlurbsCmd.Flags().StringVar(&StreamBlurbsInput.Name, \"name\", \"\", \"Required. The resource name of a chat room or user profile...\")\n\n\tStreamBlurbsCmd.Flags().Int64Var(&StreamBlurbsInput.ExpireTime.Seconds, \"expire_time.seconds\", 0, \"Represents seconds of UTC time since Unix epoch ...\")\n\n\tStreamBlurbsCmd.Flags().Int32Var(&StreamBlurbsInput.ExpireTime.Nanos, \"expire_time.nanos\", 0, \"Non-negative fractions of a second at nanosecond...\")\n\n\tStreamBlurbsCmd.Flags().StringVar(&StreamBlurbsFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar StreamBlurbsCmd = &cobra.Command{\n\tUse:   \"stream-blurbs\",\n\tShort: \"This returns a stream that emits the blurbs that...\",\n\tLong:  \"This returns a stream that emits the blurbs that are created for a  particular chat room or user profile.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif StreamBlurbsFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif StreamBlurbsFromFile != \"\" {\n\t\t\tin, err = os.Open(StreamBlurbsFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &StreamBlurbsInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"StreamBlurbs\", &StreamBlurbsInput)\n\t\t}\n\t\tresp, err := MessagingClient.StreamBlurbs(ctx, &StreamBlurbsInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar item *genprotopb.StreamBlurbsResponse\n\t\tfor {\n\t\t\titem, err = resp.Recv()\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\t\t\tprintMessage(item)\n\t\t}\n\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/testing_service.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\t\"golang.org/x/oauth2\"\n\t\"google.golang.org/api/option\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\n\tgapic \"github.com/googleapis/gapic-showcase/client\"\n)\n\nvar TestingConfig *viper.Viper\nvar TestingClient *gapic.TestingClient\nvar TestingSubCommands []string = []string{\n\t\"create-session\",\n\t\"get-session\",\n\t\"list-sessions\",\n\t\"delete-session\",\n\t\"report-session\",\n\t\"list-tests\",\n\t\"delete-test\",\n\t\"verify-test\",\n}\n\nfunc init() {\n\trootCmd.AddCommand(TestingServiceCmd)\n\n\tTestingConfig = viper.New()\n\tTestingConfig.SetEnvPrefix(\"GAPIC-SHOWCASE_TESTING\")\n\tTestingConfig.AutomaticEnv()\n\n\tTestingServiceCmd.PersistentFlags().Bool(\"insecure\", false, \"Make insecure client connection. Or use GAPIC-SHOWCASE_TESTING_INSECURE. Must be used with \\\"address\\\" option\")\n\tTestingConfig.BindPFlag(\"insecure\", TestingServiceCmd.PersistentFlags().Lookup(\"insecure\"))\n\tTestingConfig.BindEnv(\"insecure\")\n\n\tTestingServiceCmd.PersistentFlags().String(\"address\", \"\", \"Set API address used by client. Or use GAPIC-SHOWCASE_TESTING_ADDRESS.\")\n\tTestingConfig.BindPFlag(\"address\", TestingServiceCmd.PersistentFlags().Lookup(\"address\"))\n\tTestingConfig.BindEnv(\"address\")\n\n\tTestingServiceCmd.PersistentFlags().String(\"token\", \"\", \"Set Bearer token used by the client. Or use GAPIC-SHOWCASE_TESTING_TOKEN.\")\n\tTestingConfig.BindPFlag(\"token\", TestingServiceCmd.PersistentFlags().Lookup(\"token\"))\n\tTestingConfig.BindEnv(\"token\")\n\n\tTestingServiceCmd.PersistentFlags().String(\"api_key\", \"\", \"Set API Key used by the client. Or use GAPIC-SHOWCASE_TESTING_API_KEY.\")\n\tTestingConfig.BindPFlag(\"api_key\", TestingServiceCmd.PersistentFlags().Lookup(\"api_key\"))\n\tTestingConfig.BindEnv(\"api_key\")\n}\n\nvar TestingServiceCmd = &cobra.Command{\n\tUse:       \"testing\",\n\tShort:     \"A service to facilitate running discrete sets of...\",\n\tLong:      \"A service to facilitate running discrete sets of tests  against Showcase.  Adding this comment with special characters for comment formatting tests: ...\",\n\tValidArgs: TestingSubCommands,\n\tPersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\tvar opts []option.ClientOption\n\n\t\taddress := TestingConfig.GetString(\"address\")\n\t\tif address != \"\" {\n\t\t\topts = append(opts, option.WithEndpoint(address))\n\t\t}\n\n\t\tif TestingConfig.GetBool(\"insecure\") {\n\t\t\tif address == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Missing address to use with insecure connection\")\n\t\t\t}\n\n\t\t\tconn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\topts = append(opts, option.WithGRPCConn(conn))\n\t\t}\n\n\t\tif token := TestingConfig.GetString(\"token\"); token != \"\" {\n\t\t\topts = append(opts, option.WithTokenSource(oauth2.StaticTokenSource(\n\t\t\t\t&oauth2.Token{\n\t\t\t\t\tAccessToken: token,\n\t\t\t\t\tTokenType:   \"Bearer\",\n\t\t\t\t})))\n\t\t}\n\n\t\tif key := TestingConfig.GetString(\"api_key\"); key != \"\" {\n\t\t\topts = append(opts, option.WithAPIKey(key))\n\t\t}\n\n\t\tTestingClient, err = gapic.NewTestingClient(ctx, opts...)\n\t\treturn\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/update-blurb.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tfieldmaskpb \"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar UpdateBlurbInput genprotopb.UpdateBlurbRequest\n\nvar UpdateBlurbFromFile string\n\nvar UpdateBlurbInputBlurbContent string\n\nvar UpdateBlurbInputBlurbContentImage genprotopb.Blurb_Image\n\nvar UpdateBlurbInputBlurbContentText genprotopb.Blurb_Text\n\nvar UpdateBlurbInputBlurbLegacyId string\n\nvar UpdateBlurbInputBlurbLegacyIdLegacyRoomId genprotopb.Blurb_LegacyRoomId\n\nvar UpdateBlurbInputBlurbLegacyIdLegacyUserId genprotopb.Blurb_LegacyUserId\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(UpdateBlurbCmd)\n\n\tUpdateBlurbInput.Blurb = new(genprotopb.Blurb)\n\n\tUpdateBlurbInput.UpdateMask = new(fieldmaskpb.FieldMask)\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInput.Blurb.Name, \"blurb.name\", \"\", \"The resource name of the chat room.\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInput.Blurb.User, \"blurb.user\", \"\", \"Required. The resource name of the blurb's author.\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInputBlurbContentText.Text, \"blurb.content.text\", \"\", \"The textual content of this blurb.\")\n\n\tUpdateBlurbCmd.Flags().BytesHexVar(&UpdateBlurbInputBlurbContentImage.Image, \"blurb.content.image\", []byte{}, \"The image content of this blurb.\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInputBlurbLegacyIdLegacyRoomId.LegacyRoomId, \"blurb.legacy_id.legacy_room_id\", \"\", \"The legacy id of the room. This field is used to...\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInputBlurbLegacyIdLegacyUserId.LegacyUserId, \"blurb.legacy_id.legacy_user_id\", \"\", \"The legacy id of the user. This field is used to...\")\n\n\tUpdateBlurbCmd.Flags().StringSliceVar(&UpdateBlurbInput.UpdateMask.Paths, \"update_mask.paths\", []string{}, \"The set of field mask paths.\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInputBlurbContent, \"blurb.content\", \"\", \"Choices: text, image\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbInputBlurbLegacyId, \"blurb.legacy_id\", \"\", \"Choices: legacy_room_id, legacy_user_id\")\n\n\tUpdateBlurbCmd.Flags().StringVar(&UpdateBlurbFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar UpdateBlurbCmd = &cobra.Command{\n\tUse:   \"update-blurb\",\n\tShort: \"Updates a blurb.\",\n\tLong:  \"Updates a blurb.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif UpdateBlurbFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.user\")\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.content\")\n\n\t\t\tcmd.MarkFlagRequired(\"blurb.legacy_id\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif UpdateBlurbFromFile != \"\" {\n\t\t\tin, err = os.Open(UpdateBlurbFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &UpdateBlurbInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tswitch UpdateBlurbInputBlurbContent {\n\n\t\t\tcase \"image\":\n\t\t\t\tUpdateBlurbInput.Blurb.Content = &UpdateBlurbInputBlurbContentImage\n\n\t\t\tcase \"text\":\n\t\t\t\tUpdateBlurbInput.Blurb.Content = &UpdateBlurbInputBlurbContentText\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for blurb.content\")\n\t\t\t}\n\n\t\t\tswitch UpdateBlurbInputBlurbLegacyId {\n\n\t\t\tcase \"legacy_room_id\":\n\t\t\t\tUpdateBlurbInput.Blurb.LegacyId = &UpdateBlurbInputBlurbLegacyIdLegacyRoomId\n\n\t\t\tcase \"legacy_user_id\":\n\t\t\t\tUpdateBlurbInput.Blurb.LegacyId = &UpdateBlurbInputBlurbLegacyIdLegacyUserId\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for blurb.legacy_id\")\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"UpdateBlurb\", &UpdateBlurbInput)\n\t\t}\n\t\tresp, err := MessagingClient.UpdateBlurb(ctx, &UpdateBlurbInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/update-room.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tfieldmaskpb \"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar UpdateRoomInput genprotopb.UpdateRoomRequest\n\nvar UpdateRoomFromFile string\n\nfunc init() {\n\tMessagingServiceCmd.AddCommand(UpdateRoomCmd)\n\n\tUpdateRoomInput.Room = new(genprotopb.Room)\n\n\tUpdateRoomInput.UpdateMask = new(fieldmaskpb.FieldMask)\n\n\tUpdateRoomCmd.Flags().StringVar(&UpdateRoomInput.Room.Name, \"room.name\", \"\", \"The resource name of the chat room.\")\n\n\tUpdateRoomCmd.Flags().StringVar(&UpdateRoomInput.Room.DisplayName, \"room.display_name\", \"\", \"Required. The human readable name of the chat room.\")\n\n\tUpdateRoomCmd.Flags().StringVar(&UpdateRoomInput.Room.Description, \"room.description\", \"\", \"The description of the chat room.\")\n\n\tUpdateRoomCmd.Flags().StringSliceVar(&UpdateRoomInput.UpdateMask.Paths, \"update_mask.paths\", []string{}, \"The set of field mask paths.\")\n\n\tUpdateRoomCmd.Flags().StringVar(&UpdateRoomFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar UpdateRoomCmd = &cobra.Command{\n\tUse:   \"update-room\",\n\tShort: \"Updates a room.\",\n\tLong:  \"Updates a room.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif UpdateRoomFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"room.display_name\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif UpdateRoomFromFile != \"\" {\n\t\t\tin, err = os.Open(UpdateRoomFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &UpdateRoomInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Messaging\", \"UpdateRoom\", &UpdateRoomInput)\n\t\t}\n\t\tresp, err := MessagingClient.UpdateRoom(ctx, &UpdateRoomInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/update-user.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tfieldmaskpb \"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar UpdateUserInput genprotopb.UpdateUserRequest\n\nvar UpdateUserFromFile string\n\nvar updateUserInputUserAge int32\n\nvar updateUserInputUserHeightFeet float64\n\nvar updateUserInputUserNickname string\n\nvar updateUserInputUserEnableNotifications bool\n\nfunc init() {\n\tIdentityServiceCmd.AddCommand(UpdateUserCmd)\n\n\tUpdateUserInput.User = new(genprotopb.User)\n\n\tUpdateUserInput.UpdateMask = new(fieldmaskpb.FieldMask)\n\n\tUpdateUserCmd.Flags().StringVar(&UpdateUserInput.User.Name, \"user.name\", \"\", \"The resource name of the user.\")\n\n\tUpdateUserCmd.Flags().StringVar(&UpdateUserInput.User.DisplayName, \"user.display_name\", \"\", \"Required. The display_name of the user.\")\n\n\tUpdateUserCmd.Flags().StringVar(&UpdateUserInput.User.Email, \"user.email\", \"\", \"Required. The email address of the user.\")\n\n\tUpdateUserCmd.Flags().Int32Var(&updateUserInputUserAge, \"user.age\", 0, \"The age of the user in years.\")\n\n\tUpdateUserCmd.Flags().Float64Var(&updateUserInputUserHeightFeet, \"user.height_feet\", 0.0, \"The height of the user in feet.\")\n\n\tUpdateUserCmd.Flags().StringVar(&updateUserInputUserNickname, \"user.nickname\", \"\", \"The nickname of the user.   (--...\")\n\n\tUpdateUserCmd.Flags().BoolVar(&updateUserInputUserEnableNotifications, \"user.enable_notifications\", false, \"Enables the receiving of notifications. The...\")\n\n\tUpdateUserCmd.Flags().StringSliceVar(&UpdateUserInput.UpdateMask.Paths, \"update_mask.paths\", []string{}, \"The set of field mask paths.\")\n\n\tUpdateUserCmd.Flags().StringVar(&UpdateUserFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar UpdateUserCmd = &cobra.Command{\n\tUse:   \"update-user\",\n\tShort: \"Updates a user.\",\n\tLong:  \"Updates a user.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif UpdateUserFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"user.display_name\")\n\n\t\t\tcmd.MarkFlagRequired(\"user.email\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif UpdateUserFromFile != \"\" {\n\t\t\tin, err = os.Open(UpdateUserFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &UpdateUserInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif cmd.Flags().Changed(\"user.age\") {\n\t\t\t\tUpdateUserInput.User.Age = &updateUserInputUserAge\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.height_feet\") {\n\t\t\t\tUpdateUserInput.User.HeightFeet = &updateUserInputUserHeightFeet\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.nickname\") {\n\t\t\t\tUpdateUserInput.User.Nickname = &updateUserInputUserNickname\n\t\t\t}\n\n\t\t\tif cmd.Flags().Changed(\"user.enable_notifications\") {\n\t\t\t\tUpdateUserInput.User.EnableNotifications = &updateUserInputUserEnableNotifications\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Identity\", \"UpdateUser\", &UpdateUserInput)\n\t\t}\n\t\tresp, err := IdentityClient.UpdateUser(ctx, &UpdateUserInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/verify-enum.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\t\"strings\"\n)\n\nvar VerifyEnumInput genprotopb.EnumResponse\n\nvar VerifyEnumFromFile string\n\nvar VerifyEnumInputContinent string\n\nfunc init() {\n\tComplianceServiceCmd.AddCommand(VerifyEnumCmd)\n\n\tVerifyEnumInput.Request = new(genprotopb.EnumRequest)\n\n\tVerifyEnumCmd.Flags().BoolVar(&VerifyEnumInput.Request.UnknownEnum, \"request.unknown_enum\", false, \"Whether the client is requesting a new, unknown...\")\n\n\tVerifyEnumCmd.Flags().StringVar(&VerifyEnumInputContinent, \"continent\", \"\", \"The actual enum the server provided.\")\n\n\tVerifyEnumCmd.Flags().StringVar(&VerifyEnumFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar VerifyEnumCmd = &cobra.Command{\n\tUse:   \"verify-enum\",\n\tShort: \"This method is used to verify that clients can...\",\n\tLong:  \"This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST....\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif VerifyEnumFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif VerifyEnumFromFile != \"\" {\n\t\t\tin, err = os.Open(VerifyEnumFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &VerifyEnumInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tVerifyEnumInput.Continent = genprotopb.Continent(genprotopb.Continent_value[strings.ToUpper(VerifyEnumInputContinent)])\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Compliance\", \"VerifyEnum\", &VerifyEnumInput)\n\t\t}\n\t\tresp, err := ComplianceClient.VerifyEnum(ctx, &VerifyEnumInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/verify-test.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n)\n\nvar VerifyTestInput genprotopb.VerifyTestRequest\n\nvar VerifyTestFromFile string\n\nfunc init() {\n\tTestingServiceCmd.AddCommand(VerifyTestCmd)\n\n\tVerifyTestCmd.Flags().StringVar(&VerifyTestInput.Name, \"name\", \"\", \"The test to have an answer registered to it.\")\n\n\tVerifyTestCmd.Flags().BytesHexVar(&VerifyTestInput.Answer, \"answer\", []byte{}, \"The answer from the test.\")\n\n\tVerifyTestCmd.Flags().StringVar(&VerifyTestFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n}\n\nvar VerifyTestCmd = &cobra.Command{\n\tUse:   \"verify-test\",\n\tShort: \"Register a response to a test.   In cases where a...\",\n\tLong:  \"Register a response to a test.   In cases where a test involves registering a final answer at the  end of the test, this method provides the means to...\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif VerifyTestFromFile == \"\" {\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif VerifyTestFromFile != \"\" {\n\t\t\tin, err = os.Open(VerifyTestFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &VerifyTestInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Testing\", \"VerifyTest\", &VerifyTestInput)\n\t\t}\n\t\tresp, err := TestingClient.VerifyTest(ctx, &VerifyTestInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(resp)\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/version.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"strings\"\n\n\troot \"github.com/googleapis/gapic-showcase\"\n)\n\nfunc init() {\n\t// Make roots version option only emit the version. This is used in Actions.\n\t// The template looks weird on purpose. Leaving as a single line causes the\n\t// output to append an extra character.\n\trootCmd.Version = strings.TrimSpace(root.Version)\n\trootCmd.SetVersionTemplate(\n\t\t`{{printf \"%s\" .Version}}`)\n}\n"
  },
  {
    "path": "cmd/gapic-showcase/wait.go",
    "content": "// Code generated. DO NOT EDIT.\n\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\n\t\"fmt\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\n\t\"os\"\n\n\tstatuspb \"google.golang.org/genproto/googleapis/rpc/status\"\n\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n)\n\nvar WaitInput genprotopb.WaitRequest\n\nvar WaitFromFile string\n\nvar WaitFollow bool\n\nvar WaitPollOperation string\n\nvar WaitInputEnd string\n\nvar WaitInputEndEndTime genprotopb.WaitRequest_EndTime\n\nvar WaitInputEndTtl genprotopb.WaitRequest_Ttl\n\nvar WaitInputResponse string\n\nvar WaitInputResponseError genprotopb.WaitRequest_Error\n\nvar WaitInputResponseSuccess genprotopb.WaitRequest_Success\n\nvar WaitInputResponseErrorDetails []string\n\nfunc init() {\n\tEchoServiceCmd.AddCommand(WaitCmd)\n\n\tWaitInputEndEndTime.EndTime = new(timestamppb.Timestamp)\n\n\tWaitInputEndTtl.Ttl = new(durationpb.Duration)\n\n\tWaitInputResponseError.Error = new(statuspb.Status)\n\n\tWaitInputResponseSuccess.Success = new(genprotopb.WaitResponse)\n\n\tWaitCmd.Flags().Int64Var(&WaitInputEndEndTime.EndTime.Seconds, \"end.end_time.seconds\", 0, \"Represents seconds of UTC time since Unix epoch ...\")\n\n\tWaitCmd.Flags().Int32Var(&WaitInputEndEndTime.EndTime.Nanos, \"end.end_time.nanos\", 0, \"Non-negative fractions of a second at nanosecond...\")\n\n\tWaitCmd.Flags().Int64Var(&WaitInputEndTtl.Ttl.Seconds, \"end.ttl.seconds\", 0, \"Signed seconds of the span of time. Must be from...\")\n\n\tWaitCmd.Flags().Int32Var(&WaitInputEndTtl.Ttl.Nanos, \"end.ttl.nanos\", 0, \"Signed fractions of a second at nanosecond...\")\n\n\tWaitCmd.Flags().Int32Var(&WaitInputResponseError.Error.Code, \"response.error.code\", 0, \"The status code, which should be an enum value of...\")\n\n\tWaitCmd.Flags().StringVar(&WaitInputResponseError.Error.Message, \"response.error.message\", \"\", \"A developer-facing error message, which should be...\")\n\n\tWaitCmd.Flags().StringArrayVar(&WaitInputResponseErrorDetails, \"response.error.details\", []string{}, \"A list of messages that carry the error details. ...\")\n\n\tWaitCmd.Flags().StringVar(&WaitInputResponseSuccess.Success.Content, \"response.success.content\", \"\", \"This content of the result.\")\n\n\tWaitCmd.Flags().StringVar(&WaitInputEnd, \"end\", \"\", \"Choices: end_time, ttl\")\n\n\tWaitCmd.Flags().StringVar(&WaitInputResponse, \"response\", \"\", \"Choices: error, success\")\n\n\tWaitCmd.Flags().StringVar(&WaitFromFile, \"from_file\", \"\", \"Absolute path to JSON file containing request payload\")\n\n\tWaitCmd.Flags().BoolVar(&WaitFollow, \"follow\", false, \"Block until the long running operation completes\")\n\n\tEchoServiceCmd.AddCommand(WaitPollCmd)\n\n\tWaitPollCmd.Flags().BoolVar(&WaitFollow, \"follow\", false, \"Block until the long running operation completes\")\n\n\tWaitPollCmd.Flags().StringVar(&WaitPollOperation, \"operation\", \"\", \"Required. Operation name to poll for\")\n\n\tWaitPollCmd.MarkFlagRequired(\"operation\")\n\n}\n\nvar WaitCmd = &cobra.Command{\n\tUse:   \"wait\",\n\tShort: \"This method will wait for the requested amount of...\",\n\tLong:  \"This method will wait for the requested amount of time and then return.  This method showcases how a client handles a request timeout.\",\n\tPreRun: func(cmd *cobra.Command, args []string) {\n\n\t\tif WaitFromFile == \"\" {\n\n\t\t\tcmd.MarkFlagRequired(\"end\")\n\n\t\t\tcmd.MarkFlagRequired(\"response\")\n\n\t\t}\n\n\t},\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\n\t\tin := os.Stdin\n\t\tif WaitFromFile != \"\" {\n\t\t\tin, err = os.Open(WaitFromFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer in.Close()\n\n\t\t\terr = jsonpb.Unmarshal(in, &WaitInput)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tswitch WaitInputEnd {\n\n\t\t\tcase \"end_time\":\n\t\t\t\tWaitInput.End = &WaitInputEndEndTime\n\n\t\t\tcase \"ttl\":\n\t\t\t\tWaitInput.End = &WaitInputEndTtl\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for end\")\n\t\t\t}\n\n\t\t\tswitch WaitInputResponse {\n\n\t\t\tcase \"error\":\n\t\t\t\tWaitInput.Response = &WaitInputResponseError\n\n\t\t\tcase \"success\":\n\t\t\t\tWaitInput.Response = &WaitInputResponseSuccess\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Missing oneof choice for response\")\n\t\t\t}\n\n\t\t}\n\n\t\t// unmarshal JSON strings into slice of structs\n\t\tfor _, item := range WaitInputResponseErrorDetails {\n\t\t\ttmp := anypb.Any{}\n\t\t\terr = jsonpb.UnmarshalString(item, &tmp)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tWaitInputResponseError.Error.Details = append(WaitInputResponseError.Error.Details, &tmp)\n\t\t}\n\n\t\tif Verbose {\n\t\t\tprintVerboseInput(\"Echo\", \"Wait\", &WaitInput)\n\t\t}\n\t\tresp, err := EchoClient.Wait(ctx, &WaitInput)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif !WaitFollow {\n\t\t\tvar s interface{}\n\t\t\ts = resp.Name()\n\n\t\t\tif OutputJSON {\n\t\t\t\td := make(map[string]string)\n\t\t\t\td[\"operation\"] = resp.Name()\n\t\t\t\ts = d\n\t\t\t}\n\n\t\t\tprintMessage(s)\n\t\t\treturn err\n\t\t}\n\n\t\tresult, err := resp.Wait(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif Verbose {\n\t\t\tfmt.Print(\"Output: \")\n\t\t}\n\t\tprintMessage(result)\n\n\t\treturn err\n\t},\n}\n\nvar WaitPollCmd = &cobra.Command{\n\tUse:   \"poll-wait\",\n\tShort: \"Poll the status of a WaitOperation by name\",\n\tRunE: func(cmd *cobra.Command, args []string) (err error) {\n\t\top := EchoClient.WaitOperation(WaitPollOperation)\n\n\t\tif WaitFollow {\n\t\t\tresp, err := op.Wait(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\t\t\tprintMessage(resp)\n\t\t\treturn err\n\t\t}\n\n\t\tresp, err := op.Poll(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if resp != nil {\n\t\t\tif Verbose {\n\t\t\t\tfmt.Print(\"Output: \")\n\t\t\t}\n\n\t\t\tprintMessage(resp)\n\t\t\treturn\n\t\t}\n\n\t\tif op.Done() {\n\t\t\tfmt.Println(fmt.Sprintf(\"Operation %s is done\", op.Name()))\n\t\t} else {\n\t\t\tfmt.Println(fmt.Sprintf(\"Operation %s not done\", op.Name()))\n\t\t}\n\n\t\treturn err\n\t},\n}\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/googleapis/gapic-showcase\n\nrequire (\n\tcloud.google.com/go/iam v1.9.0\n\tcloud.google.com/go/longrunning v0.11.0\n\tgithub.com/ghodss/yaml v1.0.0\n\tgithub.com/golang/protobuf v1.5.4\n\tgithub.com/google/go-cmp v0.7.0\n\tgithub.com/google/uuid v1.6.0\n\tgithub.com/googleapis/gax-go/v2 v2.22.0\n\tgithub.com/googleapis/grpc-fallback-go v0.1.4\n\tgithub.com/gorilla/mux v1.8.1\n\tgithub.com/iancoleman/strcase v0.3.0\n\tgithub.com/soheilhy/cmux v0.1.5\n\tgithub.com/spf13/cobra v1.10.2\n\tgithub.com/spf13/viper v1.21.0\n\tgolang.org/x/oauth2 v0.36.0\n\tgolang.org/x/sync v0.20.0\n\tgoogle.golang.org/api v0.276.0\n\tgoogle.golang.org/genproto v0.0.0-20260414002931-afd174a4e478\n\tgoogle.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478\n\tgoogle.golang.org/grpc v1.80.0\n\tgoogle.golang.org/protobuf v1.36.11\n)\n\nrequire (\n\tcloud.google.com/go v0.123.0 // indirect\n\tcloud.google.com/go/auth v0.20.0 // indirect\n\tcloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect\n\tcloud.google.com/go/compute/metadata v0.9.0 // indirect\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/felixge/httpsnoop v1.0.4 // indirect\n\tgithub.com/fsnotify/fsnotify v1.9.0 // indirect\n\tgithub.com/go-logr/logr v1.4.3 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/go-viper/mapstructure/v2 v2.4.0 // indirect\n\tgithub.com/google/s2a-go v0.1.9 // indirect\n\tgithub.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.1.0 // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.4 // indirect\n\tgithub.com/sagikazarmark/locafero v0.12.0 // indirect\n\tgithub.com/spf13/afero v1.15.0 // indirect\n\tgithub.com/spf13/cast v1.10.0 // indirect\n\tgithub.com/spf13/pflag v1.0.10 // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgo.opentelemetry.io/auto/sdk v1.2.1 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect\n\tgo.opentelemetry.io/otel v1.43.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.43.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.43.0 // indirect\n\tgo.yaml.in/yaml/v3 v3.0.4 // indirect\n\tgolang.org/x/crypto v0.49.0 // indirect\n\tgolang.org/x/net v0.52.0 // indirect\n\tgolang.org/x/sys v0.42.0 // indirect\n\tgolang.org/x/text v0.35.0 // indirect\n\tgolang.org/x/time v0.15.0 // indirect\n\tgopkg.in/yaml.v2 v2.4.0 // indirect\n)\n\ngo 1.25.0\n\ntoolchain go1.26.2\n"
  },
  {
    "path": "go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE=\ncloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU=\ncloud.google.com/go/auth v0.20.0 h1:kXTssoVb4azsVDoUiF8KvxAqrsQcQtB53DcSgta74CA=\ncloud.google.com/go/auth v0.20.0/go.mod h1:942/yi/itH1SsmpyrbnTMDgGfdy2BUqIKyd0cyYLc5Q=\ncloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=\ncloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=\ncloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=\ncloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=\ncloud.google.com/go/iam v1.9.0 h1:89wyjxT6DL4b5rk/Nk8eBC9DHqf+JiMstrn5IEYxFw4=\ncloud.google.com/go/iam v1.9.0/go.mod h1:KP+nKGugNJW4LcLx1uEZcq1ok5sQHFaQehQNl4QDgV4=\ncloud.google.com/go/longrunning v0.11.0 h1:fE4XVLJQj+gRnw1HrbDyQXXgC0aiqY3wxP7DDU4cWk0=\ncloud.google.com/go/longrunning v0.11.0/go.mod h1:8nqFBPOO1U/XkhWl0I19AMZEphrHi73VNABIpKYaTwM=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w=\ngithub.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA=\ngithub.com/envoyproxy/go-control-plane/envoy v1.36.0 h1:yg/JjO5E7ubRyKX3m07GF3reDNEnfOboJ0QySbH736g=\ngithub.com/envoyproxy/go-control-plane/envoy v1.36.0/go.mod h1:ty89S1YCCVruQAm9OtKeEkQLTb+Lkz0k8v9W0Oxsv98=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/envoyproxy/protoc-gen-validate v1.3.0 h1:TvGH1wof4H33rezVKWSpqKz5NXWg5VPuZ0uONDT6eb4=\ngithub.com/envoyproxy/protoc-gen-validate v1.3.0/go.mod h1:HvYl7zwPa5mffgyeTUHA9zHIH36nmrm7oCbo4YKoSWA=\ngithub.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=\ngithub.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=\ngithub.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=\ngithub.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=\ngithub.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=\ngithub.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=\ngithub.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=\ngithub.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.14 h1:yh8ncqsbUY4shRD5dA6RlzjJaT4hi3kII+zYw8wmLb8=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.14/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg=\ngithub.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU5vlZD4=\ngithub.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY=\ngithub.com/googleapis/grpc-fallback-go v0.1.4 h1:tEDqZnKGKQpYrmEuu3VVBTw3pijHJsKz/Lu2U0L9AV0=\ngithub.com/googleapis/grpc-fallback-go v0.1.4/go.mod h1:R7P0bK21nlCMc4hdtiwmXMzKXThllMim0cUZvClg6XQ=\ngithub.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=\ngithub.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=\ngithub.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=\ngithub.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=\ngithub.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=\ngithub.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=\ngithub.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=\ngithub.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=\ngithub.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=\ngithub.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=\ngithub.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4=\ngithub.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI=\ngithub.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=\ngithub.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=\ngithub.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=\ngithub.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=\ngithub.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=\ngithub.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=\ngithub.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=\ngithub.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=\ngithub.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=\ngithub.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=\ngithub.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=\ngithub.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=\ngo.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=\ngo.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=\ngo.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=\ngo.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=\ngo.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=\ngo.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=\ngo.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=\ngo.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=\ngo.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=\ngo.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=\ngo.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=\ngo.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=\ngo.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=\ngo.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4=\ngolang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0=\ngolang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=\ngolang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=\ngolang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=\ngolang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8=\ngolang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=\ngolang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=\ngolang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=\ngonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=\ngoogle.golang.org/api v0.276.0 h1:nVArUtfLEihtW+b0DdcqRGK1xoEm2+ltAihyztq7MKY=\ngoogle.golang.org/api v0.276.0/go.mod h1:Fnag/EWUPIcJXuIkP1pjoTgS5vdxlk3eeemL7Do6bvw=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20201008135153-289734e2e40c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20260414002931-afd174a4e478 h1:aLsVTW0lZ8+IY5u/ERjZSCvAmhuR7slKzyha3YikDNA=\ngoogle.golang.org/genproto v0.0.0-20260414002931-afd174a4e478/go.mod h1:YJAzKjfHIUHb9T+bfu8L7mthAp7VVXQBUs1PLdBWS7M=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 h1:yQugLulqltosq0B/f8l4w9VryjV+N/5gcW0jQ3N8Qec=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478/go.mod h1:C6ADNqOxbgdUUeRTU+LCHDPB9ttAMCTff6auwCVa4uc=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 h1:RmoJA1ujG+/lRGNfUnOMfhCy5EipVMyvUE+KNbPbTlw=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.33.0/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=\ngoogle.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=\ngoogle.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"extends\": [\n    \"config:base\",\n    \":disableDependencyDashboard\",\n    \"group:all\",\n    \"schedule:weekly\",\n    \":semanticCommitTypeAll(chore)\"\n  ],\n  \"pinVersions\": false,\n  \"bazel\": {\n    \"managerBranchPrefix\": \"bazel-\"\n  },\n  \"packageRules\": [\n    {\n      \"matchPackagePatterns\": [\n        \"com_google_protobuf\"\n      ],\n      \"enabled\": false\n    }\n  ],\n  \"golang\": {\n    \"postUpdateOptions\": [\n      \"gomodTidy\"\n    ],\n    \"managerBranchPrefix\": \"golang-\"\n  },\n  \"ignoreDeps\": [\n    \"google.golang.org/grpc\"\n  ],\n  \"rebaseWhen\": \"behind-base-branch\",\n  \"labels\": [\n    \"automerge\"\n  ],\n  \"timezone\": \"America/Los_Angeles\"\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/BUILD.bazel",
    "content": "# Copyright 2021 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#      https://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\n\"\"\"\nProvides proto_library target\nExports grpc service config\n\"\"\"\nload (\"@rules_proto//proto:defs.bzl\",\n  \"proto_library\")\n\n# This is an API workspace, having public visibility by default makes perfect sense.\npackage(default_visibility = [\"//visibility:public\"])\nexports_files(glob([\"*.json\"]) + glob([\"*.yaml\"]))\n\n##\n# the proto files wrapped with dependencies\n#\nproto_library(\n  name = \"showcase_proto\",\n  srcs = [\":compliance.proto\", \":echo.proto\", \":identity.proto\", \":messaging.proto\", \":rest_error.proto\", \":sequence.proto\", \":testing.proto\" ],\n  deps = [\n    \"@com_google_googleapis//google/api:annotations_proto\",\n    \"@com_google_googleapis//google/api:client_proto\",\n    \"@com_google_googleapis//google/api:field_behavior_proto\",\n    \"@com_google_googleapis//google/api:field_info_proto\",\n    \"@com_google_googleapis//google/api:resource_proto\",\n    \"@com_google_googleapis//google/api:routing_proto\",\n    \"@com_google_googleapis//google/longrunning:operations_proto\",\n    \"@com_google_googleapis//google/rpc:code_proto\",\n    \"@com_google_googleapis//google/rpc:error_details_proto\",\n    \"@com_google_googleapis//google/rpc:status_proto\",\n    \"@com_google_protobuf//:any_proto\",\n    \"@com_google_protobuf//:duration_proto\",\n    \"@com_google_protobuf//:empty_proto\",\n    \"@com_google_protobuf//:field_mask_proto\",\n    \"@com_google_protobuf//:timestamp_proto\",\n  ]\n)\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/compliance.proto",
    "content": "// Copyright 2021 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//     https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST format\n// correctly for various types of HTTP annotations, but it also includes verifying that unknown (numeric) enums received by clients can be round-tripped\n// correctly.\nservice Compliance {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n\n  // This method echoes the ComplianceData request. This method exercises\n  // sending the entire request object in the REST body.\n  rpc RepeatDataBody(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/repeat:body\"\n      body: \"*\"\n    };\n  }\n\n  // This method echoes the ComplianceData request. This method exercises\n  // sending the a message-type field in the REST body. Per AIP-127, only\n  // top-level, non-repeated fields can be sent this way.\n  rpc RepeatDataBodyInfo(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/repeat:bodyinfo\"\n      body: \"info\"\n    };\n  }\n\n  // This method echoes the ComplianceData request. This method exercises\n  // sending all request fields as query parameters.\n  rpc RepeatDataQuery(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/repeat:query\"\n    };\n  }\n\n  // This method echoes the ComplianceData request. This method exercises\n  // sending some parameters as \"simple\" path variables (i.e., of the form\n  // \"/bar/{foo}\" rather than \"/{foo=bar/*}\"), and the rest as query parameters.\n  rpc RepeatDataSimplePath(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath\"\n    };\n  }\n\n  // Same as RepeatDataSimplePath, but with a path resource.\n  rpc RepeatDataPathResource(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\"\n      additional_bindings {\n        get: \"/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource\"\n      }\n    };\n  }\n\n  // Same as RepeatDataSimplePath, but with a trailing resource.\n  rpc RepeatDataPathTrailingResource(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource\"\n    };\n  }\n\n  // This method echoes the ComplianceData request, using the HTTP PUT method.\n  rpc RepeatDataBodyPut(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      put: \"/v1beta1/repeat:bodyput\"\n      body: \"*\"\n    };\n  }\n\n  // This method echoes the ComplianceData request, using the HTTP PATCH method.\n  rpc RepeatDataBodyPatch(RepeatRequest) returns (RepeatResponse) {\n    option (google.api.http) = {\n      patch: \"/v1beta1/repeat:bodypatch\"\n      body: \"*\"\n    };\n  }\n\n  // This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the\n  // .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the\n  // response from this RPC as the request to VerifyEnum()\n  //\n  // The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for\n  // VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.\n  rpc GetEnum(EnumRequest) returns (EnumResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/compliance/enum\"\n    };\n  }\n\n  // This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()\n  // verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds\n  // with the same EnumResponse; otherwise, the RPC errors.\n  //\n  // This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,\n  // although they are not guaranteed to be the same across separate Showcase server runs.\n  rpc VerifyEnum(EnumResponse) returns (EnumResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/compliance/enum\"\n    };\n  }\n\n}\n\nmessage RepeatRequest {\n  string name = 1;\n  ComplianceData info = 2;\n\n  // If true, the server will verify that the received request matches\n  // the request with the same name in the compliance test suite.\n  bool server_verify = 3;\n\n  // The URI template this request is expected to be bound to server-side.\n  optional string intended_binding_uri = 10;\n\n  // Some top level fields, to test that these are encoded correctly\n  // in query params.\n  int32 f_int32 = 4;\n  int64 f_int64 = 5;\n  double f_double = 6;\n\n  optional int32 p_int32 = 7;\n  optional int64 p_int64 = 8;\n  optional double p_double = 9;\n}\n\nmessage RepeatResponse {\n  RepeatRequest request = 1;\n\n  // The URI template the request was bound to server-side.\n  string binding_uri = 2;\n}\n\n// ComplianceSuite contains a set of requests that microgenerators should issue\n// over REST to the Compliance service to test their gRPC-to-REST transcoding\n// implementation.\nmessage ComplianceSuite {\n  repeated ComplianceGroup group = 1;\n}\n\n// ComplianceGroups encapsulates a group of RPC requests to the Compliance\n// server: one request for each combination of elements of `rpcs` and of\n// `requests`.\nmessage ComplianceGroup {\n  string name = 1;\n  repeated string rpcs = 2;\n  repeated RepeatRequest requests = 3;\n}\n\n// ComplianceData is a message used for testing REST transcoding of\n// different data types.\nmessage ComplianceData {\n  enum LifeKingdom {\n    LIFE_KINGDOM_UNSPECIFIED = 0;\n    ARCHAEBACTERIA = 1;\n    EUBACTERIA = 2;\n    PROTISTA = 3;\n    FUNGI = 4;\n    PLANTAE = 5;\n    ANIMALIA = 6;\n}\n  // scalar types\n\n  string f_string = 1;\n\n  int32 f_int32 = 2;\n  sint32 f_sint32 = 3;\n  sfixed32 f_sfixed32 = 4;\n\n  uint32 f_uint32 = 5;\n  fixed32 f_fixed32 = 6;\n\n  int64 f_int64 = 7;\n  sint64 f_sint64 = 8;\n  sfixed64 f_sfixed64 = 9;\n\n  uint64 f_uint64 = 10;\n  fixed64 f_fixed64 = 11;\n\n  double f_double = 12;\n  float f_float = 13;\n\n  bool f_bool = 14;\n\n  bytes f_bytes = 15;\n\n  LifeKingdom f_kingdom = 22;\n\n  ComplianceDataChild f_child = 16;\n\n  // optional fields\n\n  optional string p_string = 17;\n\n  optional int32 p_int32 = 18;\n  optional sint32 p_sint32 = 39;\n  optional sfixed32 p_sfixed32 = 40;\n\n  optional uint32 p_uint32 = 41;\n  optional fixed32 p_fixed32 = 42;\n\n  optional int64 p_int64 = 43;\n  optional sint64 p_sint64 = 44;\n  optional sfixed64 p_sfixed64 = 45;\n\n  optional uint64 p_uint64 = 46;\n  optional fixed64 p_fixed64 = 47;\n\n  optional float p_float = 48;\n  optional double p_double = 19;\n\n  optional bool p_bool = 20;\n\n  // The proto compiler seems to misgenerate optional bytes fields.\n  // The generated code looks like:\n  // ```\n  // if cmd.Flags().Changed(\"info.p_bytes\") {\n  // \tRepeatDataBodyInfoInput.Info.PBytes = &repeatDataBodyInfoInputInfoPBytes\n  // }\n  // ```\n  // The dereference of `&repeatDataBodyInfoInputInfoPBytes` is incorrect since\n  // `repeatDataBodyInfoInputInfoPBytes` is already a `byte[]`\n  // optional bytes p_bytes = 49;\n\n  optional LifeKingdom p_kingdom = 23;\n  optional ComplianceDataChild p_child = 21;\n}\n\nmessage ComplianceDataChild {\n  string f_string = 1;\n  float f_float = 2;\n  double f_double = 3;\n  bool f_bool = 4;\n  Continent f_continent = 11;\n  ComplianceDataGrandchild f_child = 5;\n\n  optional string p_string = 6;\n  optional float p_float = 7;\n  optional double p_double = 8;\n  optional bool p_bool = 9;\n  Continent p_continent = 12;\n  optional ComplianceDataGrandchild p_child = 10;\n}\n\nmessage ComplianceDataGrandchild {\n  string f_string = 1;\n  double f_double = 2;\n  bool f_bool = 3;\n}\n\nenum Continent {\n  CONTINENT_UNSPECIFIED = 0;\n  AFRICA = 1;\n  AMERICA = 2;\n  ANTARTICA = 3;\n  AUSTRALIA = 4;\n  EUROPE = 5;\n}\n\nmessage EnumRequest {\n  // Whether the client is requesting a new, unknown enum value or a known enum value already declared in this proto file.\n  bool unknown_enum = 1;\n}\n\nmessage EnumResponse {\n  // The original request for a known or unknown enum from the server.\n  EnumRequest request = 1;\n\n  // The actual enum the server provided.\n  Continent continent = 2;\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/echo.proto",
    "content": "// Copyright 2018 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//     https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\nimport \"google/api/field_behavior.proto\";\nimport \"google/api/field_info.proto\";\nimport \"google/api/routing.proto\";\nimport \"google/longrunning/operations.proto\";\nimport \"google/protobuf/any.proto\";\nimport \"google/protobuf/duration.proto\";\nimport \"google/protobuf/timestamp.proto\";\nimport \"google/rpc/status.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// This service is used showcase the four main types of rpcs - unary, server\n// side streaming, client side streaming, and bidirectional streaming. This\n// service also exposes methods that explicitly implement server delay, and\n// paginated calls. Set the 'showcase-trailer' metadata key on any method\n// to have the values echoed in the response trailers. Set the\n// 'x-goog-request-params' metadata key on any method to have the values\n// echoed in the response headers.\nservice Echo {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n  // See https://github.com/aip-dev/google.aip.dev/pull/1331\n  option (google.api.api_version) = \"v1_20240408\";\n\n  // This method simply echoes the request. This method showcases unary RPCs.\n  rpc Echo(EchoRequest) returns (EchoResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:echo\"\n      body: \"*\"\n    };\n    option (google.api.routing) = {\n      routing_parameters{\n        field: \"header\"\n      }\n      routing_parameters{\n        field: \"header\"\n        path_template: \"{routing_id=**}\"\n      }\n      routing_parameters{\n        field: \"header\"\n        path_template: \"{table_name=regions/*/zones/*/**}\"\n      }\n      routing_parameters{\n        field: \"header\"\n        path_template: \"{super_id=projects/*}/**\"\n      }\n      routing_parameters{\n        field: \"header\"\n        path_template: \"{table_name=projects/*/instances/*/**}\"\n      }\n      routing_parameters{\n        field: \"header\"\n        path_template: \"projects/*/{instance_id=instances/*}/**\"\n      }\n      routing_parameters{\n        field: \"other_header\"\n        path_template: \"{baz=**}\"\n      }\n      routing_parameters{\n        field: \"other_header\"\n        path_template: \"{qux=projects/*}/**\"\n      }\n    };\n  }\n\n  // This method returns error details in a repeated \"google.protobuf.Any\"\n  // field. This method showcases handling errors thus encoded, particularly\n  // over REST transport. Note that GAPICs only allow the type\n  // \"google.protobuf.Any\" for field paths ending in \"error.details\", and, at\n  // run-time, the actual types for these fields must be one of the types in\n  // google/rpc/error_details.proto.\n  rpc EchoErrorDetails(EchoErrorDetailsRequest) returns (EchoErrorDetailsResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:error-details\"\n      body: \"*\"\n    };\n  }\n\n  // This method always fails with a gRPC \"Aborted\" error status that contains\n  // multiple error details.  These include one instance of each of the standard\n  // ones in error_details.proto\n  // (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto)\n  // plus a custom, Showcase-defined PoetryError. The intent of this RPC is to\n  // verify that GAPICs can process these various error details and surface them\n  // to the user in an idiomatic form.\n  rpc FailEchoWithDetails(FailEchoWithDetailsRequest) returns (FailEchoWithDetailsResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:failWithDetails\"\n      body: \"*\"\n    };\n  }\n\n  // This method splits the given content into words and will pass each word back\n  // through the stream. This method showcases server-side streaming RPCs.\n  rpc Expand(ExpandRequest) returns (stream EchoResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:expand\"\n      body: \"*\"\n    };\n    // TODO(landrito): change this to be `fields: [\"content\", \"error\"]` once\n    // github.com/dcodeIO/protobuf.js/issues/1094 has been resolved.\n    option (google.api.method_signature) = \"content,error\";\n  }\n\n  // This method will collect the words given to it. When the stream is closed\n  // by the client, this method will return the a concatenation of the strings\n  // passed to it. This method showcases client-side streaming RPCs.\n  rpc Collect(stream EchoRequest) returns (EchoResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:collect\"\n      body: \"*\"\n    };\n  }\n\n  // This method, upon receiving a request on the stream, will pass the same\n  // content back on the stream. This method showcases bidirectional\n  // streaming RPCs.\n  rpc Chat(stream EchoRequest) returns (stream EchoResponse);\n\n  // This is similar to the Expand method but instead of returning a stream of\n  // expanded words, this method returns a paged list of expanded words.\n  rpc PagedExpand(PagedExpandRequest) returns (PagedExpandResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:pagedExpand\"\n      body: \"*\"\n    };\n  }\n\n  // This is similar to the PagedExpand except that it uses\n  // max_results instead of page_size, as some legacy APIs still\n  // do. New APIs should NOT use this pattern.\n  rpc PagedExpandLegacy(PagedExpandLegacyRequest) returns (PagedExpandResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:pagedExpandLegacy\"\n      body: \"*\"\n    };\n  }\n\n  // This method returns a map containing lists of words that appear in the input, keyed by their\n  // initial character. The only words returned are the ones included in the current page,\n  // as determined by page_token and page_size, which both refer to the word indices in the\n  // input. This paging result consisting of a map of lists is a pattern used by some legacy\n  // APIs. New APIs should NOT use this pattern.\n  rpc PagedExpandLegacyMapped(PagedExpandRequest) returns (PagedExpandLegacyMappedResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:pagedExpandLegacyMapped\"\n      body: \"*\"\n    };\n  }\n\n  // This method will wait for the requested amount of time and then return.\n  // This method showcases how a client handles a request timeout.\n  rpc Wait(WaitRequest) returns (google.longrunning.Operation) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:wait\"\n      body: \"*\"\n    };\n    option (google.longrunning.operation_info) = {\n      response_type: \"WaitResponse\"\n      metadata_type: \"WaitMetadata\"\n    };\n  }\n\n  // This method will block (wait) for the requested amount of time\n  // and then return the response or error.\n  // This method showcases how a client handles delays or retries.\n  rpc Block(BlockRequest) returns (BlockResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/echo:block\"\n      body: \"*\"\n    };\n  };\n}\n\n// A severity enum used to test enum capabilities in GAPIC surfaces.\nenum Severity {\n  UNNECESSARY = 0;\n  NECESSARY = 1;\n  URGENT = 2;\n  CRITICAL = 3;\n}\n\n\n// The request message used for the Echo, Collect and Chat methods.\n// If content or opt are set in this message then the request will succeed.\n// If status is set in this message then the status will be returned as an\n// error.\nmessage EchoRequest {\n  oneof response {\n    // The content to be echoed by the server.\n    string content = 1;\n\n    // The error to be thrown by the server.\n    google.rpc.Status error = 2;\n  }\n\n  // The severity to be echoed by the server.\n  Severity severity = 3;\n\n  // Optional. This field can be set to test the routing annotation on the Echo method.\n  string header = 4;\n\n  // Optional. This field can be set to test the routing annotation on the Echo method.\n  string other_header = 5;\n\n  // To facilitate testing of https://google.aip.dev/client-libraries/4235\n  string request_id = 7 [\n    (google.api.field_info).format = UUID4\n  ];\n\n  // To facilitate testing of https://google.aip.dev/client-libraries/4235\n  optional string other_request_id = 8 [\n    (google.api.field_info).format = UUID4\n  ];\n}\n\n// The response message for the Echo methods.\nmessage EchoResponse {\n  // The content specified in the request.\n  string content = 1;\n\n  // The severity specified in the request.\n  Severity severity = 2;\n\n  // The request ID specified or autopopulated in the request.\n  string request_id = 3;\n\n  // The other request ID specified or autopopulated in the request.\n  string other_request_id = 4;\n}\n\n// The request message used for the EchoErrorDetails method.\nmessage EchoErrorDetailsRequest {\n  // Content to return in a singular `*.error.details` field of type\n  // `google.protobuf.Any`\n  string single_detail_text = 1;\n\n  // Content to return in a repeated `*.error.details` field of type\n  // `google.protobuf.Any`\n  repeated string multi_detail_text = 2;\n}\n\n// The response message used for the EchoErrorDetails method.\nmessage EchoErrorDetailsResponse {\n\n  message SingleDetail {\n    ErrorWithSingleDetail error = 1;\n  }\n\n  message MultipleDetails {\n    ErrorWithMultipleDetails error = 1;\n  }\n\n  SingleDetail single_detail = 1;\n  MultipleDetails multiple_details = 2;\n}\n\nmessage ErrorWithSingleDetail {\n  google.protobuf.Any details = 1;\n}\n\nmessage ErrorWithMultipleDetails {\n  repeated google.protobuf.Any details = 1;\n}\n\n// The custom error detail to be included in the error response from the\n// FailEchoWithDetails method. Client libraries should be able to\n// surface this custom error detail.\nmessage PoetryError {\n  string poem = 1;\n}\n\n// The request message used for the FailEchoWithDetails method.\nmessage FailEchoWithDetailsRequest {\n  // Optional message to echo back in the PoetryError. If empty, a value will be\n  // provided.\n  string message = 1;\n}\n\n// The response message declared (but never used) for the FailEchoWithDetails\n// method.\nmessage FailEchoWithDetailsResponse {}\n\n// The request message for the Expand method.\nmessage ExpandRequest {\n  // The content that will be split into words and returned on the stream.\n  string content = 1;\n\n  // The error that is thrown after all words are sent on the stream.\n  google.rpc.Status error = 2;\n\n  //The wait time between each server streaming messages\n  google.protobuf.Duration stream_wait_time = 3;\n}\n\n// The request for the PagedExpand method.\nmessage PagedExpandRequest {\n  // The string to expand.\n  string content = 1 [(google.api.field_behavior) = REQUIRED];\n\n  // The number of words to returned in each page.\n  int32 page_size = 2;\n\n  // The position of the page to be returned.\n  string page_token = 3;\n}\n\n// The request for the PagedExpandLegacy method.  This is a pattern used by some legacy APIs. New\n// APIs should NOT use this pattern, but rather something like PagedExpandRequest which conforms to\n// aip.dev/158.\nmessage PagedExpandLegacyRequest {\n  // The string to expand.\n  string content = 1 [(google.api.field_behavior) = REQUIRED];\n\n  // The number of words to returned in each page.\n  // (-- aip.dev/not-precedent: This is a legacy, non-standard pattern that\n  //     violates aip.dev/158. Ordinarily, this should be page_size. --)\n  int32 max_results = 2;\n\n  // The position of the page to be returned.\n  string page_token = 3;\n}\n\n// The response for the PagedExpand method.\nmessage PagedExpandResponse {\n  // The words that were expanded.\n  repeated EchoResponse responses = 1;\n\n  // The next page token.\n  string next_page_token = 2;\n}\n\n// A list of words.\nmessage PagedExpandResponseList {\n  repeated string words = 1;\n}\n\nmessage PagedExpandLegacyMappedResponse {\n  // The words that were expanded, indexed by their initial character.\n  // (-- aip.dev/not-precedent: This is a legacy, non-standard pattern that violates\n  //     aip.dev/158. Ordinarily, this should be a `repeated` field, as in PagedExpandResponse. --)\n  map<string, PagedExpandResponseList> alphabetized = 1;\n\n  // The next page token.\n  string next_page_token = 2;\n}\n\n// The request for Wait method.\nmessage WaitRequest {\n  oneof end {\n    // The time that this operation will complete.\n    google.protobuf.Timestamp end_time = 1;\n\n    // The duration of this operation.\n    google.protobuf.Duration ttl = 4;\n  }\n\n  oneof response {\n    // The error that will be returned by the server. If this code is specified\n    // to be the OK rpc code, an empty response will be returned.\n    google.rpc.Status error = 2;\n\n    // The response to be returned on operation completion.\n    WaitResponse success = 3;\n  }\n}\n\n// The result of the Wait operation.\nmessage WaitResponse {\n  // This content of the result.\n  string content = 1;\n}\n\n// The metadata for Wait operation.\nmessage WaitMetadata {\n  // The time that this operation will complete.\n  google.protobuf.Timestamp end_time =1;\n}\n\n// The request for Block method.\nmessage BlockRequest {\n  // The amount of time to block before returning a response.\n  google.protobuf.Duration response_delay = 1;\n\n  oneof response {\n    // The error that will be returned by the server. If this code is specified\n    // to be the OK rpc code, an empty response will be returned.\n    google.rpc.Status error = 2;\n\n    // The response to be returned that will signify successful method call.\n    BlockResponse success = 3;\n  }\n}\n\n// The response for Block method.\nmessage BlockResponse {\n  // This content can contain anything, the server will not depend on a value\n  // here.\n  string content = 1;\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/identity.proto",
    "content": "// Copyright 2018 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//     https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\nimport \"google/api/field_behavior.proto\";\nimport \"google/api/resource.proto\";\nimport \"google/protobuf/empty.proto\";\nimport \"google/protobuf/field_mask.proto\";\nimport \"google/protobuf/timestamp.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// A simple identity service.\nservice Identity {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n\n  // Creates a user.\n  rpc CreateUser(CreateUserRequest) returns (User) {\n    option (google.api.http) = {\n      post: \"/v1beta1/users\"\n      body: \"*\"\n    };\n    option (google.api.method_signature) = \"user.display_name,user.email\";\n    option (google.api.method_signature) =\n        \"user.display_name,user.email,user.age,user.nickname,user.enable_notifications,user.height_feet\";\n  }\n\n  // Retrieves the User with the given uri.\n  rpc GetUser(GetUserRequest) returns (User) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=users/*}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Updates a user.\n  rpc UpdateUser(UpdateUserRequest) returns (User) {\n    option (google.api.http) = {\n      patch: \"/v1beta1/{user.name=users/*}\"\n      body: \"user\"\n    };\n  }\n\n  // Deletes a user, their profile, and all of their authored messages.\n  rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      delete: \"/v1beta1/{name=users/*}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Lists all users.\n  rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/users\"\n    };\n  }\n}\n\n// A user.\nmessage User {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/User\"\n    pattern: \"users/{user}\"\n  };\n\n  // The resource name of the user.\n  string name = 1;\n\n  // The display_name of the user.\n  string display_name = 2 [(google.api.field_behavior) = REQUIRED];\n\n  // The email address of the user.\n  string email = 3 [(google.api.field_behavior) = REQUIRED];\n\n  // The timestamp at which the user was created.\n  google.protobuf.Timestamp create_time = 4\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // The latest timestamp at which the user was updated.\n  google.protobuf.Timestamp update_time = 5\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // The age of the user in years.\n  optional int32 age = 6;\n\n  // The height of the user in feet.\n  optional double height_feet = 7;\n\n  // The nickname of the user.\n  //\n  // (-- aip.dev/not-precedent: An empty string is a valid nickname.\n  //     Ordinarily, proto3_optional should not be used on a `string` field. --)\n  optional string nickname = 8;\n\n  // Enables the receiving of notifications. The default is true if unset.\n  //\n  // (-- aip.dev/not-precedent: The default for the feature is true.\n  //     Ordinarily, the default for a `bool` field should be false. --)\n  optional bool enable_notifications = 9;\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\CreateUser\n// method.\nmessage CreateUserRequest {\n  // The user to create.\n  User user = 1;\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\GetUser\n// method.\nmessage GetUserRequest {\n  // The resource name of the requested user.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/User\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\UpdateUser\n// method.\nmessage UpdateUserRequest {\n  // The user to update.\n  User user = 1;\n\n  // The field mask to determine which fields are to be updated. If empty, the\n  // server will assume all fields are to be updated.\n  google.protobuf.FieldMask update_mask = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\DeleteUser\n// method.\nmessage DeleteUserRequest {\n  // The resource name of the user to delete.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/User\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\ListUsers\n// method.\nmessage ListUsersRequest {\n  // The maximum number of users to return. Server may return fewer users\n  // than requested. If unspecified, server will pick an appropriate default.\n  int32 page_size = 1;\n\n  // The value of google.showcase.v1beta1.ListUsersResponse.next_page_token\n  // returned from the previous call to\n  // `google.showcase.v1beta1.Identity\\ListUsers` method.\n  string page_token = 2;\n}\n\n// The response message for the google.showcase.v1beta1.Identity\\ListUsers\n// method.\nmessage ListUsersResponse {\n  // The list of users.\n  repeated User users = 1;\n\n  // A token to retrieve next page of results.\n  // Pass this value in ListUsersRequest.page_token field in the subsequent\n  // call to `google.showcase.v1beta1.Message\\ListUsers` method to retrieve the\n  // next page of results.\n  string next_page_token = 2;\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/messaging.proto",
    "content": "// Copyright 2018 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//     https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\nimport \"google/api/field_behavior.proto\";\nimport \"google/api/resource.proto\";\nimport \"google/longrunning/operations.proto\";\nimport \"google/protobuf/empty.proto\";\nimport \"google/protobuf/field_mask.proto\";\nimport \"google/protobuf/timestamp.proto\";\nimport \"google/rpc/error_details.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// A simple messaging service that implements chat rooms and profile posts.\n//\n// This messaging service showcases the features that API clients\n// generated by gapic-generators implement.\nservice Messaging {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n\n  // Creates a room.\n  rpc CreateRoom(CreateRoomRequest) returns (Room) {\n    option (google.api.http) = {\n      post: \"/v1beta1/rooms\"\n      body: \"*\"\n    };\n    option (google.api.method_signature) = \"room.display_name,room.description\";\n  }\n\n  // Retrieves the Room with the given resource name.\n  rpc GetRoom(GetRoomRequest) returns (Room) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=rooms/*}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Updates a room.\n  rpc UpdateRoom(UpdateRoomRequest) returns (Room) {\n    option (google.api.http) = {\n      patch: \"/v1beta1/{room.name=rooms/*}\"\n      body: \"room\"\n    };\n  }\n\n  // Deletes a room and all of its blurbs.\n  rpc DeleteRoom(DeleteRoomRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      delete: \"/v1beta1/{name=rooms/*}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Lists all chat rooms.\n  rpc ListRooms(ListRoomsRequest) returns (ListRoomsResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/rooms\"\n    };\n  }\n\n  // Creates a blurb. If the parent is a room, the blurb is understood to be a\n  // message in that room. If the parent is a profile, the blurb is understood\n  // to be a post on the profile.\n  rpc CreateBlurb(CreateBlurbRequest) returns (Blurb) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{parent=rooms/*}/blurbs\"\n      body: \"*\"\n      additional_bindings: {\n        post: \"/v1beta1/{parent=users/*/profile}/blurbs\"\n        body: \"*\"\n      }\n    };\n    option (google.api.method_signature) = \"parent,blurb.user,blurb.text\";\n    option (google.api.method_signature) = \"parent,blurb.user,blurb.image\";\n  }\n\n  // Retrieves the Blurb with the given resource name.\n  rpc GetBlurb(GetBlurbRequest) returns (Blurb) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=rooms/*/blurbs/*}\"\n      additional_bindings: { get: \"/v1beta1/{name=users/*/profile/blurbs/*}\" }\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Updates a blurb.\n  rpc UpdateBlurb(UpdateBlurbRequest) returns (Blurb) {\n    option (google.api.http) = {\n      patch: \"/v1beta1/{blurb.name=rooms/*/blurbs/*}\"\n      body: \"blurb\"\n      additional_bindings: {\n        patch: \"/v1beta1/{blurb.name=users/*/profile/blurbs/*}\"\n        body: \"blurb\"\n      }\n    };\n  }\n\n  // Deletes a blurb.\n  rpc DeleteBlurb(DeleteBlurbRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      delete: \"/v1beta1/{name=rooms/*/blurbs/*}\"\n      additional_bindings: {\n        delete: \"/v1beta1/{name=users/*/profile/blurbs/*}\"\n      }\n    };\n    option (google.api.method_signature) = \"name\";\n  }\n\n  // Lists blurbs for a specific chat room or user profile depending on the\n  // parent resource name.\n  rpc ListBlurbs(ListBlurbsRequest) returns (ListBlurbsResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{parent=rooms/*}/blurbs\"\n      additional_bindings: { get: \"/v1beta1/{parent=users/*/profile}/blurbs\" }\n    };\n    option (google.api.method_signature) = \"parent\";\n  }\n\n  // This method searches through all blurbs across all rooms and profiles\n  // for blurbs containing to words found in the query. Only posts that\n  // contain an exact match of a queried word will be returned.\n  rpc SearchBlurbs(SearchBlurbsRequest) returns (google.longrunning.Operation) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{parent=rooms/*}/blurbs:search\"\n      body: \"*\"\n      additional_bindings: {\n        post: \"/v1beta1/{parent=users/*/profile}/blurbs:search\"\n      }\n    };\n    option (google.longrunning.operation_info) = {\n      response_type: \"SearchBlurbsResponse\"\n      metadata_type: \"SearchBlurbsMetadata\"\n    };\n    option (google.api.method_signature) = \"parent,query\";\n  }\n\n  // This returns a stream that emits the blurbs that are created for a\n  // particular chat room or user profile.\n  rpc StreamBlurbs(StreamBlurbsRequest) returns (stream StreamBlurbsResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{name=rooms/*}/blurbs:stream\"\n      body: \"*\"\n      additional_bindings: {\n        post: \"/v1beta1/{name=users/*/profile}/blurbs:stream\"\n        body: \"*\"\n      }\n    };\n  }\n\n  // This is a stream to create multiple blurbs. If an invalid blurb is\n  // requested to be created, the stream will close with an error.\n  rpc SendBlurbs(stream CreateBlurbRequest) returns (SendBlurbsResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{parent=rooms/*}/blurbs:send\"\n      body: \"*\"\n      additional_bindings: {\n        post: \"/v1beta1/{parent=users/*/profile}/blurbs:send\"\n        body: \"*\"\n      }\n    };\n  }\n\n  // This method starts a bidirectional stream that receives all blurbs that\n  // are being created after the stream has started and sends requests to create\n  // blurbs. If an invalid blurb is requested to be created, the stream will\n  // close with an error.\n  rpc Connect(stream ConnectRequest) returns (stream StreamBlurbsResponse);\n}\n\n// A chat room.\nmessage Room {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/Room\"\n    pattern: \"rooms/{room}\"\n  };\n\n  // The resource name of the chat room.\n  string name = 1;\n\n  // The human readable name of the chat room.\n  string display_name = 2 [(google.api.field_behavior) = REQUIRED];\n\n  // The description of the chat room.\n  string description = 3;\n\n  // The timestamp at which the room was created.\n  google.protobuf.Timestamp create_time = 4\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // The latest timestamp at which the room was updated.\n  google.protobuf.Timestamp update_time = 5\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\CreateRoom\n// method.\nmessage CreateRoomRequest {\n  // The room to create.\n  Room room = 1;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\GetRoom\n// method.\nmessage GetRoomRequest {\n  // The resource name of the requested room.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Room\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\UpdateRoom\n// method.\nmessage UpdateRoomRequest {\n  // The room to update.\n  Room room = 1;\n\n  // The field mask to determine which fields are to be updated. If empty, the\n  // server will assume all fields are to be updated.\n  google.protobuf.FieldMask update_mask = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\DeleteRoom\n// method.\nmessage DeleteRoomRequest {\n  // The resource name of the requested room.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Room\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\ListRooms\n// method.\nmessage ListRoomsRequest {\n  // The maximum number of rooms return. Server may return fewer rooms\n  // than requested. If unspecified, server will pick an appropriate default.\n  int32 page_size = 1;\n\n  // The value of google.showcase.v1beta1.ListRoomsResponse.next_page_token\n  // returned from the previous call to\n  // `google.showcase.v1beta1.Messaging\\ListRooms` method.\n  string page_token = 2;\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\ListRooms\n// method.\nmessage ListRoomsResponse {\n  // The list of rooms.\n  repeated Room rooms = 1;\n\n  // A token to retrieve next page of results.\n  // Pass this value in ListRoomsRequest.page_token field in the subsequent\n  // call to `google.showcase.v1beta1.Messaging\\ListRooms` method to retrieve\n  // the next page of results.\n  string next_page_token = 2;\n}\n\n// This protocol buffer message represents a blurb sent to a chat room or\n// posted on a user profile.\nmessage Blurb {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/Blurb\"\n    pattern: \"users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}\"\n    pattern: \"users/{user}/profile/blurbs/{blurb}\"\n    pattern: \"rooms/{room}/blurbs/{blurb}\"\n    pattern: \"rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}\"\n  };\n\n  // The resource name of the chat room.\n  string name = 1;\n\n  // The resource name of the blurb's author.\n  string user = 2 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/User\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n\n  oneof content {\n    // The textual content of this blurb.\n    string text = 3;\n\n    // The image content of this blurb.\n    bytes image = 4;\n  }\n\n  // The timestamp at which the blurb was created.\n  google.protobuf.Timestamp create_time = 5\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // The latest timestamp at which the blurb was updated.\n  google.protobuf.Timestamp update_time = 6\n      [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // (-- aip.dev/not-precedent: This is designed for testing non-slash\n  //     resource patterns. Ordinarily, non-slash separators are discouraged.\n  //     --)\n  oneof legacy_id {\n    // The legacy id of the room. This field is used to signal\n    // the use of the compound resource pattern\n    // `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`\n    string legacy_room_id = 7;\n\n    // The legacy id of the user. This field is used to signal\n    // the use of the compound resource pattern\n    // `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`\n    string legacy_user_id = 8;\n  }\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\CreateBlurb\n// method.\nmessage CreateBlurbRequest {\n  // The resource name of the chat room or user profile that this blurb will\n  // be tied to.\n  string parent = 1 [\n    (google.api.resource_reference).child_type =\n        \"showcase.googleapis.com/Blurb\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n\n  // The blurb to create.\n  Blurb blurb = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\GetBlurb\n// method.\nmessage GetBlurbRequest {\n  // The resource name of the requested blurb.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Blurb\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\UpdateBlurb\n// method.\nmessage UpdateBlurbRequest {\n  // The blurb to update.\n  Blurb blurb = 1;\n\n  // The field mask to determine which fields are to be updated. If empty, the\n  // server will assume all fields are to be updated.\n  google.protobuf.FieldMask update_mask = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\DeleteBlurb\n// method.\nmessage DeleteBlurbRequest {\n  // The resource name of the requested blurb.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Blurb\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\ListBlurbs\n// method.\nmessage ListBlurbsRequest {\n  // The resource name of the requested room or profile who blurbs to list.\n  string parent = 1 [\n    (google.api.resource_reference).child_type =\n        \"showcase.googleapis.com/Blurb\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n\n  // The maximum number of blurbs to return. Server may return fewer\n  // blurbs than requested. If unspecified, server will pick an appropriate\n  // default.\n  int32 page_size = 2;\n\n  // The value of google.showcase.v1beta1.ListBlurbsResponse.next_page_token\n  // returned from the previous call to\n  // `google.showcase.v1beta1.Messaging\\ListBlurbs` method.\n  string page_token = 3;\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\ListBlurbs\n// method.\nmessage ListBlurbsResponse {\n  // The list of blurbs.\n  repeated Blurb blurbs = 1;\n\n  // A token to retrieve next page of results.\n  // Pass this value in ListBlurbsRequest.page_token field in the subsequent\n  // call to `google.showcase.v1beta1.Blurb\\ListBlurbs` method to retrieve\n  // the next page of results.\n  string next_page_token = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\SearchBlurbs\n// method.\nmessage SearchBlurbsRequest {\n  // The query used to search for blurbs containing to words of this string.\n  // Only posts that contain an exact match of a queried word will be returned.\n  string query = 1 [(google.api.field_behavior) = REQUIRED];\n\n  // The rooms or profiles to search. If unset, `SearchBlurbs` will search all\n  // rooms and all profiles.\n  string parent = 2 [(google.api.resource_reference).child_type =\n                         \"showcase.googleapis.com/Blurb\"];\n\n  // The maximum number of blurbs return. Server may return fewer\n  // blurbs than requested. If unspecified, server will pick an appropriate\n  // default.\n  int32 page_size = 3;\n\n  // The value of\n  // google.showcase.v1beta1.SearchBlurbsResponse.next_page_token\n  // returned from the previous call to\n  // `google.showcase.v1beta1.Messaging\\SearchBlurbs` method.\n  string page_token = 4;\n}\n\n// The operation metadata message for the\n// google.showcase.v1beta1.Messaging\\SearchBlurbs method.\nmessage SearchBlurbsMetadata {\n  // This signals to the client when to next poll for response.\n  google.rpc.RetryInfo retry_info = 1;\n}\n\n// The operation response message for the\n// google.showcase.v1beta1.Messaging\\SearchBlurbs method.\nmessage SearchBlurbsResponse {\n  // Blurbs that matched the search query.\n  repeated Blurb blurbs = 1;\n\n  // A token to retrieve next page of results.\n  // Pass this value in SearchBlurbsRequest.page_token field in the subsequent\n  // call to `google.showcase.v1beta1.Blurb\\SearchBlurbs` method to\n  // retrieve the next page of results.\n  string next_page_token = 2;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\StreamBlurbs\n// method.\nmessage StreamBlurbsRequest {\n  // The resource name of a chat room or user profile whose blurbs to stream.\n  string name = 1 [\n    (google.api.resource_reference).child_type =\n        \"showcase.googleapis.com/Blurb\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n\n  // The time at which this stream will close.\n  google.protobuf.Timestamp expire_time = 2\n      [(google.api.field_behavior) = REQUIRED];\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\StreamBlurbs\n// method.\nmessage StreamBlurbsResponse {\n  // The blurb that was either created, updated, or deleted.\n  Blurb blurb = 1;\n\n  // The action that triggered the blurb to be returned.\n  enum Action {\n    ACTION_UNSPECIFIED = 0;\n\n    // Specifies that the blurb was created.\n    CREATE = 1;\n\n    // Specifies that the blurb was updated.\n    UPDATE = 2;\n\n    // Specifies that the blurb was deleted.\n    DELETE = 3;\n  }\n\n  // The action that triggered the blurb to be returned.\n  Action action = 2;\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\SendBlurbs\n// method.\nmessage SendBlurbsResponse {\n  // The names of successful blurb creations.\n  repeated string names = 1;\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\Connect\n// method.\nmessage ConnectRequest {\n  message ConnectConfig {\n    // The room or profile to follow and create messages for.\n    string parent = 1 [(google.api.resource_reference).child_type =\n                           \"showcase.googleapis.com/Blurb\"];\n  }\n\n  oneof request {\n    // Provides information that specifies how to process subsequent requests.\n    // The first `ConnectRequest` message must contain a `config`  message.\n    ConnectConfig config = 1;\n\n    // The blurb to be created.\n    Blurb blurb = 2;\n  }\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/rest_error.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//     https://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\nimport \"google/protobuf/any.proto\";\nimport \"google/rpc/code.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// HTTP/JSON error representation as defined in\n// https://google.aip.dev/193#http11json-representation,\nmessage RestError {\n  message Status {\n    // The HTTP status code that corresponds to `google.rpc.Status.code`.\n    int32 code = 1;\n    // This corresponds to `google.rpc.Status.message`.\n    string message = 2;\n    // This is the enum version for `google.rpc.Status.code`.\n    google.rpc.Code status = 4;\n    // This corresponds to `google.rpc.Status.details`.\n    repeated google.protobuf.Any details = 5;\n  }\n\n  Status error = 1;\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/sequence.proto",
    "content": "// Copyright 2020 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//   https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\nimport \"google/api/field_behavior.proto\";\nimport \"google/api/resource.proto\";\nimport \"google/protobuf/duration.proto\";\nimport \"google/protobuf/empty.proto\";\nimport \"google/protobuf/timestamp.proto\";\nimport \"google/rpc/status.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// A service that enables testing of unary and server streaming calls\n// by specifying a specific, predictable sequence of responses from the service\nservice SequenceService {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n\n  // Create a sequence of responses to be returned as unary calls\n  rpc CreateSequence(CreateSequenceRequest) returns (Sequence) {\n    option (google.api.http) = {\n      post: \"/v1beta1/sequences\"\n      body: \"sequence\"\n    };\n    option (google.api.method_signature) = \"sequence\";\n  };\n\n  // Creates a sequence of responses to be returned in a server streaming call\n  rpc CreateStreamingSequence(CreateStreamingSequenceRequest) returns (StreamingSequence) {\n    option (google.api.http) = {\n      post: \"/v1beta1/streamingSequences\"\n      body: \"streaming_sequence\"\n    };\n    option (google.api.method_signature) = \"streaming_sequence\";\n  };\n\n  // Retrieves a sequence report which can be used to retrieve information about a\n  // sequence of unary calls.\n  rpc GetSequenceReport(GetSequenceReportRequest) returns (SequenceReport) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=sequences/*/sequenceReport}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  };\n\n  // Retrieves a sequence report which can be used to retrieve information\n  // about a sequences of responses in a server streaming call.\n  rpc GetStreamingSequenceReport(GetStreamingSequenceReportRequest) returns (StreamingSequenceReport) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=streamingSequences/*/streamingSequenceReport}\"\n    };\n    option (google.api.method_signature) = \"name\";\n  };\n\n  // Attempts a sequence of unary responses.\n  rpc AttemptSequence(AttemptSequenceRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{name=sequences/*}\"\n      body: \"*\"\n    };\n    option (google.api.method_signature) = \"name\";\n  };\n\n  // Attempts a server streaming call with a sequence of responses\n  // Can be used to test retries and stream resumption logic\n  // May not function as expected in HTTP mode due to when http statuses are sent\n  // See https://github.com/googleapis/gapic-showcase/issues/1377 for more details\n  rpc AttemptStreamingSequence(AttemptStreamingSequenceRequest) returns  (stream AttemptStreamingSequenceResponse) {\n    option (google.api.http) = {\n    post: \"/v1beta1/{name=streamingSequences/*}:stream\"\n      body: \"*\"\n    };\n    option (google.api.method_signature) = \"name\";\n  };\n}\n\n// A sequence of responses to be returned in order for each unary call attempt\nmessage Sequence {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/Sequence\"\n    pattern: \"sequences/{sequence}\"\n  };\n\n  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // A server response to an RPC Attempt in a sequence.\n  message Response {\n    // The status to return for an individual attempt.\n    google.rpc.Status status = 1;\n\n    // The amount of time to delay sending the response.\n    google.protobuf.Duration delay = 2;\n  }\n\n  // Sequence of responses to return in order for each attempt. If empty, the\n  // default response is an immediate OK.\n  repeated Response responses = 2;\n}\n\n// A sequence of responses to be returned in order at the delay specified\n// as part of the server streaming call\nmessage StreamingSequence {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/StreamingSequence\"\n    pattern: \"streamingSequences/{streaming_sequence}\"\n  };\n\n  // The name of the streaming sequence.\n  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // The content that the stream will send\n  // this was specified when the sequence was created\n  string content = 2;\n\n  // A server response to an RPC Attempt in a sequence.\n  message Response {\n    // The status to return for an individual attempt.\n    google.rpc.Status status = 1;\n\n    // The amount of time to delay sending the response.\n    google.protobuf.Duration delay = 2;\n\n    // The index that the status should be sent at\n    int32 response_index = 3;\n  }\n\n  // Sequence of responses to return in order for each attempt. If empty, the\n  // default response is an immediate OK.\n  repeated Response responses = 3;\n}\n\n// A report of the results of a streaming sequence.\nmessage StreamingSequenceReport {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/StreamingSequenceReport\"\n    pattern: \"streamingSequences/{streaming_sequence}/streamingSequenceReport\"\n  };\n\n  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // Contains metrics on individual RPC Attempts in a sequence.\n  message Attempt {\n    // The attempt number - starting at 0.\n    int32 attempt_number = 1;\n\n    // The deadline dictated by the attempt to the server.\n    google.protobuf.Timestamp attempt_deadline = 2;\n\n    // The time that the server responded to the RPC attempt. Used for\n    // calculating attempt_delay.\n    google.protobuf.Timestamp response_time = 3;\n\n    // The server perceived delay between sending the last response and\n    // receiving this attempt. Used for validating attempt delay backoff.\n    google.protobuf.Duration attempt_delay = 4;\n\n    // The status returned to the attempt.\n    google.rpc.Status status = 5;\n\n  }\n\n  // The set of RPC attempts received by the server for a Sequence.\n  repeated Attempt attempts = 2;\n}\n\n// A report of the results of a sequence of unary responses\nmessage SequenceReport {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/SequenceReport\"\n    pattern: \"sequences/{sequence}/sequenceReport\"\n  };\n\n  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];\n\n  // Contains metrics on individual RPC Attempts in a sequence.\n  message Attempt {\n    // The attempt number - starting at 0.\n    int32 attempt_number = 1;\n\n    // The deadline dictated by the attempt to the server.\n    google.protobuf.Timestamp attempt_deadline = 2;\n\n    // The time that the server responded to the RPC attempt. Used for\n    // calculating attempt_delay.\n    google.protobuf.Timestamp response_time = 3;\n\n    // The server perceived delay between sending the last response and\n    // receiving this attempt. Used for validating attempt delay backoff.\n    google.protobuf.Duration attempt_delay = 4;\n\n    // The status returned to the attempt.\n    google.rpc.Status status = 5;\n  }\n\n  // The set of RPC attempts received by the server for a Sequence.\n  repeated Attempt attempts = 2;\n}\n\n// Request message for creating a sequence of unary calls\nmessage CreateSequenceRequest {\n  Sequence sequence = 1;\n}\n\n// Request message for the sequences of responses to be sent in a server streaming call\nmessage CreateStreamingSequenceRequest {\n  StreamingSequence streaming_sequence = 1;\n}\n\n// Request message for the unary AttemptSequence method\nmessage AttemptSequenceRequest {\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Sequence\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n\n}\n\n// Request message for the AttemptStreamingSequence method.\nmessage AttemptStreamingSequenceRequest {\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/StreamingSequence\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n  \n  // used to send the index of the last failed message\n  // in the string \"content\" of an AttemptStreamingSequenceResponse\n  // needed for stream resumption logic testing\n  int32 last_fail_index = 2 [\n    (google.api.field_behavior) = OPTIONAL\n  ];\n}\n\n// The response message for the AttemptStreamingSequence method.\nmessage AttemptStreamingSequenceResponse {\n  // The content specified in the request.\n  string content = 1;\n\n}\n\nmessage GetSequenceReportRequest {\n  string name = 1 [\n    (google.api.resource_reference).type =\n        \"showcase.googleapis.com/SequenceReport\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}\n\nmessage GetStreamingSequenceReportRequest {\n  string name = 1 [\n    (google.api.resource_reference).type =\n        \"showcase.googleapis.com/StreamingSequenceReport\",\n    (google.api.field_behavior) = REQUIRED\n  ];\n}"
  },
  {
    "path": "schema/google/showcase/v1beta1/showcase_grpc_service_config.json",
    "content": "{\n    \"methodConfig\": [\n        {\n            \"name\": [\n                {\"service\": \"google.showcase.v1beta1.Echo\"},\n                {\"service\": \"google.showcase.v1beta1.Messaging\"},\n                {\"service\": \"google.showcase.v1beta1.SequenceService\"}\n            ],\n            \"timeout\": \"5s\"\n        },\n        {\n            \"name\": [\n                {\n                    \"service\": \"google.showcase.v1beta1.Echo\",\n                    \"method\": \"Echo\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Echo\",\n                    \"method\": \"Expand\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Echo\",\n                    \"method\": \"PagedExpand\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"GetRoom\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"ListRooms\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"GetBlurb\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"ListBlurbs\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"SearchBlurbs\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Messaging\",\n                    \"method\": \"Connect\"\n                },\n                {\n                  \"service\": \"google.showcase.v1beta1.SequenceService\",\n                  \"method\": \"AttemptSequence\"\n                }\n            ],\n            \"retryPolicy\": {\n                \"maxAttempts\": 3,\n                \"maxBackoff\": \"3s\",\n                \"initialBackoff\": \"0.1s\",\n                \"backoffMultiplier\": 2,\n                \"retryableStatusCodes\": [\n                    \"UNAVAILABLE\",\n                    \"UNKNOWN\"\n                ]\n            },\n            \"timeout\": \"10s\"\n        },\n        {\n            \"name\": [\n                {\n                    \"service\": \"google.showcase.v1beta1.Identity\",\n                    \"method\": \"GetUser\"\n                },\n                {\n                    \"service\": \"google.showcase.v1beta1.Identity\",\n                    \"method\": \"ListUsers\"\n                }\n            ],\n            \"retryPolicy\": {\n                \"maxAttempts\": 5,\n                \"maxBackoff\": \"3s\",\n                \"initialBackoff\": \"0.2s\",\n                \"backoffMultiplier\": 2,\n                \"retryableStatusCodes\": [\n                    \"UNAVAILABLE\",\n                    \"UNKNOWN\"\n                ]\n            },\n            \"timeout\": \"5s\"\n        }\n    ]\n}\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/showcase_v1beta1.yaml",
    "content": "# Copyright 2020 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#     https://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\ntype: google.api.Service\nconfig_version: 3\nname: showcase.googleapis.com\ntitle: Client Libraries Showcase API\n\napis:\n- name: google.showcase.v1beta1.Compliance\n- name: google.showcase.v1beta1.Echo\n- name: google.showcase.v1beta1.Identity\n- name: google.showcase.v1beta1.Messaging\n- name: google.showcase.v1beta1.SequenceService\n- name: google.showcase.v1beta1.Testing\n# Mix-in services\n- name: 'google.cloud.location.Locations'\n- name: 'google.iam.v1.IAMPolicy'\n- name: 'google.longrunning.Operations'\n\ndocumentation:\n  summary: |-\n    Showcase represents both a model API and an integration testing surface for\n    client library generator consumption.\n\nbackend:\n  rules:\n  - selector: 'google.cloud.location.Locations.*'\n    deadline: 60.0\n  - selector: 'google.iam.v1.IAMPolicy.*'\n    deadline: 60.0\n  - selector: 'google.longrunning.Operations.*'\n    deadline: 60.0\n    \nhttp:\n  rules:\n  - selector: google.cloud.location.Locations.ListLocations\n    get:  '/v1beta1/{name=projects/*}/locations'\n  - selector: google.cloud.location.Locations.GetLocation\n    get:  '/v1beta1/{name=projects/*/locations/*}'\n  - selector: google.iam.v1.IAMPolicy.SetIamPolicy\n    post: '/v1beta1/{resource=users/*}:setIamPolicy'\n    body: '*'\n    additional_bindings:\n    - post: '/v1beta1/{resource=rooms/*}:setIamPolicy'\n      body: '*'\n    - post: '/v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy'\n      body: '*'\n    - post: '/v1beta1/{resource=sequences/*}:setIamPolicy'\n      body: '*'\n  - selector: google.iam.v1.IAMPolicy.GetIamPolicy\n    get: '/v1beta1/{resource=users/*}:getIamPolicy'\n    additional_bindings:\n    - get: '/v1beta1/{resource=rooms/*}:getIamPolicy'\n    - get: '/v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy'\n    - get: '/v1beta1/{resource=sequences/*}:getIamPolicy'\n  - selector: google.iam.v1.IAMPolicy.TestIamPermissions\n    post: '/v1beta1/{resource=users/*}:testIamPermissions'\n    body: '*'\n    additional_bindings:\n    - post: '/v1beta1/{resource=rooms/*}:testIamPermissions'\n      body: '*'\n    - post: '/v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions'\n      body: '*'\n    - post: '/v1beta1/{resource=sequences/*}:testIamPermissions'\n      body: '*'\n  - selector: google.longrunning.Operations.ListOperations\n    get: '/v1beta1/operations'\n  - selector: google.longrunning.Operations.GetOperation\n    get: '/v1beta1/{name=operations/**}'\n  - selector: google.longrunning.Operations.DeleteOperation\n    delete: '/v1beta1/{name=operations/**}'\n  - selector: google.longrunning.Operations.CancelOperation\n    post: '/v1beta1/{name=operations/**}:cancel'\npublishing:\n  method_settings:\n  - selector: google.showcase.v1beta1.Echo.Echo\n    auto_populated_fields:\n    - request_id\n    - other_request_id\n"
  },
  {
    "path": "schema/google/showcase/v1beta1/testing.proto",
    "content": "// Copyright 2018 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//     https://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\nimport \"google/api/annotations.proto\";\nimport \"google/api/client.proto\";\nimport \"google/api/resource.proto\";\nimport \"google/protobuf/empty.proto\";\n\npackage google.showcase.v1beta1;\n\noption go_package = \"github.com/googleapis/gapic-showcase/server/genproto\";\noption java_package = \"com.google.showcase.v1beta1\";\noption java_multiple_files = true;\noption ruby_package = \"Google::Showcase::V1beta1\";\n\n// A service to facilitate running discrete sets of tests\n// against Showcase.\n// Adding this comment with special characters for comment formatting tests:\n// 1. (abra->kadabra->alakazam)\n// 2) [Nonsense][]: `pokemon/*/psychic/*`\nservice Testing {\n  // This service is meant to only run locally on the port 7469 (keypad digits\n  // for \"show\").\n  option (google.api.default_host) = \"localhost:7469\";\n\n  // Creates a new testing session.\n  // Adding this comment with special characters for comment formatting tests:\n  // 1. (abra->kadabra->alakazam)\n  // 2) [Nonsense][]: `pokemon/*/psychic/*`\n  rpc CreateSession(CreateSessionRequest) returns (Session) {\n    option (google.api.http) = {\n      post: \"/v1beta1/sessions\"\n      body: \"session\"\n    };\n  }\n\n  // Gets a testing session.\n  rpc GetSession(GetSessionRequest) returns (Session) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{name=sessions/*}\"\n    };\n  }\n\n  // Lists the current test sessions.\n  rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/sessions\"\n    };\n  }\n\n  // Delete a test session.\n  rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      delete: \"/v1beta1/{name=sessions/*}\"\n    };\n  }\n\n  // Report on the status of a session.\n  // This generates a report detailing which tests have been completed,\n  // and an overall rollup.\n  rpc ReportSession(ReportSessionRequest) returns (ReportSessionResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{name=sessions/*}:report\"\n    };\n  }\n\n  // List the tests of a sessesion.\n  rpc ListTests(ListTestsRequest) returns (ListTestsResponse) {\n    option (google.api.http) = {\n      get: \"/v1beta1/{parent=sessions/*}/tests\"\n    };\n  }\n\n  // Explicitly decline to implement a test.\n  //\n  // This removes the test from subsequent `ListTests` calls, and\n  // attempting to do the test will error.\n  //\n  // This method will error if attempting to delete a required test.\n  rpc DeleteTest(DeleteTestRequest) returns (google.protobuf.Empty) {\n    option (google.api.http) = {\n      delete: \"/v1beta1/{name=sessions/*/tests/*}\"\n    };\n  }\n\n  // Register a response to a test.\n  //\n  // In cases where a test involves registering a final answer at the\n  // end of the test, this method provides the means to do so.\n  rpc VerifyTest(VerifyTestRequest) returns (VerifyTestResponse) {\n    option (google.api.http) = {\n      post: \"/v1beta1/{name=sessions/*/tests/*}:check\"\n    };\n  }\n}\n\n// A session is a suite of tests, generally being made in the context\n// of testing code generation.\n//\n// A session defines tests it may expect, based on which version of the\n// code generation spec is in use.\nmessage Session {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/Session\"\n    pattern: \"sessions/{session}\"\n  };\n\n  // The name of the session. The ID must conform to ^[a-z]+$\n  // If this is not provided, Showcase chooses one at random.\n  string name = 1;\n\n  // The specification versions understood by Showcase.\n  enum Version {\n    // Unspecified version. If passed on creation, the session will default\n    // to using the latest stable release.\n    VERSION_UNSPECIFIED = 0;\n\n    // The latest v1. Currently, this is v1.0.\n    V1_LATEST = 1;\n\n    // v1.0. (Until the spec is \"GA\", this will be a moving target.)\n    V1_0 = 2;\n  }\n\n  // Required. The version this session is using.\n  Version version = 2;\n}\n\n// The request for the CreateSession method.\nmessage CreateSessionRequest {\n  // The session to be created.\n  // Sessions are immutable once they are created (although they can\n  // be deleted).\n  Session session = 1;\n}\n\n// The request for the GetSession method.\nmessage GetSessionRequest {\n  // The session to be retrieved.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Session\"];\n}\n\n// The request for the ListSessions method.\nmessage ListSessionsRequest {\n  // The maximum number of sessions to return per page.\n  int32 page_size = 1;\n\n  // The page token, for retrieving subsequent pages.\n  string page_token = 2;\n}\n\n// Response for the ListSessions method.\nmessage ListSessionsResponse {\n  // The sessions being returned.\n  repeated Session sessions = 1;\n\n  // The next page token, if any.\n  // An empty value here means the last page has been reached.\n  string next_page_token = 2;\n}\n\n// Request for the DeleteSession method.\nmessage DeleteSessionRequest {\n  // The session to be deleted.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Session\"];\n}\n\n// Request message for reporting on a session.\nmessage ReportSessionRequest {\n  // The session to be reported on.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Session\"];\n}\n\n// Response message for reporting on a session.\nmessage ReportSessionResponse {\n  // The topline state of the report.\n  enum Result {\n    RESULT_UNSPECIFIED = 0;\n\n    // The session is complete, and everything passed.\n    PASSED = 1;\n\n    // The session had an explicit failure.\n    FAILED = 2;\n\n    // The session is incomplete. This is a failure response.\n    INCOMPLETE = 3;\n  }\n\n  // The state of the report.\n  Result result = 1;\n\n  // The test runs of this session.\n  repeated TestRun test_runs = 2;\n}\n\nmessage Test {\n  option (google.api.resource) = {\n    type: \"showcase.googleapis.com/Test\"\n    pattern: \"sessions/{session}/tests/{test}\"\n  };\n\n  // The name of the test.\n  // The tests/* portion of the names are hard-coded, and do not change\n  // from session to session.\n  string name = 1;\n\n  // Whether or not a test is required, recommended, or optional.\n  enum ExpectationLevel {\n    EXPECTATION_LEVEL_UNSPECIFIED = 0;\n\n    // This test is strictly required.\n    REQUIRED = 1;\n\n    // This test is recommended.\n    //\n    // If a generator explicitly ignores a recommended test (see `DeleteTest`),\n    // then the report may still pass, but with a warning.\n    //\n    // If a generator skips a recommended test and does not explicitly\n    // express that intention, the report will fail.\n    RECOMMENDED = 2;\n\n    // This test is optional.\n    //\n    // If a generator explicitly ignores an optional test (see `DeleteTest`),\n    // then the report may still pass, and no warning will be issued.\n    //\n    // If a generator skips an optional test and does not explicitly\n    // express that intention, the report may still pass, but with a\n    // warning.\n    OPTIONAL = 3;\n  }\n\n  // The expectation level for this test.\n  ExpectationLevel expectation_level = 2;\n\n  // A description of the test.\n  string description = 3;\n\n  // A blueprint is an explicit definition of methods and requests that are needed\n  // to be made to test this specific test case. Ideally this would be represented\n  // by something more robust like CEL, but as of writing this, I am unsure if CEL\n  // is ready.\n  message Blueprint {\n    option (google.api.resource) = {\n      type: \"showcase.googleapis.com/Blueprint\"\n      pattern: \"sessions/{session}/tests/{test}/blueprints/{blueprint}\"\n    };\n\n    // The name of this blueprint.\n    string name = 1;\n\n    // A description of this blueprint.\n    string description = 2;\n\n    // A message representing a method invocation.\n    message Invocation {\n      // The fully qualified name of the showcase method to be invoked.\n      string method = 1;\n\n      // The request to be made if a specific request is necessary.\n      bytes serialized_request = 2;\n    }\n\n    // The initial request to trigger this test.\n    Invocation request = 3;\n\n    // An ordered list of method calls that can be called to trigger this test.\n    repeated Invocation additional_requests = 4;\n  }\n\n  // The blueprints that will satisfy this test. There may be multiple blueprints\n  // that can signal to the server that this test case is being exercised. Although\n  // multiple blueprints are specified, only a single blueprint needs to be run to\n  // signal that the test case was exercised.\n  repeated Blueprint blueprints = 4;\n}\n\n// An issue found in the test.\nmessage Issue {\n  // The different potential types of issues.\n  enum Type {\n    TYPE_UNSPECIFIED = 0;\n\n    // The test was never instrumented.\n    SKIPPED = 1;\n\n    // The test was started but never confirmed.\n    PENDING = 2;\n\n    // The test was instrumented, but Showcase got an unexpected\n    // value when the generator tried to confirm success.\n    INCORRECT_CONFIRMATION = 3;\n  }\n\n  // The type of the issue.\n  Type type = 1;\n\n  // Severity levels.\n  enum Severity {\n    SEVERITY_UNSPECIFIED = 0;\n\n    // Errors.\n    ERROR = 1;\n\n    // Warnings.\n    WARNING = 2;\n  }\n\n  // The severity of the issue.\n  Severity severity = 2;\n\n  // A description of the issue.\n  string description = 3;\n}\n\n// The request for the ListTests method.\nmessage ListTestsRequest {\n  // The session.\n  string parent = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Session\"];\n\n  // The maximum number of tests to return per page.\n  int32 page_size = 2;\n\n  // The page token, for retrieving subsequent pages.\n  string page_token = 3;\n}\n\n// The response for the ListTests method.\nmessage ListTestsResponse {\n  // The tests being returned.\n  repeated Test tests = 1;\n\n  // The next page token, if any.\n  // An empty value here means the last page has been reached.\n  string next_page_token = 2;\n}\n\n// A TestRun is the result of running a Test.\nmessage TestRun {\n  // The name of the test.\n  // The tests/* portion of the names are hard-coded, and do not change\n  // from session to session.\n  string test = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Test\"];\n\n\n  // An issue found with the test run. If empty, this test run was successful.\n  Issue issue = 2;\n}\n\n// Request message for deleting a test.\nmessage DeleteTestRequest {\n  // The test to be deleted.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Test\"];\n}\n\nmessage VerifyTestRequest {\n  // The test to have an answer registered to it.\n  string name = 1 [\n    (google.api.resource_reference).type = \"showcase.googleapis.com/Test\"];\n\n  // The answer from the test.\n  bytes answer = 2;\n\n  // The answers from the test if multiple are to be checked\n  repeated bytes answers = 3;\n}\n\nmessage VerifyTestResponse {\n  // An issue if check answer was unsuccessful. This will be empty if the check answer succeeded.\n  Issue issue = 1;\n}\n"
  },
  {
    "path": "server/genproto/compliance.pb.go",
    "content": "// Copyright 2021 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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/compliance.proto\n\npackage genproto\n\nimport (\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype Continent int32\n\nconst (\n\tContinent_CONTINENT_UNSPECIFIED Continent = 0\n\tContinent_AFRICA                Continent = 1\n\tContinent_AMERICA               Continent = 2\n\tContinent_ANTARTICA             Continent = 3\n\tContinent_AUSTRALIA             Continent = 4\n\tContinent_EUROPE                Continent = 5\n)\n\n// Enum value maps for Continent.\nvar (\n\tContinent_name = map[int32]string{\n\t\t0: \"CONTINENT_UNSPECIFIED\",\n\t\t1: \"AFRICA\",\n\t\t2: \"AMERICA\",\n\t\t3: \"ANTARTICA\",\n\t\t4: \"AUSTRALIA\",\n\t\t5: \"EUROPE\",\n\t}\n\tContinent_value = map[string]int32{\n\t\t\"CONTINENT_UNSPECIFIED\": 0,\n\t\t\"AFRICA\":                1,\n\t\t\"AMERICA\":               2,\n\t\t\"ANTARTICA\":             3,\n\t\t\"AUSTRALIA\":             4,\n\t\t\"EUROPE\":                5,\n\t}\n)\n\nfunc (x Continent) Enum() *Continent {\n\tp := new(Continent)\n\t*p = x\n\treturn p\n}\n\nfunc (x Continent) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Continent) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_compliance_proto_enumTypes[0].Descriptor()\n}\n\nfunc (Continent) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_compliance_proto_enumTypes[0]\n}\n\nfunc (x Continent) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Continent.Descriptor instead.\nfunc (Continent) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{0}\n}\n\ntype ComplianceData_LifeKingdom int32\n\nconst (\n\tComplianceData_LIFE_KINGDOM_UNSPECIFIED ComplianceData_LifeKingdom = 0\n\tComplianceData_ARCHAEBACTERIA           ComplianceData_LifeKingdom = 1\n\tComplianceData_EUBACTERIA               ComplianceData_LifeKingdom = 2\n\tComplianceData_PROTISTA                 ComplianceData_LifeKingdom = 3\n\tComplianceData_FUNGI                    ComplianceData_LifeKingdom = 4\n\tComplianceData_PLANTAE                  ComplianceData_LifeKingdom = 5\n\tComplianceData_ANIMALIA                 ComplianceData_LifeKingdom = 6\n)\n\n// Enum value maps for ComplianceData_LifeKingdom.\nvar (\n\tComplianceData_LifeKingdom_name = map[int32]string{\n\t\t0: \"LIFE_KINGDOM_UNSPECIFIED\",\n\t\t1: \"ARCHAEBACTERIA\",\n\t\t2: \"EUBACTERIA\",\n\t\t3: \"PROTISTA\",\n\t\t4: \"FUNGI\",\n\t\t5: \"PLANTAE\",\n\t\t6: \"ANIMALIA\",\n\t}\n\tComplianceData_LifeKingdom_value = map[string]int32{\n\t\t\"LIFE_KINGDOM_UNSPECIFIED\": 0,\n\t\t\"ARCHAEBACTERIA\":           1,\n\t\t\"EUBACTERIA\":               2,\n\t\t\"PROTISTA\":                 3,\n\t\t\"FUNGI\":                    4,\n\t\t\"PLANTAE\":                  5,\n\t\t\"ANIMALIA\":                 6,\n\t}\n)\n\nfunc (x ComplianceData_LifeKingdom) Enum() *ComplianceData_LifeKingdom {\n\tp := new(ComplianceData_LifeKingdom)\n\t*p = x\n\treturn p\n}\n\nfunc (x ComplianceData_LifeKingdom) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ComplianceData_LifeKingdom) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_compliance_proto_enumTypes[1].Descriptor()\n}\n\nfunc (ComplianceData_LifeKingdom) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_compliance_proto_enumTypes[1]\n}\n\nfunc (x ComplianceData_LifeKingdom) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ComplianceData_LifeKingdom.Descriptor instead.\nfunc (ComplianceData_LifeKingdom) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{4, 0}\n}\n\ntype RepeatRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string          `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tInfo *ComplianceData `protobuf:\"bytes,2,opt,name=info,proto3\" json:\"info,omitempty\"`\n\t// If true, the server will verify that the received request matches\n\t// the request with the same name in the compliance test suite.\n\tServerVerify bool `protobuf:\"varint,3,opt,name=server_verify,json=serverVerify,proto3\" json:\"server_verify,omitempty\"`\n\t// The URI template this request is expected to be bound to server-side.\n\tIntendedBindingUri *string `protobuf:\"bytes,10,opt,name=intended_binding_uri,json=intendedBindingUri,proto3,oneof\" json:\"intended_binding_uri,omitempty\"`\n\t// Some top level fields, to test that these are encoded correctly\n\t// in query params.\n\tFInt32  int32    `protobuf:\"varint,4,opt,name=f_int32,json=fInt32,proto3\" json:\"f_int32,omitempty\"`\n\tFInt64  int64    `protobuf:\"varint,5,opt,name=f_int64,json=fInt64,proto3\" json:\"f_int64,omitempty\"`\n\tFDouble float64  `protobuf:\"fixed64,6,opt,name=f_double,json=fDouble,proto3\" json:\"f_double,omitempty\"`\n\tPInt32  *int32   `protobuf:\"varint,7,opt,name=p_int32,json=pInt32,proto3,oneof\" json:\"p_int32,omitempty\"`\n\tPInt64  *int64   `protobuf:\"varint,8,opt,name=p_int64,json=pInt64,proto3,oneof\" json:\"p_int64,omitempty\"`\n\tPDouble *float64 `protobuf:\"fixed64,9,opt,name=p_double,json=pDouble,proto3,oneof\" json:\"p_double,omitempty\"`\n}\n\nfunc (x *RepeatRequest) Reset() {\n\t*x = RepeatRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RepeatRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RepeatRequest) ProtoMessage() {}\n\nfunc (x *RepeatRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RepeatRequest.ProtoReflect.Descriptor instead.\nfunc (*RepeatRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *RepeatRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *RepeatRequest) GetInfo() *ComplianceData {\n\tif x != nil {\n\t\treturn x.Info\n\t}\n\treturn nil\n}\n\nfunc (x *RepeatRequest) GetServerVerify() bool {\n\tif x != nil {\n\t\treturn x.ServerVerify\n\t}\n\treturn false\n}\n\nfunc (x *RepeatRequest) GetIntendedBindingUri() string {\n\tif x != nil && x.IntendedBindingUri != nil {\n\t\treturn *x.IntendedBindingUri\n\t}\n\treturn \"\"\n}\n\nfunc (x *RepeatRequest) GetFInt32() int32 {\n\tif x != nil {\n\t\treturn x.FInt32\n\t}\n\treturn 0\n}\n\nfunc (x *RepeatRequest) GetFInt64() int64 {\n\tif x != nil {\n\t\treturn x.FInt64\n\t}\n\treturn 0\n}\n\nfunc (x *RepeatRequest) GetFDouble() float64 {\n\tif x != nil {\n\t\treturn x.FDouble\n\t}\n\treturn 0\n}\n\nfunc (x *RepeatRequest) GetPInt32() int32 {\n\tif x != nil && x.PInt32 != nil {\n\t\treturn *x.PInt32\n\t}\n\treturn 0\n}\n\nfunc (x *RepeatRequest) GetPInt64() int64 {\n\tif x != nil && x.PInt64 != nil {\n\t\treturn *x.PInt64\n\t}\n\treturn 0\n}\n\nfunc (x *RepeatRequest) GetPDouble() float64 {\n\tif x != nil && x.PDouble != nil {\n\t\treturn *x.PDouble\n\t}\n\treturn 0\n}\n\ntype RepeatResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tRequest *RepeatRequest `protobuf:\"bytes,1,opt,name=request,proto3\" json:\"request,omitempty\"`\n\t// The URI template the request was bound to server-side.\n\tBindingUri string `protobuf:\"bytes,2,opt,name=binding_uri,json=bindingUri,proto3\" json:\"binding_uri,omitempty\"`\n}\n\nfunc (x *RepeatResponse) Reset() {\n\t*x = RepeatResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RepeatResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RepeatResponse) ProtoMessage() {}\n\nfunc (x *RepeatResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RepeatResponse.ProtoReflect.Descriptor instead.\nfunc (*RepeatResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *RepeatResponse) GetRequest() *RepeatRequest {\n\tif x != nil {\n\t\treturn x.Request\n\t}\n\treturn nil\n}\n\nfunc (x *RepeatResponse) GetBindingUri() string {\n\tif x != nil {\n\t\treturn x.BindingUri\n\t}\n\treturn \"\"\n}\n\n// ComplianceSuite contains a set of requests that microgenerators should issue\n// over REST to the Compliance service to test their gRPC-to-REST transcoding\n// implementation.\ntype ComplianceSuite struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tGroup []*ComplianceGroup `protobuf:\"bytes,1,rep,name=group,proto3\" json:\"group,omitempty\"`\n}\n\nfunc (x *ComplianceSuite) Reset() {\n\t*x = ComplianceSuite{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ComplianceSuite) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ComplianceSuite) ProtoMessage() {}\n\nfunc (x *ComplianceSuite) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ComplianceSuite.ProtoReflect.Descriptor instead.\nfunc (*ComplianceSuite) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *ComplianceSuite) GetGroup() []*ComplianceGroup {\n\tif x != nil {\n\t\treturn x.Group\n\t}\n\treturn nil\n}\n\n// ComplianceGroups encapsulates a group of RPC requests to the Compliance\n// server: one request for each combination of elements of `rpcs` and of\n// `requests`.\ntype ComplianceGroup struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName     string           `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tRpcs     []string         `protobuf:\"bytes,2,rep,name=rpcs,proto3\" json:\"rpcs,omitempty\"`\n\tRequests []*RepeatRequest `protobuf:\"bytes,3,rep,name=requests,proto3\" json:\"requests,omitempty\"`\n}\n\nfunc (x *ComplianceGroup) Reset() {\n\t*x = ComplianceGroup{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ComplianceGroup) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ComplianceGroup) ProtoMessage() {}\n\nfunc (x *ComplianceGroup) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ComplianceGroup.ProtoReflect.Descriptor instead.\nfunc (*ComplianceGroup) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *ComplianceGroup) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceGroup) GetRpcs() []string {\n\tif x != nil {\n\t\treturn x.Rpcs\n\t}\n\treturn nil\n}\n\nfunc (x *ComplianceGroup) GetRequests() []*RepeatRequest {\n\tif x != nil {\n\t\treturn x.Requests\n\t}\n\treturn nil\n}\n\n// ComplianceData is a message used for testing REST transcoding of\n// different data types.\ntype ComplianceData struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tFString   string                      `protobuf:\"bytes,1,opt,name=f_string,json=fString,proto3\" json:\"f_string,omitempty\"`\n\tFInt32    int32                       `protobuf:\"varint,2,opt,name=f_int32,json=fInt32,proto3\" json:\"f_int32,omitempty\"`\n\tFSint32   int32                       `protobuf:\"zigzag32,3,opt,name=f_sint32,json=fSint32,proto3\" json:\"f_sint32,omitempty\"`\n\tFSfixed32 int32                       `protobuf:\"fixed32,4,opt,name=f_sfixed32,json=fSfixed32,proto3\" json:\"f_sfixed32,omitempty\"`\n\tFUint32   uint32                      `protobuf:\"varint,5,opt,name=f_uint32,json=fUint32,proto3\" json:\"f_uint32,omitempty\"`\n\tFFixed32  uint32                      `protobuf:\"fixed32,6,opt,name=f_fixed32,json=fFixed32,proto3\" json:\"f_fixed32,omitempty\"`\n\tFInt64    int64                       `protobuf:\"varint,7,opt,name=f_int64,json=fInt64,proto3\" json:\"f_int64,omitempty\"`\n\tFSint64   int64                       `protobuf:\"zigzag64,8,opt,name=f_sint64,json=fSint64,proto3\" json:\"f_sint64,omitempty\"`\n\tFSfixed64 int64                       `protobuf:\"fixed64,9,opt,name=f_sfixed64,json=fSfixed64,proto3\" json:\"f_sfixed64,omitempty\"`\n\tFUint64   uint64                      `protobuf:\"varint,10,opt,name=f_uint64,json=fUint64,proto3\" json:\"f_uint64,omitempty\"`\n\tFFixed64  uint64                      `protobuf:\"fixed64,11,opt,name=f_fixed64,json=fFixed64,proto3\" json:\"f_fixed64,omitempty\"`\n\tFDouble   float64                     `protobuf:\"fixed64,12,opt,name=f_double,json=fDouble,proto3\" json:\"f_double,omitempty\"`\n\tFFloat    float32                     `protobuf:\"fixed32,13,opt,name=f_float,json=fFloat,proto3\" json:\"f_float,omitempty\"`\n\tFBool     bool                        `protobuf:\"varint,14,opt,name=f_bool,json=fBool,proto3\" json:\"f_bool,omitempty\"`\n\tFBytes    []byte                      `protobuf:\"bytes,15,opt,name=f_bytes,json=fBytes,proto3\" json:\"f_bytes,omitempty\"`\n\tFKingdom  ComplianceData_LifeKingdom  `protobuf:\"varint,22,opt,name=f_kingdom,json=fKingdom,proto3,enum=google.showcase.v1beta1.ComplianceData_LifeKingdom\" json:\"f_kingdom,omitempty\"`\n\tFChild    *ComplianceDataChild        `protobuf:\"bytes,16,opt,name=f_child,json=fChild,proto3\" json:\"f_child,omitempty\"`\n\tPString   *string                     `protobuf:\"bytes,17,opt,name=p_string,json=pString,proto3,oneof\" json:\"p_string,omitempty\"`\n\tPInt32    *int32                      `protobuf:\"varint,18,opt,name=p_int32,json=pInt32,proto3,oneof\" json:\"p_int32,omitempty\"`\n\tPSint32   *int32                      `protobuf:\"zigzag32,39,opt,name=p_sint32,json=pSint32,proto3,oneof\" json:\"p_sint32,omitempty\"`\n\tPSfixed32 *int32                      `protobuf:\"fixed32,40,opt,name=p_sfixed32,json=pSfixed32,proto3,oneof\" json:\"p_sfixed32,omitempty\"`\n\tPUint32   *uint32                     `protobuf:\"varint,41,opt,name=p_uint32,json=pUint32,proto3,oneof\" json:\"p_uint32,omitempty\"`\n\tPFixed32  *uint32                     `protobuf:\"fixed32,42,opt,name=p_fixed32,json=pFixed32,proto3,oneof\" json:\"p_fixed32,omitempty\"`\n\tPInt64    *int64                      `protobuf:\"varint,43,opt,name=p_int64,json=pInt64,proto3,oneof\" json:\"p_int64,omitempty\"`\n\tPSint64   *int64                      `protobuf:\"zigzag64,44,opt,name=p_sint64,json=pSint64,proto3,oneof\" json:\"p_sint64,omitempty\"`\n\tPSfixed64 *int64                      `protobuf:\"fixed64,45,opt,name=p_sfixed64,json=pSfixed64,proto3,oneof\" json:\"p_sfixed64,omitempty\"`\n\tPUint64   *uint64                     `protobuf:\"varint,46,opt,name=p_uint64,json=pUint64,proto3,oneof\" json:\"p_uint64,omitempty\"`\n\tPFixed64  *uint64                     `protobuf:\"fixed64,47,opt,name=p_fixed64,json=pFixed64,proto3,oneof\" json:\"p_fixed64,omitempty\"`\n\tPFloat    *float32                    `protobuf:\"fixed32,48,opt,name=p_float,json=pFloat,proto3,oneof\" json:\"p_float,omitempty\"`\n\tPDouble   *float64                    `protobuf:\"fixed64,19,opt,name=p_double,json=pDouble,proto3,oneof\" json:\"p_double,omitempty\"`\n\tPBool     *bool                       `protobuf:\"varint,20,opt,name=p_bool,json=pBool,proto3,oneof\" json:\"p_bool,omitempty\"`\n\tPKingdom  *ComplianceData_LifeKingdom `protobuf:\"varint,23,opt,name=p_kingdom,json=pKingdom,proto3,enum=google.showcase.v1beta1.ComplianceData_LifeKingdom,oneof\" json:\"p_kingdom,omitempty\"`\n\tPChild    *ComplianceDataChild        `protobuf:\"bytes,21,opt,name=p_child,json=pChild,proto3,oneof\" json:\"p_child,omitempty\"`\n}\n\nfunc (x *ComplianceData) Reset() {\n\t*x = ComplianceData{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ComplianceData) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ComplianceData) ProtoMessage() {}\n\nfunc (x *ComplianceData) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ComplianceData.ProtoReflect.Descriptor instead.\nfunc (*ComplianceData) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *ComplianceData) GetFString() string {\n\tif x != nil {\n\t\treturn x.FString\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceData) GetFInt32() int32 {\n\tif x != nil {\n\t\treturn x.FInt32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFSint32() int32 {\n\tif x != nil {\n\t\treturn x.FSint32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFSfixed32() int32 {\n\tif x != nil {\n\t\treturn x.FSfixed32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFUint32() uint32 {\n\tif x != nil {\n\t\treturn x.FUint32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFFixed32() uint32 {\n\tif x != nil {\n\t\treturn x.FFixed32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFInt64() int64 {\n\tif x != nil {\n\t\treturn x.FInt64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFSint64() int64 {\n\tif x != nil {\n\t\treturn x.FSint64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFSfixed64() int64 {\n\tif x != nil {\n\t\treturn x.FSfixed64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFUint64() uint64 {\n\tif x != nil {\n\t\treturn x.FUint64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFFixed64() uint64 {\n\tif x != nil {\n\t\treturn x.FFixed64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFDouble() float64 {\n\tif x != nil {\n\t\treturn x.FDouble\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFFloat() float32 {\n\tif x != nil {\n\t\treturn x.FFloat\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetFBool() bool {\n\tif x != nil {\n\t\treturn x.FBool\n\t}\n\treturn false\n}\n\nfunc (x *ComplianceData) GetFBytes() []byte {\n\tif x != nil {\n\t\treturn x.FBytes\n\t}\n\treturn nil\n}\n\nfunc (x *ComplianceData) GetFKingdom() ComplianceData_LifeKingdom {\n\tif x != nil {\n\t\treturn x.FKingdom\n\t}\n\treturn ComplianceData_LIFE_KINGDOM_UNSPECIFIED\n}\n\nfunc (x *ComplianceData) GetFChild() *ComplianceDataChild {\n\tif x != nil {\n\t\treturn x.FChild\n\t}\n\treturn nil\n}\n\nfunc (x *ComplianceData) GetPString() string {\n\tif x != nil && x.PString != nil {\n\t\treturn *x.PString\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceData) GetPInt32() int32 {\n\tif x != nil && x.PInt32 != nil {\n\t\treturn *x.PInt32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPSint32() int32 {\n\tif x != nil && x.PSint32 != nil {\n\t\treturn *x.PSint32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPSfixed32() int32 {\n\tif x != nil && x.PSfixed32 != nil {\n\t\treturn *x.PSfixed32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPUint32() uint32 {\n\tif x != nil && x.PUint32 != nil {\n\t\treturn *x.PUint32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPFixed32() uint32 {\n\tif x != nil && x.PFixed32 != nil {\n\t\treturn *x.PFixed32\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPInt64() int64 {\n\tif x != nil && x.PInt64 != nil {\n\t\treturn *x.PInt64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPSint64() int64 {\n\tif x != nil && x.PSint64 != nil {\n\t\treturn *x.PSint64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPSfixed64() int64 {\n\tif x != nil && x.PSfixed64 != nil {\n\t\treturn *x.PSfixed64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPUint64() uint64 {\n\tif x != nil && x.PUint64 != nil {\n\t\treturn *x.PUint64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPFixed64() uint64 {\n\tif x != nil && x.PFixed64 != nil {\n\t\treturn *x.PFixed64\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPFloat() float32 {\n\tif x != nil && x.PFloat != nil {\n\t\treturn *x.PFloat\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPDouble() float64 {\n\tif x != nil && x.PDouble != nil {\n\t\treturn *x.PDouble\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceData) GetPBool() bool {\n\tif x != nil && x.PBool != nil {\n\t\treturn *x.PBool\n\t}\n\treturn false\n}\n\nfunc (x *ComplianceData) GetPKingdom() ComplianceData_LifeKingdom {\n\tif x != nil && x.PKingdom != nil {\n\t\treturn *x.PKingdom\n\t}\n\treturn ComplianceData_LIFE_KINGDOM_UNSPECIFIED\n}\n\nfunc (x *ComplianceData) GetPChild() *ComplianceDataChild {\n\tif x != nil {\n\t\treturn x.PChild\n\t}\n\treturn nil\n}\n\ntype ComplianceDataChild struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tFString    string                    `protobuf:\"bytes,1,opt,name=f_string,json=fString,proto3\" json:\"f_string,omitempty\"`\n\tFFloat     float32                   `protobuf:\"fixed32,2,opt,name=f_float,json=fFloat,proto3\" json:\"f_float,omitempty\"`\n\tFDouble    float64                   `protobuf:\"fixed64,3,opt,name=f_double,json=fDouble,proto3\" json:\"f_double,omitempty\"`\n\tFBool      bool                      `protobuf:\"varint,4,opt,name=f_bool,json=fBool,proto3\" json:\"f_bool,omitempty\"`\n\tFContinent Continent                 `protobuf:\"varint,11,opt,name=f_continent,json=fContinent,proto3,enum=google.showcase.v1beta1.Continent\" json:\"f_continent,omitempty\"`\n\tFChild     *ComplianceDataGrandchild `protobuf:\"bytes,5,opt,name=f_child,json=fChild,proto3\" json:\"f_child,omitempty\"`\n\tPString    *string                   `protobuf:\"bytes,6,opt,name=p_string,json=pString,proto3,oneof\" json:\"p_string,omitempty\"`\n\tPFloat     *float32                  `protobuf:\"fixed32,7,opt,name=p_float,json=pFloat,proto3,oneof\" json:\"p_float,omitempty\"`\n\tPDouble    *float64                  `protobuf:\"fixed64,8,opt,name=p_double,json=pDouble,proto3,oneof\" json:\"p_double,omitempty\"`\n\tPBool      *bool                     `protobuf:\"varint,9,opt,name=p_bool,json=pBool,proto3,oneof\" json:\"p_bool,omitempty\"`\n\tPContinent Continent                 `protobuf:\"varint,12,opt,name=p_continent,json=pContinent,proto3,enum=google.showcase.v1beta1.Continent\" json:\"p_continent,omitempty\"`\n\tPChild     *ComplianceDataGrandchild `protobuf:\"bytes,10,opt,name=p_child,json=pChild,proto3,oneof\" json:\"p_child,omitempty\"`\n}\n\nfunc (x *ComplianceDataChild) Reset() {\n\t*x = ComplianceDataChild{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ComplianceDataChild) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ComplianceDataChild) ProtoMessage() {}\n\nfunc (x *ComplianceDataChild) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ComplianceDataChild.ProtoReflect.Descriptor instead.\nfunc (*ComplianceDataChild) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *ComplianceDataChild) GetFString() string {\n\tif x != nil {\n\t\treturn x.FString\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceDataChild) GetFFloat() float32 {\n\tif x != nil {\n\t\treturn x.FFloat\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceDataChild) GetFDouble() float64 {\n\tif x != nil {\n\t\treturn x.FDouble\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceDataChild) GetFBool() bool {\n\tif x != nil {\n\t\treturn x.FBool\n\t}\n\treturn false\n}\n\nfunc (x *ComplianceDataChild) GetFContinent() Continent {\n\tif x != nil {\n\t\treturn x.FContinent\n\t}\n\treturn Continent_CONTINENT_UNSPECIFIED\n}\n\nfunc (x *ComplianceDataChild) GetFChild() *ComplianceDataGrandchild {\n\tif x != nil {\n\t\treturn x.FChild\n\t}\n\treturn nil\n}\n\nfunc (x *ComplianceDataChild) GetPString() string {\n\tif x != nil && x.PString != nil {\n\t\treturn *x.PString\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceDataChild) GetPFloat() float32 {\n\tif x != nil && x.PFloat != nil {\n\t\treturn *x.PFloat\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceDataChild) GetPDouble() float64 {\n\tif x != nil && x.PDouble != nil {\n\t\treturn *x.PDouble\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceDataChild) GetPBool() bool {\n\tif x != nil && x.PBool != nil {\n\t\treturn *x.PBool\n\t}\n\treturn false\n}\n\nfunc (x *ComplianceDataChild) GetPContinent() Continent {\n\tif x != nil {\n\t\treturn x.PContinent\n\t}\n\treturn Continent_CONTINENT_UNSPECIFIED\n}\n\nfunc (x *ComplianceDataChild) GetPChild() *ComplianceDataGrandchild {\n\tif x != nil {\n\t\treturn x.PChild\n\t}\n\treturn nil\n}\n\ntype ComplianceDataGrandchild struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tFString string  `protobuf:\"bytes,1,opt,name=f_string,json=fString,proto3\" json:\"f_string,omitempty\"`\n\tFDouble float64 `protobuf:\"fixed64,2,opt,name=f_double,json=fDouble,proto3\" json:\"f_double,omitempty\"`\n\tFBool   bool    `protobuf:\"varint,3,opt,name=f_bool,json=fBool,proto3\" json:\"f_bool,omitempty\"`\n}\n\nfunc (x *ComplianceDataGrandchild) Reset() {\n\t*x = ComplianceDataGrandchild{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ComplianceDataGrandchild) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ComplianceDataGrandchild) ProtoMessage() {}\n\nfunc (x *ComplianceDataGrandchild) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ComplianceDataGrandchild.ProtoReflect.Descriptor instead.\nfunc (*ComplianceDataGrandchild) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ComplianceDataGrandchild) GetFString() string {\n\tif x != nil {\n\t\treturn x.FString\n\t}\n\treturn \"\"\n}\n\nfunc (x *ComplianceDataGrandchild) GetFDouble() float64 {\n\tif x != nil {\n\t\treturn x.FDouble\n\t}\n\treturn 0\n}\n\nfunc (x *ComplianceDataGrandchild) GetFBool() bool {\n\tif x != nil {\n\t\treturn x.FBool\n\t}\n\treturn false\n}\n\ntype EnumRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Whether the client is requesting a new, unknown enum value or a known enum value already declared in this proto file.\n\tUnknownEnum bool `protobuf:\"varint,1,opt,name=unknown_enum,json=unknownEnum,proto3\" json:\"unknown_enum,omitempty\"`\n}\n\nfunc (x *EnumRequest) Reset() {\n\t*x = EnumRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EnumRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumRequest) ProtoMessage() {}\n\nfunc (x *EnumRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumRequest.ProtoReflect.Descriptor instead.\nfunc (*EnumRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *EnumRequest) GetUnknownEnum() bool {\n\tif x != nil {\n\t\treturn x.UnknownEnum\n\t}\n\treturn false\n}\n\ntype EnumResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The original request for a known or unknown enum from the server.\n\tRequest *EnumRequest `protobuf:\"bytes,1,opt,name=request,proto3\" json:\"request,omitempty\"`\n\t// The actual enum the server provided.\n\tContinent Continent `protobuf:\"varint,2,opt,name=continent,proto3,enum=google.showcase.v1beta1.Continent\" json:\"continent,omitempty\"`\n}\n\nfunc (x *EnumResponse) Reset() {\n\t*x = EnumResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EnumResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumResponse) ProtoMessage() {}\n\nfunc (x *EnumResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_compliance_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumResponse.ProtoReflect.Descriptor instead.\nfunc (*EnumResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *EnumResponse) GetRequest() *EnumRequest {\n\tif x != nil {\n\t\treturn x.Request\n\t}\n\treturn nil\n}\n\nfunc (x *EnumResponse) GetContinent() Continent {\n\tif x != nil {\n\t\treturn x.Continent\n\t}\n\treturn Continent_CONTINENT_UNSPECIFIED\n}\n\nvar File_google_showcase_v1beta1_compliance_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_compliance_proto_rawDesc = []byte{\n\t0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69,\n\t0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,\n\t0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c,\n\t0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x03, 0x0a, 0x0d, 0x52,\n\t0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,\n\t0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x12, 0x3b, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61,\n\t0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a,\n\t0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03,\n\t0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69,\n\t0x66, 0x79, 0x12, 0x35, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62,\n\t0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,\n\t0x48, 0x00, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x69, 0x6e, 0x64,\n\t0x69, 0x6e, 0x67, 0x55, 0x72, 0x69, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x69,\n\t0x6e, 0x74, 0x33, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x49, 0x6e, 0x74,\n\t0x33, 0x32, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x05, 0x20,\n\t0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x19, 0x0a, 0x08, 0x66,\n\t0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x66,\n\t0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33,\n\t0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x06, 0x70, 0x49, 0x6e, 0x74, 0x33,\n\t0x32, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18,\n\t0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x06, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x88,\n\t0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x09,\n\t0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x07, 0x70, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x88,\n\t0x01, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f,\n\t0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x72, 0x69, 0x42, 0x0a, 0x0a, 0x08, 0x5f,\n\t0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x69, 0x6e,\n\t0x74, 0x36, 0x34, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65,\n\t0x22, 0x73, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65,\n\t0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,\n\t0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x69,\n\t0x6e, 0x67, 0x55, 0x72, 0x69, 0x22, 0x51, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61,\n\t0x6e, 0x63, 0x65, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75,\n\t0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75,\n\t0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70,\n\t0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e,\n\t0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,\n\t0x12, 0x0a, 0x04, 0x72, 0x70, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x72,\n\t0x70, 0x63, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,\n\t0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xfa, 0x0b, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70,\n\t0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f,\n\t0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x53,\n\t0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x19,\n\t0x0a, 0x08, 0x66, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11,\n\t0x52, 0x07, 0x66, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x5f, 0x73,\n\t0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x09, 0x66,\n\t0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f, 0x75, 0x69,\n\t0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x55, 0x69, 0x6e,\n\t0x74, 0x33, 0x32, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,\n\t0x18, 0x06, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x66, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,\n\t0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28,\n\t0x03, 0x52, 0x06, 0x66, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f, 0x73,\n\t0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x66, 0x53, 0x69,\n\t0x6e, 0x74, 0x36, 0x34, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64,\n\t0x36, 0x34, 0x18, 0x09, 0x20, 0x01, 0x28, 0x10, 0x52, 0x09, 0x66, 0x53, 0x66, 0x69, 0x78, 0x65,\n\t0x64, 0x36, 0x34, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18,\n\t0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x1b,\n\t0x0a, 0x09, 0x66, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0b, 0x20, 0x01, 0x28,\n\t0x06, 0x52, 0x08, 0x66, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x19, 0x0a, 0x08, 0x66,\n\t0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x66,\n\t0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x66, 0x6c, 0x6f, 0x61,\n\t0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x66, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12,\n\t0x15, 0x0a, 0x06, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52,\n\t0x05, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x62, 0x79, 0x74, 0x65,\n\t0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x66, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12,\n\t0x50, 0x0a, 0x09, 0x66, 0x5f, 0x6b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x18, 0x16, 0x20, 0x01,\n\t0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d,\n\t0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x66, 0x65,\n\t0x4b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x52, 0x08, 0x66, 0x4b, 0x69, 0x6e, 0x67, 0x64, 0x6f,\n\t0x6d, 0x12, 0x45, 0x0a, 0x07, 0x66, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d,\n\t0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x69, 0x6c, 0x64,\n\t0x52, 0x06, 0x66, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f, 0x73, 0x74,\n\t0x72, 0x69, 0x6e, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x53,\n\t0x74, 0x72, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x5f, 0x69, 0x6e,\n\t0x74, 0x33, 0x32, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x06, 0x70, 0x49, 0x6e,\n\t0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74,\n\t0x33, 0x32, 0x18, 0x27, 0x20, 0x01, 0x28, 0x11, 0x48, 0x02, 0x52, 0x07, 0x70, 0x53, 0x69, 0x6e,\n\t0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78,\n\t0x65, 0x64, 0x33, 0x32, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0f, 0x48, 0x03, 0x52, 0x09, 0x70, 0x53,\n\t0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f,\n\t0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x07,\n\t0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x5f,\n\t0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x07, 0x48, 0x05, 0x52,\n\t0x08, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07,\n\t0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x03, 0x48, 0x06, 0x52,\n\t0x06, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f,\n\t0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x12, 0x48, 0x07, 0x52, 0x07,\n\t0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x5f,\n\t0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x10, 0x48, 0x08,\n\t0x52, 0x09, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x1e,\n\t0x0a, 0x08, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x04,\n\t0x48, 0x09, 0x52, 0x07, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x20,\n\t0x0a, 0x09, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x2f, 0x20, 0x01, 0x28,\n\t0x06, 0x48, 0x0a, 0x52, 0x08, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x88, 0x01, 0x01,\n\t0x12, 0x1c, 0x0a, 0x07, 0x70, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x30, 0x20, 0x01, 0x28,\n\t0x02, 0x48, 0x0b, 0x52, 0x06, 0x70, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e,\n\t0x0a, 0x08, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x01,\n\t0x48, 0x0c, 0x52, 0x07, 0x70, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a,\n\t0x0a, 0x06, 0x70, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0d,\n\t0x52, 0x05, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x55, 0x0a, 0x09, 0x70, 0x5f,\n\t0x6b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e,\n\t0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x64,\n\t0x6f, 0x6d, 0x48, 0x0e, 0x52, 0x08, 0x70, 0x4b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x88, 0x01,\n\t0x01, 0x12, 0x4a, 0x0a, 0x07, 0x70, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x15, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d,\n\t0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x69, 0x6c, 0x64,\n\t0x48, 0x0f, 0x52, 0x06, 0x70, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x22, 0x83, 0x01,\n\t0x0a, 0x0b, 0x4c, 0x69, 0x66, 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x12, 0x1c, 0x0a,\n\t0x18, 0x4c, 0x49, 0x46, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x47, 0x44, 0x4f, 0x4d, 0x5f, 0x55, 0x4e,\n\t0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41,\n\t0x52, 0x43, 0x48, 0x41, 0x45, 0x42, 0x41, 0x43, 0x54, 0x45, 0x52, 0x49, 0x41, 0x10, 0x01, 0x12,\n\t0x0e, 0x0a, 0x0a, 0x45, 0x55, 0x42, 0x41, 0x43, 0x54, 0x45, 0x52, 0x49, 0x41, 0x10, 0x02, 0x12,\n\t0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x54, 0x49, 0x53, 0x54, 0x41, 0x10, 0x03, 0x12, 0x09, 0x0a,\n\t0x05, 0x46, 0x55, 0x4e, 0x47, 0x49, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x4c, 0x41, 0x4e,\n\t0x54, 0x41, 0x45, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x4e, 0x49, 0x4d, 0x41, 0x4c, 0x49,\n\t0x41, 0x10, 0x06, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n\t0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x0b, 0x0a, 0x09,\n\t0x5f, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x5f,\n\t0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x75,\n\t0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65,\n\t0x64, 0x33, 0x32, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42,\n\t0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x0d, 0x0a, 0x0b,\n\t0x5f, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x42, 0x0b, 0x0a, 0x09, 0x5f,\n\t0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x5f, 0x66,\n\t0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x66, 0x6c, 0x6f,\n\t0x61, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x42,\n\t0x09, 0x0a, 0x07, 0x5f, 0x70, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70,\n\t0x5f, 0x6b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x63,\n\t0x68, 0x69, 0x6c, 0x64, 0x22, 0xd9, 0x04, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61,\n\t0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08,\n\t0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,\n\t0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x5f, 0x66, 0x6c, 0x6f,\n\t0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x66, 0x46, 0x6c, 0x6f, 0x61, 0x74,\n\t0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x01, 0x52, 0x07, 0x66, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x66,\n\t0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x42, 0x6f,\n\t0x6f, 0x6c, 0x12, 0x43, 0x0a, 0x0b, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e,\n\t0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x66, 0x43, 0x6f,\n\t0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x66, 0x5f, 0x63, 0x68, 0x69,\n\t0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74,\n\t0x61, 0x47, 0x72, 0x61, 0x6e, 0x64, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x43, 0x68,\n\t0x69, 0x6c, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18,\n\t0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,\n\t0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x07,\n\t0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x06, 0x70, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x88, 0x01,\n\t0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20,\n\t0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x07, 0x70, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x88, 0x01,\n\t0x01, 0x12, 0x1a, 0x0a, 0x06, 0x70, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28,\n\t0x08, 0x48, 0x03, 0x52, 0x05, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a,\n\t0x0b, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01,\n\t0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e,\n\t0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65,\n\t0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x70, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x0a, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f,\n\t0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x47, 0x72, 0x61, 0x6e,\n\t0x64, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x48, 0x04, 0x52, 0x06, 0x70, 0x43, 0x68, 0x69, 0x6c, 0x64,\n\t0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n\t0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x42, 0x0b, 0x0a, 0x09,\n\t0x5f, 0x70, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x5f,\n\t0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64,\n\t0x22, 0x67, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61,\n\t0x74, 0x61, 0x47, 0x72, 0x61, 0x6e, 0x64, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08,\n\t0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,\n\t0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x5f, 0x64, 0x6f, 0x75,\n\t0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x66, 0x44, 0x6f, 0x75, 0x62,\n\t0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x08, 0x52, 0x05, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x30, 0x0a, 0x0b, 0x45, 0x6e, 0x75,\n\t0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x6b, 0x6e,\n\t0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,\n\t0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x22, 0x90, 0x01, 0x0a, 0x0c,\n\t0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07,\n\t0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x09,\n\t0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,\n\t0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e,\n\t0x65, 0x6e, 0x74, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x2a, 0x69,\n\t0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x15, 0x43,\n\t0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,\n\t0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x46, 0x52, 0x49, 0x43, 0x41,\n\t0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x41, 0x10, 0x02, 0x12,\n\t0x0d, 0x0a, 0x09, 0x41, 0x4e, 0x54, 0x41, 0x52, 0x54, 0x49, 0x43, 0x41, 0x10, 0x03, 0x12, 0x0d,\n\t0x0a, 0x09, 0x41, 0x55, 0x53, 0x54, 0x52, 0x41, 0x4c, 0x49, 0x41, 0x10, 0x04, 0x12, 0x0a, 0x0a,\n\t0x06, 0x45, 0x55, 0x52, 0x4f, 0x50, 0x45, 0x10, 0x05, 0x32, 0xd8, 0x0d, 0x0a, 0x0a, 0x43, 0x6f,\n\t0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x70,\n\t0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x26, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65,\n\t0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3,\n\t0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x3a, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x8d, 0x01,\n\t0x0a, 0x12, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x6f, 0x64, 0x79,\n\t0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52,\n\t0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x04, 0x69,\n\t0x6e, 0x66, 0x6f, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65,\n\t0x70, 0x65, 0x61, 0x74, 0x3a, 0x62, 0x6f, 0x64, 0x79, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x81, 0x01,\n\t0x0a, 0x0f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72,\n\t0x79, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65,\n\t0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x3a, 0x71, 0x75, 0x65, 0x72,\n\t0x79, 0x12, 0xd9, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61,\n\t0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,\n\t0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x82, 0xd3, 0xe4,\n\t0x93, 0x02, 0x6a, 0x12, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65,\n\t0x70, 0x65, 0x61, 0x74, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72,\n\t0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x69, 0x6e, 0x74,\n\t0x33, 0x32, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x64, 0x6f, 0x75, 0x62,\n\t0x6c, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c,\n\t0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x6b, 0x69, 0x6e, 0x67, 0x64, 0x6f,\n\t0x6d, 0x7d, 0x3a, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0xd3, 0x02,\n\t0x0a, 0x16, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x74, 0x68,\n\t0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61,\n\t0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe7, 0x01, 0x82, 0xd3, 0xe4, 0x93,\n\t0x02, 0xe0, 0x01, 0x5a, 0x74, 0x12, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,\n\t0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x63,\n\t0x68, 0x69, 0x6c, 0x64, 0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d, 0x66, 0x69,\n\t0x72, 0x73, 0x74, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x73,\n\t0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x2f, 0x2a, 0x7d, 0x2f,\n\t0x62, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x62, 0x6f, 0x6f,\n\t0x6c, 0x7d, 0x3a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x66, 0x69, 0x72, 0x73, 0x74, 0x70, 0x61, 0x74,\n\t0x68, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f,\n\t0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2f,\n\t0x2a, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64,\n\t0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,\n\t0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66,\n\t0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x7d, 0x3a, 0x70, 0x61, 0x74, 0x68, 0x72, 0x65, 0x73, 0x6f, 0x75,\n\t0x72, 0x63, 0x65, 0x12, 0xd9, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61,\n\t0x74, 0x61, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x12,\n\t0x5e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,\n\t0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d,\n\t0x66, 0x69, 0x72, 0x73, 0x74, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66,\n\t0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3d,\n\t0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x2f, 0x2a, 0x2a, 0x7d, 0x3a, 0x70, 0x61, 0x74, 0x68, 0x74,\n\t0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,\n\t0x88, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x6f,\n\t0x64, 0x79, 0x50, 0x75, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01,\n\t0x2a, 0x1a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x65,\n\t0x61, 0x74, 0x3a, 0x62, 0x6f, 0x64, 0x79, 0x70, 0x75, 0x74, 0x12, 0x8c, 0x01, 0x0a, 0x13, 0x52,\n\t0x65, 0x70, 0x65, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x74,\n\t0x63, 0x68, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,\n\t0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x32, 0x19,\n\t0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x3a,\n\t0x62, 0x6f, 0x64, 0x79, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74,\n\t0x45, 0x6e, 0x75, 0x6d, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45,\n\t0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x65,\n\t0x6e, 0x75, 0x6d, 0x12, 0x7c, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6e, 0x75,\n\t0x6d, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x65, 0x6e, 0x75,\n\t0x6d, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a,\n\t0x37, 0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,\n\t0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x61, 0x70,\n\t0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76,\n\t0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x19, 0x47, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x3a, 0x3a,\n\t0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_compliance_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_compliance_proto_rawDescData = file_google_showcase_v1beta1_compliance_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_compliance_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_compliance_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_compliance_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_compliance_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_compliance_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_compliance_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_google_showcase_v1beta1_compliance_proto_msgTypes = make([]protoimpl.MessageInfo, 9)\nvar file_google_showcase_v1beta1_compliance_proto_goTypes = []interface{}{\n\t(Continent)(0),                   // 0: google.showcase.v1beta1.Continent\n\t(ComplianceData_LifeKingdom)(0),  // 1: google.showcase.v1beta1.ComplianceData.LifeKingdom\n\t(*RepeatRequest)(nil),            // 2: google.showcase.v1beta1.RepeatRequest\n\t(*RepeatResponse)(nil),           // 3: google.showcase.v1beta1.RepeatResponse\n\t(*ComplianceSuite)(nil),          // 4: google.showcase.v1beta1.ComplianceSuite\n\t(*ComplianceGroup)(nil),          // 5: google.showcase.v1beta1.ComplianceGroup\n\t(*ComplianceData)(nil),           // 6: google.showcase.v1beta1.ComplianceData\n\t(*ComplianceDataChild)(nil),      // 7: google.showcase.v1beta1.ComplianceDataChild\n\t(*ComplianceDataGrandchild)(nil), // 8: google.showcase.v1beta1.ComplianceDataGrandchild\n\t(*EnumRequest)(nil),              // 9: google.showcase.v1beta1.EnumRequest\n\t(*EnumResponse)(nil),             // 10: google.showcase.v1beta1.EnumResponse\n}\nvar file_google_showcase_v1beta1_compliance_proto_depIdxs = []int32{\n\t6,  // 0: google.showcase.v1beta1.RepeatRequest.info:type_name -> google.showcase.v1beta1.ComplianceData\n\t2,  // 1: google.showcase.v1beta1.RepeatResponse.request:type_name -> google.showcase.v1beta1.RepeatRequest\n\t5,  // 2: google.showcase.v1beta1.ComplianceSuite.group:type_name -> google.showcase.v1beta1.ComplianceGroup\n\t2,  // 3: google.showcase.v1beta1.ComplianceGroup.requests:type_name -> google.showcase.v1beta1.RepeatRequest\n\t1,  // 4: google.showcase.v1beta1.ComplianceData.f_kingdom:type_name -> google.showcase.v1beta1.ComplianceData.LifeKingdom\n\t7,  // 5: google.showcase.v1beta1.ComplianceData.f_child:type_name -> google.showcase.v1beta1.ComplianceDataChild\n\t1,  // 6: google.showcase.v1beta1.ComplianceData.p_kingdom:type_name -> google.showcase.v1beta1.ComplianceData.LifeKingdom\n\t7,  // 7: google.showcase.v1beta1.ComplianceData.p_child:type_name -> google.showcase.v1beta1.ComplianceDataChild\n\t0,  // 8: google.showcase.v1beta1.ComplianceDataChild.f_continent:type_name -> google.showcase.v1beta1.Continent\n\t8,  // 9: google.showcase.v1beta1.ComplianceDataChild.f_child:type_name -> google.showcase.v1beta1.ComplianceDataGrandchild\n\t0,  // 10: google.showcase.v1beta1.ComplianceDataChild.p_continent:type_name -> google.showcase.v1beta1.Continent\n\t8,  // 11: google.showcase.v1beta1.ComplianceDataChild.p_child:type_name -> google.showcase.v1beta1.ComplianceDataGrandchild\n\t9,  // 12: google.showcase.v1beta1.EnumResponse.request:type_name -> google.showcase.v1beta1.EnumRequest\n\t0,  // 13: google.showcase.v1beta1.EnumResponse.continent:type_name -> google.showcase.v1beta1.Continent\n\t2,  // 14: google.showcase.v1beta1.Compliance.RepeatDataBody:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 15: google.showcase.v1beta1.Compliance.RepeatDataBodyInfo:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 16: google.showcase.v1beta1.Compliance.RepeatDataQuery:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 17: google.showcase.v1beta1.Compliance.RepeatDataSimplePath:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 18: google.showcase.v1beta1.Compliance.RepeatDataPathResource:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 19: google.showcase.v1beta1.Compliance.RepeatDataPathTrailingResource:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 20: google.showcase.v1beta1.Compliance.RepeatDataBodyPut:input_type -> google.showcase.v1beta1.RepeatRequest\n\t2,  // 21: google.showcase.v1beta1.Compliance.RepeatDataBodyPatch:input_type -> google.showcase.v1beta1.RepeatRequest\n\t9,  // 22: google.showcase.v1beta1.Compliance.GetEnum:input_type -> google.showcase.v1beta1.EnumRequest\n\t10, // 23: google.showcase.v1beta1.Compliance.VerifyEnum:input_type -> google.showcase.v1beta1.EnumResponse\n\t3,  // 24: google.showcase.v1beta1.Compliance.RepeatDataBody:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 25: google.showcase.v1beta1.Compliance.RepeatDataBodyInfo:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 26: google.showcase.v1beta1.Compliance.RepeatDataQuery:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 27: google.showcase.v1beta1.Compliance.RepeatDataSimplePath:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 28: google.showcase.v1beta1.Compliance.RepeatDataPathResource:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 29: google.showcase.v1beta1.Compliance.RepeatDataPathTrailingResource:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 30: google.showcase.v1beta1.Compliance.RepeatDataBodyPut:output_type -> google.showcase.v1beta1.RepeatResponse\n\t3,  // 31: google.showcase.v1beta1.Compliance.RepeatDataBodyPatch:output_type -> google.showcase.v1beta1.RepeatResponse\n\t10, // 32: google.showcase.v1beta1.Compliance.GetEnum:output_type -> google.showcase.v1beta1.EnumResponse\n\t10, // 33: google.showcase.v1beta1.Compliance.VerifyEnum:output_type -> google.showcase.v1beta1.EnumResponse\n\t24, // [24:34] is the sub-list for method output_type\n\t14, // [14:24] is the sub-list for method input_type\n\t14, // [14:14] is the sub-list for extension type_name\n\t14, // [14:14] is the sub-list for extension extendee\n\t0,  // [0:14] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_compliance_proto_init() }\nfunc file_google_showcase_v1beta1_compliance_proto_init() {\n\tif File_google_showcase_v1beta1_compliance_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RepeatRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RepeatResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ComplianceSuite); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ComplianceGroup); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ComplianceData); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ComplianceDataChild); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ComplianceDataGrandchild); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EnumRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EnumResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[0].OneofWrappers = []interface{}{}\n\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[4].OneofWrappers = []interface{}{}\n\tfile_google_showcase_v1beta1_compliance_proto_msgTypes[5].OneofWrappers = []interface{}{}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_compliance_proto_rawDesc,\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   9,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_compliance_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_compliance_proto_depIdxs,\n\t\tEnumInfos:         file_google_showcase_v1beta1_compliance_proto_enumTypes,\n\t\tMessageInfos:      file_google_showcase_v1beta1_compliance_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_compliance_proto = out.File\n\tfile_google_showcase_v1beta1_compliance_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_compliance_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_compliance_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// ComplianceClient is the client API for Compliance service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype ComplianceClient interface {\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending the entire request object in the REST body.\n\tRepeatDataBody(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending the a message-type field in the REST body. Per AIP-127, only\n\t// top-level, non-repeated fields can be sent this way.\n\tRepeatDataBodyInfo(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending all request fields as query parameters.\n\tRepeatDataQuery(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending some parameters as \"simple\" path variables (i.e., of the form\n\t// \"/bar/{foo}\" rather than \"/{foo=bar/*}\"), and the rest as query parameters.\n\tRepeatDataSimplePath(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// Same as RepeatDataSimplePath, but with a path resource.\n\tRepeatDataPathResource(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// Same as RepeatDataSimplePath, but with a trailing resource.\n\tRepeatDataPathTrailingResource(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request, using the HTTP PUT method.\n\tRepeatDataBodyPut(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request, using the HTTP PATCH method.\n\tRepeatDataBodyPatch(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error)\n\t// This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the\n\t// .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the\n\t// response from this RPC as the request to VerifyEnum()\n\t//\n\t// The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for\n\t// VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.\n\tGetEnum(ctx context.Context, in *EnumRequest, opts ...grpc.CallOption) (*EnumResponse, error)\n\t// This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()\n\t// verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds\n\t// with the same EnumResponse; otherwise, the RPC errors.\n\t//\n\t// This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,\n\t// although they are not guaranteed to be the same across separate Showcase server runs.\n\tVerifyEnum(ctx context.Context, in *EnumResponse, opts ...grpc.CallOption) (*EnumResponse, error)\n}\n\ntype complianceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewComplianceClient(cc grpc.ClientConnInterface) ComplianceClient {\n\treturn &complianceClient{cc}\n}\n\nfunc (c *complianceClient) RepeatDataBody(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataBody\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataBodyInfo(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataBodyInfo\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataQuery(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataQuery\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataSimplePath(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataSimplePath\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataPathResource(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataPathResource\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataPathTrailingResource(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataPathTrailingResource\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataBodyPut(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataBodyPut\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) RepeatDataBodyPatch(ctx context.Context, in *RepeatRequest, opts ...grpc.CallOption) (*RepeatResponse, error) {\n\tout := new(RepeatResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/RepeatDataBodyPatch\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) GetEnum(ctx context.Context, in *EnumRequest, opts ...grpc.CallOption) (*EnumResponse, error) {\n\tout := new(EnumResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/GetEnum\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *complianceClient) VerifyEnum(ctx context.Context, in *EnumResponse, opts ...grpc.CallOption) (*EnumResponse, error) {\n\tout := new(EnumResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Compliance/VerifyEnum\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// ComplianceServer is the server API for Compliance service.\ntype ComplianceServer interface {\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending the entire request object in the REST body.\n\tRepeatDataBody(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending the a message-type field in the REST body. Per AIP-127, only\n\t// top-level, non-repeated fields can be sent this way.\n\tRepeatDataBodyInfo(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending all request fields as query parameters.\n\tRepeatDataQuery(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request. This method exercises\n\t// sending some parameters as \"simple\" path variables (i.e., of the form\n\t// \"/bar/{foo}\" rather than \"/{foo=bar/*}\"), and the rest as query parameters.\n\tRepeatDataSimplePath(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// Same as RepeatDataSimplePath, but with a path resource.\n\tRepeatDataPathResource(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// Same as RepeatDataSimplePath, but with a trailing resource.\n\tRepeatDataPathTrailingResource(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request, using the HTTP PUT method.\n\tRepeatDataBodyPut(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method echoes the ComplianceData request, using the HTTP PATCH method.\n\tRepeatDataBodyPatch(context.Context, *RepeatRequest) (*RepeatResponse, error)\n\t// This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the\n\t// .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the\n\t// response from this RPC as the request to VerifyEnum()\n\t//\n\t// The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for\n\t// VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.\n\tGetEnum(context.Context, *EnumRequest) (*EnumResponse, error)\n\t// This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()\n\t// verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds\n\t// with the same EnumResponse; otherwise, the RPC errors.\n\t//\n\t// This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,\n\t// although they are not guaranteed to be the same across separate Showcase server runs.\n\tVerifyEnum(context.Context, *EnumResponse) (*EnumResponse, error)\n}\n\n// UnimplementedComplianceServer can be embedded to have forward compatible implementations.\ntype UnimplementedComplianceServer struct {\n}\n\nfunc (*UnimplementedComplianceServer) RepeatDataBody(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataBody not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataBodyInfo(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataBodyInfo not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataQuery(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataQuery not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataSimplePath(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataSimplePath not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataPathResource(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataPathResource not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataPathTrailingResource(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataPathTrailingResource not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataBodyPut(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataBodyPut not implemented\")\n}\nfunc (*UnimplementedComplianceServer) RepeatDataBodyPatch(context.Context, *RepeatRequest) (*RepeatResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method RepeatDataBodyPatch not implemented\")\n}\nfunc (*UnimplementedComplianceServer) GetEnum(context.Context, *EnumRequest) (*EnumResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetEnum not implemented\")\n}\nfunc (*UnimplementedComplianceServer) VerifyEnum(context.Context, *EnumResponse) (*EnumResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method VerifyEnum not implemented\")\n}\n\nfunc RegisterComplianceServer(s *grpc.Server, srv ComplianceServer) {\n\ts.RegisterService(&_Compliance_serviceDesc, srv)\n}\n\nfunc _Compliance_RepeatDataBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataBody(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataBody\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataBody(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataBodyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataBodyInfo\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyInfo(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataQuery(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataQuery\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataQuery(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataSimplePath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataSimplePath(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataSimplePath\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataSimplePath(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataPathResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataPathResource(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataPathResource\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataPathResource(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataPathTrailingResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataPathTrailingResource(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataPathTrailingResource\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataPathTrailingResource(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataBodyPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyPut(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataBodyPut\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyPut(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_RepeatDataBodyPatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RepeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyPatch(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/RepeatDataBodyPatch\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).RepeatDataBodyPatch(ctx, req.(*RepeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_GetEnum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(EnumRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).GetEnum(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/GetEnum\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).GetEnum(ctx, req.(*EnumRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Compliance_VerifyEnum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(EnumResponse)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ComplianceServer).VerifyEnum(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Compliance/VerifyEnum\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ComplianceServer).VerifyEnum(ctx, req.(*EnumResponse))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nvar _Compliance_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.Compliance\",\n\tHandlerType: (*ComplianceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"RepeatDataBody\",\n\t\t\tHandler:    _Compliance_RepeatDataBody_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataBodyInfo\",\n\t\t\tHandler:    _Compliance_RepeatDataBodyInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataQuery\",\n\t\t\tHandler:    _Compliance_RepeatDataQuery_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataSimplePath\",\n\t\t\tHandler:    _Compliance_RepeatDataSimplePath_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataPathResource\",\n\t\t\tHandler:    _Compliance_RepeatDataPathResource_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataPathTrailingResource\",\n\t\t\tHandler:    _Compliance_RepeatDataPathTrailingResource_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataBodyPut\",\n\t\t\tHandler:    _Compliance_RepeatDataBodyPut_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RepeatDataBodyPatch\",\n\t\t\tHandler:    _Compliance_RepeatDataBodyPatch_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetEnum\",\n\t\t\tHandler:    _Compliance_GetEnum_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"VerifyEnum\",\n\t\t\tHandler:    _Compliance_VerifyEnum_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"google/showcase/v1beta1/compliance.proto\",\n}\n"
  },
  {
    "path": "server/genproto/echo.pb.go",
    "content": "// Copyright 2018 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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/echo.proto\n\npackage genproto\n\nimport (\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tstatus \"google.golang.org/genproto/googleapis/rpc/status\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus1 \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// A severity enum used to test enum capabilities in GAPIC surfaces.\ntype Severity int32\n\nconst (\n\tSeverity_UNNECESSARY Severity = 0\n\tSeverity_NECESSARY   Severity = 1\n\tSeverity_URGENT      Severity = 2\n\tSeverity_CRITICAL    Severity = 3\n)\n\n// Enum value maps for Severity.\nvar (\n\tSeverity_name = map[int32]string{\n\t\t0: \"UNNECESSARY\",\n\t\t1: \"NECESSARY\",\n\t\t2: \"URGENT\",\n\t\t3: \"CRITICAL\",\n\t}\n\tSeverity_value = map[string]int32{\n\t\t\"UNNECESSARY\": 0,\n\t\t\"NECESSARY\":   1,\n\t\t\"URGENT\":      2,\n\t\t\"CRITICAL\":    3,\n\t}\n)\n\nfunc (x Severity) Enum() *Severity {\n\tp := new(Severity)\n\t*p = x\n\treturn p\n}\n\nfunc (x Severity) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Severity) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_echo_proto_enumTypes[0].Descriptor()\n}\n\nfunc (Severity) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_echo_proto_enumTypes[0]\n}\n\nfunc (x Severity) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Severity.Descriptor instead.\nfunc (Severity) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{0}\n}\n\n// The request message used for the Echo, Collect and Chat methods.\n// If content or opt are set in this message then the request will succeed.\n// If status is set in this message then the status will be returned as an\n// error.\ntype EchoRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Types that are assignable to Response:\n\t//\n\t//\t*EchoRequest_Content\n\t//\t*EchoRequest_Error\n\tResponse isEchoRequest_Response `protobuf_oneof:\"response\"`\n\t// The severity to be echoed by the server.\n\tSeverity Severity `protobuf:\"varint,3,opt,name=severity,proto3,enum=google.showcase.v1beta1.Severity\" json:\"severity,omitempty\"`\n\t// Optional. This field can be set to test the routing annotation on the Echo method.\n\tHeader string `protobuf:\"bytes,4,opt,name=header,proto3\" json:\"header,omitempty\"`\n\t// Optional. This field can be set to test the routing annotation on the Echo method.\n\tOtherHeader string `protobuf:\"bytes,5,opt,name=other_header,json=otherHeader,proto3\" json:\"other_header,omitempty\"`\n\t// To facilitate testing of https://google.aip.dev/client-libraries/4235\n\tRequestId string `protobuf:\"bytes,7,opt,name=request_id,json=requestId,proto3\" json:\"request_id,omitempty\"`\n\t// To facilitate testing of https://google.aip.dev/client-libraries/4235\n\tOtherRequestId *string `protobuf:\"bytes,8,opt,name=other_request_id,json=otherRequestId,proto3,oneof\" json:\"other_request_id,omitempty\"`\n}\n\nfunc (x *EchoRequest) Reset() {\n\t*x = EchoRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoRequest) ProtoMessage() {}\n\nfunc (x *EchoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.\nfunc (*EchoRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (m *EchoRequest) GetResponse() isEchoRequest_Response {\n\tif m != nil {\n\t\treturn m.Response\n\t}\n\treturn nil\n}\n\nfunc (x *EchoRequest) GetContent() string {\n\tif x, ok := x.GetResponse().(*EchoRequest_Content); ok {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoRequest) GetError() *status.Status {\n\tif x, ok := x.GetResponse().(*EchoRequest_Error); ok {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\nfunc (x *EchoRequest) GetSeverity() Severity {\n\tif x != nil {\n\t\treturn x.Severity\n\t}\n\treturn Severity_UNNECESSARY\n}\n\nfunc (x *EchoRequest) GetHeader() string {\n\tif x != nil {\n\t\treturn x.Header\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoRequest) GetOtherHeader() string {\n\tif x != nil {\n\t\treturn x.OtherHeader\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoRequest) GetRequestId() string {\n\tif x != nil {\n\t\treturn x.RequestId\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoRequest) GetOtherRequestId() string {\n\tif x != nil && x.OtherRequestId != nil {\n\t\treturn *x.OtherRequestId\n\t}\n\treturn \"\"\n}\n\ntype isEchoRequest_Response interface {\n\tisEchoRequest_Response()\n}\n\ntype EchoRequest_Content struct {\n\t// The content to be echoed by the server.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3,oneof\"`\n}\n\ntype EchoRequest_Error struct {\n\t// The error to be thrown by the server.\n\tError *status.Status `protobuf:\"bytes,2,opt,name=error,proto3,oneof\"`\n}\n\nfunc (*EchoRequest_Content) isEchoRequest_Response() {}\n\nfunc (*EchoRequest_Error) isEchoRequest_Response() {}\n\n// The response message for the Echo methods.\ntype EchoResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The content specified in the request.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n\t// The severity specified in the request.\n\tSeverity Severity `protobuf:\"varint,2,opt,name=severity,proto3,enum=google.showcase.v1beta1.Severity\" json:\"severity,omitempty\"`\n\t// The request ID specified or autopopulated in the request.\n\tRequestId string `protobuf:\"bytes,3,opt,name=request_id,json=requestId,proto3\" json:\"request_id,omitempty\"`\n\t// The other request ID specified or autopopulated in the request.\n\tOtherRequestId string `protobuf:\"bytes,4,opt,name=other_request_id,json=otherRequestId,proto3\" json:\"other_request_id,omitempty\"`\n}\n\nfunc (x *EchoResponse) Reset() {\n\t*x = EchoResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoResponse) ProtoMessage() {}\n\nfunc (x *EchoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.\nfunc (*EchoResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *EchoResponse) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoResponse) GetSeverity() Severity {\n\tif x != nil {\n\t\treturn x.Severity\n\t}\n\treturn Severity_UNNECESSARY\n}\n\nfunc (x *EchoResponse) GetRequestId() string {\n\tif x != nil {\n\t\treturn x.RequestId\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoResponse) GetOtherRequestId() string {\n\tif x != nil {\n\t\treturn x.OtherRequestId\n\t}\n\treturn \"\"\n}\n\n// The request message used for the EchoErrorDetails method.\ntype EchoErrorDetailsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Content to return in a singular `*.error.details` field of type\n\t// `google.protobuf.Any`\n\tSingleDetailText string `protobuf:\"bytes,1,opt,name=single_detail_text,json=singleDetailText,proto3\" json:\"single_detail_text,omitempty\"`\n\t// Content to return in a repeated `*.error.details` field of type\n\t// `google.protobuf.Any`\n\tMultiDetailText []string `protobuf:\"bytes,2,rep,name=multi_detail_text,json=multiDetailText,proto3\" json:\"multi_detail_text,omitempty\"`\n}\n\nfunc (x *EchoErrorDetailsRequest) Reset() {\n\t*x = EchoErrorDetailsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoErrorDetailsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoErrorDetailsRequest) ProtoMessage() {}\n\nfunc (x *EchoErrorDetailsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoErrorDetailsRequest.ProtoReflect.Descriptor instead.\nfunc (*EchoErrorDetailsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *EchoErrorDetailsRequest) GetSingleDetailText() string {\n\tif x != nil {\n\t\treturn x.SingleDetailText\n\t}\n\treturn \"\"\n}\n\nfunc (x *EchoErrorDetailsRequest) GetMultiDetailText() []string {\n\tif x != nil {\n\t\treturn x.MultiDetailText\n\t}\n\treturn nil\n}\n\n// The response message used for the EchoErrorDetails method.\ntype EchoErrorDetailsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tSingleDetail    *EchoErrorDetailsResponse_SingleDetail    `protobuf:\"bytes,1,opt,name=single_detail,json=singleDetail,proto3\" json:\"single_detail,omitempty\"`\n\tMultipleDetails *EchoErrorDetailsResponse_MultipleDetails `protobuf:\"bytes,2,opt,name=multiple_details,json=multipleDetails,proto3\" json:\"multiple_details,omitempty\"`\n}\n\nfunc (x *EchoErrorDetailsResponse) Reset() {\n\t*x = EchoErrorDetailsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoErrorDetailsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoErrorDetailsResponse) ProtoMessage() {}\n\nfunc (x *EchoErrorDetailsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoErrorDetailsResponse.ProtoReflect.Descriptor instead.\nfunc (*EchoErrorDetailsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *EchoErrorDetailsResponse) GetSingleDetail() *EchoErrorDetailsResponse_SingleDetail {\n\tif x != nil {\n\t\treturn x.SingleDetail\n\t}\n\treturn nil\n}\n\nfunc (x *EchoErrorDetailsResponse) GetMultipleDetails() *EchoErrorDetailsResponse_MultipleDetails {\n\tif x != nil {\n\t\treturn x.MultipleDetails\n\t}\n\treturn nil\n}\n\ntype ErrorWithSingleDetail struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tDetails *anypb.Any `protobuf:\"bytes,1,opt,name=details,proto3\" json:\"details,omitempty\"`\n}\n\nfunc (x *ErrorWithSingleDetail) Reset() {\n\t*x = ErrorWithSingleDetail{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ErrorWithSingleDetail) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ErrorWithSingleDetail) ProtoMessage() {}\n\nfunc (x *ErrorWithSingleDetail) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ErrorWithSingleDetail.ProtoReflect.Descriptor instead.\nfunc (*ErrorWithSingleDetail) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *ErrorWithSingleDetail) GetDetails() *anypb.Any {\n\tif x != nil {\n\t\treturn x.Details\n\t}\n\treturn nil\n}\n\ntype ErrorWithMultipleDetails struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tDetails []*anypb.Any `protobuf:\"bytes,1,rep,name=details,proto3\" json:\"details,omitempty\"`\n}\n\nfunc (x *ErrorWithMultipleDetails) Reset() {\n\t*x = ErrorWithMultipleDetails{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ErrorWithMultipleDetails) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ErrorWithMultipleDetails) ProtoMessage() {}\n\nfunc (x *ErrorWithMultipleDetails) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ErrorWithMultipleDetails.ProtoReflect.Descriptor instead.\nfunc (*ErrorWithMultipleDetails) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *ErrorWithMultipleDetails) GetDetails() []*anypb.Any {\n\tif x != nil {\n\t\treturn x.Details\n\t}\n\treturn nil\n}\n\n// The custom error detail to be included in the error response from the\n// FailEchoWithDetails method. Client libraries should be able to\n// surface this custom error detail.\ntype PoetryError struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tPoem string `protobuf:\"bytes,1,opt,name=poem,proto3\" json:\"poem,omitempty\"`\n}\n\nfunc (x *PoetryError) Reset() {\n\t*x = PoetryError{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PoetryError) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PoetryError) ProtoMessage() {}\n\nfunc (x *PoetryError) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PoetryError.ProtoReflect.Descriptor instead.\nfunc (*PoetryError) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *PoetryError) GetPoem() string {\n\tif x != nil {\n\t\treturn x.Poem\n\t}\n\treturn \"\"\n}\n\n// The request message used for the FailEchoWithDetails method.\ntype FailEchoWithDetailsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Optional message to echo back in the PoetryError. If empty, a value will be\n\t// provided.\n\tMessage string `protobuf:\"bytes,1,opt,name=message,proto3\" json:\"message,omitempty\"`\n}\n\nfunc (x *FailEchoWithDetailsRequest) Reset() {\n\t*x = FailEchoWithDetailsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *FailEchoWithDetailsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FailEchoWithDetailsRequest) ProtoMessage() {}\n\nfunc (x *FailEchoWithDetailsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FailEchoWithDetailsRequest.ProtoReflect.Descriptor instead.\nfunc (*FailEchoWithDetailsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *FailEchoWithDetailsRequest) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\n// The response message declared (but never used) for the FailEchoWithDetails\n// method.\ntype FailEchoWithDetailsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n}\n\nfunc (x *FailEchoWithDetailsResponse) Reset() {\n\t*x = FailEchoWithDetailsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *FailEchoWithDetailsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FailEchoWithDetailsResponse) ProtoMessage() {}\n\nfunc (x *FailEchoWithDetailsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FailEchoWithDetailsResponse.ProtoReflect.Descriptor instead.\nfunc (*FailEchoWithDetailsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{8}\n}\n\n// The request message for the Expand method.\ntype ExpandRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The content that will be split into words and returned on the stream.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n\t// The error that is thrown after all words are sent on the stream.\n\tError *status.Status `protobuf:\"bytes,2,opt,name=error,proto3\" json:\"error,omitempty\"`\n\t// The wait time between each server streaming messages\n\tStreamWaitTime *durationpb.Duration `protobuf:\"bytes,3,opt,name=stream_wait_time,json=streamWaitTime,proto3\" json:\"stream_wait_time,omitempty\"`\n}\n\nfunc (x *ExpandRequest) Reset() {\n\t*x = ExpandRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ExpandRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ExpandRequest) ProtoMessage() {}\n\nfunc (x *ExpandRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ExpandRequest.ProtoReflect.Descriptor instead.\nfunc (*ExpandRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *ExpandRequest) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *ExpandRequest) GetError() *status.Status {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\nfunc (x *ExpandRequest) GetStreamWaitTime() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.StreamWaitTime\n\t}\n\treturn nil\n}\n\n// The request for the PagedExpand method.\ntype PagedExpandRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The string to expand.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n\t// The number of words to returned in each page.\n\tPageSize int32 `protobuf:\"varint,2,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The position of the page to be returned.\n\tPageToken string `protobuf:\"bytes,3,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *PagedExpandRequest) Reset() {\n\t*x = PagedExpandRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PagedExpandRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PagedExpandRequest) ProtoMessage() {}\n\nfunc (x *PagedExpandRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PagedExpandRequest.ProtoReflect.Descriptor instead.\nfunc (*PagedExpandRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *PagedExpandRequest) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *PagedExpandRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *PagedExpandRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The request for the PagedExpandLegacy method.  This is a pattern used by some legacy APIs. New\n// APIs should NOT use this pattern, but rather something like PagedExpandRequest which conforms to\n// aip.dev/158.\ntype PagedExpandLegacyRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The string to expand.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n\t// The number of words to returned in each page.\n\t// (-- aip.dev/not-precedent: This is a legacy, non-standard pattern that\n\t//\n\t//\tviolates aip.dev/158. Ordinarily, this should be page_size. --)\n\tMaxResults int32 `protobuf:\"varint,2,opt,name=max_results,json=maxResults,proto3\" json:\"max_results,omitempty\"`\n\t// The position of the page to be returned.\n\tPageToken string `protobuf:\"bytes,3,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *PagedExpandLegacyRequest) Reset() {\n\t*x = PagedExpandLegacyRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PagedExpandLegacyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PagedExpandLegacyRequest) ProtoMessage() {}\n\nfunc (x *PagedExpandLegacyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PagedExpandLegacyRequest.ProtoReflect.Descriptor instead.\nfunc (*PagedExpandLegacyRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *PagedExpandLegacyRequest) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *PagedExpandLegacyRequest) GetMaxResults() int32 {\n\tif x != nil {\n\t\treturn x.MaxResults\n\t}\n\treturn 0\n}\n\nfunc (x *PagedExpandLegacyRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The response for the PagedExpand method.\ntype PagedExpandResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The words that were expanded.\n\tResponses []*EchoResponse `protobuf:\"bytes,1,rep,name=responses,proto3\" json:\"responses,omitempty\"`\n\t// The next page token.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *PagedExpandResponse) Reset() {\n\t*x = PagedExpandResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PagedExpandResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PagedExpandResponse) ProtoMessage() {}\n\nfunc (x *PagedExpandResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PagedExpandResponse.ProtoReflect.Descriptor instead.\nfunc (*PagedExpandResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *PagedExpandResponse) GetResponses() []*EchoResponse {\n\tif x != nil {\n\t\treturn x.Responses\n\t}\n\treturn nil\n}\n\nfunc (x *PagedExpandResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// A list of words.\ntype PagedExpandResponseList struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tWords []string `protobuf:\"bytes,1,rep,name=words,proto3\" json:\"words,omitempty\"`\n}\n\nfunc (x *PagedExpandResponseList) Reset() {\n\t*x = PagedExpandResponseList{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[13]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PagedExpandResponseList) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PagedExpandResponseList) ProtoMessage() {}\n\nfunc (x *PagedExpandResponseList) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[13]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PagedExpandResponseList.ProtoReflect.Descriptor instead.\nfunc (*PagedExpandResponseList) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *PagedExpandResponseList) GetWords() []string {\n\tif x != nil {\n\t\treturn x.Words\n\t}\n\treturn nil\n}\n\ntype PagedExpandLegacyMappedResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The words that were expanded, indexed by their initial character.\n\t// (-- aip.dev/not-precedent: This is a legacy, non-standard pattern that violates\n\t//\n\t//\taip.dev/158. Ordinarily, this should be a `repeated` field, as in PagedExpandResponse. --)\n\tAlphabetized map[string]*PagedExpandResponseList `protobuf:\"bytes,1,rep,name=alphabetized,proto3\" json:\"alphabetized,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\"`\n\t// The next page token.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *PagedExpandLegacyMappedResponse) Reset() {\n\t*x = PagedExpandLegacyMappedResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[14]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PagedExpandLegacyMappedResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PagedExpandLegacyMappedResponse) ProtoMessage() {}\n\nfunc (x *PagedExpandLegacyMappedResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[14]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PagedExpandLegacyMappedResponse.ProtoReflect.Descriptor instead.\nfunc (*PagedExpandLegacyMappedResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *PagedExpandLegacyMappedResponse) GetAlphabetized() map[string]*PagedExpandResponseList {\n\tif x != nil {\n\t\treturn x.Alphabetized\n\t}\n\treturn nil\n}\n\nfunc (x *PagedExpandLegacyMappedResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// The request for Wait method.\ntype WaitRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Types that are assignable to End:\n\t//\n\t//\t*WaitRequest_EndTime\n\t//\t*WaitRequest_Ttl\n\tEnd isWaitRequest_End `protobuf_oneof:\"end\"`\n\t// Types that are assignable to Response:\n\t//\n\t//\t*WaitRequest_Error\n\t//\t*WaitRequest_Success\n\tResponse isWaitRequest_Response `protobuf_oneof:\"response\"`\n}\n\nfunc (x *WaitRequest) Reset() {\n\t*x = WaitRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[15]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *WaitRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*WaitRequest) ProtoMessage() {}\n\nfunc (x *WaitRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[15]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use WaitRequest.ProtoReflect.Descriptor instead.\nfunc (*WaitRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (m *WaitRequest) GetEnd() isWaitRequest_End {\n\tif m != nil {\n\t\treturn m.End\n\t}\n\treturn nil\n}\n\nfunc (x *WaitRequest) GetEndTime() *timestamppb.Timestamp {\n\tif x, ok := x.GetEnd().(*WaitRequest_EndTime); ok {\n\t\treturn x.EndTime\n\t}\n\treturn nil\n}\n\nfunc (x *WaitRequest) GetTtl() *durationpb.Duration {\n\tif x, ok := x.GetEnd().(*WaitRequest_Ttl); ok {\n\t\treturn x.Ttl\n\t}\n\treturn nil\n}\n\nfunc (m *WaitRequest) GetResponse() isWaitRequest_Response {\n\tif m != nil {\n\t\treturn m.Response\n\t}\n\treturn nil\n}\n\nfunc (x *WaitRequest) GetError() *status.Status {\n\tif x, ok := x.GetResponse().(*WaitRequest_Error); ok {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\nfunc (x *WaitRequest) GetSuccess() *WaitResponse {\n\tif x, ok := x.GetResponse().(*WaitRequest_Success); ok {\n\t\treturn x.Success\n\t}\n\treturn nil\n}\n\ntype isWaitRequest_End interface {\n\tisWaitRequest_End()\n}\n\ntype WaitRequest_EndTime struct {\n\t// The time that this operation will complete.\n\tEndTime *timestamppb.Timestamp `protobuf:\"bytes,1,opt,name=end_time,json=endTime,proto3,oneof\"`\n}\n\ntype WaitRequest_Ttl struct {\n\t// The duration of this operation.\n\tTtl *durationpb.Duration `protobuf:\"bytes,4,opt,name=ttl,proto3,oneof\"`\n}\n\nfunc (*WaitRequest_EndTime) isWaitRequest_End() {}\n\nfunc (*WaitRequest_Ttl) isWaitRequest_End() {}\n\ntype isWaitRequest_Response interface {\n\tisWaitRequest_Response()\n}\n\ntype WaitRequest_Error struct {\n\t// The error that will be returned by the server. If this code is specified\n\t// to be the OK rpc code, an empty response will be returned.\n\tError *status.Status `protobuf:\"bytes,2,opt,name=error,proto3,oneof\"`\n}\n\ntype WaitRequest_Success struct {\n\t// The response to be returned on operation completion.\n\tSuccess *WaitResponse `protobuf:\"bytes,3,opt,name=success,proto3,oneof\"`\n}\n\nfunc (*WaitRequest_Error) isWaitRequest_Response() {}\n\nfunc (*WaitRequest_Success) isWaitRequest_Response() {}\n\n// The result of the Wait operation.\ntype WaitResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// This content of the result.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n}\n\nfunc (x *WaitResponse) Reset() {\n\t*x = WaitResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[16]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *WaitResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*WaitResponse) ProtoMessage() {}\n\nfunc (x *WaitResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[16]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use WaitResponse.ProtoReflect.Descriptor instead.\nfunc (*WaitResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *WaitResponse) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\n// The metadata for Wait operation.\ntype WaitMetadata struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The time that this operation will complete.\n\tEndTime *timestamppb.Timestamp `protobuf:\"bytes,1,opt,name=end_time,json=endTime,proto3\" json:\"end_time,omitempty\"`\n}\n\nfunc (x *WaitMetadata) Reset() {\n\t*x = WaitMetadata{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[17]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *WaitMetadata) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*WaitMetadata) ProtoMessage() {}\n\nfunc (x *WaitMetadata) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[17]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use WaitMetadata.ProtoReflect.Descriptor instead.\nfunc (*WaitMetadata) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{17}\n}\n\nfunc (x *WaitMetadata) GetEndTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.EndTime\n\t}\n\treturn nil\n}\n\n// The request for Block method.\ntype BlockRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The amount of time to block before returning a response.\n\tResponseDelay *durationpb.Duration `protobuf:\"bytes,1,opt,name=response_delay,json=responseDelay,proto3\" json:\"response_delay,omitempty\"`\n\t// Types that are assignable to Response:\n\t//\n\t//\t*BlockRequest_Error\n\t//\t*BlockRequest_Success\n\tResponse isBlockRequest_Response `protobuf_oneof:\"response\"`\n}\n\nfunc (x *BlockRequest) Reset() {\n\t*x = BlockRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[18]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *BlockRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*BlockRequest) ProtoMessage() {}\n\nfunc (x *BlockRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[18]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead.\nfunc (*BlockRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *BlockRequest) GetResponseDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.ResponseDelay\n\t}\n\treturn nil\n}\n\nfunc (m *BlockRequest) GetResponse() isBlockRequest_Response {\n\tif m != nil {\n\t\treturn m.Response\n\t}\n\treturn nil\n}\n\nfunc (x *BlockRequest) GetError() *status.Status {\n\tif x, ok := x.GetResponse().(*BlockRequest_Error); ok {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\nfunc (x *BlockRequest) GetSuccess() *BlockResponse {\n\tif x, ok := x.GetResponse().(*BlockRequest_Success); ok {\n\t\treturn x.Success\n\t}\n\treturn nil\n}\n\ntype isBlockRequest_Response interface {\n\tisBlockRequest_Response()\n}\n\ntype BlockRequest_Error struct {\n\t// The error that will be returned by the server. If this code is specified\n\t// to be the OK rpc code, an empty response will be returned.\n\tError *status.Status `protobuf:\"bytes,2,opt,name=error,proto3,oneof\"`\n}\n\ntype BlockRequest_Success struct {\n\t// The response to be returned that will signify successful method call.\n\tSuccess *BlockResponse `protobuf:\"bytes,3,opt,name=success,proto3,oneof\"`\n}\n\nfunc (*BlockRequest_Error) isBlockRequest_Response() {}\n\nfunc (*BlockRequest_Success) isBlockRequest_Response() {}\n\n// The response for Block method.\ntype BlockResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// This content can contain anything, the server will not depend on a value\n\t// here.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n}\n\nfunc (x *BlockResponse) Reset() {\n\t*x = BlockResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[19]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *BlockResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*BlockResponse) ProtoMessage() {}\n\nfunc (x *BlockResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[19]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.\nfunc (*BlockResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{19}\n}\n\nfunc (x *BlockResponse) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\ntype EchoErrorDetailsResponse_SingleDetail struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tError *ErrorWithSingleDetail `protobuf:\"bytes,1,opt,name=error,proto3\" json:\"error,omitempty\"`\n}\n\nfunc (x *EchoErrorDetailsResponse_SingleDetail) Reset() {\n\t*x = EchoErrorDetailsResponse_SingleDetail{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[20]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoErrorDetailsResponse_SingleDetail) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoErrorDetailsResponse_SingleDetail) ProtoMessage() {}\n\nfunc (x *EchoErrorDetailsResponse_SingleDetail) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[20]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoErrorDetailsResponse_SingleDetail.ProtoReflect.Descriptor instead.\nfunc (*EchoErrorDetailsResponse_SingleDetail) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3, 0}\n}\n\nfunc (x *EchoErrorDetailsResponse_SingleDetail) GetError() *ErrorWithSingleDetail {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\ntype EchoErrorDetailsResponse_MultipleDetails struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tError *ErrorWithMultipleDetails `protobuf:\"bytes,1,opt,name=error,proto3\" json:\"error,omitempty\"`\n}\n\nfunc (x *EchoErrorDetailsResponse_MultipleDetails) Reset() {\n\t*x = EchoErrorDetailsResponse_MultipleDetails{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[21]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *EchoErrorDetailsResponse_MultipleDetails) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EchoErrorDetailsResponse_MultipleDetails) ProtoMessage() {}\n\nfunc (x *EchoErrorDetailsResponse_MultipleDetails) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_echo_proto_msgTypes[21]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EchoErrorDetailsResponse_MultipleDetails.ProtoReflect.Descriptor instead.\nfunc (*EchoErrorDetailsResponse_MultipleDetails) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3, 1}\n}\n\nfunc (x *EchoErrorDetailsResponse_MultipleDetails) GetError() *ErrorWithMultipleDetails {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\nvar File_google_showcase_v1beta1_echo_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_echo_proto_rawDesc = []byte{\n\t0x0a, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,\n\t0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,\n\t0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72,\n\t0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67,\n\t0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,\n\t0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,\n\t0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,\n\t0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x02, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,\n\t0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,\n\t0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53,\n\t0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3d,\n\t0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,\n\t0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72,\n\t0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a,\n\t0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68,\n\t0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68,\n\t0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x74, 0x68,\n\t0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xe2, 0x8c,\n\t0xcf, 0xd7, 0x08, 0x02, 0x08, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,\n\t0x64, 0x12, 0x37, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xe2, 0x8c, 0xcf,\n\t0xd7, 0x08, 0x02, 0x08, 0x01, 0x48, 0x01, 0x52, 0x0e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72,\n\t0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c,\n\t0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07,\n\t0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,\n\t0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69,\n\t0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76,\n\t0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x72, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,\n\t0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x73,\n\t0x0a, 0x17, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,\n\t0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x69, 0x6e,\n\t0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69,\n\t0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x03,\n\t0x28, 0x09, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x54,\n\t0x65, 0x78, 0x74, 0x22, 0x9f, 0x03, 0x0a, 0x18, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f,\n\t0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x12, 0x63, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69,\n\t0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,\n\t0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c,\n\t0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44,\n\t0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x6c, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c,\n\t0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72,\n\t0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69,\n\t0x6c, 0x73, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61,\n\t0x69, 0x6c, 0x73, 0x1a, 0x54, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x12, 0x44, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72,\n\t0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61,\n\t0x69, 0x6c, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x5a, 0x0a, 0x0f, 0x4d, 0x75, 0x6c,\n\t0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x05,\n\t0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x4d,\n\t0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x05,\n\t0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x15, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69,\n\t0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x2e,\n\t0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,\n\t0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x4a,\n\t0x0a, 0x18, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69,\n\t0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65,\n\t0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,\n\t0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x6f,\n\t0x65, 0x74, 0x72, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x65,\n\t0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x65, 0x6d, 0x22, 0x36, 0x0a,\n\t0x1a, 0x46, 0x61, 0x69, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d,\n\t0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,\n\t0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x46, 0x61, 0x69, 0x6c, 0x45, 0x63, 0x68,\n\t0x6f, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,\n\t0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,\n\t0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61,\n\t0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x74,\n\t0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,\n\t0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22,\n\t0x6f, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6e,\n\t0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,\n\t0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,\n\t0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,\n\t0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,\n\t0x22, 0x79, 0x0a, 0x18, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c,\n\t0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07,\n\t0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,\n\t0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d,\n\t0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,\n\t0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a,\n\t0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x13,\n\t0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73,\n\t0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,\n\t0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,\n\t0x22, 0x2f, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77,\n\t0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x77, 0x6f, 0x72, 0x64,\n\t0x73, 0x22, 0xac, 0x02, 0x0a, 0x1f, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e,\n\t0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65,\n\t0x74, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e,\n\t0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a,\n\t0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65,\n\t0x74, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,\n\t0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,\n\t0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x71, 0x0a,\n\t0x11, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x6e, 0x74,\n\t0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61,\n\t0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,\n\t0x22, 0xf7, 0x01, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x12, 0x37, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00,\n\t0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x74, 0x6c,\n\t0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x48, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,\n\t0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x01, 0x52, 0x05, 0x65,\n\t0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,\n\t0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x01, 0x52, 0x07,\n\t0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x0a,\n\t0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x57, 0x61,\n\t0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,\n\t0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,\n\t0x74, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61,\n\t0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,\n\t0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x0c,\n\t0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e,\n\t0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,\n\t0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2a,\n\t0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,\n\t0x73, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x75,\n\t0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0a,\n\t0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x42, 0x6c,\n\t0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,\n\t0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,\n\t0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x44, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74,\n\t0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x4e, 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59,\n\t0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59, 0x10,\n\t0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x52, 0x47, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a,\n\t0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x32, 0xdf, 0x0e, 0x0a, 0x04,\n\t0x45, 0x63, 0x68, 0x6f, 0x12, 0x94, 0x03, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x24, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63,\n\t0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbe, 0x02, 0x82, 0xd3, 0xe4,\n\t0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x63, 0x68, 0x6f, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x9a,\n\t0x02, 0x12, 0x08, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x68,\n\t0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x7b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f,\n\t0x69, 0x64, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,\n\t0x12, 0x21, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65,\n\t0x67, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x2f, 0x2a, 0x2f,\n\t0x2a, 0x2a, 0x7d, 0x12, 0x22, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x7b,\n\t0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,\n\t0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x30, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,\n\t0x72, 0x12, 0x26, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,\n\t0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,\n\t0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x2a, 0x2a, 0x7d, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, 0x61,\n\t0x64, 0x65, 0x72, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,\n\t0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x3d, 0x69, 0x6e, 0x73,\n\t0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x18, 0x0a, 0x0c,\n\t0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x08, 0x7b, 0x62,\n\t0x61, 0x7a, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f,\n\t0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, 0x7b, 0x71, 0x75, 0x78, 0x3d, 0x70, 0x72, 0x6f,\n\t0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x9f, 0x01, 0x0a, 0x10,\n\t0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,\n\t0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45,\n\t0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68,\n\t0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a,\n\t0x22, 0x1b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a,\n\t0x65, 0x72, 0x72, 0x6f, 0x72, 0x2d, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xaa, 0x01,\n\t0x0a, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65,\n\t0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x46, 0x61, 0x69, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61,\n\t0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x57, 0x69, 0x74,\n\t0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x66, 0x61, 0x69, 0x6c, 0x57,\n\t0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x45,\n\t0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,\n\t0x2c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22,\n\t0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65,\n\t0x78, 0x70, 0x61, 0x6e, 0x64, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6c, 0x65,\n\t0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68,\n\t0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63,\n\t0x74, 0x28, 0x01, 0x12, 0x57, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a,\n\t0x0b, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x2b, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61,\n\t0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a,\n\t0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68,\n\t0x6f, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0xa0, 0x01,\n\t0x0a, 0x11, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67,\n\t0x61, 0x63, 0x79, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61,\n\t0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22,\n\t0x1f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70,\n\t0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,\n\t0x12, 0xb2, 0x01, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64,\n\t0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x2b, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61,\n\t0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c,\n\t0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25,\n\t0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61,\n\t0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d,\n\t0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x89, 0x01, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x24,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f,\n\t0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x22, 0x3c, 0xca, 0x41, 0x1c, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61,\n\t0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x77, 0x61, 0x69,\n\t0x74, 0x12, 0x76, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63,\n\t0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02,\n\t0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65,\n\t0x63, 0x68, 0x6f, 0x3a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x22, 0xca, 0x41, 0x0e, 0x6c, 0x6f,\n\t0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x37, 0x34, 0x36, 0x39, 0x8a, 0xd4, 0xdb, 0xd2,\n\t0x0f, 0x0b, 0x76, 0x31, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x30, 0x34, 0x30, 0x38, 0x42, 0x71, 0x0a,\n\t0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34,\n\t0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_echo_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_echo_proto_rawDescData = file_google_showcase_v1beta1_echo_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_echo_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_echo_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_echo_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_echo_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_echo_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_echo_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_google_showcase_v1beta1_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 23)\nvar file_google_showcase_v1beta1_echo_proto_goTypes = []interface{}{\n\t(Severity)(0),                                    // 0: google.showcase.v1beta1.Severity\n\t(*EchoRequest)(nil),                              // 1: google.showcase.v1beta1.EchoRequest\n\t(*EchoResponse)(nil),                             // 2: google.showcase.v1beta1.EchoResponse\n\t(*EchoErrorDetailsRequest)(nil),                  // 3: google.showcase.v1beta1.EchoErrorDetailsRequest\n\t(*EchoErrorDetailsResponse)(nil),                 // 4: google.showcase.v1beta1.EchoErrorDetailsResponse\n\t(*ErrorWithSingleDetail)(nil),                    // 5: google.showcase.v1beta1.ErrorWithSingleDetail\n\t(*ErrorWithMultipleDetails)(nil),                 // 6: google.showcase.v1beta1.ErrorWithMultipleDetails\n\t(*PoetryError)(nil),                              // 7: google.showcase.v1beta1.PoetryError\n\t(*FailEchoWithDetailsRequest)(nil),               // 8: google.showcase.v1beta1.FailEchoWithDetailsRequest\n\t(*FailEchoWithDetailsResponse)(nil),              // 9: google.showcase.v1beta1.FailEchoWithDetailsResponse\n\t(*ExpandRequest)(nil),                            // 10: google.showcase.v1beta1.ExpandRequest\n\t(*PagedExpandRequest)(nil),                       // 11: google.showcase.v1beta1.PagedExpandRequest\n\t(*PagedExpandLegacyRequest)(nil),                 // 12: google.showcase.v1beta1.PagedExpandLegacyRequest\n\t(*PagedExpandResponse)(nil),                      // 13: google.showcase.v1beta1.PagedExpandResponse\n\t(*PagedExpandResponseList)(nil),                  // 14: google.showcase.v1beta1.PagedExpandResponseList\n\t(*PagedExpandLegacyMappedResponse)(nil),          // 15: google.showcase.v1beta1.PagedExpandLegacyMappedResponse\n\t(*WaitRequest)(nil),                              // 16: google.showcase.v1beta1.WaitRequest\n\t(*WaitResponse)(nil),                             // 17: google.showcase.v1beta1.WaitResponse\n\t(*WaitMetadata)(nil),                             // 18: google.showcase.v1beta1.WaitMetadata\n\t(*BlockRequest)(nil),                             // 19: google.showcase.v1beta1.BlockRequest\n\t(*BlockResponse)(nil),                            // 20: google.showcase.v1beta1.BlockResponse\n\t(*EchoErrorDetailsResponse_SingleDetail)(nil),    // 21: google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail\n\t(*EchoErrorDetailsResponse_MultipleDetails)(nil), // 22: google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails\n\tnil,                             // 23: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry\n\t(*status.Status)(nil),           // 24: google.rpc.Status\n\t(*anypb.Any)(nil),               // 25: google.protobuf.Any\n\t(*durationpb.Duration)(nil),     // 26: google.protobuf.Duration\n\t(*timestamppb.Timestamp)(nil),   // 27: google.protobuf.Timestamp\n\t(*longrunningpb.Operation)(nil), // 28: google.longrunning.Operation\n}\nvar file_google_showcase_v1beta1_echo_proto_depIdxs = []int32{\n\t24, // 0: google.showcase.v1beta1.EchoRequest.error:type_name -> google.rpc.Status\n\t0,  // 1: google.showcase.v1beta1.EchoRequest.severity:type_name -> google.showcase.v1beta1.Severity\n\t0,  // 2: google.showcase.v1beta1.EchoResponse.severity:type_name -> google.showcase.v1beta1.Severity\n\t21, // 3: google.showcase.v1beta1.EchoErrorDetailsResponse.single_detail:type_name -> google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail\n\t22, // 4: google.showcase.v1beta1.EchoErrorDetailsResponse.multiple_details:type_name -> google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails\n\t25, // 5: google.showcase.v1beta1.ErrorWithSingleDetail.details:type_name -> google.protobuf.Any\n\t25, // 6: google.showcase.v1beta1.ErrorWithMultipleDetails.details:type_name -> google.protobuf.Any\n\t24, // 7: google.showcase.v1beta1.ExpandRequest.error:type_name -> google.rpc.Status\n\t26, // 8: google.showcase.v1beta1.ExpandRequest.stream_wait_time:type_name -> google.protobuf.Duration\n\t2,  // 9: google.showcase.v1beta1.PagedExpandResponse.responses:type_name -> google.showcase.v1beta1.EchoResponse\n\t23, // 10: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.alphabetized:type_name -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry\n\t27, // 11: google.showcase.v1beta1.WaitRequest.end_time:type_name -> google.protobuf.Timestamp\n\t26, // 12: google.showcase.v1beta1.WaitRequest.ttl:type_name -> google.protobuf.Duration\n\t24, // 13: google.showcase.v1beta1.WaitRequest.error:type_name -> google.rpc.Status\n\t17, // 14: google.showcase.v1beta1.WaitRequest.success:type_name -> google.showcase.v1beta1.WaitResponse\n\t27, // 15: google.showcase.v1beta1.WaitMetadata.end_time:type_name -> google.protobuf.Timestamp\n\t26, // 16: google.showcase.v1beta1.BlockRequest.response_delay:type_name -> google.protobuf.Duration\n\t24, // 17: google.showcase.v1beta1.BlockRequest.error:type_name -> google.rpc.Status\n\t20, // 18: google.showcase.v1beta1.BlockRequest.success:type_name -> google.showcase.v1beta1.BlockResponse\n\t5,  // 19: google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail.error:type_name -> google.showcase.v1beta1.ErrorWithSingleDetail\n\t6,  // 20: google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails.error:type_name -> google.showcase.v1beta1.ErrorWithMultipleDetails\n\t14, // 21: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry.value:type_name -> google.showcase.v1beta1.PagedExpandResponseList\n\t1,  // 22: google.showcase.v1beta1.Echo.Echo:input_type -> google.showcase.v1beta1.EchoRequest\n\t3,  // 23: google.showcase.v1beta1.Echo.EchoErrorDetails:input_type -> google.showcase.v1beta1.EchoErrorDetailsRequest\n\t8,  // 24: google.showcase.v1beta1.Echo.FailEchoWithDetails:input_type -> google.showcase.v1beta1.FailEchoWithDetailsRequest\n\t10, // 25: google.showcase.v1beta1.Echo.Expand:input_type -> google.showcase.v1beta1.ExpandRequest\n\t1,  // 26: google.showcase.v1beta1.Echo.Collect:input_type -> google.showcase.v1beta1.EchoRequest\n\t1,  // 27: google.showcase.v1beta1.Echo.Chat:input_type -> google.showcase.v1beta1.EchoRequest\n\t11, // 28: google.showcase.v1beta1.Echo.PagedExpand:input_type -> google.showcase.v1beta1.PagedExpandRequest\n\t12, // 29: google.showcase.v1beta1.Echo.PagedExpandLegacy:input_type -> google.showcase.v1beta1.PagedExpandLegacyRequest\n\t11, // 30: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:input_type -> google.showcase.v1beta1.PagedExpandRequest\n\t16, // 31: google.showcase.v1beta1.Echo.Wait:input_type -> google.showcase.v1beta1.WaitRequest\n\t19, // 32: google.showcase.v1beta1.Echo.Block:input_type -> google.showcase.v1beta1.BlockRequest\n\t2,  // 33: google.showcase.v1beta1.Echo.Echo:output_type -> google.showcase.v1beta1.EchoResponse\n\t4,  // 34: google.showcase.v1beta1.Echo.EchoErrorDetails:output_type -> google.showcase.v1beta1.EchoErrorDetailsResponse\n\t9,  // 35: google.showcase.v1beta1.Echo.FailEchoWithDetails:output_type -> google.showcase.v1beta1.FailEchoWithDetailsResponse\n\t2,  // 36: google.showcase.v1beta1.Echo.Expand:output_type -> google.showcase.v1beta1.EchoResponse\n\t2,  // 37: google.showcase.v1beta1.Echo.Collect:output_type -> google.showcase.v1beta1.EchoResponse\n\t2,  // 38: google.showcase.v1beta1.Echo.Chat:output_type -> google.showcase.v1beta1.EchoResponse\n\t13, // 39: google.showcase.v1beta1.Echo.PagedExpand:output_type -> google.showcase.v1beta1.PagedExpandResponse\n\t13, // 40: google.showcase.v1beta1.Echo.PagedExpandLegacy:output_type -> google.showcase.v1beta1.PagedExpandResponse\n\t15, // 41: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:output_type -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse\n\t28, // 42: google.showcase.v1beta1.Echo.Wait:output_type -> google.longrunning.Operation\n\t20, // 43: google.showcase.v1beta1.Echo.Block:output_type -> google.showcase.v1beta1.BlockResponse\n\t33, // [33:44] is the sub-list for method output_type\n\t22, // [22:33] is the sub-list for method input_type\n\t22, // [22:22] is the sub-list for extension type_name\n\t22, // [22:22] is the sub-list for extension extendee\n\t0,  // [0:22] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_echo_proto_init() }\nfunc file_google_showcase_v1beta1_echo_proto_init() {\n\tif File_google_showcase_v1beta1_echo_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoErrorDetailsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoErrorDetailsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ErrorWithSingleDetail); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ErrorWithMultipleDetails); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PoetryError); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*FailEchoWithDetailsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*FailEchoWithDetailsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ExpandRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PagedExpandRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PagedExpandLegacyRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PagedExpandResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PagedExpandResponseList); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PagedExpandLegacyMappedResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*WaitRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*WaitResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*WaitMetadata); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*BlockRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*BlockResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoErrorDetailsResponse_SingleDetail); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_echo_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*EchoErrorDetailsResponse_MultipleDetails); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\tfile_google_showcase_v1beta1_echo_proto_msgTypes[0].OneofWrappers = []interface{}{\n\t\t(*EchoRequest_Content)(nil),\n\t\t(*EchoRequest_Error)(nil),\n\t}\n\tfile_google_showcase_v1beta1_echo_proto_msgTypes[15].OneofWrappers = []interface{}{\n\t\t(*WaitRequest_EndTime)(nil),\n\t\t(*WaitRequest_Ttl)(nil),\n\t\t(*WaitRequest_Error)(nil),\n\t\t(*WaitRequest_Success)(nil),\n\t}\n\tfile_google_showcase_v1beta1_echo_proto_msgTypes[18].OneofWrappers = []interface{}{\n\t\t(*BlockRequest_Error)(nil),\n\t\t(*BlockRequest_Success)(nil),\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_echo_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   23,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_echo_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_echo_proto_depIdxs,\n\t\tEnumInfos:         file_google_showcase_v1beta1_echo_proto_enumTypes,\n\t\tMessageInfos:      file_google_showcase_v1beta1_echo_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_echo_proto = out.File\n\tfile_google_showcase_v1beta1_echo_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_echo_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_echo_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// EchoClient is the client API for Echo service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype EchoClient interface {\n\t// This method simply echoes the request. This method showcases unary RPCs.\n\tEcho(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)\n\t// This method returns error details in a repeated \"google.protobuf.Any\"\n\t// field. This method showcases handling errors thus encoded, particularly\n\t// over REST transport. Note that GAPICs only allow the type\n\t// \"google.protobuf.Any\" for field paths ending in \"error.details\", and, at\n\t// run-time, the actual types for these fields must be one of the types in\n\t// google/rpc/error_details.proto.\n\tEchoErrorDetails(ctx context.Context, in *EchoErrorDetailsRequest, opts ...grpc.CallOption) (*EchoErrorDetailsResponse, error)\n\t// This method always fails with a gRPC \"Aborted\" error status that contains\n\t// multiple error details.  These include one instance of each of the standard\n\t// ones in error_details.proto\n\t// (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto)\n\t// plus a custom, Showcase-defined PoetryError. The intent of this RPC is to\n\t// verify that GAPICs can process these various error details and surface them\n\t// to the user in an idiomatic form.\n\tFailEchoWithDetails(ctx context.Context, in *FailEchoWithDetailsRequest, opts ...grpc.CallOption) (*FailEchoWithDetailsResponse, error)\n\t// This method splits the given content into words and will pass each word back\n\t// through the stream. This method showcases server-side streaming RPCs.\n\tExpand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (Echo_ExpandClient, error)\n\t// This method will collect the words given to it. When the stream is closed\n\t// by the client, this method will return the a concatenation of the strings\n\t// passed to it. This method showcases client-side streaming RPCs.\n\tCollect(ctx context.Context, opts ...grpc.CallOption) (Echo_CollectClient, error)\n\t// This method, upon receiving a request on the stream, will pass the same\n\t// content back on the stream. This method showcases bidirectional\n\t// streaming RPCs.\n\tChat(ctx context.Context, opts ...grpc.CallOption) (Echo_ChatClient, error)\n\t// This is similar to the Expand method but instead of returning a stream of\n\t// expanded words, this method returns a paged list of expanded words.\n\tPagedExpand(ctx context.Context, in *PagedExpandRequest, opts ...grpc.CallOption) (*PagedExpandResponse, error)\n\t// This is similar to the PagedExpand except that it uses\n\t// max_results instead of page_size, as some legacy APIs still\n\t// do. New APIs should NOT use this pattern.\n\tPagedExpandLegacy(ctx context.Context, in *PagedExpandLegacyRequest, opts ...grpc.CallOption) (*PagedExpandResponse, error)\n\t// This method returns a map containing lists of words that appear in the input, keyed by their\n\t// initial character. The only words returned are the ones included in the current page,\n\t// as determined by page_token and page_size, which both refer to the word indices in the\n\t// input. This paging result consisting of a map of lists is a pattern used by some legacy\n\t// APIs. New APIs should NOT use this pattern.\n\tPagedExpandLegacyMapped(ctx context.Context, in *PagedExpandRequest, opts ...grpc.CallOption) (*PagedExpandLegacyMappedResponse, error)\n\t// This method will wait for the requested amount of time and then return.\n\t// This method showcases how a client handles a request timeout.\n\tWait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)\n\t// This method will block (wait) for the requested amount of time\n\t// and then return the response or error.\n\t// This method showcases how a client handles delays or retries.\n\tBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error)\n}\n\ntype echoClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewEchoClient(cc grpc.ClientConnInterface) EchoClient {\n\treturn &echoClient{cc}\n}\n\nfunc (c *echoClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) {\n\tout := new(EchoResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/Echo\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) EchoErrorDetails(ctx context.Context, in *EchoErrorDetailsRequest, opts ...grpc.CallOption) (*EchoErrorDetailsResponse, error) {\n\tout := new(EchoErrorDetailsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/EchoErrorDetails\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) FailEchoWithDetails(ctx context.Context, in *FailEchoWithDetailsRequest, opts ...grpc.CallOption) (*FailEchoWithDetailsResponse, error) {\n\tout := new(FailEchoWithDetailsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/FailEchoWithDetails\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (Echo_ExpandClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Echo_serviceDesc.Streams[0], \"/google.showcase.v1beta1.Echo/Expand\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &echoExpandClient{stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype Echo_ExpandClient interface {\n\tRecv() (*EchoResponse, error)\n\tgrpc.ClientStream\n}\n\ntype echoExpandClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *echoExpandClient) Recv() (*EchoResponse, error) {\n\tm := new(EchoResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *echoClient) Collect(ctx context.Context, opts ...grpc.CallOption) (Echo_CollectClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Echo_serviceDesc.Streams[1], \"/google.showcase.v1beta1.Echo/Collect\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &echoCollectClient{stream}\n\treturn x, nil\n}\n\ntype Echo_CollectClient interface {\n\tSend(*EchoRequest) error\n\tCloseAndRecv() (*EchoResponse, error)\n\tgrpc.ClientStream\n}\n\ntype echoCollectClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *echoCollectClient) Send(m *EchoRequest) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *echoCollectClient) CloseAndRecv() (*EchoResponse, error) {\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\tm := new(EchoResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *echoClient) Chat(ctx context.Context, opts ...grpc.CallOption) (Echo_ChatClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Echo_serviceDesc.Streams[2], \"/google.showcase.v1beta1.Echo/Chat\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &echoChatClient{stream}\n\treturn x, nil\n}\n\ntype Echo_ChatClient interface {\n\tSend(*EchoRequest) error\n\tRecv() (*EchoResponse, error)\n\tgrpc.ClientStream\n}\n\ntype echoChatClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *echoChatClient) Send(m *EchoRequest) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *echoChatClient) Recv() (*EchoResponse, error) {\n\tm := new(EchoResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *echoClient) PagedExpand(ctx context.Context, in *PagedExpandRequest, opts ...grpc.CallOption) (*PagedExpandResponse, error) {\n\tout := new(PagedExpandResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/PagedExpand\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) PagedExpandLegacy(ctx context.Context, in *PagedExpandLegacyRequest, opts ...grpc.CallOption) (*PagedExpandResponse, error) {\n\tout := new(PagedExpandResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/PagedExpandLegacy\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) PagedExpandLegacyMapped(ctx context.Context, in *PagedExpandRequest, opts ...grpc.CallOption) (*PagedExpandLegacyMappedResponse, error) {\n\tout := new(PagedExpandLegacyMappedResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/PagedExpandLegacyMapped\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {\n\tout := new(longrunningpb.Operation)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/Wait\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *echoClient) Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) {\n\tout := new(BlockResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Echo/Block\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// EchoServer is the server API for Echo service.\ntype EchoServer interface {\n\t// This method simply echoes the request. This method showcases unary RPCs.\n\tEcho(context.Context, *EchoRequest) (*EchoResponse, error)\n\t// This method returns error details in a repeated \"google.protobuf.Any\"\n\t// field. This method showcases handling errors thus encoded, particularly\n\t// over REST transport. Note that GAPICs only allow the type\n\t// \"google.protobuf.Any\" for field paths ending in \"error.details\", and, at\n\t// run-time, the actual types for these fields must be one of the types in\n\t// google/rpc/error_details.proto.\n\tEchoErrorDetails(context.Context, *EchoErrorDetailsRequest) (*EchoErrorDetailsResponse, error)\n\t// This method always fails with a gRPC \"Aborted\" error status that contains\n\t// multiple error details.  These include one instance of each of the standard\n\t// ones in error_details.proto\n\t// (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto)\n\t// plus a custom, Showcase-defined PoetryError. The intent of this RPC is to\n\t// verify that GAPICs can process these various error details and surface them\n\t// to the user in an idiomatic form.\n\tFailEchoWithDetails(context.Context, *FailEchoWithDetailsRequest) (*FailEchoWithDetailsResponse, error)\n\t// This method splits the given content into words and will pass each word back\n\t// through the stream. This method showcases server-side streaming RPCs.\n\tExpand(*ExpandRequest, Echo_ExpandServer) error\n\t// This method will collect the words given to it. When the stream is closed\n\t// by the client, this method will return the a concatenation of the strings\n\t// passed to it. This method showcases client-side streaming RPCs.\n\tCollect(Echo_CollectServer) error\n\t// This method, upon receiving a request on the stream, will pass the same\n\t// content back on the stream. This method showcases bidirectional\n\t// streaming RPCs.\n\tChat(Echo_ChatServer) error\n\t// This is similar to the Expand method but instead of returning a stream of\n\t// expanded words, this method returns a paged list of expanded words.\n\tPagedExpand(context.Context, *PagedExpandRequest) (*PagedExpandResponse, error)\n\t// This is similar to the PagedExpand except that it uses\n\t// max_results instead of page_size, as some legacy APIs still\n\t// do. New APIs should NOT use this pattern.\n\tPagedExpandLegacy(context.Context, *PagedExpandLegacyRequest) (*PagedExpandResponse, error)\n\t// This method returns a map containing lists of words that appear in the input, keyed by their\n\t// initial character. The only words returned are the ones included in the current page,\n\t// as determined by page_token and page_size, which both refer to the word indices in the\n\t// input. This paging result consisting of a map of lists is a pattern used by some legacy\n\t// APIs. New APIs should NOT use this pattern.\n\tPagedExpandLegacyMapped(context.Context, *PagedExpandRequest) (*PagedExpandLegacyMappedResponse, error)\n\t// This method will wait for the requested amount of time and then return.\n\t// This method showcases how a client handles a request timeout.\n\tWait(context.Context, *WaitRequest) (*longrunningpb.Operation, error)\n\t// This method will block (wait) for the requested amount of time\n\t// and then return the response or error.\n\t// This method showcases how a client handles delays or retries.\n\tBlock(context.Context, *BlockRequest) (*BlockResponse, error)\n}\n\n// UnimplementedEchoServer can be embedded to have forward compatible implementations.\ntype UnimplementedEchoServer struct {\n}\n\nfunc (*UnimplementedEchoServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method Echo not implemented\")\n}\nfunc (*UnimplementedEchoServer) EchoErrorDetails(context.Context, *EchoErrorDetailsRequest) (*EchoErrorDetailsResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method EchoErrorDetails not implemented\")\n}\nfunc (*UnimplementedEchoServer) FailEchoWithDetails(context.Context, *FailEchoWithDetailsRequest) (*FailEchoWithDetailsResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method FailEchoWithDetails not implemented\")\n}\nfunc (*UnimplementedEchoServer) Expand(*ExpandRequest, Echo_ExpandServer) error {\n\treturn status1.Errorf(codes.Unimplemented, \"method Expand not implemented\")\n}\nfunc (*UnimplementedEchoServer) Collect(Echo_CollectServer) error {\n\treturn status1.Errorf(codes.Unimplemented, \"method Collect not implemented\")\n}\nfunc (*UnimplementedEchoServer) Chat(Echo_ChatServer) error {\n\treturn status1.Errorf(codes.Unimplemented, \"method Chat not implemented\")\n}\nfunc (*UnimplementedEchoServer) PagedExpand(context.Context, *PagedExpandRequest) (*PagedExpandResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method PagedExpand not implemented\")\n}\nfunc (*UnimplementedEchoServer) PagedExpandLegacy(context.Context, *PagedExpandLegacyRequest) (*PagedExpandResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method PagedExpandLegacy not implemented\")\n}\nfunc (*UnimplementedEchoServer) PagedExpandLegacyMapped(context.Context, *PagedExpandRequest) (*PagedExpandLegacyMappedResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method PagedExpandLegacyMapped not implemented\")\n}\nfunc (*UnimplementedEchoServer) Wait(context.Context, *WaitRequest) (*longrunningpb.Operation, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method Wait not implemented\")\n}\nfunc (*UnimplementedEchoServer) Block(context.Context, *BlockRequest) (*BlockResponse, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method Block not implemented\")\n}\n\nfunc RegisterEchoServer(s *grpc.Server, srv EchoServer) {\n\ts.RegisterService(&_Echo_serviceDesc, srv)\n}\n\nfunc _Echo_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(EchoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).Echo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/Echo\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).Echo(ctx, req.(*EchoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_EchoErrorDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(EchoErrorDetailsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).EchoErrorDetails(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/EchoErrorDetails\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).EchoErrorDetails(ctx, req.(*EchoErrorDetailsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_FailEchoWithDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(FailEchoWithDetailsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).FailEchoWithDetails(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/FailEchoWithDetails\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).FailEchoWithDetails(ctx, req.(*FailEchoWithDetailsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_Expand_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(ExpandRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(EchoServer).Expand(m, &echoExpandServer{stream})\n}\n\ntype Echo_ExpandServer interface {\n\tSend(*EchoResponse) error\n\tgrpc.ServerStream\n}\n\ntype echoExpandServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *echoExpandServer) Send(m *EchoResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _Echo_Collect_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(EchoServer).Collect(&echoCollectServer{stream})\n}\n\ntype Echo_CollectServer interface {\n\tSendAndClose(*EchoResponse) error\n\tRecv() (*EchoRequest, error)\n\tgrpc.ServerStream\n}\n\ntype echoCollectServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *echoCollectServer) SendAndClose(m *EchoResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *echoCollectServer) Recv() (*EchoRequest, error) {\n\tm := new(EchoRequest)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc _Echo_Chat_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(EchoServer).Chat(&echoChatServer{stream})\n}\n\ntype Echo_ChatServer interface {\n\tSend(*EchoResponse) error\n\tRecv() (*EchoRequest, error)\n\tgrpc.ServerStream\n}\n\ntype echoChatServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *echoChatServer) Send(m *EchoResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *echoChatServer) Recv() (*EchoRequest, error) {\n\tm := new(EchoRequest)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc _Echo_PagedExpand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PagedExpandRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).PagedExpand(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/PagedExpand\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).PagedExpand(ctx, req.(*PagedExpandRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_PagedExpandLegacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PagedExpandLegacyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).PagedExpandLegacy(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/PagedExpandLegacy\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).PagedExpandLegacy(ctx, req.(*PagedExpandLegacyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_PagedExpandLegacyMapped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PagedExpandRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).PagedExpandLegacyMapped(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/PagedExpandLegacyMapped\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).PagedExpandLegacyMapped(ctx, req.(*PagedExpandRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_Wait_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(WaitRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).Wait(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/Wait\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).Wait(ctx, req.(*WaitRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Echo_Block_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(BlockRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(EchoServer).Block(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Echo/Block\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(EchoServer).Block(ctx, req.(*BlockRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nvar _Echo_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.Echo\",\n\tHandlerType: (*EchoServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Echo\",\n\t\t\tHandler:    _Echo_Echo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"EchoErrorDetails\",\n\t\t\tHandler:    _Echo_EchoErrorDetails_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"FailEchoWithDetails\",\n\t\t\tHandler:    _Echo_FailEchoWithDetails_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"PagedExpand\",\n\t\t\tHandler:    _Echo_PagedExpand_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"PagedExpandLegacy\",\n\t\t\tHandler:    _Echo_PagedExpandLegacy_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"PagedExpandLegacyMapped\",\n\t\t\tHandler:    _Echo_PagedExpandLegacyMapped_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Wait\",\n\t\t\tHandler:    _Echo_Wait_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Block\",\n\t\t\tHandler:    _Echo_Block_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Expand\",\n\t\t\tHandler:       _Echo_Expand_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"Collect\",\n\t\t\tHandler:       _Echo_Collect_Handler,\n\t\t\tClientStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"Chat\",\n\t\t\tHandler:       _Echo_Chat_Handler,\n\t\t\tServerStreams: true,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"google/showcase/v1beta1/echo.proto\",\n}\n"
  },
  {
    "path": "server/genproto/identity.pb.go",
    "content": "// Copyright 2018 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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/identity.proto\n\npackage genproto\n\nimport (\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n\tfieldmaskpb \"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// A user.\ntype User struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the user.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The display_name of the user.\n\tDisplayName string `protobuf:\"bytes,2,opt,name=display_name,json=displayName,proto3\" json:\"display_name,omitempty\"`\n\t// The email address of the user.\n\tEmail string `protobuf:\"bytes,3,opt,name=email,proto3\" json:\"email,omitempty\"`\n\t// The timestamp at which the user was created.\n\tCreateTime *timestamppb.Timestamp `protobuf:\"bytes,4,opt,name=create_time,json=createTime,proto3\" json:\"create_time,omitempty\"`\n\t// The latest timestamp at which the user was updated.\n\tUpdateTime *timestamppb.Timestamp `protobuf:\"bytes,5,opt,name=update_time,json=updateTime,proto3\" json:\"update_time,omitempty\"`\n\t// The age of the user in years.\n\tAge *int32 `protobuf:\"varint,6,opt,name=age,proto3,oneof\" json:\"age,omitempty\"`\n\t// The height of the user in feet.\n\tHeightFeet *float64 `protobuf:\"fixed64,7,opt,name=height_feet,json=heightFeet,proto3,oneof\" json:\"height_feet,omitempty\"`\n\t// The nickname of the user.\n\t//\n\t// (-- aip.dev/not-precedent: An empty string is a valid nickname.\n\t//\n\t//\tOrdinarily, proto3_optional should not be used on a `string` field. --)\n\tNickname *string `protobuf:\"bytes,8,opt,name=nickname,proto3,oneof\" json:\"nickname,omitempty\"`\n\t// Enables the receiving of notifications. The default is true if unset.\n\t//\n\t// (-- aip.dev/not-precedent: The default for the feature is true.\n\t//\n\t//\tOrdinarily, the default for a `bool` field should be false. --)\n\tEnableNotifications *bool `protobuf:\"varint,9,opt,name=enable_notifications,json=enableNotifications,proto3,oneof\" json:\"enable_notifications,omitempty\"`\n}\n\nfunc (x *User) Reset() {\n\t*x = User{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *User) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*User) ProtoMessage() {}\n\nfunc (x *User) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use User.ProtoReflect.Descriptor instead.\nfunc (*User) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *User) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *User) GetDisplayName() string {\n\tif x != nil {\n\t\treturn x.DisplayName\n\t}\n\treturn \"\"\n}\n\nfunc (x *User) GetEmail() string {\n\tif x != nil {\n\t\treturn x.Email\n\t}\n\treturn \"\"\n}\n\nfunc (x *User) GetCreateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.CreateTime\n\t}\n\treturn nil\n}\n\nfunc (x *User) GetUpdateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.UpdateTime\n\t}\n\treturn nil\n}\n\nfunc (x *User) GetAge() int32 {\n\tif x != nil && x.Age != nil {\n\t\treturn *x.Age\n\t}\n\treturn 0\n}\n\nfunc (x *User) GetHeightFeet() float64 {\n\tif x != nil && x.HeightFeet != nil {\n\t\treturn *x.HeightFeet\n\t}\n\treturn 0\n}\n\nfunc (x *User) GetNickname() string {\n\tif x != nil && x.Nickname != nil {\n\t\treturn *x.Nickname\n\t}\n\treturn \"\"\n}\n\nfunc (x *User) GetEnableNotifications() bool {\n\tif x != nil && x.EnableNotifications != nil {\n\t\treturn *x.EnableNotifications\n\t}\n\treturn false\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\CreateUser\n// method.\ntype CreateUserRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The user to create.\n\tUser *User `protobuf:\"bytes,1,opt,name=user,proto3\" json:\"user,omitempty\"`\n}\n\nfunc (x *CreateUserRequest) Reset() {\n\t*x = CreateUserRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateUserRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateUserRequest) ProtoMessage() {}\n\nfunc (x *CreateUserRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateUserRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *CreateUserRequest) GetUser() *User {\n\tif x != nil {\n\t\treturn x.User\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\GetUser\n// method.\ntype GetUserRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested user.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetUserRequest) Reset() {\n\t*x = GetUserRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetUserRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetUserRequest) ProtoMessage() {}\n\nfunc (x *GetUserRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.\nfunc (*GetUserRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *GetUserRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\UpdateUser\n// method.\ntype UpdateUserRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The user to update.\n\tUser *User `protobuf:\"bytes,1,opt,name=user,proto3\" json:\"user,omitempty\"`\n\t// The field mask to determine which fields are to be updated. If empty, the\n\t// server will assume all fields are to be updated.\n\tUpdateMask *fieldmaskpb.FieldMask `protobuf:\"bytes,2,opt,name=update_mask,json=updateMask,proto3\" json:\"update_mask,omitempty\"`\n}\n\nfunc (x *UpdateUserRequest) Reset() {\n\t*x = UpdateUserRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *UpdateUserRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UpdateUserRequest) ProtoMessage() {}\n\nfunc (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.\nfunc (*UpdateUserRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *UpdateUserRequest) GetUser() *User {\n\tif x != nil {\n\t\treturn x.User\n\t}\n\treturn nil\n}\n\nfunc (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask {\n\tif x != nil {\n\t\treturn x.UpdateMask\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\DeleteUser\n// method.\ntype DeleteUserRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the user to delete.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *DeleteUserRequest) Reset() {\n\t*x = DeleteUserRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DeleteUserRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DeleteUserRequest) ProtoMessage() {}\n\nfunc (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.\nfunc (*DeleteUserRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *DeleteUserRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Identity\\ListUsers\n// method.\ntype ListUsersRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The maximum number of users to return. Server may return fewer users\n\t// than requested. If unspecified, server will pick an appropriate default.\n\tPageSize int32 `protobuf:\"varint,1,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The value of google.showcase.v1beta1.ListUsersResponse.next_page_token\n\t// returned from the previous call to\n\t// `google.showcase.v1beta1.Identity\\ListUsers` method.\n\tPageToken string `protobuf:\"bytes,2,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *ListUsersRequest) Reset() {\n\t*x = ListUsersRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListUsersRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListUsersRequest) ProtoMessage() {}\n\nfunc (x *ListUsersRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.\nfunc (*ListUsersRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *ListUsersRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *ListUsersRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The response message for the google.showcase.v1beta1.Identity\\ListUsers\n// method.\ntype ListUsersResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The list of users.\n\tUsers []*User `protobuf:\"bytes,1,rep,name=users,proto3\" json:\"users,omitempty\"`\n\t// A token to retrieve next page of results.\n\t// Pass this value in ListUsersRequest.page_token field in the subsequent\n\t// call to `google.showcase.v1beta1.Message\\ListUsers` method to retrieve the\n\t// next page of results.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *ListUsersResponse) Reset() {\n\t*x = ListUsersResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListUsersResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListUsersResponse) ProtoMessage() {}\n\nfunc (x *ListUsersResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_identity_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.\nfunc (*ListUsersResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ListUsersResponse) GetUsers() []*User {\n\tif x != nil {\n\t\treturn x.Users\n\t}\n\treturn nil\n}\n\nfunc (x *ListUsersResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\nvar File_google_showcase_v1beta1_identity_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_identity_proto_rawDesc = []byte{\n\t0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,\n\t0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,\n\t0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,\n\t0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65,\n\t0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,\n\t0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,\n\t0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x03, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a,\n\t0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,\n\t0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d,\n\t0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69,\n\t0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61,\n\t0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65,\n\t0x6d, 0x61, 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,\n\t0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,\n\t0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,\n\t0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,\n\t0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,\n\t0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70,\n\t0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18,\n\t0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x03, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12,\n\t0x24, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x74, 0x18, 0x07,\n\t0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x46, 0x65,\n\t0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d,\n\t0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e,\n\t0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,\n\t0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09,\n\t0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f,\n\t0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x3a, 0x2f,\n\t0xea, 0x41, 0x2c, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65,\n\t0x72, 0x12, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x7d, 0x42,\n\t0x06, 0x0a, 0x04, 0x5f, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x68, 0x65, 0x69, 0x67,\n\t0x68, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x69, 0x63, 0x6b,\n\t0x6e, 0x61, 0x6d, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f,\n\t0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x46, 0x0a,\n\t0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,\n\t0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52,\n\t0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,\n\t0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d,\n\t0x65, 0x22, 0x83, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70,\n\t0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,\n\t0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64,\n\t0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74,\n\t0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04,\n\t0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xe0, 0x41, 0x02, 0xfa,\n\t0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72,\n\t0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,\n\t0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61,\n\t0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,\n\t0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,\n\t0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67,\n\t0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x70, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,\n\t0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x75,\n\t0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73,\n\t0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,\n\t0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50,\n\t0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x8a, 0x06, 0x0a, 0x08, 0x49, 0x64, 0x65,\n\t0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0xf3, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,\n\t0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43,\n\t0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22,\n\t0x99, 0x01, 0xda, 0x41, 0x1c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61,\n\t0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x65, 0x6d, 0x61, 0x69,\n\t0x6c, 0xda, 0x41, 0x5e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,\n\t0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c,\n\t0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e,\n\t0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x65, 0x6e, 0x61,\n\t0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x73, 0x2c, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x65,\n\t0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x79, 0x0a, 0x07, 0x47,\n\t0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x26,\n\t0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,\n\t0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74,\n\t0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,\n\t0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x1c,\n\t0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e,\n\t0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x78, 0x0a, 0x0a,\n\t0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26,\n\t0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,\n\t0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,\n\t0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69,\n\t0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,\n\t0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93,\n\t0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65,\n\t0x72, 0x73, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74,\n\t0x3a, 0x37, 0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,\n\t0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x61,\n\t0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x72,\n\t0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x19, 0x47,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x3a,\n\t0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_identity_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_identity_proto_rawDescData = file_google_showcase_v1beta1_identity_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_identity_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_identity_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_identity_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_identity_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_identity_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 7)\nvar file_google_showcase_v1beta1_identity_proto_goTypes = []interface{}{\n\t(*User)(nil),                  // 0: google.showcase.v1beta1.User\n\t(*CreateUserRequest)(nil),     // 1: google.showcase.v1beta1.CreateUserRequest\n\t(*GetUserRequest)(nil),        // 2: google.showcase.v1beta1.GetUserRequest\n\t(*UpdateUserRequest)(nil),     // 3: google.showcase.v1beta1.UpdateUserRequest\n\t(*DeleteUserRequest)(nil),     // 4: google.showcase.v1beta1.DeleteUserRequest\n\t(*ListUsersRequest)(nil),      // 5: google.showcase.v1beta1.ListUsersRequest\n\t(*ListUsersResponse)(nil),     // 6: google.showcase.v1beta1.ListUsersResponse\n\t(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp\n\t(*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask\n\t(*emptypb.Empty)(nil),         // 9: google.protobuf.Empty\n}\nvar file_google_showcase_v1beta1_identity_proto_depIdxs = []int32{\n\t7,  // 0: google.showcase.v1beta1.User.create_time:type_name -> google.protobuf.Timestamp\n\t7,  // 1: google.showcase.v1beta1.User.update_time:type_name -> google.protobuf.Timestamp\n\t0,  // 2: google.showcase.v1beta1.CreateUserRequest.user:type_name -> google.showcase.v1beta1.User\n\t0,  // 3: google.showcase.v1beta1.UpdateUserRequest.user:type_name -> google.showcase.v1beta1.User\n\t8,  // 4: google.showcase.v1beta1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask\n\t0,  // 5: google.showcase.v1beta1.ListUsersResponse.users:type_name -> google.showcase.v1beta1.User\n\t1,  // 6: google.showcase.v1beta1.Identity.CreateUser:input_type -> google.showcase.v1beta1.CreateUserRequest\n\t2,  // 7: google.showcase.v1beta1.Identity.GetUser:input_type -> google.showcase.v1beta1.GetUserRequest\n\t3,  // 8: google.showcase.v1beta1.Identity.UpdateUser:input_type -> google.showcase.v1beta1.UpdateUserRequest\n\t4,  // 9: google.showcase.v1beta1.Identity.DeleteUser:input_type -> google.showcase.v1beta1.DeleteUserRequest\n\t5,  // 10: google.showcase.v1beta1.Identity.ListUsers:input_type -> google.showcase.v1beta1.ListUsersRequest\n\t0,  // 11: google.showcase.v1beta1.Identity.CreateUser:output_type -> google.showcase.v1beta1.User\n\t0,  // 12: google.showcase.v1beta1.Identity.GetUser:output_type -> google.showcase.v1beta1.User\n\t0,  // 13: google.showcase.v1beta1.Identity.UpdateUser:output_type -> google.showcase.v1beta1.User\n\t9,  // 14: google.showcase.v1beta1.Identity.DeleteUser:output_type -> google.protobuf.Empty\n\t6,  // 15: google.showcase.v1beta1.Identity.ListUsers:output_type -> google.showcase.v1beta1.ListUsersResponse\n\t11, // [11:16] is the sub-list for method output_type\n\t6,  // [6:11] is the sub-list for method input_type\n\t6,  // [6:6] is the sub-list for extension type_name\n\t6,  // [6:6] is the sub-list for extension extendee\n\t0,  // [0:6] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_identity_proto_init() }\nfunc file_google_showcase_v1beta1_identity_proto_init() {\n\tif File_google_showcase_v1beta1_identity_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*User); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateUserRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetUserRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*UpdateUserRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DeleteUserRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListUsersRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_identity_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListUsersResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\tfile_google_showcase_v1beta1_identity_proto_msgTypes[0].OneofWrappers = []interface{}{}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_identity_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   7,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_identity_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_identity_proto_depIdxs,\n\t\tMessageInfos:      file_google_showcase_v1beta1_identity_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_identity_proto = out.File\n\tfile_google_showcase_v1beta1_identity_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_identity_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_identity_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// IdentityClient is the client API for Identity service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype IdentityClient interface {\n\t// Creates a user.\n\tCreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)\n\t// Retrieves the User with the given uri.\n\tGetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)\n\t// Updates a user.\n\tUpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)\n\t// Deletes a user, their profile, and all of their authored messages.\n\tDeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Lists all users.\n\tListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)\n}\n\ntype identityClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient {\n\treturn &identityClient{cc}\n}\n\nfunc (c *identityClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) {\n\tout := new(User)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Identity/CreateUser\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *identityClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) {\n\tout := new(User)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Identity/GetUser\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *identityClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) {\n\tout := new(User)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Identity/UpdateUser\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *identityClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Identity/DeleteUser\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *identityClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {\n\tout := new(ListUsersResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Identity/ListUsers\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// IdentityServer is the server API for Identity service.\ntype IdentityServer interface {\n\t// Creates a user.\n\tCreateUser(context.Context, *CreateUserRequest) (*User, error)\n\t// Retrieves the User with the given uri.\n\tGetUser(context.Context, *GetUserRequest) (*User, error)\n\t// Updates a user.\n\tUpdateUser(context.Context, *UpdateUserRequest) (*User, error)\n\t// Deletes a user, their profile, and all of their authored messages.\n\tDeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)\n\t// Lists all users.\n\tListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)\n}\n\n// UnimplementedIdentityServer can be embedded to have forward compatible implementations.\ntype UnimplementedIdentityServer struct {\n}\n\nfunc (*UnimplementedIdentityServer) CreateUser(context.Context, *CreateUserRequest) (*User, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method CreateUser not implemented\")\n}\nfunc (*UnimplementedIdentityServer) GetUser(context.Context, *GetUserRequest) (*User, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetUser not implemented\")\n}\nfunc (*UnimplementedIdentityServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateUser not implemented\")\n}\nfunc (*UnimplementedIdentityServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteUser not implemented\")\n}\nfunc (*UnimplementedIdentityServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ListUsers not implemented\")\n}\n\nfunc RegisterIdentityServer(s *grpc.Server, srv IdentityServer) {\n\ts.RegisterService(&_Identity_serviceDesc, srv)\n}\n\nfunc _Identity_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateUserRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(IdentityServer).CreateUser(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Identity/CreateUser\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(IdentityServer).CreateUser(ctx, req.(*CreateUserRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Identity_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetUserRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(IdentityServer).GetUser(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Identity/GetUser\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(IdentityServer).GetUser(ctx, req.(*GetUserRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Identity_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(UpdateUserRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(IdentityServer).UpdateUser(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Identity/UpdateUser\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(IdentityServer).UpdateUser(ctx, req.(*UpdateUserRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Identity_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DeleteUserRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(IdentityServer).DeleteUser(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Identity/DeleteUser\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(IdentityServer).DeleteUser(ctx, req.(*DeleteUserRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Identity_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListUsersRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(IdentityServer).ListUsers(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Identity/ListUsers\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(IdentityServer).ListUsers(ctx, req.(*ListUsersRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nvar _Identity_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.Identity\",\n\tHandlerType: (*IdentityServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"CreateUser\",\n\t\t\tHandler:    _Identity_CreateUser_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetUser\",\n\t\t\tHandler:    _Identity_GetUser_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateUser\",\n\t\t\tHandler:    _Identity_UpdateUser_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteUser\",\n\t\t\tHandler:    _Identity_DeleteUser_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListUsers\",\n\t\t\tHandler:    _Identity_ListUsers_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"google/showcase/v1beta1/identity.proto\",\n}\n"
  },
  {
    "path": "server/genproto/messaging.pb.go",
    "content": "// Copyright 2018 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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/messaging.proto\n\npackage genproto\n\nimport (\n\tlongrunningpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\terrdetails \"google.golang.org/genproto/googleapis/rpc/errdetails\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n\tfieldmaskpb \"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The action that triggered the blurb to be returned.\ntype StreamBlurbsResponse_Action int32\n\nconst (\n\tStreamBlurbsResponse_ACTION_UNSPECIFIED StreamBlurbsResponse_Action = 0\n\t// Specifies that the blurb was created.\n\tStreamBlurbsResponse_CREATE StreamBlurbsResponse_Action = 1\n\t// Specifies that the blurb was updated.\n\tStreamBlurbsResponse_UPDATE StreamBlurbsResponse_Action = 2\n\t// Specifies that the blurb was deleted.\n\tStreamBlurbsResponse_DELETE StreamBlurbsResponse_Action = 3\n)\n\n// Enum value maps for StreamBlurbsResponse_Action.\nvar (\n\tStreamBlurbsResponse_Action_name = map[int32]string{\n\t\t0: \"ACTION_UNSPECIFIED\",\n\t\t1: \"CREATE\",\n\t\t2: \"UPDATE\",\n\t\t3: \"DELETE\",\n\t}\n\tStreamBlurbsResponse_Action_value = map[string]int32{\n\t\t\"ACTION_UNSPECIFIED\": 0,\n\t\t\"CREATE\":             1,\n\t\t\"UPDATE\":             2,\n\t\t\"DELETE\":             3,\n\t}\n)\n\nfunc (x StreamBlurbsResponse_Action) Enum() *StreamBlurbsResponse_Action {\n\tp := new(StreamBlurbsResponse_Action)\n\t*p = x\n\treturn p\n}\n\nfunc (x StreamBlurbsResponse_Action) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (StreamBlurbsResponse_Action) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_messaging_proto_enumTypes[0].Descriptor()\n}\n\nfunc (StreamBlurbsResponse_Action) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_messaging_proto_enumTypes[0]\n}\n\nfunc (x StreamBlurbsResponse_Action) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use StreamBlurbsResponse_Action.Descriptor instead.\nfunc (StreamBlurbsResponse_Action) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{18, 0}\n}\n\n// A chat room.\ntype Room struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the chat room.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The human readable name of the chat room.\n\tDisplayName string `protobuf:\"bytes,2,opt,name=display_name,json=displayName,proto3\" json:\"display_name,omitempty\"`\n\t// The description of the chat room.\n\tDescription string `protobuf:\"bytes,3,opt,name=description,proto3\" json:\"description,omitempty\"`\n\t// The timestamp at which the room was created.\n\tCreateTime *timestamppb.Timestamp `protobuf:\"bytes,4,opt,name=create_time,json=createTime,proto3\" json:\"create_time,omitempty\"`\n\t// The latest timestamp at which the room was updated.\n\tUpdateTime *timestamppb.Timestamp `protobuf:\"bytes,5,opt,name=update_time,json=updateTime,proto3\" json:\"update_time,omitempty\"`\n}\n\nfunc (x *Room) Reset() {\n\t*x = Room{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Room) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Room) ProtoMessage() {}\n\nfunc (x *Room) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Room.ProtoReflect.Descriptor instead.\nfunc (*Room) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Room) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Room) GetDisplayName() string {\n\tif x != nil {\n\t\treturn x.DisplayName\n\t}\n\treturn \"\"\n}\n\nfunc (x *Room) GetDescription() string {\n\tif x != nil {\n\t\treturn x.Description\n\t}\n\treturn \"\"\n}\n\nfunc (x *Room) GetCreateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.CreateTime\n\t}\n\treturn nil\n}\n\nfunc (x *Room) GetUpdateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.UpdateTime\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\CreateRoom\n// method.\ntype CreateRoomRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The room to create.\n\tRoom *Room `protobuf:\"bytes,1,opt,name=room,proto3\" json:\"room,omitempty\"`\n}\n\nfunc (x *CreateRoomRequest) Reset() {\n\t*x = CreateRoomRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateRoomRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateRoomRequest) ProtoMessage() {}\n\nfunc (x *CreateRoomRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateRoomRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateRoomRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *CreateRoomRequest) GetRoom() *Room {\n\tif x != nil {\n\t\treturn x.Room\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\GetRoom\n// method.\ntype GetRoomRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested room.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetRoomRequest) Reset() {\n\t*x = GetRoomRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetRoomRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRoomRequest) ProtoMessage() {}\n\nfunc (x *GetRoomRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRoomRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRoomRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *GetRoomRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\UpdateRoom\n// method.\ntype UpdateRoomRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The room to update.\n\tRoom *Room `protobuf:\"bytes,1,opt,name=room,proto3\" json:\"room,omitempty\"`\n\t// The field mask to determine which fields are to be updated. If empty, the\n\t// server will assume all fields are to be updated.\n\tUpdateMask *fieldmaskpb.FieldMask `protobuf:\"bytes,2,opt,name=update_mask,json=updateMask,proto3\" json:\"update_mask,omitempty\"`\n}\n\nfunc (x *UpdateRoomRequest) Reset() {\n\t*x = UpdateRoomRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *UpdateRoomRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UpdateRoomRequest) ProtoMessage() {}\n\nfunc (x *UpdateRoomRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UpdateRoomRequest.ProtoReflect.Descriptor instead.\nfunc (*UpdateRoomRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *UpdateRoomRequest) GetRoom() *Room {\n\tif x != nil {\n\t\treturn x.Room\n\t}\n\treturn nil\n}\n\nfunc (x *UpdateRoomRequest) GetUpdateMask() *fieldmaskpb.FieldMask {\n\tif x != nil {\n\t\treturn x.UpdateMask\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\DeleteRoom\n// method.\ntype DeleteRoomRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested room.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *DeleteRoomRequest) Reset() {\n\t*x = DeleteRoomRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DeleteRoomRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DeleteRoomRequest) ProtoMessage() {}\n\nfunc (x *DeleteRoomRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DeleteRoomRequest.ProtoReflect.Descriptor instead.\nfunc (*DeleteRoomRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *DeleteRoomRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\ListRooms\n// method.\ntype ListRoomsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The maximum number of rooms return. Server may return fewer rooms\n\t// than requested. If unspecified, server will pick an appropriate default.\n\tPageSize int32 `protobuf:\"varint,1,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The value of google.showcase.v1beta1.ListRoomsResponse.next_page_token\n\t// returned from the previous call to\n\t// `google.showcase.v1beta1.Messaging\\ListRooms` method.\n\tPageToken string `protobuf:\"bytes,2,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *ListRoomsRequest) Reset() {\n\t*x = ListRoomsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListRoomsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListRoomsRequest) ProtoMessage() {}\n\nfunc (x *ListRoomsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListRoomsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListRoomsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *ListRoomsRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *ListRoomsRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\ListRooms\n// method.\ntype ListRoomsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The list of rooms.\n\tRooms []*Room `protobuf:\"bytes,1,rep,name=rooms,proto3\" json:\"rooms,omitempty\"`\n\t// A token to retrieve next page of results.\n\t// Pass this value in ListRoomsRequest.page_token field in the subsequent\n\t// call to `google.showcase.v1beta1.Messaging\\ListRooms` method to retrieve\n\t// the next page of results.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *ListRoomsResponse) Reset() {\n\t*x = ListRoomsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListRoomsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListRoomsResponse) ProtoMessage() {}\n\nfunc (x *ListRoomsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListRoomsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListRoomsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ListRoomsResponse) GetRooms() []*Room {\n\tif x != nil {\n\t\treturn x.Rooms\n\t}\n\treturn nil\n}\n\nfunc (x *ListRoomsResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// This protocol buffer message represents a blurb sent to a chat room or\n// posted on a user profile.\ntype Blurb struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the chat room.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The resource name of the blurb's author.\n\tUser string `protobuf:\"bytes,2,opt,name=user,proto3\" json:\"user,omitempty\"`\n\t// Types that are assignable to Content:\n\t//\n\t//\t*Blurb_Text\n\t//\t*Blurb_Image\n\tContent isBlurb_Content `protobuf_oneof:\"content\"`\n\t// The timestamp at which the blurb was created.\n\tCreateTime *timestamppb.Timestamp `protobuf:\"bytes,5,opt,name=create_time,json=createTime,proto3\" json:\"create_time,omitempty\"`\n\t// The latest timestamp at which the blurb was updated.\n\tUpdateTime *timestamppb.Timestamp `protobuf:\"bytes,6,opt,name=update_time,json=updateTime,proto3\" json:\"update_time,omitempty\"`\n\t// (-- aip.dev/not-precedent: This is designed for testing non-slash\n\t//\n\t//\tresource patterns. Ordinarily, non-slash separators are discouraged.\n\t//\t--)\n\t//\n\t// Types that are assignable to LegacyId:\n\t//\n\t//\t*Blurb_LegacyRoomId\n\t//\t*Blurb_LegacyUserId\n\tLegacyId isBlurb_LegacyId `protobuf_oneof:\"legacy_id\"`\n}\n\nfunc (x *Blurb) Reset() {\n\t*x = Blurb{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Blurb) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Blurb) ProtoMessage() {}\n\nfunc (x *Blurb) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Blurb.ProtoReflect.Descriptor instead.\nfunc (*Blurb) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *Blurb) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Blurb) GetUser() string {\n\tif x != nil {\n\t\treturn x.User\n\t}\n\treturn \"\"\n}\n\nfunc (m *Blurb) GetContent() isBlurb_Content {\n\tif m != nil {\n\t\treturn m.Content\n\t}\n\treturn nil\n}\n\nfunc (x *Blurb) GetText() string {\n\tif x, ok := x.GetContent().(*Blurb_Text); ok {\n\t\treturn x.Text\n\t}\n\treturn \"\"\n}\n\nfunc (x *Blurb) GetImage() []byte {\n\tif x, ok := x.GetContent().(*Blurb_Image); ok {\n\t\treturn x.Image\n\t}\n\treturn nil\n}\n\nfunc (x *Blurb) GetCreateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.CreateTime\n\t}\n\treturn nil\n}\n\nfunc (x *Blurb) GetUpdateTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.UpdateTime\n\t}\n\treturn nil\n}\n\nfunc (m *Blurb) GetLegacyId() isBlurb_LegacyId {\n\tif m != nil {\n\t\treturn m.LegacyId\n\t}\n\treturn nil\n}\n\nfunc (x *Blurb) GetLegacyRoomId() string {\n\tif x, ok := x.GetLegacyId().(*Blurb_LegacyRoomId); ok {\n\t\treturn x.LegacyRoomId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Blurb) GetLegacyUserId() string {\n\tif x, ok := x.GetLegacyId().(*Blurb_LegacyUserId); ok {\n\t\treturn x.LegacyUserId\n\t}\n\treturn \"\"\n}\n\ntype isBlurb_Content interface {\n\tisBlurb_Content()\n}\n\ntype Blurb_Text struct {\n\t// The textual content of this blurb.\n\tText string `protobuf:\"bytes,3,opt,name=text,proto3,oneof\"`\n}\n\ntype Blurb_Image struct {\n\t// The image content of this blurb.\n\tImage []byte `protobuf:\"bytes,4,opt,name=image,proto3,oneof\"`\n}\n\nfunc (*Blurb_Text) isBlurb_Content() {}\n\nfunc (*Blurb_Image) isBlurb_Content() {}\n\ntype isBlurb_LegacyId interface {\n\tisBlurb_LegacyId()\n}\n\ntype Blurb_LegacyRoomId struct {\n\t// The legacy id of the room. This field is used to signal\n\t// the use of the compound resource pattern\n\t// `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`\n\tLegacyRoomId string `protobuf:\"bytes,7,opt,name=legacy_room_id,json=legacyRoomId,proto3,oneof\"`\n}\n\ntype Blurb_LegacyUserId struct {\n\t// The legacy id of the user. This field is used to signal\n\t// the use of the compound resource pattern\n\t// `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`\n\tLegacyUserId string `protobuf:\"bytes,8,opt,name=legacy_user_id,json=legacyUserId,proto3,oneof\"`\n}\n\nfunc (*Blurb_LegacyRoomId) isBlurb_LegacyId() {}\n\nfunc (*Blurb_LegacyUserId) isBlurb_LegacyId() {}\n\n// The request message for the google.showcase.v1beta1.Messaging\\CreateBlurb\n// method.\ntype CreateBlurbRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the chat room or user profile that this blurb will\n\t// be tied to.\n\tParent string `protobuf:\"bytes,1,opt,name=parent,proto3\" json:\"parent,omitempty\"`\n\t// The blurb to create.\n\tBlurb *Blurb `protobuf:\"bytes,2,opt,name=blurb,proto3\" json:\"blurb,omitempty\"`\n}\n\nfunc (x *CreateBlurbRequest) Reset() {\n\t*x = CreateBlurbRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateBlurbRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateBlurbRequest) ProtoMessage() {}\n\nfunc (x *CreateBlurbRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateBlurbRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateBlurbRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *CreateBlurbRequest) GetParent() string {\n\tif x != nil {\n\t\treturn x.Parent\n\t}\n\treturn \"\"\n}\n\nfunc (x *CreateBlurbRequest) GetBlurb() *Blurb {\n\tif x != nil {\n\t\treturn x.Blurb\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\GetBlurb\n// method.\ntype GetBlurbRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested blurb.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetBlurbRequest) Reset() {\n\t*x = GetBlurbRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetBlurbRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlurbRequest) ProtoMessage() {}\n\nfunc (x *GetBlurbRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlurbRequest.ProtoReflect.Descriptor instead.\nfunc (*GetBlurbRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *GetBlurbRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\UpdateBlurb\n// method.\ntype UpdateBlurbRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The blurb to update.\n\tBlurb *Blurb `protobuf:\"bytes,1,opt,name=blurb,proto3\" json:\"blurb,omitempty\"`\n\t// The field mask to determine which fields are to be updated. If empty, the\n\t// server will assume all fields are to be updated.\n\tUpdateMask *fieldmaskpb.FieldMask `protobuf:\"bytes,2,opt,name=update_mask,json=updateMask,proto3\" json:\"update_mask,omitempty\"`\n}\n\nfunc (x *UpdateBlurbRequest) Reset() {\n\t*x = UpdateBlurbRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *UpdateBlurbRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UpdateBlurbRequest) ProtoMessage() {}\n\nfunc (x *UpdateBlurbRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UpdateBlurbRequest.ProtoReflect.Descriptor instead.\nfunc (*UpdateBlurbRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *UpdateBlurbRequest) GetBlurb() *Blurb {\n\tif x != nil {\n\t\treturn x.Blurb\n\t}\n\treturn nil\n}\n\nfunc (x *UpdateBlurbRequest) GetUpdateMask() *fieldmaskpb.FieldMask {\n\tif x != nil {\n\t\treturn x.UpdateMask\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\DeleteBlurb\n// method.\ntype DeleteBlurbRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested blurb.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *DeleteBlurbRequest) Reset() {\n\t*x = DeleteBlurbRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DeleteBlurbRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DeleteBlurbRequest) ProtoMessage() {}\n\nfunc (x *DeleteBlurbRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DeleteBlurbRequest.ProtoReflect.Descriptor instead.\nfunc (*DeleteBlurbRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *DeleteBlurbRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\ListBlurbs\n// method.\ntype ListBlurbsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of the requested room or profile who blurbs to list.\n\tParent string `protobuf:\"bytes,1,opt,name=parent,proto3\" json:\"parent,omitempty\"`\n\t// The maximum number of blurbs to return. Server may return fewer\n\t// blurbs than requested. If unspecified, server will pick an appropriate\n\t// default.\n\tPageSize int32 `protobuf:\"varint,2,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The value of google.showcase.v1beta1.ListBlurbsResponse.next_page_token\n\t// returned from the previous call to\n\t// `google.showcase.v1beta1.Messaging\\ListBlurbs` method.\n\tPageToken string `protobuf:\"bytes,3,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *ListBlurbsRequest) Reset() {\n\t*x = ListBlurbsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListBlurbsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListBlurbsRequest) ProtoMessage() {}\n\nfunc (x *ListBlurbsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListBlurbsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListBlurbsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *ListBlurbsRequest) GetParent() string {\n\tif x != nil {\n\t\treturn x.Parent\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListBlurbsRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *ListBlurbsRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\ListBlurbs\n// method.\ntype ListBlurbsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The list of blurbs.\n\tBlurbs []*Blurb `protobuf:\"bytes,1,rep,name=blurbs,proto3\" json:\"blurbs,omitempty\"`\n\t// A token to retrieve next page of results.\n\t// Pass this value in ListBlurbsRequest.page_token field in the subsequent\n\t// call to `google.showcase.v1beta1.Blurb\\ListBlurbs` method to retrieve\n\t// the next page of results.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *ListBlurbsResponse) Reset() {\n\t*x = ListBlurbsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[13]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListBlurbsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListBlurbsResponse) ProtoMessage() {}\n\nfunc (x *ListBlurbsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[13]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListBlurbsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListBlurbsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *ListBlurbsResponse) GetBlurbs() []*Blurb {\n\tif x != nil {\n\t\treturn x.Blurbs\n\t}\n\treturn nil\n}\n\nfunc (x *ListBlurbsResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\SearchBlurbs\n// method.\ntype SearchBlurbsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The query used to search for blurbs containing to words of this string.\n\t// Only posts that contain an exact match of a queried word will be returned.\n\tQuery string `protobuf:\"bytes,1,opt,name=query,proto3\" json:\"query,omitempty\"`\n\t// The rooms or profiles to search. If unset, `SearchBlurbs` will search all\n\t// rooms and all profiles.\n\tParent string `protobuf:\"bytes,2,opt,name=parent,proto3\" json:\"parent,omitempty\"`\n\t// The maximum number of blurbs return. Server may return fewer\n\t// blurbs than requested. If unspecified, server will pick an appropriate\n\t// default.\n\tPageSize int32 `protobuf:\"varint,3,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The value of\n\t// google.showcase.v1beta1.SearchBlurbsResponse.next_page_token\n\t// returned from the previous call to\n\t// `google.showcase.v1beta1.Messaging\\SearchBlurbs` method.\n\tPageToken string `protobuf:\"bytes,4,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *SearchBlurbsRequest) Reset() {\n\t*x = SearchBlurbsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[14]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SearchBlurbsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SearchBlurbsRequest) ProtoMessage() {}\n\nfunc (x *SearchBlurbsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[14]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SearchBlurbsRequest.ProtoReflect.Descriptor instead.\nfunc (*SearchBlurbsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *SearchBlurbsRequest) GetQuery() string {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn \"\"\n}\n\nfunc (x *SearchBlurbsRequest) GetParent() string {\n\tif x != nil {\n\t\treturn x.Parent\n\t}\n\treturn \"\"\n}\n\nfunc (x *SearchBlurbsRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *SearchBlurbsRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The operation metadata message for the\n// google.showcase.v1beta1.Messaging\\SearchBlurbs method.\ntype SearchBlurbsMetadata struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// This signals to the client when to next poll for response.\n\tRetryInfo *errdetails.RetryInfo `protobuf:\"bytes,1,opt,name=retry_info,json=retryInfo,proto3\" json:\"retry_info,omitempty\"`\n}\n\nfunc (x *SearchBlurbsMetadata) Reset() {\n\t*x = SearchBlurbsMetadata{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[15]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SearchBlurbsMetadata) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SearchBlurbsMetadata) ProtoMessage() {}\n\nfunc (x *SearchBlurbsMetadata) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[15]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SearchBlurbsMetadata.ProtoReflect.Descriptor instead.\nfunc (*SearchBlurbsMetadata) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (x *SearchBlurbsMetadata) GetRetryInfo() *errdetails.RetryInfo {\n\tif x != nil {\n\t\treturn x.RetryInfo\n\t}\n\treturn nil\n}\n\n// The operation response message for the\n// google.showcase.v1beta1.Messaging\\SearchBlurbs method.\ntype SearchBlurbsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Blurbs that matched the search query.\n\tBlurbs []*Blurb `protobuf:\"bytes,1,rep,name=blurbs,proto3\" json:\"blurbs,omitempty\"`\n\t// A token to retrieve next page of results.\n\t// Pass this value in SearchBlurbsRequest.page_token field in the subsequent\n\t// call to `google.showcase.v1beta1.Blurb\\SearchBlurbs` method to\n\t// retrieve the next page of results.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *SearchBlurbsResponse) Reset() {\n\t*x = SearchBlurbsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[16]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SearchBlurbsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SearchBlurbsResponse) ProtoMessage() {}\n\nfunc (x *SearchBlurbsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[16]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SearchBlurbsResponse.ProtoReflect.Descriptor instead.\nfunc (*SearchBlurbsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *SearchBlurbsResponse) GetBlurbs() []*Blurb {\n\tif x != nil {\n\t\treturn x.Blurbs\n\t}\n\treturn nil\n}\n\nfunc (x *SearchBlurbsResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\StreamBlurbs\n// method.\ntype StreamBlurbsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource name of a chat room or user profile whose blurbs to stream.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The time at which this stream will close.\n\tExpireTime *timestamppb.Timestamp `protobuf:\"bytes,2,opt,name=expire_time,json=expireTime,proto3\" json:\"expire_time,omitempty\"`\n}\n\nfunc (x *StreamBlurbsRequest) Reset() {\n\t*x = StreamBlurbsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[17]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamBlurbsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamBlurbsRequest) ProtoMessage() {}\n\nfunc (x *StreamBlurbsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[17]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamBlurbsRequest.ProtoReflect.Descriptor instead.\nfunc (*StreamBlurbsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{17}\n}\n\nfunc (x *StreamBlurbsRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamBlurbsRequest) GetExpireTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.ExpireTime\n\t}\n\treturn nil\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\StreamBlurbs\n// method.\ntype StreamBlurbsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The blurb that was either created, updated, or deleted.\n\tBlurb *Blurb `protobuf:\"bytes,1,opt,name=blurb,proto3\" json:\"blurb,omitempty\"`\n\t// The action that triggered the blurb to be returned.\n\tAction StreamBlurbsResponse_Action `protobuf:\"varint,2,opt,name=action,proto3,enum=google.showcase.v1beta1.StreamBlurbsResponse_Action\" json:\"action,omitempty\"`\n}\n\nfunc (x *StreamBlurbsResponse) Reset() {\n\t*x = StreamBlurbsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[18]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamBlurbsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamBlurbsResponse) ProtoMessage() {}\n\nfunc (x *StreamBlurbsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[18]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamBlurbsResponse.ProtoReflect.Descriptor instead.\nfunc (*StreamBlurbsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *StreamBlurbsResponse) GetBlurb() *Blurb {\n\tif x != nil {\n\t\treturn x.Blurb\n\t}\n\treturn nil\n}\n\nfunc (x *StreamBlurbsResponse) GetAction() StreamBlurbsResponse_Action {\n\tif x != nil {\n\t\treturn x.Action\n\t}\n\treturn StreamBlurbsResponse_ACTION_UNSPECIFIED\n}\n\n// The response message for the google.showcase.v1beta1.Messaging\\SendBlurbs\n// method.\ntype SendBlurbsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The names of successful blurb creations.\n\tNames []string `protobuf:\"bytes,1,rep,name=names,proto3\" json:\"names,omitempty\"`\n}\n\nfunc (x *SendBlurbsResponse) Reset() {\n\t*x = SendBlurbsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[19]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SendBlurbsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SendBlurbsResponse) ProtoMessage() {}\n\nfunc (x *SendBlurbsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[19]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SendBlurbsResponse.ProtoReflect.Descriptor instead.\nfunc (*SendBlurbsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{19}\n}\n\nfunc (x *SendBlurbsResponse) GetNames() []string {\n\tif x != nil {\n\t\treturn x.Names\n\t}\n\treturn nil\n}\n\n// The request message for the google.showcase.v1beta1.Messaging\\Connect\n// method.\ntype ConnectRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Types that are assignable to Request:\n\t//\n\t//\t*ConnectRequest_Config\n\t//\t*ConnectRequest_Blurb\n\tRequest isConnectRequest_Request `protobuf_oneof:\"request\"`\n}\n\nfunc (x *ConnectRequest) Reset() {\n\t*x = ConnectRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[20]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ConnectRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ConnectRequest) ProtoMessage() {}\n\nfunc (x *ConnectRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[20]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.\nfunc (*ConnectRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{20}\n}\n\nfunc (m *ConnectRequest) GetRequest() isConnectRequest_Request {\n\tif m != nil {\n\t\treturn m.Request\n\t}\n\treturn nil\n}\n\nfunc (x *ConnectRequest) GetConfig() *ConnectRequest_ConnectConfig {\n\tif x, ok := x.GetRequest().(*ConnectRequest_Config); ok {\n\t\treturn x.Config\n\t}\n\treturn nil\n}\n\nfunc (x *ConnectRequest) GetBlurb() *Blurb {\n\tif x, ok := x.GetRequest().(*ConnectRequest_Blurb); ok {\n\t\treturn x.Blurb\n\t}\n\treturn nil\n}\n\ntype isConnectRequest_Request interface {\n\tisConnectRequest_Request()\n}\n\ntype ConnectRequest_Config struct {\n\t// Provides information that specifies how to process subsequent requests.\n\t// The first `ConnectRequest` message must contain a `config`  message.\n\tConfig *ConnectRequest_ConnectConfig `protobuf:\"bytes,1,opt,name=config,proto3,oneof\"`\n}\n\ntype ConnectRequest_Blurb struct {\n\t// The blurb to be created.\n\tBlurb *Blurb `protobuf:\"bytes,2,opt,name=blurb,proto3,oneof\"`\n}\n\nfunc (*ConnectRequest_Config) isConnectRequest_Request() {}\n\nfunc (*ConnectRequest_Blurb) isConnectRequest_Request() {}\n\ntype ConnectRequest_ConnectConfig struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The room or profile to follow and create messages for.\n\tParent string `protobuf:\"bytes,1,opt,name=parent,proto3\" json:\"parent,omitempty\"`\n}\n\nfunc (x *ConnectRequest_ConnectConfig) Reset() {\n\t*x = ConnectRequest_ConnectConfig{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[21]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ConnectRequest_ConnectConfig) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ConnectRequest_ConnectConfig) ProtoMessage() {}\n\nfunc (x *ConnectRequest_ConnectConfig) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_messaging_proto_msgTypes[21]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ConnectRequest_ConnectConfig.ProtoReflect.Descriptor instead.\nfunc (*ConnectRequest_ConnectConfig) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescGZIP(), []int{20, 0}\n}\n\nfunc (x *ConnectRequest_ConnectConfig) GetParent() string {\n\tif x != nil {\n\t\treturn x.Parent\n\t}\n\treturn \"\"\n}\n\nvar File_google_showcase_v1beta1_messaging_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_messaging_proto_rawDesc = []byte{\n\t0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,\n\t0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,\n\t0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,\n\t0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61,\n\t0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f,\n\t0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74,\n\t0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d,\n\t0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73,\n\t0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x04, 0x52,\n\t0x6f, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c,\n\t0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,\n\t0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,\n\t0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,\n\t0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,\n\t0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,\n\t0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,\n\t0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,\n\t0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,\n\t0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,\n\t0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x2f, 0xea, 0x41, 0x2c, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,\n\t0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f,\n\t0x7b, 0x72, 0x6f, 0x6f, 0x6d, 0x7d, 0x22, 0x46, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,\n\t0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x72,\n\t0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x4a,\n\t0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24,\n\t0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,\n\t0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x11, 0x55,\n\t0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x12, 0x31, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72,\n\t0x6f, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,\n\t0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,\n\t0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b,\n\t0x22, 0x4d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x09, 0x42, 0x24, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,\n\t0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,\n\t0x4e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,\n\t0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,\n\t0x70, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20,\n\t0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f,\n\t0x6f, 0x6d, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78,\n\t0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,\n\t0x6e, 0x22, 0xc3, 0x04, 0x0a, 0x05, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e,\n\t0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,\n\t0x38, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xe0,\n\t0x41, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55,\n\t0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78,\n\t0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12,\n\t0x16, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00,\n\t0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,\n\t0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,\n\t0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63,\n\t0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64,\n\t0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,\n\t0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,\n\t0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6c,\n\t0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20,\n\t0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x6f, 0x6f,\n\t0x6d, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x73,\n\t0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x6c,\n\t0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x3a, 0xd1, 0x01, 0xea, 0x41,\n\t0xcd, 0x01, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x12, 0x38, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x7d, 0x2f,\n\t0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x2f, 0x6c,\n\t0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x7b, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x73,\n\t0x65, 0x72, 0x7d, 0x7e, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x7d, 0x12, 0x23, 0x75, 0x73, 0x65,\n\t0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,\n\t0x65, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x7d,\n\t0x12, 0x1b, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6f, 0x6d, 0x7d, 0x2f, 0x62,\n\t0x6c, 0x75, 0x72, 0x62, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x7d, 0x12, 0x30, 0x72,\n\t0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6f, 0x6d, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x2f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x7b, 0x6c, 0x65, 0x67, 0x61, 0x63,\n\t0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x7d, 0x2e, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x7d, 0x42,\n\t0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65,\n\t0x67, 0x61, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61,\n\t0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d,\n\t0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25,\n\t0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a,\n\t0x05, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x05, 0x62, 0x6c,\n\t0x75, 0x72, 0x62, 0x22, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,\n\t0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d,\n\t0x65, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x3b,\n\t0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52,\n\t0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4f, 0x0a, 0x12, 0x44,\n\t0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,\n\t0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,\n\t0x2f, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x01, 0x0a,\n\t0x11, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,\n\t0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,\n\t0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d,\n\t0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x74, 0x0a,\n\t0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x18, 0x01, 0x20,\n\t0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c,\n\t0x75, 0x72, 0x62, 0x52, 0x06, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,\n\t0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,\n\t0x6b, 0x65, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c,\n\t0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x71,\n\t0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,\n\t0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,\n\t0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65,\n\t0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,\n\t0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12,\n\t0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4c,\n\t0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x4d, 0x65,\n\t0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f,\n\t0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x66,\n\t0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x76, 0x0a, 0x14,\n\t0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x18, 0x01,\n\t0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42,\n\t0x6c, 0x75, 0x72, 0x62, 0x52, 0x06, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x26, 0x0a, 0x0f,\n\t0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,\n\t0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42,\n\t0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04,\n\t0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa,\n\t0x41, 0x1f, 0x12, 0x1d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72,\n\t0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,\n\t0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x65,\n\t0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x14, 0x53, 0x74,\n\t0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x52, 0x05, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x4c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69,\n\t0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,\n\t0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,\n\t0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,\n\t0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41,\n\t0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02,\n\t0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0x2a, 0x0a, 0x12,\n\t0x53, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,\n\t0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e,\n\t0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x63,\n\t0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66,\n\t0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x05,\n\t0x62, 0x6c, 0x75, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x48, 0x00, 0x52, 0x05, 0x62,\n\t0x6c, 0x75, 0x72, 0x62, 0x1a, 0x4b, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43,\n\t0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,\n\t0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,\n\t0x74, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xb4, 0x13, 0x0a,\n\t0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x97, 0x01, 0x0a, 0x0a, 0x43,\n\t0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x52, 0x6f, 0x6f, 0x6d, 0x22, 0x3e, 0xda, 0x41, 0x22, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x64, 0x69,\n\t0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x72, 0x6f, 0x6f, 0x6d, 0x2e,\n\t0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02,\n\t0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72,\n\t0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x79, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12,\n\t0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f,\n\t0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x22, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x12,\n\t0x83, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x2a,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,\n\t0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02,\n\t0x24, 0x3a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x32, 0x1c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2f, 0x7b, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f,\n\t0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x78, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,\n\t0x6f, 0x6f, 0x6d, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65,\n\t0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,\n\t0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x12,\n\t0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x29, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0xf6, 0x01, 0x0a, 0x0b,\n\t0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x2b, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x22, 0x99, 0x01, 0xda, 0x41, 0x1c, 0x70, 0x61,\n\t0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c,\n\t0x62, 0x6c, 0x75, 0x72, 0x62, 0x2e, 0x74, 0x65, 0x78, 0x74, 0xda, 0x41, 0x1d, 0x70, 0x61, 0x72,\n\t0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x62,\n\t0x6c, 0x75, 0x72, 0x62, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54,\n\t0x3a, 0x01, 0x2a, 0x5a, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73,\n\t0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61,\n\t0x72, 0x65, 0x6e, 0x74, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6c,\n\t0x75, 0x72, 0x62, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x75, 0x72,\n\t0x62, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42,\n\t0x6c, 0x75, 0x72, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x22, 0x5b, 0xda, 0x41, 0x04,\n\t0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65,\n\t0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x62, 0x6c, 0x75,\n\t0x72, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x2f, 0x62,\n\t0x6c, 0x75, 0x72, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xca, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64,\n\t0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x22, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x68, 0x3a, 0x05, 0x62,\n\t0x6c, 0x75, 0x72, 0x62, 0x5a, 0x37, 0x3a, 0x05, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x32, 0x2e, 0x2f,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x2e, 0x6e,\n\t0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66,\n\t0x69, 0x6c, 0x65, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x32, 0x26, 0x2f,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x2e, 0x6e,\n\t0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5b, 0xda, 0x41, 0x04, 0x6e,\n\t0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x5a, 0x2a, 0x2a, 0x28, 0x2f, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72,\n\t0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,\n\t0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6c,\n\t0x75, 0x72, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,\n\t0x74, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x5d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e,\n\t0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61,\n\t0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f,\n\t0x66, 0x69, 0x6c, 0x65, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x20, 0x2f, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x72,\n\t0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x81,\n\t0x02, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12,\n\t0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69,\n\t0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0xca,\n\t0x41, 0x2c, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,\n\t0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41,\n\t0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x82, 0xd3, 0xe4,\n\t0x93, 0x02, 0x5f, 0x3a, 0x01, 0x2a, 0x5a, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73,\n\t0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x72, 0x6f, 0x6f, 0x6d,\n\t0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72,\n\t0x63, 0x68, 0x12, 0xd3, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x75,\n\t0x72, 0x62, 0x73, 0x12, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74,\n\t0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65,\n\t0x61, 0x6d, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x22, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x3a, 0x01, 0x2a, 0x5a, 0x32, 0x3a, 0x01, 0x2a,\n\t0x22, 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,\n\t0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,\n\t0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x3a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22,\n\t0x25, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,\n\t0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x3a,\n\t0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0xce, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x6e,\n\t0x64, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53,\n\t0x65, 0x6e, 0x64, 0x42, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x22, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x3a, 0x01, 0x2a, 0x5a, 0x32, 0x3a, 0x01,\n\t0x2a, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,\n\t0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x66,\n\t0x69, 0x6c, 0x65, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72, 0x62, 0x73, 0x3a, 0x73, 0x65, 0x6e, 0x64,\n\t0x22, 0x25, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,\n\t0x6e, 0x74, 0x3d, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6c, 0x75, 0x72,\n\t0x62, 0x73, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x01, 0x12, 0x65, 0x0a, 0x07, 0x43, 0x6f, 0x6e,\n\t0x6e, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43,\n\t0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c,\n\t0x75, 0x72, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01,\n\t0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x37,\n\t0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,\n\t0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x61, 0x70, 0x69,\n\t0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,\n\t0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_messaging_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_messaging_proto_rawDescData = file_google_showcase_v1beta1_messaging_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_messaging_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_messaging_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_messaging_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_messaging_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_messaging_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_messaging_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_google_showcase_v1beta1_messaging_proto_msgTypes = make([]protoimpl.MessageInfo, 22)\nvar file_google_showcase_v1beta1_messaging_proto_goTypes = []interface{}{\n\t(StreamBlurbsResponse_Action)(0),     // 0: google.showcase.v1beta1.StreamBlurbsResponse.Action\n\t(*Room)(nil),                         // 1: google.showcase.v1beta1.Room\n\t(*CreateRoomRequest)(nil),            // 2: google.showcase.v1beta1.CreateRoomRequest\n\t(*GetRoomRequest)(nil),               // 3: google.showcase.v1beta1.GetRoomRequest\n\t(*UpdateRoomRequest)(nil),            // 4: google.showcase.v1beta1.UpdateRoomRequest\n\t(*DeleteRoomRequest)(nil),            // 5: google.showcase.v1beta1.DeleteRoomRequest\n\t(*ListRoomsRequest)(nil),             // 6: google.showcase.v1beta1.ListRoomsRequest\n\t(*ListRoomsResponse)(nil),            // 7: google.showcase.v1beta1.ListRoomsResponse\n\t(*Blurb)(nil),                        // 8: google.showcase.v1beta1.Blurb\n\t(*CreateBlurbRequest)(nil),           // 9: google.showcase.v1beta1.CreateBlurbRequest\n\t(*GetBlurbRequest)(nil),              // 10: google.showcase.v1beta1.GetBlurbRequest\n\t(*UpdateBlurbRequest)(nil),           // 11: google.showcase.v1beta1.UpdateBlurbRequest\n\t(*DeleteBlurbRequest)(nil),           // 12: google.showcase.v1beta1.DeleteBlurbRequest\n\t(*ListBlurbsRequest)(nil),            // 13: google.showcase.v1beta1.ListBlurbsRequest\n\t(*ListBlurbsResponse)(nil),           // 14: google.showcase.v1beta1.ListBlurbsResponse\n\t(*SearchBlurbsRequest)(nil),          // 15: google.showcase.v1beta1.SearchBlurbsRequest\n\t(*SearchBlurbsMetadata)(nil),         // 16: google.showcase.v1beta1.SearchBlurbsMetadata\n\t(*SearchBlurbsResponse)(nil),         // 17: google.showcase.v1beta1.SearchBlurbsResponse\n\t(*StreamBlurbsRequest)(nil),          // 18: google.showcase.v1beta1.StreamBlurbsRequest\n\t(*StreamBlurbsResponse)(nil),         // 19: google.showcase.v1beta1.StreamBlurbsResponse\n\t(*SendBlurbsResponse)(nil),           // 20: google.showcase.v1beta1.SendBlurbsResponse\n\t(*ConnectRequest)(nil),               // 21: google.showcase.v1beta1.ConnectRequest\n\t(*ConnectRequest_ConnectConfig)(nil), // 22: google.showcase.v1beta1.ConnectRequest.ConnectConfig\n\t(*timestamppb.Timestamp)(nil),        // 23: google.protobuf.Timestamp\n\t(*fieldmaskpb.FieldMask)(nil),        // 24: google.protobuf.FieldMask\n\t(*errdetails.RetryInfo)(nil),         // 25: google.rpc.RetryInfo\n\t(*emptypb.Empty)(nil),                // 26: google.protobuf.Empty\n\t(*longrunningpb.Operation)(nil),      // 27: google.longrunning.Operation\n}\nvar file_google_showcase_v1beta1_messaging_proto_depIdxs = []int32{\n\t23, // 0: google.showcase.v1beta1.Room.create_time:type_name -> google.protobuf.Timestamp\n\t23, // 1: google.showcase.v1beta1.Room.update_time:type_name -> google.protobuf.Timestamp\n\t1,  // 2: google.showcase.v1beta1.CreateRoomRequest.room:type_name -> google.showcase.v1beta1.Room\n\t1,  // 3: google.showcase.v1beta1.UpdateRoomRequest.room:type_name -> google.showcase.v1beta1.Room\n\t24, // 4: google.showcase.v1beta1.UpdateRoomRequest.update_mask:type_name -> google.protobuf.FieldMask\n\t1,  // 5: google.showcase.v1beta1.ListRoomsResponse.rooms:type_name -> google.showcase.v1beta1.Room\n\t23, // 6: google.showcase.v1beta1.Blurb.create_time:type_name -> google.protobuf.Timestamp\n\t23, // 7: google.showcase.v1beta1.Blurb.update_time:type_name -> google.protobuf.Timestamp\n\t8,  // 8: google.showcase.v1beta1.CreateBlurbRequest.blurb:type_name -> google.showcase.v1beta1.Blurb\n\t8,  // 9: google.showcase.v1beta1.UpdateBlurbRequest.blurb:type_name -> google.showcase.v1beta1.Blurb\n\t24, // 10: google.showcase.v1beta1.UpdateBlurbRequest.update_mask:type_name -> google.protobuf.FieldMask\n\t8,  // 11: google.showcase.v1beta1.ListBlurbsResponse.blurbs:type_name -> google.showcase.v1beta1.Blurb\n\t25, // 12: google.showcase.v1beta1.SearchBlurbsMetadata.retry_info:type_name -> google.rpc.RetryInfo\n\t8,  // 13: google.showcase.v1beta1.SearchBlurbsResponse.blurbs:type_name -> google.showcase.v1beta1.Blurb\n\t23, // 14: google.showcase.v1beta1.StreamBlurbsRequest.expire_time:type_name -> google.protobuf.Timestamp\n\t8,  // 15: google.showcase.v1beta1.StreamBlurbsResponse.blurb:type_name -> google.showcase.v1beta1.Blurb\n\t0,  // 16: google.showcase.v1beta1.StreamBlurbsResponse.action:type_name -> google.showcase.v1beta1.StreamBlurbsResponse.Action\n\t22, // 17: google.showcase.v1beta1.ConnectRequest.config:type_name -> google.showcase.v1beta1.ConnectRequest.ConnectConfig\n\t8,  // 18: google.showcase.v1beta1.ConnectRequest.blurb:type_name -> google.showcase.v1beta1.Blurb\n\t2,  // 19: google.showcase.v1beta1.Messaging.CreateRoom:input_type -> google.showcase.v1beta1.CreateRoomRequest\n\t3,  // 20: google.showcase.v1beta1.Messaging.GetRoom:input_type -> google.showcase.v1beta1.GetRoomRequest\n\t4,  // 21: google.showcase.v1beta1.Messaging.UpdateRoom:input_type -> google.showcase.v1beta1.UpdateRoomRequest\n\t5,  // 22: google.showcase.v1beta1.Messaging.DeleteRoom:input_type -> google.showcase.v1beta1.DeleteRoomRequest\n\t6,  // 23: google.showcase.v1beta1.Messaging.ListRooms:input_type -> google.showcase.v1beta1.ListRoomsRequest\n\t9,  // 24: google.showcase.v1beta1.Messaging.CreateBlurb:input_type -> google.showcase.v1beta1.CreateBlurbRequest\n\t10, // 25: google.showcase.v1beta1.Messaging.GetBlurb:input_type -> google.showcase.v1beta1.GetBlurbRequest\n\t11, // 26: google.showcase.v1beta1.Messaging.UpdateBlurb:input_type -> google.showcase.v1beta1.UpdateBlurbRequest\n\t12, // 27: google.showcase.v1beta1.Messaging.DeleteBlurb:input_type -> google.showcase.v1beta1.DeleteBlurbRequest\n\t13, // 28: google.showcase.v1beta1.Messaging.ListBlurbs:input_type -> google.showcase.v1beta1.ListBlurbsRequest\n\t15, // 29: google.showcase.v1beta1.Messaging.SearchBlurbs:input_type -> google.showcase.v1beta1.SearchBlurbsRequest\n\t18, // 30: google.showcase.v1beta1.Messaging.StreamBlurbs:input_type -> google.showcase.v1beta1.StreamBlurbsRequest\n\t9,  // 31: google.showcase.v1beta1.Messaging.SendBlurbs:input_type -> google.showcase.v1beta1.CreateBlurbRequest\n\t21, // 32: google.showcase.v1beta1.Messaging.Connect:input_type -> google.showcase.v1beta1.ConnectRequest\n\t1,  // 33: google.showcase.v1beta1.Messaging.CreateRoom:output_type -> google.showcase.v1beta1.Room\n\t1,  // 34: google.showcase.v1beta1.Messaging.GetRoom:output_type -> google.showcase.v1beta1.Room\n\t1,  // 35: google.showcase.v1beta1.Messaging.UpdateRoom:output_type -> google.showcase.v1beta1.Room\n\t26, // 36: google.showcase.v1beta1.Messaging.DeleteRoom:output_type -> google.protobuf.Empty\n\t7,  // 37: google.showcase.v1beta1.Messaging.ListRooms:output_type -> google.showcase.v1beta1.ListRoomsResponse\n\t8,  // 38: google.showcase.v1beta1.Messaging.CreateBlurb:output_type -> google.showcase.v1beta1.Blurb\n\t8,  // 39: google.showcase.v1beta1.Messaging.GetBlurb:output_type -> google.showcase.v1beta1.Blurb\n\t8,  // 40: google.showcase.v1beta1.Messaging.UpdateBlurb:output_type -> google.showcase.v1beta1.Blurb\n\t26, // 41: google.showcase.v1beta1.Messaging.DeleteBlurb:output_type -> google.protobuf.Empty\n\t14, // 42: google.showcase.v1beta1.Messaging.ListBlurbs:output_type -> google.showcase.v1beta1.ListBlurbsResponse\n\t27, // 43: google.showcase.v1beta1.Messaging.SearchBlurbs:output_type -> google.longrunning.Operation\n\t19, // 44: google.showcase.v1beta1.Messaging.StreamBlurbs:output_type -> google.showcase.v1beta1.StreamBlurbsResponse\n\t20, // 45: google.showcase.v1beta1.Messaging.SendBlurbs:output_type -> google.showcase.v1beta1.SendBlurbsResponse\n\t19, // 46: google.showcase.v1beta1.Messaging.Connect:output_type -> google.showcase.v1beta1.StreamBlurbsResponse\n\t33, // [33:47] is the sub-list for method output_type\n\t19, // [19:33] is the sub-list for method input_type\n\t19, // [19:19] is the sub-list for extension type_name\n\t19, // [19:19] is the sub-list for extension extendee\n\t0,  // [0:19] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_messaging_proto_init() }\nfunc file_google_showcase_v1beta1_messaging_proto_init() {\n\tif File_google_showcase_v1beta1_messaging_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Room); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateRoomRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetRoomRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*UpdateRoomRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DeleteRoomRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListRoomsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListRoomsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Blurb); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateBlurbRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetBlurbRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*UpdateBlurbRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DeleteBlurbRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListBlurbsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListBlurbsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SearchBlurbsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SearchBlurbsMetadata); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SearchBlurbsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamBlurbsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamBlurbsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SendBlurbsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ConnectRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ConnectRequest_ConnectConfig); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[7].OneofWrappers = []interface{}{\n\t\t(*Blurb_Text)(nil),\n\t\t(*Blurb_Image)(nil),\n\t\t(*Blurb_LegacyRoomId)(nil),\n\t\t(*Blurb_LegacyUserId)(nil),\n\t}\n\tfile_google_showcase_v1beta1_messaging_proto_msgTypes[20].OneofWrappers = []interface{}{\n\t\t(*ConnectRequest_Config)(nil),\n\t\t(*ConnectRequest_Blurb)(nil),\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_messaging_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   22,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_messaging_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_messaging_proto_depIdxs,\n\t\tEnumInfos:         file_google_showcase_v1beta1_messaging_proto_enumTypes,\n\t\tMessageInfos:      file_google_showcase_v1beta1_messaging_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_messaging_proto = out.File\n\tfile_google_showcase_v1beta1_messaging_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_messaging_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_messaging_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// MessagingClient is the client API for Messaging service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype MessagingClient interface {\n\t// Creates a room.\n\tCreateRoom(ctx context.Context, in *CreateRoomRequest, opts ...grpc.CallOption) (*Room, error)\n\t// Retrieves the Room with the given resource name.\n\tGetRoom(ctx context.Context, in *GetRoomRequest, opts ...grpc.CallOption) (*Room, error)\n\t// Updates a room.\n\tUpdateRoom(ctx context.Context, in *UpdateRoomRequest, opts ...grpc.CallOption) (*Room, error)\n\t// Deletes a room and all of its blurbs.\n\tDeleteRoom(ctx context.Context, in *DeleteRoomRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Lists all chat rooms.\n\tListRooms(ctx context.Context, in *ListRoomsRequest, opts ...grpc.CallOption) (*ListRoomsResponse, error)\n\t// Creates a blurb. If the parent is a room, the blurb is understood to be a\n\t// message in that room. If the parent is a profile, the blurb is understood\n\t// to be a post on the profile.\n\tCreateBlurb(ctx context.Context, in *CreateBlurbRequest, opts ...grpc.CallOption) (*Blurb, error)\n\t// Retrieves the Blurb with the given resource name.\n\tGetBlurb(ctx context.Context, in *GetBlurbRequest, opts ...grpc.CallOption) (*Blurb, error)\n\t// Updates a blurb.\n\tUpdateBlurb(ctx context.Context, in *UpdateBlurbRequest, opts ...grpc.CallOption) (*Blurb, error)\n\t// Deletes a blurb.\n\tDeleteBlurb(ctx context.Context, in *DeleteBlurbRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Lists blurbs for a specific chat room or user profile depending on the\n\t// parent resource name.\n\tListBlurbs(ctx context.Context, in *ListBlurbsRequest, opts ...grpc.CallOption) (*ListBlurbsResponse, error)\n\t// This method searches through all blurbs across all rooms and profiles\n\t// for blurbs containing to words found in the query. Only posts that\n\t// contain an exact match of a queried word will be returned.\n\tSearchBlurbs(ctx context.Context, in *SearchBlurbsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)\n\t// This returns a stream that emits the blurbs that are created for a\n\t// particular chat room or user profile.\n\tStreamBlurbs(ctx context.Context, in *StreamBlurbsRequest, opts ...grpc.CallOption) (Messaging_StreamBlurbsClient, error)\n\t// This is a stream to create multiple blurbs. If an invalid blurb is\n\t// requested to be created, the stream will close with an error.\n\tSendBlurbs(ctx context.Context, opts ...grpc.CallOption) (Messaging_SendBlurbsClient, error)\n\t// This method starts a bidirectional stream that receives all blurbs that\n\t// are being created after the stream has started and sends requests to create\n\t// blurbs. If an invalid blurb is requested to be created, the stream will\n\t// close with an error.\n\tConnect(ctx context.Context, opts ...grpc.CallOption) (Messaging_ConnectClient, error)\n}\n\ntype messagingClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewMessagingClient(cc grpc.ClientConnInterface) MessagingClient {\n\treturn &messagingClient{cc}\n}\n\nfunc (c *messagingClient) CreateRoom(ctx context.Context, in *CreateRoomRequest, opts ...grpc.CallOption) (*Room, error) {\n\tout := new(Room)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/CreateRoom\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) GetRoom(ctx context.Context, in *GetRoomRequest, opts ...grpc.CallOption) (*Room, error) {\n\tout := new(Room)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/GetRoom\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) UpdateRoom(ctx context.Context, in *UpdateRoomRequest, opts ...grpc.CallOption) (*Room, error) {\n\tout := new(Room)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/UpdateRoom\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) DeleteRoom(ctx context.Context, in *DeleteRoomRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/DeleteRoom\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) ListRooms(ctx context.Context, in *ListRoomsRequest, opts ...grpc.CallOption) (*ListRoomsResponse, error) {\n\tout := new(ListRoomsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/ListRooms\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) CreateBlurb(ctx context.Context, in *CreateBlurbRequest, opts ...grpc.CallOption) (*Blurb, error) {\n\tout := new(Blurb)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/CreateBlurb\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) GetBlurb(ctx context.Context, in *GetBlurbRequest, opts ...grpc.CallOption) (*Blurb, error) {\n\tout := new(Blurb)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/GetBlurb\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) UpdateBlurb(ctx context.Context, in *UpdateBlurbRequest, opts ...grpc.CallOption) (*Blurb, error) {\n\tout := new(Blurb)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/UpdateBlurb\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) DeleteBlurb(ctx context.Context, in *DeleteBlurbRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/DeleteBlurb\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) ListBlurbs(ctx context.Context, in *ListBlurbsRequest, opts ...grpc.CallOption) (*ListBlurbsResponse, error) {\n\tout := new(ListBlurbsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/ListBlurbs\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) SearchBlurbs(ctx context.Context, in *SearchBlurbsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {\n\tout := new(longrunningpb.Operation)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Messaging/SearchBlurbs\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *messagingClient) StreamBlurbs(ctx context.Context, in *StreamBlurbsRequest, opts ...grpc.CallOption) (Messaging_StreamBlurbsClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Messaging_serviceDesc.Streams[0], \"/google.showcase.v1beta1.Messaging/StreamBlurbs\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &messagingStreamBlurbsClient{stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype Messaging_StreamBlurbsClient interface {\n\tRecv() (*StreamBlurbsResponse, error)\n\tgrpc.ClientStream\n}\n\ntype messagingStreamBlurbsClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *messagingStreamBlurbsClient) Recv() (*StreamBlurbsResponse, error) {\n\tm := new(StreamBlurbsResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *messagingClient) SendBlurbs(ctx context.Context, opts ...grpc.CallOption) (Messaging_SendBlurbsClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Messaging_serviceDesc.Streams[1], \"/google.showcase.v1beta1.Messaging/SendBlurbs\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &messagingSendBlurbsClient{stream}\n\treturn x, nil\n}\n\ntype Messaging_SendBlurbsClient interface {\n\tSend(*CreateBlurbRequest) error\n\tCloseAndRecv() (*SendBlurbsResponse, error)\n\tgrpc.ClientStream\n}\n\ntype messagingSendBlurbsClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *messagingSendBlurbsClient) Send(m *CreateBlurbRequest) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *messagingSendBlurbsClient) CloseAndRecv() (*SendBlurbsResponse, error) {\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\tm := new(SendBlurbsResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *messagingClient) Connect(ctx context.Context, opts ...grpc.CallOption) (Messaging_ConnectClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Messaging_serviceDesc.Streams[2], \"/google.showcase.v1beta1.Messaging/Connect\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &messagingConnectClient{stream}\n\treturn x, nil\n}\n\ntype Messaging_ConnectClient interface {\n\tSend(*ConnectRequest) error\n\tRecv() (*StreamBlurbsResponse, error)\n\tgrpc.ClientStream\n}\n\ntype messagingConnectClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *messagingConnectClient) Send(m *ConnectRequest) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *messagingConnectClient) Recv() (*StreamBlurbsResponse, error) {\n\tm := new(StreamBlurbsResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// MessagingServer is the server API for Messaging service.\ntype MessagingServer interface {\n\t// Creates a room.\n\tCreateRoom(context.Context, *CreateRoomRequest) (*Room, error)\n\t// Retrieves the Room with the given resource name.\n\tGetRoom(context.Context, *GetRoomRequest) (*Room, error)\n\t// Updates a room.\n\tUpdateRoom(context.Context, *UpdateRoomRequest) (*Room, error)\n\t// Deletes a room and all of its blurbs.\n\tDeleteRoom(context.Context, *DeleteRoomRequest) (*emptypb.Empty, error)\n\t// Lists all chat rooms.\n\tListRooms(context.Context, *ListRoomsRequest) (*ListRoomsResponse, error)\n\t// Creates a blurb. If the parent is a room, the blurb is understood to be a\n\t// message in that room. If the parent is a profile, the blurb is understood\n\t// to be a post on the profile.\n\tCreateBlurb(context.Context, *CreateBlurbRequest) (*Blurb, error)\n\t// Retrieves the Blurb with the given resource name.\n\tGetBlurb(context.Context, *GetBlurbRequest) (*Blurb, error)\n\t// Updates a blurb.\n\tUpdateBlurb(context.Context, *UpdateBlurbRequest) (*Blurb, error)\n\t// Deletes a blurb.\n\tDeleteBlurb(context.Context, *DeleteBlurbRequest) (*emptypb.Empty, error)\n\t// Lists blurbs for a specific chat room or user profile depending on the\n\t// parent resource name.\n\tListBlurbs(context.Context, *ListBlurbsRequest) (*ListBlurbsResponse, error)\n\t// This method searches through all blurbs across all rooms and profiles\n\t// for blurbs containing to words found in the query. Only posts that\n\t// contain an exact match of a queried word will be returned.\n\tSearchBlurbs(context.Context, *SearchBlurbsRequest) (*longrunningpb.Operation, error)\n\t// This returns a stream that emits the blurbs that are created for a\n\t// particular chat room or user profile.\n\tStreamBlurbs(*StreamBlurbsRequest, Messaging_StreamBlurbsServer) error\n\t// This is a stream to create multiple blurbs. If an invalid blurb is\n\t// requested to be created, the stream will close with an error.\n\tSendBlurbs(Messaging_SendBlurbsServer) error\n\t// This method starts a bidirectional stream that receives all blurbs that\n\t// are being created after the stream has started and sends requests to create\n\t// blurbs. If an invalid blurb is requested to be created, the stream will\n\t// close with an error.\n\tConnect(Messaging_ConnectServer) error\n}\n\n// UnimplementedMessagingServer can be embedded to have forward compatible implementations.\ntype UnimplementedMessagingServer struct {\n}\n\nfunc (*UnimplementedMessagingServer) CreateRoom(context.Context, *CreateRoomRequest) (*Room, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method CreateRoom not implemented\")\n}\nfunc (*UnimplementedMessagingServer) GetRoom(context.Context, *GetRoomRequest) (*Room, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetRoom not implemented\")\n}\nfunc (*UnimplementedMessagingServer) UpdateRoom(context.Context, *UpdateRoomRequest) (*Room, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateRoom not implemented\")\n}\nfunc (*UnimplementedMessagingServer) DeleteRoom(context.Context, *DeleteRoomRequest) (*emptypb.Empty, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteRoom not implemented\")\n}\nfunc (*UnimplementedMessagingServer) ListRooms(context.Context, *ListRoomsRequest) (*ListRoomsResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ListRooms not implemented\")\n}\nfunc (*UnimplementedMessagingServer) CreateBlurb(context.Context, *CreateBlurbRequest) (*Blurb, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method CreateBlurb not implemented\")\n}\nfunc (*UnimplementedMessagingServer) GetBlurb(context.Context, *GetBlurbRequest) (*Blurb, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetBlurb not implemented\")\n}\nfunc (*UnimplementedMessagingServer) UpdateBlurb(context.Context, *UpdateBlurbRequest) (*Blurb, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateBlurb not implemented\")\n}\nfunc (*UnimplementedMessagingServer) DeleteBlurb(context.Context, *DeleteBlurbRequest) (*emptypb.Empty, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteBlurb not implemented\")\n}\nfunc (*UnimplementedMessagingServer) ListBlurbs(context.Context, *ListBlurbsRequest) (*ListBlurbsResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ListBlurbs not implemented\")\n}\nfunc (*UnimplementedMessagingServer) SearchBlurbs(context.Context, *SearchBlurbsRequest) (*longrunningpb.Operation, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method SearchBlurbs not implemented\")\n}\nfunc (*UnimplementedMessagingServer) StreamBlurbs(*StreamBlurbsRequest, Messaging_StreamBlurbsServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method StreamBlurbs not implemented\")\n}\nfunc (*UnimplementedMessagingServer) SendBlurbs(Messaging_SendBlurbsServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method SendBlurbs not implemented\")\n}\nfunc (*UnimplementedMessagingServer) Connect(Messaging_ConnectServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Connect not implemented\")\n}\n\nfunc RegisterMessagingServer(s *grpc.Server, srv MessagingServer) {\n\ts.RegisterService(&_Messaging_serviceDesc, srv)\n}\n\nfunc _Messaging_CreateRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateRoomRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).CreateRoom(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/CreateRoom\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).CreateRoom(ctx, req.(*CreateRoomRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_GetRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRoomRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).GetRoom(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/GetRoom\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).GetRoom(ctx, req.(*GetRoomRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_UpdateRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(UpdateRoomRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).UpdateRoom(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/UpdateRoom\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).UpdateRoom(ctx, req.(*UpdateRoomRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_DeleteRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DeleteRoomRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).DeleteRoom(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/DeleteRoom\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).DeleteRoom(ctx, req.(*DeleteRoomRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_ListRooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListRoomsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).ListRooms(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/ListRooms\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).ListRooms(ctx, req.(*ListRoomsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_CreateBlurb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateBlurbRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).CreateBlurb(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/CreateBlurb\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).CreateBlurb(ctx, req.(*CreateBlurbRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_GetBlurb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetBlurbRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).GetBlurb(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/GetBlurb\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).GetBlurb(ctx, req.(*GetBlurbRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_UpdateBlurb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(UpdateBlurbRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).UpdateBlurb(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/UpdateBlurb\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).UpdateBlurb(ctx, req.(*UpdateBlurbRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_DeleteBlurb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DeleteBlurbRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).DeleteBlurb(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/DeleteBlurb\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).DeleteBlurb(ctx, req.(*DeleteBlurbRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_ListBlurbs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListBlurbsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).ListBlurbs(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/ListBlurbs\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).ListBlurbs(ctx, req.(*ListBlurbsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_SearchBlurbs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SearchBlurbsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MessagingServer).SearchBlurbs(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Messaging/SearchBlurbs\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MessagingServer).SearchBlurbs(ctx, req.(*SearchBlurbsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Messaging_StreamBlurbs_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(StreamBlurbsRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(MessagingServer).StreamBlurbs(m, &messagingStreamBlurbsServer{stream})\n}\n\ntype Messaging_StreamBlurbsServer interface {\n\tSend(*StreamBlurbsResponse) error\n\tgrpc.ServerStream\n}\n\ntype messagingStreamBlurbsServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *messagingStreamBlurbsServer) Send(m *StreamBlurbsResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _Messaging_SendBlurbs_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(MessagingServer).SendBlurbs(&messagingSendBlurbsServer{stream})\n}\n\ntype Messaging_SendBlurbsServer interface {\n\tSendAndClose(*SendBlurbsResponse) error\n\tRecv() (*CreateBlurbRequest, error)\n\tgrpc.ServerStream\n}\n\ntype messagingSendBlurbsServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *messagingSendBlurbsServer) SendAndClose(m *SendBlurbsResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *messagingSendBlurbsServer) Recv() (*CreateBlurbRequest, error) {\n\tm := new(CreateBlurbRequest)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc _Messaging_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(MessagingServer).Connect(&messagingConnectServer{stream})\n}\n\ntype Messaging_ConnectServer interface {\n\tSend(*StreamBlurbsResponse) error\n\tRecv() (*ConnectRequest, error)\n\tgrpc.ServerStream\n}\n\ntype messagingConnectServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *messagingConnectServer) Send(m *StreamBlurbsResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *messagingConnectServer) Recv() (*ConnectRequest, error) {\n\tm := new(ConnectRequest)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nvar _Messaging_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.Messaging\",\n\tHandlerType: (*MessagingServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"CreateRoom\",\n\t\t\tHandler:    _Messaging_CreateRoom_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRoom\",\n\t\t\tHandler:    _Messaging_GetRoom_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateRoom\",\n\t\t\tHandler:    _Messaging_UpdateRoom_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteRoom\",\n\t\t\tHandler:    _Messaging_DeleteRoom_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListRooms\",\n\t\t\tHandler:    _Messaging_ListRooms_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"CreateBlurb\",\n\t\t\tHandler:    _Messaging_CreateBlurb_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetBlurb\",\n\t\t\tHandler:    _Messaging_GetBlurb_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateBlurb\",\n\t\t\tHandler:    _Messaging_UpdateBlurb_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteBlurb\",\n\t\t\tHandler:    _Messaging_DeleteBlurb_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListBlurbs\",\n\t\t\tHandler:    _Messaging_ListBlurbs_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SearchBlurbs\",\n\t\t\tHandler:    _Messaging_SearchBlurbs_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"StreamBlurbs\",\n\t\t\tHandler:       _Messaging_StreamBlurbs_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"SendBlurbs\",\n\t\t\tHandler:       _Messaging_SendBlurbs_Handler,\n\t\t\tClientStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"Connect\",\n\t\t\tHandler:       _Messaging_Connect_Handler,\n\t\t\tServerStreams: true,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"google/showcase/v1beta1/messaging.proto\",\n}\n"
  },
  {
    "path": "server/genproto/rest_error.pb.go",
    "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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/rest_error.proto\n\npackage genproto\n\nimport (\n\tcode \"google.golang.org/genproto/googleapis/rpc/code\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// HTTP/JSON error representation as defined in\n// https://google.aip.dev/193#http11json-representation,\ntype RestError struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tError *RestError_Status `protobuf:\"bytes,1,opt,name=error,proto3\" json:\"error,omitempty\"`\n}\n\nfunc (x *RestError) Reset() {\n\t*x = RestError{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_rest_error_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RestError) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RestError) ProtoMessage() {}\n\nfunc (x *RestError) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_rest_error_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RestError.ProtoReflect.Descriptor instead.\nfunc (*RestError) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_rest_error_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *RestError) GetError() *RestError_Status {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn nil\n}\n\ntype RestError_Status struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The HTTP status code that corresponds to `google.rpc.Status.code`.\n\tCode int32 `protobuf:\"varint,1,opt,name=code,proto3\" json:\"code,omitempty\"`\n\t// This corresponds to `google.rpc.Status.message`.\n\tMessage string `protobuf:\"bytes,2,opt,name=message,proto3\" json:\"message,omitempty\"`\n\t// This is the enum version for `google.rpc.Status.code`.\n\tStatus code.Code `protobuf:\"varint,4,opt,name=status,proto3,enum=google.rpc.Code\" json:\"status,omitempty\"`\n\t// This corresponds to `google.rpc.Status.details`.\n\tDetails []*anypb.Any `protobuf:\"bytes,5,rep,name=details,proto3\" json:\"details,omitempty\"`\n}\n\nfunc (x *RestError_Status) Reset() {\n\t*x = RestError_Status{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_rest_error_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RestError_Status) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RestError_Status) ProtoMessage() {}\n\nfunc (x *RestError_Status) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_rest_error_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RestError_Status.ProtoReflect.Descriptor instead.\nfunc (*RestError_Status) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_rest_error_proto_rawDescGZIP(), []int{0, 0}\n}\n\nfunc (x *RestError_Status) GetCode() int32 {\n\tif x != nil {\n\t\treturn x.Code\n\t}\n\treturn 0\n}\n\nfunc (x *RestError_Status) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\nfunc (x *RestError_Status) GetStatus() code.Code {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn code.Code(0)\n}\n\nfunc (x *RestError_Status) GetDetails() []*anypb.Any {\n\tif x != nil {\n\t\treturn x.Details\n\t}\n\treturn nil\n}\n\nvar File_google_showcase_v1beta1_rest_error_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_rest_error_proto_rawDesc = []byte{\n\t0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65,\n\t0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x74, 0x45, 0x72,\n\t0x72, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73,\n\t0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65,\n\t0x72, 0x72, 0x6f, 0x72, 0x1a, 0x90, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,\n\t0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63,\n\t0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a,\n\t0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52,\n\t0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69,\n\t0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07,\n\t0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,\n\t0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f,\n\t0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73,\n\t0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02,\n\t0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_rest_error_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_rest_error_proto_rawDescData = file_google_showcase_v1beta1_rest_error_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_rest_error_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_rest_error_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_rest_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_rest_error_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_rest_error_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_rest_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_google_showcase_v1beta1_rest_error_proto_goTypes = []interface{}{\n\t(*RestError)(nil),        // 0: google.showcase.v1beta1.RestError\n\t(*RestError_Status)(nil), // 1: google.showcase.v1beta1.RestError.Status\n\t(code.Code)(0),           // 2: google.rpc.Code\n\t(*anypb.Any)(nil),        // 3: google.protobuf.Any\n}\nvar file_google_showcase_v1beta1_rest_error_proto_depIdxs = []int32{\n\t1, // 0: google.showcase.v1beta1.RestError.error:type_name -> google.showcase.v1beta1.RestError.Status\n\t2, // 1: google.showcase.v1beta1.RestError.Status.status:type_name -> google.rpc.Code\n\t3, // 2: google.showcase.v1beta1.RestError.Status.details:type_name -> google.protobuf.Any\n\t3, // [3:3] is the sub-list for method output_type\n\t3, // [3:3] is the sub-list for method input_type\n\t3, // [3:3] is the sub-list for extension type_name\n\t3, // [3:3] is the sub-list for extension extendee\n\t0, // [0:3] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_rest_error_proto_init() }\nfunc file_google_showcase_v1beta1_rest_error_proto_init() {\n\tif File_google_showcase_v1beta1_rest_error_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_rest_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RestError); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_rest_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RestError_Status); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_rest_error_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   2,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_rest_error_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_rest_error_proto_depIdxs,\n\t\tMessageInfos:      file_google_showcase_v1beta1_rest_error_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_rest_error_proto = out.File\n\tfile_google_showcase_v1beta1_rest_error_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_rest_error_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_rest_error_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "server/genproto/sequence.pb.go",
    "content": "// Copyright 2020 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//   https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/sequence.proto\n\npackage genproto\n\nimport (\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tstatus \"google.golang.org/genproto/googleapis/rpc/status\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus1 \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// A sequence of responses to be returned in order for each unary call attempt\ntype Sequence struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// Sequence of responses to return in order for each attempt. If empty, the\n\t// default response is an immediate OK.\n\tResponses []*Sequence_Response `protobuf:\"bytes,2,rep,name=responses,proto3\" json:\"responses,omitempty\"`\n}\n\nfunc (x *Sequence) Reset() {\n\t*x = Sequence{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Sequence) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Sequence) ProtoMessage() {}\n\nfunc (x *Sequence) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Sequence.ProtoReflect.Descriptor instead.\nfunc (*Sequence) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Sequence) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Sequence) GetResponses() []*Sequence_Response {\n\tif x != nil {\n\t\treturn x.Responses\n\t}\n\treturn nil\n}\n\n// A sequence of responses to be returned in order at the delay specified\n// as part of the server streaming call\ntype StreamingSequence struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of the streaming sequence.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The content that the stream will send\n\t// this was specified when the sequence was created\n\tContent string `protobuf:\"bytes,2,opt,name=content,proto3\" json:\"content,omitempty\"`\n\t// Sequence of responses to return in order for each attempt. If empty, the\n\t// default response is an immediate OK.\n\tResponses []*StreamingSequence_Response `protobuf:\"bytes,3,rep,name=responses,proto3\" json:\"responses,omitempty\"`\n}\n\nfunc (x *StreamingSequence) Reset() {\n\t*x = StreamingSequence{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamingSequence) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamingSequence) ProtoMessage() {}\n\nfunc (x *StreamingSequence) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamingSequence.ProtoReflect.Descriptor instead.\nfunc (*StreamingSequence) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *StreamingSequence) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamingSequence) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamingSequence) GetResponses() []*StreamingSequence_Response {\n\tif x != nil {\n\t\treturn x.Responses\n\t}\n\treturn nil\n}\n\n// A report of the results of a streaming sequence.\ntype StreamingSequenceReport struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The set of RPC attempts received by the server for a Sequence.\n\tAttempts []*StreamingSequenceReport_Attempt `protobuf:\"bytes,2,rep,name=attempts,proto3\" json:\"attempts,omitempty\"`\n}\n\nfunc (x *StreamingSequenceReport) Reset() {\n\t*x = StreamingSequenceReport{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamingSequenceReport) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamingSequenceReport) ProtoMessage() {}\n\nfunc (x *StreamingSequenceReport) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamingSequenceReport.ProtoReflect.Descriptor instead.\nfunc (*StreamingSequenceReport) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *StreamingSequenceReport) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamingSequenceReport) GetAttempts() []*StreamingSequenceReport_Attempt {\n\tif x != nil {\n\t\treturn x.Attempts\n\t}\n\treturn nil\n}\n\n// A report of the results of a sequence of unary responses\ntype SequenceReport struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The set of RPC attempts received by the server for a Sequence.\n\tAttempts []*SequenceReport_Attempt `protobuf:\"bytes,2,rep,name=attempts,proto3\" json:\"attempts,omitempty\"`\n}\n\nfunc (x *SequenceReport) Reset() {\n\t*x = SequenceReport{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SequenceReport) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SequenceReport) ProtoMessage() {}\n\nfunc (x *SequenceReport) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SequenceReport.ProtoReflect.Descriptor instead.\nfunc (*SequenceReport) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *SequenceReport) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *SequenceReport) GetAttempts() []*SequenceReport_Attempt {\n\tif x != nil {\n\t\treturn x.Attempts\n\t}\n\treturn nil\n}\n\n// Request message for creating a sequence of unary calls\ntype CreateSequenceRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tSequence *Sequence `protobuf:\"bytes,1,opt,name=sequence,proto3\" json:\"sequence,omitempty\"`\n}\n\nfunc (x *CreateSequenceRequest) Reset() {\n\t*x = CreateSequenceRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateSequenceRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateSequenceRequest) ProtoMessage() {}\n\nfunc (x *CreateSequenceRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateSequenceRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateSequenceRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *CreateSequenceRequest) GetSequence() *Sequence {\n\tif x != nil {\n\t\treturn x.Sequence\n\t}\n\treturn nil\n}\n\n// Request message for the sequences of responses to be sent in a server streaming call\ntype CreateStreamingSequenceRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tStreamingSequence *StreamingSequence `protobuf:\"bytes,1,opt,name=streaming_sequence,json=streamingSequence,proto3\" json:\"streaming_sequence,omitempty\"`\n}\n\nfunc (x *CreateStreamingSequenceRequest) Reset() {\n\t*x = CreateStreamingSequenceRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateStreamingSequenceRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateStreamingSequenceRequest) ProtoMessage() {}\n\nfunc (x *CreateStreamingSequenceRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateStreamingSequenceRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateStreamingSequenceRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *CreateStreamingSequenceRequest) GetStreamingSequence() *StreamingSequence {\n\tif x != nil {\n\t\treturn x.StreamingSequence\n\t}\n\treturn nil\n}\n\n// Request message for the unary AttemptSequence method\ntype AttemptSequenceRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *AttemptSequenceRequest) Reset() {\n\t*x = AttemptSequenceRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *AttemptSequenceRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*AttemptSequenceRequest) ProtoMessage() {}\n\nfunc (x *AttemptSequenceRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use AttemptSequenceRequest.ProtoReflect.Descriptor instead.\nfunc (*AttemptSequenceRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *AttemptSequenceRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// Request message for the AttemptStreamingSequence method.\ntype AttemptStreamingSequenceRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// used to send the index of the last failed message\n\t// in the string \"content\" of an AttemptStreamingSequenceResponse\n\t// needed for stream resumption logic testing\n\tLastFailIndex int32 `protobuf:\"varint,2,opt,name=last_fail_index,json=lastFailIndex,proto3\" json:\"last_fail_index,omitempty\"`\n}\n\nfunc (x *AttemptStreamingSequenceRequest) Reset() {\n\t*x = AttemptStreamingSequenceRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *AttemptStreamingSequenceRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*AttemptStreamingSequenceRequest) ProtoMessage() {}\n\nfunc (x *AttemptStreamingSequenceRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use AttemptStreamingSequenceRequest.ProtoReflect.Descriptor instead.\nfunc (*AttemptStreamingSequenceRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *AttemptStreamingSequenceRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *AttemptStreamingSequenceRequest) GetLastFailIndex() int32 {\n\tif x != nil {\n\t\treturn x.LastFailIndex\n\t}\n\treturn 0\n}\n\n// The response message for the AttemptStreamingSequence method.\ntype AttemptStreamingSequenceResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The content specified in the request.\n\tContent string `protobuf:\"bytes,1,opt,name=content,proto3\" json:\"content,omitempty\"`\n}\n\nfunc (x *AttemptStreamingSequenceResponse) Reset() {\n\t*x = AttemptStreamingSequenceResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *AttemptStreamingSequenceResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*AttemptStreamingSequenceResponse) ProtoMessage() {}\n\nfunc (x *AttemptStreamingSequenceResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use AttemptStreamingSequenceResponse.ProtoReflect.Descriptor instead.\nfunc (*AttemptStreamingSequenceResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *AttemptStreamingSequenceResponse) GetContent() string {\n\tif x != nil {\n\t\treturn x.Content\n\t}\n\treturn \"\"\n}\n\ntype GetSequenceReportRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetSequenceReportRequest) Reset() {\n\t*x = GetSequenceReportRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetSequenceReportRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetSequenceReportRequest) ProtoMessage() {}\n\nfunc (x *GetSequenceReportRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetSequenceReportRequest.ProtoReflect.Descriptor instead.\nfunc (*GetSequenceReportRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *GetSequenceReportRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\ntype GetStreamingSequenceReportRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetStreamingSequenceReportRequest) Reset() {\n\t*x = GetStreamingSequenceReportRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetStreamingSequenceReportRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetStreamingSequenceReportRequest) ProtoMessage() {}\n\nfunc (x *GetStreamingSequenceReportRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetStreamingSequenceReportRequest.ProtoReflect.Descriptor instead.\nfunc (*GetStreamingSequenceReportRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *GetStreamingSequenceReportRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// A server response to an RPC Attempt in a sequence.\ntype Sequence_Response struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The status to return for an individual attempt.\n\tStatus *status.Status `protobuf:\"bytes,1,opt,name=status,proto3\" json:\"status,omitempty\"`\n\t// The amount of time to delay sending the response.\n\tDelay *durationpb.Duration `protobuf:\"bytes,2,opt,name=delay,proto3\" json:\"delay,omitempty\"`\n}\n\nfunc (x *Sequence_Response) Reset() {\n\t*x = Sequence_Response{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Sequence_Response) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Sequence_Response) ProtoMessage() {}\n\nfunc (x *Sequence_Response) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Sequence_Response.ProtoReflect.Descriptor instead.\nfunc (*Sequence_Response) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{0, 0}\n}\n\nfunc (x *Sequence_Response) GetStatus() *status.Status {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn nil\n}\n\nfunc (x *Sequence_Response) GetDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.Delay\n\t}\n\treturn nil\n}\n\n// A server response to an RPC Attempt in a sequence.\ntype StreamingSequence_Response struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The status to return for an individual attempt.\n\tStatus *status.Status `protobuf:\"bytes,1,opt,name=status,proto3\" json:\"status,omitempty\"`\n\t// The amount of time to delay sending the response.\n\tDelay *durationpb.Duration `protobuf:\"bytes,2,opt,name=delay,proto3\" json:\"delay,omitempty\"`\n\t// The index that the status should be sent at\n\tResponseIndex int32 `protobuf:\"varint,3,opt,name=response_index,json=responseIndex,proto3\" json:\"response_index,omitempty\"`\n}\n\nfunc (x *StreamingSequence_Response) Reset() {\n\t*x = StreamingSequence_Response{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamingSequence_Response) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamingSequence_Response) ProtoMessage() {}\n\nfunc (x *StreamingSequence_Response) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamingSequence_Response.ProtoReflect.Descriptor instead.\nfunc (*StreamingSequence_Response) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{1, 0}\n}\n\nfunc (x *StreamingSequence_Response) GetStatus() *status.Status {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn nil\n}\n\nfunc (x *StreamingSequence_Response) GetDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.Delay\n\t}\n\treturn nil\n}\n\nfunc (x *StreamingSequence_Response) GetResponseIndex() int32 {\n\tif x != nil {\n\t\treturn x.ResponseIndex\n\t}\n\treturn 0\n}\n\n// Contains metrics on individual RPC Attempts in a sequence.\ntype StreamingSequenceReport_Attempt struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The attempt number - starting at 0.\n\tAttemptNumber int32 `protobuf:\"varint,1,opt,name=attempt_number,json=attemptNumber,proto3\" json:\"attempt_number,omitempty\"`\n\t// The deadline dictated by the attempt to the server.\n\tAttemptDeadline *timestamppb.Timestamp `protobuf:\"bytes,2,opt,name=attempt_deadline,json=attemptDeadline,proto3\" json:\"attempt_deadline,omitempty\"`\n\t// The time that the server responded to the RPC attempt. Used for\n\t// calculating attempt_delay.\n\tResponseTime *timestamppb.Timestamp `protobuf:\"bytes,3,opt,name=response_time,json=responseTime,proto3\" json:\"response_time,omitempty\"`\n\t// The server perceived delay between sending the last response and\n\t// receiving this attempt. Used for validating attempt delay backoff.\n\tAttemptDelay *durationpb.Duration `protobuf:\"bytes,4,opt,name=attempt_delay,json=attemptDelay,proto3\" json:\"attempt_delay,omitempty\"`\n\t// The status returned to the attempt.\n\tStatus *status.Status `protobuf:\"bytes,5,opt,name=status,proto3\" json:\"status,omitempty\"`\n}\n\nfunc (x *StreamingSequenceReport_Attempt) Reset() {\n\t*x = StreamingSequenceReport_Attempt{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[13]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamingSequenceReport_Attempt) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamingSequenceReport_Attempt) ProtoMessage() {}\n\nfunc (x *StreamingSequenceReport_Attempt) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[13]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamingSequenceReport_Attempt.ProtoReflect.Descriptor instead.\nfunc (*StreamingSequenceReport_Attempt) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{2, 0}\n}\n\nfunc (x *StreamingSequenceReport_Attempt) GetAttemptNumber() int32 {\n\tif x != nil {\n\t\treturn x.AttemptNumber\n\t}\n\treturn 0\n}\n\nfunc (x *StreamingSequenceReport_Attempt) GetAttemptDeadline() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.AttemptDeadline\n\t}\n\treturn nil\n}\n\nfunc (x *StreamingSequenceReport_Attempt) GetResponseTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.ResponseTime\n\t}\n\treturn nil\n}\n\nfunc (x *StreamingSequenceReport_Attempt) GetAttemptDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.AttemptDelay\n\t}\n\treturn nil\n}\n\nfunc (x *StreamingSequenceReport_Attempt) GetStatus() *status.Status {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn nil\n}\n\n// Contains metrics on individual RPC Attempts in a sequence.\ntype SequenceReport_Attempt struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The attempt number - starting at 0.\n\tAttemptNumber int32 `protobuf:\"varint,1,opt,name=attempt_number,json=attemptNumber,proto3\" json:\"attempt_number,omitempty\"`\n\t// The deadline dictated by the attempt to the server.\n\tAttemptDeadline *timestamppb.Timestamp `protobuf:\"bytes,2,opt,name=attempt_deadline,json=attemptDeadline,proto3\" json:\"attempt_deadline,omitempty\"`\n\t// The time that the server responded to the RPC attempt. Used for\n\t// calculating attempt_delay.\n\tResponseTime *timestamppb.Timestamp `protobuf:\"bytes,3,opt,name=response_time,json=responseTime,proto3\" json:\"response_time,omitempty\"`\n\t// The server perceived delay between sending the last response and\n\t// receiving this attempt. Used for validating attempt delay backoff.\n\tAttemptDelay *durationpb.Duration `protobuf:\"bytes,4,opt,name=attempt_delay,json=attemptDelay,proto3\" json:\"attempt_delay,omitempty\"`\n\t// The status returned to the attempt.\n\tStatus *status.Status `protobuf:\"bytes,5,opt,name=status,proto3\" json:\"status,omitempty\"`\n}\n\nfunc (x *SequenceReport_Attempt) Reset() {\n\t*x = SequenceReport_Attempt{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[14]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SequenceReport_Attempt) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SequenceReport_Attempt) ProtoMessage() {}\n\nfunc (x *SequenceReport_Attempt) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_sequence_proto_msgTypes[14]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SequenceReport_Attempt.ProtoReflect.Descriptor instead.\nfunc (*SequenceReport_Attempt) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescGZIP(), []int{3, 0}\n}\n\nfunc (x *SequenceReport_Attempt) GetAttemptNumber() int32 {\n\tif x != nil {\n\t\treturn x.AttemptNumber\n\t}\n\treturn 0\n}\n\nfunc (x *SequenceReport_Attempt) GetAttemptDeadline() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.AttemptDeadline\n\t}\n\treturn nil\n}\n\nfunc (x *SequenceReport_Attempt) GetResponseTime() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.ResponseTime\n\t}\n\treturn nil\n}\n\nfunc (x *SequenceReport_Attempt) GetAttemptDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.AttemptDelay\n\t}\n\treturn nil\n}\n\nfunc (x *SequenceReport_Attempt) GetStatus() *status.Status {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn nil\n}\n\nvar File_google_showcase_v1beta1_sequence_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_sequence_proto_rawDesc = []byte{\n\t0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,\n\t0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,\n\t0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,\n\t0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65,\n\t0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,\n\t0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,\n\t0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73,\n\t0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x08,\n\t0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d,\n\t0x65, 0x12, 0x48, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02,\n\t0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x67, 0x0a, 0x08, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,\n\t0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,\n\t0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64,\n\t0x65, 0x6c, 0x61, 0x79, 0x3a, 0x3b, 0xea, 0x41, 0x38, 0x0a, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,\n\t0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x73, 0x65, 0x71,\n\t0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n\t0x7d, 0x22, 0x83, 0x03, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,\n\t0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x8e, 0x01,\n\t0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74,\n\t0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,\n\t0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,\n\t0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x57,\n\t0xea, 0x41, 0x54, 0x0a, 0x29, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x27,\n\t0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65,\n\t0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x22, 0xa6, 0x04, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65,\n\t0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x08,\n\t0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69,\n\t0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,\n\t0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70,\n\t0x74, 0x73, 0x1a, 0xa4, 0x02, 0x0a, 0x07, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x25,\n\t0x0a, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x4e,\n\t0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74,\n\t0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,\n\t0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x61, 0x74, 0x74,\n\t0x65, 0x6d, 0x70, 0x74, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3f, 0x0a, 0x0d,\n\t0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,\n\t0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a,\n\t0x0d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,\n\t0x0c, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2a, 0x0a,\n\t0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,\n\t0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x75, 0xea, 0x41, 0x72, 0x0a, 0x2f,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,\n\t0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,\n\t0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12,\n\t0x3f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e,\n\t0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69,\n\t0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,\n\t0x22, 0xef, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x08,\n\t0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52,\n\t0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x1a, 0xa4, 0x02, 0x0a, 0x07, 0x41, 0x74,\n\t0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74,\n\t0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61,\n\t0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x10,\n\t0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,\n\t0x6d, 0x70, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x44, 0x65, 0x61, 0x64, 0x6c,\n\t0x69, 0x6e, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f,\n\t0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,\n\t0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f,\n\t0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,\n\t0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x44,\n\t0x65, 0x6c, 0x61, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70,\n\t0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,\n\t0x3a, 0x50, 0xea, 0x41, 0x4d, 0x0a, 0x26, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x73,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,\n\t0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f,\n\t0x72, 0x74, 0x22, 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x73,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n\t0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x7b, 0x0a, 0x1e, 0x43, 0x72,\n\t0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71,\n\t0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x12,\n\t0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,\n\t0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x65, 0x6d,\n\t0x70, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,\n\t0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,\n\t0x2f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,\n\t0x95, 0x01, 0x0a, 0x1f, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61,\n\t0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,\n\t0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61,\n\t0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x61,\n\t0x69, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3c, 0x0a, 0x20, 0x41, 0x74, 0x74, 0x65, 0x6d,\n\t0x70, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65,\n\t0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,\n\t0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,\n\t0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x5e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,\n\t0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,\n\t0x2f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52,\n\t0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65,\n\t0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x6e, 0x61,\n\t0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x31,\n\t0x0a, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,\n\t0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72,\n\t0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xf0, 0x08, 0x0a, 0x0f, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0e,\n\t0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2e,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x22, 0x2f, 0xda, 0x41, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x82, 0xd3,\n\t0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x12,\n\t0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x73, 0x12, 0xcc, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x37,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,\n\t0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65,\n\t0x6e, 0x63, 0x65, 0x22, 0x4c, 0xda, 0x41, 0x12, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,\n\t0x67, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31,\n\t0x3a, 0x12, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73,\n\t0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n\t0x73, 0x12, 0xaa, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x22, 0x39, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,\n\t0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61,\n\t0x6d, 0x65, 0x3d, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x73,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x7d, 0x12, 0xd7,\n\t0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53,\n\t0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3a, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61,\n\t0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f,\n\t0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71,\n\t0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x4b, 0xda, 0x41, 0x04,\n\t0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x74, 0x72, 0x65, 0x61,\n\t0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f,\n\t0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x0f, 0x41, 0x74, 0x74,\n\t0x65, 0x6d, 0x70, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x65,\n\t0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,\n\t0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,\n\t0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n\t0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xd0, 0x01, 0x0a, 0x18, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74,\n\t0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,\n\t0x65, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65,\n\t0x6d, 0x70, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,\n\t0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69,\n\t0x6e, 0x67, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73,\n\t0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61,\n\t0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x37, 0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f,\n\t0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74,\n\t0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,\n\t0x69, 0x73, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_sequence_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_sequence_proto_rawDescData = file_google_showcase_v1beta1_sequence_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_sequence_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_sequence_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_sequence_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_sequence_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_sequence_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_sequence_proto_msgTypes = make([]protoimpl.MessageInfo, 15)\nvar file_google_showcase_v1beta1_sequence_proto_goTypes = []interface{}{\n\t(*Sequence)(nil),                          // 0: google.showcase.v1beta1.Sequence\n\t(*StreamingSequence)(nil),                 // 1: google.showcase.v1beta1.StreamingSequence\n\t(*StreamingSequenceReport)(nil),           // 2: google.showcase.v1beta1.StreamingSequenceReport\n\t(*SequenceReport)(nil),                    // 3: google.showcase.v1beta1.SequenceReport\n\t(*CreateSequenceRequest)(nil),             // 4: google.showcase.v1beta1.CreateSequenceRequest\n\t(*CreateStreamingSequenceRequest)(nil),    // 5: google.showcase.v1beta1.CreateStreamingSequenceRequest\n\t(*AttemptSequenceRequest)(nil),            // 6: google.showcase.v1beta1.AttemptSequenceRequest\n\t(*AttemptStreamingSequenceRequest)(nil),   // 7: google.showcase.v1beta1.AttemptStreamingSequenceRequest\n\t(*AttemptStreamingSequenceResponse)(nil),  // 8: google.showcase.v1beta1.AttemptStreamingSequenceResponse\n\t(*GetSequenceReportRequest)(nil),          // 9: google.showcase.v1beta1.GetSequenceReportRequest\n\t(*GetStreamingSequenceReportRequest)(nil), // 10: google.showcase.v1beta1.GetStreamingSequenceReportRequest\n\t(*Sequence_Response)(nil),                 // 11: google.showcase.v1beta1.Sequence.Response\n\t(*StreamingSequence_Response)(nil),        // 12: google.showcase.v1beta1.StreamingSequence.Response\n\t(*StreamingSequenceReport_Attempt)(nil),   // 13: google.showcase.v1beta1.StreamingSequenceReport.Attempt\n\t(*SequenceReport_Attempt)(nil),            // 14: google.showcase.v1beta1.SequenceReport.Attempt\n\t(*status.Status)(nil),                     // 15: google.rpc.Status\n\t(*durationpb.Duration)(nil),               // 16: google.protobuf.Duration\n\t(*timestamppb.Timestamp)(nil),             // 17: google.protobuf.Timestamp\n\t(*emptypb.Empty)(nil),                     // 18: google.protobuf.Empty\n}\nvar file_google_showcase_v1beta1_sequence_proto_depIdxs = []int32{\n\t11, // 0: google.showcase.v1beta1.Sequence.responses:type_name -> google.showcase.v1beta1.Sequence.Response\n\t12, // 1: google.showcase.v1beta1.StreamingSequence.responses:type_name -> google.showcase.v1beta1.StreamingSequence.Response\n\t13, // 2: google.showcase.v1beta1.StreamingSequenceReport.attempts:type_name -> google.showcase.v1beta1.StreamingSequenceReport.Attempt\n\t14, // 3: google.showcase.v1beta1.SequenceReport.attempts:type_name -> google.showcase.v1beta1.SequenceReport.Attempt\n\t0,  // 4: google.showcase.v1beta1.CreateSequenceRequest.sequence:type_name -> google.showcase.v1beta1.Sequence\n\t1,  // 5: google.showcase.v1beta1.CreateStreamingSequenceRequest.streaming_sequence:type_name -> google.showcase.v1beta1.StreamingSequence\n\t15, // 6: google.showcase.v1beta1.Sequence.Response.status:type_name -> google.rpc.Status\n\t16, // 7: google.showcase.v1beta1.Sequence.Response.delay:type_name -> google.protobuf.Duration\n\t15, // 8: google.showcase.v1beta1.StreamingSequence.Response.status:type_name -> google.rpc.Status\n\t16, // 9: google.showcase.v1beta1.StreamingSequence.Response.delay:type_name -> google.protobuf.Duration\n\t17, // 10: google.showcase.v1beta1.StreamingSequenceReport.Attempt.attempt_deadline:type_name -> google.protobuf.Timestamp\n\t17, // 11: google.showcase.v1beta1.StreamingSequenceReport.Attempt.response_time:type_name -> google.protobuf.Timestamp\n\t16, // 12: google.showcase.v1beta1.StreamingSequenceReport.Attempt.attempt_delay:type_name -> google.protobuf.Duration\n\t15, // 13: google.showcase.v1beta1.StreamingSequenceReport.Attempt.status:type_name -> google.rpc.Status\n\t17, // 14: google.showcase.v1beta1.SequenceReport.Attempt.attempt_deadline:type_name -> google.protobuf.Timestamp\n\t17, // 15: google.showcase.v1beta1.SequenceReport.Attempt.response_time:type_name -> google.protobuf.Timestamp\n\t16, // 16: google.showcase.v1beta1.SequenceReport.Attempt.attempt_delay:type_name -> google.protobuf.Duration\n\t15, // 17: google.showcase.v1beta1.SequenceReport.Attempt.status:type_name -> google.rpc.Status\n\t4,  // 18: google.showcase.v1beta1.SequenceService.CreateSequence:input_type -> google.showcase.v1beta1.CreateSequenceRequest\n\t5,  // 19: google.showcase.v1beta1.SequenceService.CreateStreamingSequence:input_type -> google.showcase.v1beta1.CreateStreamingSequenceRequest\n\t9,  // 20: google.showcase.v1beta1.SequenceService.GetSequenceReport:input_type -> google.showcase.v1beta1.GetSequenceReportRequest\n\t10, // 21: google.showcase.v1beta1.SequenceService.GetStreamingSequenceReport:input_type -> google.showcase.v1beta1.GetStreamingSequenceReportRequest\n\t6,  // 22: google.showcase.v1beta1.SequenceService.AttemptSequence:input_type -> google.showcase.v1beta1.AttemptSequenceRequest\n\t7,  // 23: google.showcase.v1beta1.SequenceService.AttemptStreamingSequence:input_type -> google.showcase.v1beta1.AttemptStreamingSequenceRequest\n\t0,  // 24: google.showcase.v1beta1.SequenceService.CreateSequence:output_type -> google.showcase.v1beta1.Sequence\n\t1,  // 25: google.showcase.v1beta1.SequenceService.CreateStreamingSequence:output_type -> google.showcase.v1beta1.StreamingSequence\n\t3,  // 26: google.showcase.v1beta1.SequenceService.GetSequenceReport:output_type -> google.showcase.v1beta1.SequenceReport\n\t2,  // 27: google.showcase.v1beta1.SequenceService.GetStreamingSequenceReport:output_type -> google.showcase.v1beta1.StreamingSequenceReport\n\t18, // 28: google.showcase.v1beta1.SequenceService.AttemptSequence:output_type -> google.protobuf.Empty\n\t8,  // 29: google.showcase.v1beta1.SequenceService.AttemptStreamingSequence:output_type -> google.showcase.v1beta1.AttemptStreamingSequenceResponse\n\t24, // [24:30] is the sub-list for method output_type\n\t18, // [18:24] is the sub-list for method input_type\n\t18, // [18:18] is the sub-list for extension type_name\n\t18, // [18:18] is the sub-list for extension extendee\n\t0,  // [0:18] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_sequence_proto_init() }\nfunc file_google_showcase_v1beta1_sequence_proto_init() {\n\tif File_google_showcase_v1beta1_sequence_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Sequence); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamingSequence); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamingSequenceReport); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SequenceReport); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateSequenceRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateStreamingSequenceRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*AttemptSequenceRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*AttemptStreamingSequenceRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*AttemptStreamingSequenceResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetSequenceReportRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetStreamingSequenceReportRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Sequence_Response); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamingSequence_Response); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*StreamingSequenceReport_Attempt); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_sequence_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SequenceReport_Attempt); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_sequence_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   15,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_sequence_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_sequence_proto_depIdxs,\n\t\tMessageInfos:      file_google_showcase_v1beta1_sequence_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_sequence_proto = out.File\n\tfile_google_showcase_v1beta1_sequence_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_sequence_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_sequence_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// SequenceServiceClient is the client API for SequenceService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype SequenceServiceClient interface {\n\t// Create a sequence of responses to be returned as unary calls\n\tCreateSequence(ctx context.Context, in *CreateSequenceRequest, opts ...grpc.CallOption) (*Sequence, error)\n\t// Creates a sequence of responses to be returned in a server streaming call\n\tCreateStreamingSequence(ctx context.Context, in *CreateStreamingSequenceRequest, opts ...grpc.CallOption) (*StreamingSequence, error)\n\t// Retrieves a sequence report which can be used to retrieve information about a\n\t// sequence of unary calls.\n\tGetSequenceReport(ctx context.Context, in *GetSequenceReportRequest, opts ...grpc.CallOption) (*SequenceReport, error)\n\t// Retrieves a sequence report which can be used to retrieve information\n\t// about a sequences of responses in a server streaming call.\n\tGetStreamingSequenceReport(ctx context.Context, in *GetStreamingSequenceReportRequest, opts ...grpc.CallOption) (*StreamingSequenceReport, error)\n\t// Attempts a sequence of unary responses.\n\tAttemptSequence(ctx context.Context, in *AttemptSequenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Attempts a server streaming call with a sequence of responses\n\t// Can be used to test retries and stream resumption logic\n\t// May not function as expected in HTTP mode due to when http statuses are sent\n\t// See https://github.com/googleapis/gapic-showcase/issues/1377 for more details\n\tAttemptStreamingSequence(ctx context.Context, in *AttemptStreamingSequenceRequest, opts ...grpc.CallOption) (SequenceService_AttemptStreamingSequenceClient, error)\n}\n\ntype sequenceServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewSequenceServiceClient(cc grpc.ClientConnInterface) SequenceServiceClient {\n\treturn &sequenceServiceClient{cc}\n}\n\nfunc (c *sequenceServiceClient) CreateSequence(ctx context.Context, in *CreateSequenceRequest, opts ...grpc.CallOption) (*Sequence, error) {\n\tout := new(Sequence)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.SequenceService/CreateSequence\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *sequenceServiceClient) CreateStreamingSequence(ctx context.Context, in *CreateStreamingSequenceRequest, opts ...grpc.CallOption) (*StreamingSequence, error) {\n\tout := new(StreamingSequence)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.SequenceService/CreateStreamingSequence\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *sequenceServiceClient) GetSequenceReport(ctx context.Context, in *GetSequenceReportRequest, opts ...grpc.CallOption) (*SequenceReport, error) {\n\tout := new(SequenceReport)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.SequenceService/GetSequenceReport\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *sequenceServiceClient) GetStreamingSequenceReport(ctx context.Context, in *GetStreamingSequenceReportRequest, opts ...grpc.CallOption) (*StreamingSequenceReport, error) {\n\tout := new(StreamingSequenceReport)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.SequenceService/GetStreamingSequenceReport\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *sequenceServiceClient) AttemptSequence(ctx context.Context, in *AttemptSequenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.SequenceService/AttemptSequence\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *sequenceServiceClient) AttemptStreamingSequence(ctx context.Context, in *AttemptStreamingSequenceRequest, opts ...grpc.CallOption) (SequenceService_AttemptStreamingSequenceClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_SequenceService_serviceDesc.Streams[0], \"/google.showcase.v1beta1.SequenceService/AttemptStreamingSequence\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &sequenceServiceAttemptStreamingSequenceClient{stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype SequenceService_AttemptStreamingSequenceClient interface {\n\tRecv() (*AttemptStreamingSequenceResponse, error)\n\tgrpc.ClientStream\n}\n\ntype sequenceServiceAttemptStreamingSequenceClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *sequenceServiceAttemptStreamingSequenceClient) Recv() (*AttemptStreamingSequenceResponse, error) {\n\tm := new(AttemptStreamingSequenceResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// SequenceServiceServer is the server API for SequenceService service.\ntype SequenceServiceServer interface {\n\t// Create a sequence of responses to be returned as unary calls\n\tCreateSequence(context.Context, *CreateSequenceRequest) (*Sequence, error)\n\t// Creates a sequence of responses to be returned in a server streaming call\n\tCreateStreamingSequence(context.Context, *CreateStreamingSequenceRequest) (*StreamingSequence, error)\n\t// Retrieves a sequence report which can be used to retrieve information about a\n\t// sequence of unary calls.\n\tGetSequenceReport(context.Context, *GetSequenceReportRequest) (*SequenceReport, error)\n\t// Retrieves a sequence report which can be used to retrieve information\n\t// about a sequences of responses in a server streaming call.\n\tGetStreamingSequenceReport(context.Context, *GetStreamingSequenceReportRequest) (*StreamingSequenceReport, error)\n\t// Attempts a sequence of unary responses.\n\tAttemptSequence(context.Context, *AttemptSequenceRequest) (*emptypb.Empty, error)\n\t// Attempts a server streaming call with a sequence of responses\n\t// Can be used to test retries and stream resumption logic\n\t// May not function as expected in HTTP mode due to when http statuses are sent\n\t// See https://github.com/googleapis/gapic-showcase/issues/1377 for more details\n\tAttemptStreamingSequence(*AttemptStreamingSequenceRequest, SequenceService_AttemptStreamingSequenceServer) error\n}\n\n// UnimplementedSequenceServiceServer can be embedded to have forward compatible implementations.\ntype UnimplementedSequenceServiceServer struct {\n}\n\nfunc (*UnimplementedSequenceServiceServer) CreateSequence(context.Context, *CreateSequenceRequest) (*Sequence, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method CreateSequence not implemented\")\n}\nfunc (*UnimplementedSequenceServiceServer) CreateStreamingSequence(context.Context, *CreateStreamingSequenceRequest) (*StreamingSequence, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method CreateStreamingSequence not implemented\")\n}\nfunc (*UnimplementedSequenceServiceServer) GetSequenceReport(context.Context, *GetSequenceReportRequest) (*SequenceReport, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method GetSequenceReport not implemented\")\n}\nfunc (*UnimplementedSequenceServiceServer) GetStreamingSequenceReport(context.Context, *GetStreamingSequenceReportRequest) (*StreamingSequenceReport, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method GetStreamingSequenceReport not implemented\")\n}\nfunc (*UnimplementedSequenceServiceServer) AttemptSequence(context.Context, *AttemptSequenceRequest) (*emptypb.Empty, error) {\n\treturn nil, status1.Errorf(codes.Unimplemented, \"method AttemptSequence not implemented\")\n}\nfunc (*UnimplementedSequenceServiceServer) AttemptStreamingSequence(*AttemptStreamingSequenceRequest, SequenceService_AttemptStreamingSequenceServer) error {\n\treturn status1.Errorf(codes.Unimplemented, \"method AttemptStreamingSequence not implemented\")\n}\n\nfunc RegisterSequenceServiceServer(s *grpc.Server, srv SequenceServiceServer) {\n\ts.RegisterService(&_SequenceService_serviceDesc, srv)\n}\n\nfunc _SequenceService_CreateSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateSequenceRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(SequenceServiceServer).CreateSequence(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.SequenceService/CreateSequence\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(SequenceServiceServer).CreateSequence(ctx, req.(*CreateSequenceRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _SequenceService_CreateStreamingSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateStreamingSequenceRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(SequenceServiceServer).CreateStreamingSequence(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.SequenceService/CreateStreamingSequence\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(SequenceServiceServer).CreateStreamingSequence(ctx, req.(*CreateStreamingSequenceRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _SequenceService_GetSequenceReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetSequenceReportRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(SequenceServiceServer).GetSequenceReport(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.SequenceService/GetSequenceReport\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(SequenceServiceServer).GetSequenceReport(ctx, req.(*GetSequenceReportRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _SequenceService_GetStreamingSequenceReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetStreamingSequenceReportRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(SequenceServiceServer).GetStreamingSequenceReport(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.SequenceService/GetStreamingSequenceReport\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(SequenceServiceServer).GetStreamingSequenceReport(ctx, req.(*GetStreamingSequenceReportRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _SequenceService_AttemptSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(AttemptSequenceRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(SequenceServiceServer).AttemptSequence(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.SequenceService/AttemptSequence\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(SequenceServiceServer).AttemptSequence(ctx, req.(*AttemptSequenceRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _SequenceService_AttemptStreamingSequence_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(AttemptStreamingSequenceRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(SequenceServiceServer).AttemptStreamingSequence(m, &sequenceServiceAttemptStreamingSequenceServer{stream})\n}\n\ntype SequenceService_AttemptStreamingSequenceServer interface {\n\tSend(*AttemptStreamingSequenceResponse) error\n\tgrpc.ServerStream\n}\n\ntype sequenceServiceAttemptStreamingSequenceServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *sequenceServiceAttemptStreamingSequenceServer) Send(m *AttemptStreamingSequenceResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nvar _SequenceService_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.SequenceService\",\n\tHandlerType: (*SequenceServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"CreateSequence\",\n\t\t\tHandler:    _SequenceService_CreateSequence_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"CreateStreamingSequence\",\n\t\t\tHandler:    _SequenceService_CreateStreamingSequence_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetSequenceReport\",\n\t\t\tHandler:    _SequenceService_GetSequenceReport_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetStreamingSequenceReport\",\n\t\t\tHandler:    _SequenceService_GetStreamingSequenceReport_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"AttemptSequence\",\n\t\t\tHandler:    _SequenceService_AttemptSequence_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"AttemptStreamingSequence\",\n\t\t\tHandler:       _SequenceService_AttemptStreamingSequence_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t},\n\tMetadata: \"google/showcase/v1beta1/sequence.proto\",\n}\n"
  },
  {
    "path": "server/genproto/testing.pb.go",
    "content": "// Copyright 2018 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//     https://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\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.33.0\n// \tprotoc        v3.20.3\n// source: google/showcase/v1beta1/testing.proto\n\npackage genproto\n\nimport (\n\tcontext \"context\"\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The specification versions understood by Showcase.\ntype Session_Version int32\n\nconst (\n\t// Unspecified version. If passed on creation, the session will default\n\t// to using the latest stable release.\n\tSession_VERSION_UNSPECIFIED Session_Version = 0\n\t// The latest v1. Currently, this is v1.0.\n\tSession_V1_LATEST Session_Version = 1\n\t// v1.0. (Until the spec is \"GA\", this will be a moving target.)\n\tSession_V1_0 Session_Version = 2\n)\n\n// Enum value maps for Session_Version.\nvar (\n\tSession_Version_name = map[int32]string{\n\t\t0: \"VERSION_UNSPECIFIED\",\n\t\t1: \"V1_LATEST\",\n\t\t2: \"V1_0\",\n\t}\n\tSession_Version_value = map[string]int32{\n\t\t\"VERSION_UNSPECIFIED\": 0,\n\t\t\"V1_LATEST\":           1,\n\t\t\"V1_0\":                2,\n\t}\n)\n\nfunc (x Session_Version) Enum() *Session_Version {\n\tp := new(Session_Version)\n\t*p = x\n\treturn p\n}\n\nfunc (x Session_Version) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Session_Version) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_testing_proto_enumTypes[0].Descriptor()\n}\n\nfunc (Session_Version) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_testing_proto_enumTypes[0]\n}\n\nfunc (x Session_Version) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Session_Version.Descriptor instead.\nfunc (Session_Version) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{0, 0}\n}\n\n// The topline state of the report.\ntype ReportSessionResponse_Result int32\n\nconst (\n\tReportSessionResponse_RESULT_UNSPECIFIED ReportSessionResponse_Result = 0\n\t// The session is complete, and everything passed.\n\tReportSessionResponse_PASSED ReportSessionResponse_Result = 1\n\t// The session had an explicit failure.\n\tReportSessionResponse_FAILED ReportSessionResponse_Result = 2\n\t// The session is incomplete. This is a failure response.\n\tReportSessionResponse_INCOMPLETE ReportSessionResponse_Result = 3\n)\n\n// Enum value maps for ReportSessionResponse_Result.\nvar (\n\tReportSessionResponse_Result_name = map[int32]string{\n\t\t0: \"RESULT_UNSPECIFIED\",\n\t\t1: \"PASSED\",\n\t\t2: \"FAILED\",\n\t\t3: \"INCOMPLETE\",\n\t}\n\tReportSessionResponse_Result_value = map[string]int32{\n\t\t\"RESULT_UNSPECIFIED\": 0,\n\t\t\"PASSED\":             1,\n\t\t\"FAILED\":             2,\n\t\t\"INCOMPLETE\":         3,\n\t}\n)\n\nfunc (x ReportSessionResponse_Result) Enum() *ReportSessionResponse_Result {\n\tp := new(ReportSessionResponse_Result)\n\t*p = x\n\treturn p\n}\n\nfunc (x ReportSessionResponse_Result) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ReportSessionResponse_Result) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_testing_proto_enumTypes[1].Descriptor()\n}\n\nfunc (ReportSessionResponse_Result) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_testing_proto_enumTypes[1]\n}\n\nfunc (x ReportSessionResponse_Result) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ReportSessionResponse_Result.Descriptor instead.\nfunc (ReportSessionResponse_Result) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{7, 0}\n}\n\n// Whether or not a test is required, recommended, or optional.\ntype Test_ExpectationLevel int32\n\nconst (\n\tTest_EXPECTATION_LEVEL_UNSPECIFIED Test_ExpectationLevel = 0\n\t// This test is strictly required.\n\tTest_REQUIRED Test_ExpectationLevel = 1\n\t// This test is recommended.\n\t//\n\t// If a generator explicitly ignores a recommended test (see `DeleteTest`),\n\t// then the report may still pass, but with a warning.\n\t//\n\t// If a generator skips a recommended test and does not explicitly\n\t// express that intention, the report will fail.\n\tTest_RECOMMENDED Test_ExpectationLevel = 2\n\t// This test is optional.\n\t//\n\t// If a generator explicitly ignores an optional test (see `DeleteTest`),\n\t// then the report may still pass, and no warning will be issued.\n\t//\n\t// If a generator skips an optional test and does not explicitly\n\t// express that intention, the report may still pass, but with a\n\t// warning.\n\tTest_OPTIONAL Test_ExpectationLevel = 3\n)\n\n// Enum value maps for Test_ExpectationLevel.\nvar (\n\tTest_ExpectationLevel_name = map[int32]string{\n\t\t0: \"EXPECTATION_LEVEL_UNSPECIFIED\",\n\t\t1: \"REQUIRED\",\n\t\t2: \"RECOMMENDED\",\n\t\t3: \"OPTIONAL\",\n\t}\n\tTest_ExpectationLevel_value = map[string]int32{\n\t\t\"EXPECTATION_LEVEL_UNSPECIFIED\": 0,\n\t\t\"REQUIRED\":                      1,\n\t\t\"RECOMMENDED\":                   2,\n\t\t\"OPTIONAL\":                      3,\n\t}\n)\n\nfunc (x Test_ExpectationLevel) Enum() *Test_ExpectationLevel {\n\tp := new(Test_ExpectationLevel)\n\t*p = x\n\treturn p\n}\n\nfunc (x Test_ExpectationLevel) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Test_ExpectationLevel) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_testing_proto_enumTypes[2].Descriptor()\n}\n\nfunc (Test_ExpectationLevel) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_testing_proto_enumTypes[2]\n}\n\nfunc (x Test_ExpectationLevel) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Test_ExpectationLevel.Descriptor instead.\nfunc (Test_ExpectationLevel) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{8, 0}\n}\n\n// The different potential types of issues.\ntype Issue_Type int32\n\nconst (\n\tIssue_TYPE_UNSPECIFIED Issue_Type = 0\n\t// The test was never instrumented.\n\tIssue_SKIPPED Issue_Type = 1\n\t// The test was started but never confirmed.\n\tIssue_PENDING Issue_Type = 2\n\t// The test was instrumented, but Showcase got an unexpected\n\t// value when the generator tried to confirm success.\n\tIssue_INCORRECT_CONFIRMATION Issue_Type = 3\n)\n\n// Enum value maps for Issue_Type.\nvar (\n\tIssue_Type_name = map[int32]string{\n\t\t0: \"TYPE_UNSPECIFIED\",\n\t\t1: \"SKIPPED\",\n\t\t2: \"PENDING\",\n\t\t3: \"INCORRECT_CONFIRMATION\",\n\t}\n\tIssue_Type_value = map[string]int32{\n\t\t\"TYPE_UNSPECIFIED\":       0,\n\t\t\"SKIPPED\":                1,\n\t\t\"PENDING\":                2,\n\t\t\"INCORRECT_CONFIRMATION\": 3,\n\t}\n)\n\nfunc (x Issue_Type) Enum() *Issue_Type {\n\tp := new(Issue_Type)\n\t*p = x\n\treturn p\n}\n\nfunc (x Issue_Type) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Issue_Type) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_testing_proto_enumTypes[3].Descriptor()\n}\n\nfunc (Issue_Type) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_testing_proto_enumTypes[3]\n}\n\nfunc (x Issue_Type) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Issue_Type.Descriptor instead.\nfunc (Issue_Type) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{9, 0}\n}\n\n// Severity levels.\ntype Issue_Severity int32\n\nconst (\n\tIssue_SEVERITY_UNSPECIFIED Issue_Severity = 0\n\t// Errors.\n\tIssue_ERROR Issue_Severity = 1\n\t// Warnings.\n\tIssue_WARNING Issue_Severity = 2\n)\n\n// Enum value maps for Issue_Severity.\nvar (\n\tIssue_Severity_name = map[int32]string{\n\t\t0: \"SEVERITY_UNSPECIFIED\",\n\t\t1: \"ERROR\",\n\t\t2: \"WARNING\",\n\t}\n\tIssue_Severity_value = map[string]int32{\n\t\t\"SEVERITY_UNSPECIFIED\": 0,\n\t\t\"ERROR\":                1,\n\t\t\"WARNING\":              2,\n\t}\n)\n\nfunc (x Issue_Severity) Enum() *Issue_Severity {\n\tp := new(Issue_Severity)\n\t*p = x\n\treturn p\n}\n\nfunc (x Issue_Severity) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Issue_Severity) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_showcase_v1beta1_testing_proto_enumTypes[4].Descriptor()\n}\n\nfunc (Issue_Severity) Type() protoreflect.EnumType {\n\treturn &file_google_showcase_v1beta1_testing_proto_enumTypes[4]\n}\n\nfunc (x Issue_Severity) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Issue_Severity.Descriptor instead.\nfunc (Issue_Severity) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{9, 1}\n}\n\n// A session is a suite of tests, generally being made in the context\n// of testing code generation.\n//\n// A session defines tests it may expect, based on which version of the\n// code generation spec is in use.\ntype Session struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of the session. The ID must conform to ^[a-z]+$\n\t// If this is not provided, Showcase chooses one at random.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// Required. The version this session is using.\n\tVersion Session_Version `protobuf:\"varint,2,opt,name=version,proto3,enum=google.showcase.v1beta1.Session_Version\" json:\"version,omitempty\"`\n}\n\nfunc (x *Session) Reset() {\n\t*x = Session{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Session) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Session) ProtoMessage() {}\n\nfunc (x *Session) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Session.ProtoReflect.Descriptor instead.\nfunc (*Session) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Session) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Session) GetVersion() Session_Version {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn Session_VERSION_UNSPECIFIED\n}\n\n// The request for the CreateSession method.\ntype CreateSessionRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The session to be created.\n\t// Sessions are immutable once they are created (although they can\n\t// be deleted).\n\tSession *Session `protobuf:\"bytes,1,opt,name=session,proto3\" json:\"session,omitempty\"`\n}\n\nfunc (x *CreateSessionRequest) Reset() {\n\t*x = CreateSessionRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CreateSessionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateSessionRequest) ProtoMessage() {}\n\nfunc (x *CreateSessionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateSessionRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *CreateSessionRequest) GetSession() *Session {\n\tif x != nil {\n\t\treturn x.Session\n\t}\n\treturn nil\n}\n\n// The request for the GetSession method.\ntype GetSessionRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The session to be retrieved.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *GetSessionRequest) Reset() {\n\t*x = GetSessionRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GetSessionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetSessionRequest) ProtoMessage() {}\n\nfunc (x *GetSessionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetSessionRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *GetSessionRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// The request for the ListSessions method.\ntype ListSessionsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The maximum number of sessions to return per page.\n\tPageSize int32 `protobuf:\"varint,1,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The page token, for retrieving subsequent pages.\n\tPageToken string `protobuf:\"bytes,2,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *ListSessionsRequest) Reset() {\n\t*x = ListSessionsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListSessionsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListSessionsRequest) ProtoMessage() {}\n\nfunc (x *ListSessionsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListSessionsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *ListSessionsRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *ListSessionsRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// Response for the ListSessions method.\ntype ListSessionsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The sessions being returned.\n\tSessions []*Session `protobuf:\"bytes,1,rep,name=sessions,proto3\" json:\"sessions,omitempty\"`\n\t// The next page token, if any.\n\t// An empty value here means the last page has been reached.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *ListSessionsResponse) Reset() {\n\t*x = ListSessionsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListSessionsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListSessionsResponse) ProtoMessage() {}\n\nfunc (x *ListSessionsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListSessionsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *ListSessionsResponse) GetSessions() []*Session {\n\tif x != nil {\n\t\treturn x.Sessions\n\t}\n\treturn nil\n}\n\nfunc (x *ListSessionsResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// Request for the DeleteSession method.\ntype DeleteSessionRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The session to be deleted.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *DeleteSessionRequest) Reset() {\n\t*x = DeleteSessionRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DeleteSessionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DeleteSessionRequest) ProtoMessage() {}\n\nfunc (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead.\nfunc (*DeleteSessionRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *DeleteSessionRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// Request message for reporting on a session.\ntype ReportSessionRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The session to be reported on.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *ReportSessionRequest) Reset() {\n\t*x = ReportSessionRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ReportSessionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ReportSessionRequest) ProtoMessage() {}\n\nfunc (x *ReportSessionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ReportSessionRequest.ProtoReflect.Descriptor instead.\nfunc (*ReportSessionRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ReportSessionRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\n// Response message for reporting on a session.\ntype ReportSessionResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The state of the report.\n\tResult ReportSessionResponse_Result `protobuf:\"varint,1,opt,name=result,proto3,enum=google.showcase.v1beta1.ReportSessionResponse_Result\" json:\"result,omitempty\"`\n\t// The test runs of this session.\n\tTestRuns []*TestRun `protobuf:\"bytes,2,rep,name=test_runs,json=testRuns,proto3\" json:\"test_runs,omitempty\"`\n}\n\nfunc (x *ReportSessionResponse) Reset() {\n\t*x = ReportSessionResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ReportSessionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ReportSessionResponse) ProtoMessage() {}\n\nfunc (x *ReportSessionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ReportSessionResponse.ProtoReflect.Descriptor instead.\nfunc (*ReportSessionResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *ReportSessionResponse) GetResult() ReportSessionResponse_Result {\n\tif x != nil {\n\t\treturn x.Result\n\t}\n\treturn ReportSessionResponse_RESULT_UNSPECIFIED\n}\n\nfunc (x *ReportSessionResponse) GetTestRuns() []*TestRun {\n\tif x != nil {\n\t\treturn x.TestRuns\n\t}\n\treturn nil\n}\n\ntype Test struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of the test.\n\t// The tests/* portion of the names are hard-coded, and do not change\n\t// from session to session.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The expectation level for this test.\n\tExpectationLevel Test_ExpectationLevel `protobuf:\"varint,2,opt,name=expectation_level,json=expectationLevel,proto3,enum=google.showcase.v1beta1.Test_ExpectationLevel\" json:\"expectation_level,omitempty\"`\n\t// A description of the test.\n\tDescription string `protobuf:\"bytes,3,opt,name=description,proto3\" json:\"description,omitempty\"`\n\t// The blueprints that will satisfy this test. There may be multiple blueprints\n\t// that can signal to the server that this test case is being exercised. Although\n\t// multiple blueprints are specified, only a single blueprint needs to be run to\n\t// signal that the test case was exercised.\n\tBlueprints []*Test_Blueprint `protobuf:\"bytes,4,rep,name=blueprints,proto3\" json:\"blueprints,omitempty\"`\n}\n\nfunc (x *Test) Reset() {\n\t*x = Test{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Test) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Test) ProtoMessage() {}\n\nfunc (x *Test) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Test.ProtoReflect.Descriptor instead.\nfunc (*Test) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *Test) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Test) GetExpectationLevel() Test_ExpectationLevel {\n\tif x != nil {\n\t\treturn x.ExpectationLevel\n\t}\n\treturn Test_EXPECTATION_LEVEL_UNSPECIFIED\n}\n\nfunc (x *Test) GetDescription() string {\n\tif x != nil {\n\t\treturn x.Description\n\t}\n\treturn \"\"\n}\n\nfunc (x *Test) GetBlueprints() []*Test_Blueprint {\n\tif x != nil {\n\t\treturn x.Blueprints\n\t}\n\treturn nil\n}\n\n// An issue found in the test.\ntype Issue struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The type of the issue.\n\tType Issue_Type `protobuf:\"varint,1,opt,name=type,proto3,enum=google.showcase.v1beta1.Issue_Type\" json:\"type,omitempty\"`\n\t// The severity of the issue.\n\tSeverity Issue_Severity `protobuf:\"varint,2,opt,name=severity,proto3,enum=google.showcase.v1beta1.Issue_Severity\" json:\"severity,omitempty\"`\n\t// A description of the issue.\n\tDescription string `protobuf:\"bytes,3,opt,name=description,proto3\" json:\"description,omitempty\"`\n}\n\nfunc (x *Issue) Reset() {\n\t*x = Issue{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Issue) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Issue) ProtoMessage() {}\n\nfunc (x *Issue) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Issue.ProtoReflect.Descriptor instead.\nfunc (*Issue) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *Issue) GetType() Issue_Type {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn Issue_TYPE_UNSPECIFIED\n}\n\nfunc (x *Issue) GetSeverity() Issue_Severity {\n\tif x != nil {\n\t\treturn x.Severity\n\t}\n\treturn Issue_SEVERITY_UNSPECIFIED\n}\n\nfunc (x *Issue) GetDescription() string {\n\tif x != nil {\n\t\treturn x.Description\n\t}\n\treturn \"\"\n}\n\n// The request for the ListTests method.\ntype ListTestsRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The session.\n\tParent string `protobuf:\"bytes,1,opt,name=parent,proto3\" json:\"parent,omitempty\"`\n\t// The maximum number of tests to return per page.\n\tPageSize int32 `protobuf:\"varint,2,opt,name=page_size,json=pageSize,proto3\" json:\"page_size,omitempty\"`\n\t// The page token, for retrieving subsequent pages.\n\tPageToken string `protobuf:\"bytes,3,opt,name=page_token,json=pageToken,proto3\" json:\"page_token,omitempty\"`\n}\n\nfunc (x *ListTestsRequest) Reset() {\n\t*x = ListTestsRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListTestsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListTestsRequest) ProtoMessage() {}\n\nfunc (x *ListTestsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListTestsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListTestsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *ListTestsRequest) GetParent() string {\n\tif x != nil {\n\t\treturn x.Parent\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListTestsRequest) GetPageSize() int32 {\n\tif x != nil {\n\t\treturn x.PageSize\n\t}\n\treturn 0\n}\n\nfunc (x *ListTestsRequest) GetPageToken() string {\n\tif x != nil {\n\t\treturn x.PageToken\n\t}\n\treturn \"\"\n}\n\n// The response for the ListTests method.\ntype ListTestsResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The tests being returned.\n\tTests []*Test `protobuf:\"bytes,1,rep,name=tests,proto3\" json:\"tests,omitempty\"`\n\t// The next page token, if any.\n\t// An empty value here means the last page has been reached.\n\tNextPageToken string `protobuf:\"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3\" json:\"next_page_token,omitempty\"`\n}\n\nfunc (x *ListTestsResponse) Reset() {\n\t*x = ListTestsResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ListTestsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListTestsResponse) ProtoMessage() {}\n\nfunc (x *ListTestsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListTestsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListTestsResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *ListTestsResponse) GetTests() []*Test {\n\tif x != nil {\n\t\treturn x.Tests\n\t}\n\treturn nil\n}\n\nfunc (x *ListTestsResponse) GetNextPageToken() string {\n\tif x != nil {\n\t\treturn x.NextPageToken\n\t}\n\treturn \"\"\n}\n\n// A TestRun is the result of running a Test.\ntype TestRun struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of the test.\n\t// The tests/* portion of the names are hard-coded, and do not change\n\t// from session to session.\n\tTest string `protobuf:\"bytes,1,opt,name=test,proto3\" json:\"test,omitempty\"`\n\t// An issue found with the test run. If empty, this test run was successful.\n\tIssue *Issue `protobuf:\"bytes,2,opt,name=issue,proto3\" json:\"issue,omitempty\"`\n}\n\nfunc (x *TestRun) Reset() {\n\t*x = TestRun{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *TestRun) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*TestRun) ProtoMessage() {}\n\nfunc (x *TestRun) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use TestRun.ProtoReflect.Descriptor instead.\nfunc (*TestRun) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *TestRun) GetTest() string {\n\tif x != nil {\n\t\treturn x.Test\n\t}\n\treturn \"\"\n}\n\nfunc (x *TestRun) GetIssue() *Issue {\n\tif x != nil {\n\t\treturn x.Issue\n\t}\n\treturn nil\n}\n\n// Request message for deleting a test.\ntype DeleteTestRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The test to be deleted.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n}\n\nfunc (x *DeleteTestRequest) Reset() {\n\t*x = DeleteTestRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[13]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DeleteTestRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DeleteTestRequest) ProtoMessage() {}\n\nfunc (x *DeleteTestRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[13]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DeleteTestRequest.ProtoReflect.Descriptor instead.\nfunc (*DeleteTestRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *DeleteTestRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\ntype VerifyTestRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The test to have an answer registered to it.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// The answer from the test.\n\tAnswer []byte `protobuf:\"bytes,2,opt,name=answer,proto3\" json:\"answer,omitempty\"`\n\t// The answers from the test if multiple are to be checked\n\tAnswers [][]byte `protobuf:\"bytes,3,rep,name=answers,proto3\" json:\"answers,omitempty\"`\n}\n\nfunc (x *VerifyTestRequest) Reset() {\n\t*x = VerifyTestRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[14]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *VerifyTestRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*VerifyTestRequest) ProtoMessage() {}\n\nfunc (x *VerifyTestRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[14]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use VerifyTestRequest.ProtoReflect.Descriptor instead.\nfunc (*VerifyTestRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *VerifyTestRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *VerifyTestRequest) GetAnswer() []byte {\n\tif x != nil {\n\t\treturn x.Answer\n\t}\n\treturn nil\n}\n\nfunc (x *VerifyTestRequest) GetAnswers() [][]byte {\n\tif x != nil {\n\t\treturn x.Answers\n\t}\n\treturn nil\n}\n\ntype VerifyTestResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// An issue if check answer was unsuccessful. This will be empty if the check answer succeeded.\n\tIssue *Issue `protobuf:\"bytes,1,opt,name=issue,proto3\" json:\"issue,omitempty\"`\n}\n\nfunc (x *VerifyTestResponse) Reset() {\n\t*x = VerifyTestResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[15]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *VerifyTestResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*VerifyTestResponse) ProtoMessage() {}\n\nfunc (x *VerifyTestResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[15]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use VerifyTestResponse.ProtoReflect.Descriptor instead.\nfunc (*VerifyTestResponse) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (x *VerifyTestResponse) GetIssue() *Issue {\n\tif x != nil {\n\t\treturn x.Issue\n\t}\n\treturn nil\n}\n\n// A blueprint is an explicit definition of methods and requests that are needed\n// to be made to test this specific test case. Ideally this would be represented\n// by something more robust like CEL, but as of writing this, I am unsure if CEL\n// is ready.\ntype Test_Blueprint struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of this blueprint.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\t// A description of this blueprint.\n\tDescription string `protobuf:\"bytes,2,opt,name=description,proto3\" json:\"description,omitempty\"`\n\t// The initial request to trigger this test.\n\tRequest *Test_Blueprint_Invocation `protobuf:\"bytes,3,opt,name=request,proto3\" json:\"request,omitempty\"`\n\t// An ordered list of method calls that can be called to trigger this test.\n\tAdditionalRequests []*Test_Blueprint_Invocation `protobuf:\"bytes,4,rep,name=additional_requests,json=additionalRequests,proto3\" json:\"additional_requests,omitempty\"`\n}\n\nfunc (x *Test_Blueprint) Reset() {\n\t*x = Test_Blueprint{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[16]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Test_Blueprint) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Test_Blueprint) ProtoMessage() {}\n\nfunc (x *Test_Blueprint) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[16]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Test_Blueprint.ProtoReflect.Descriptor instead.\nfunc (*Test_Blueprint) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{8, 0}\n}\n\nfunc (x *Test_Blueprint) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Test_Blueprint) GetDescription() string {\n\tif x != nil {\n\t\treturn x.Description\n\t}\n\treturn \"\"\n}\n\nfunc (x *Test_Blueprint) GetRequest() *Test_Blueprint_Invocation {\n\tif x != nil {\n\t\treturn x.Request\n\t}\n\treturn nil\n}\n\nfunc (x *Test_Blueprint) GetAdditionalRequests() []*Test_Blueprint_Invocation {\n\tif x != nil {\n\t\treturn x.AdditionalRequests\n\t}\n\treturn nil\n}\n\n// A message representing a method invocation.\ntype Test_Blueprint_Invocation struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The fully qualified name of the showcase method to be invoked.\n\tMethod string `protobuf:\"bytes,1,opt,name=method,proto3\" json:\"method,omitempty\"`\n\t// The request to be made if a specific request is necessary.\n\tSerializedRequest []byte `protobuf:\"bytes,2,opt,name=serialized_request,json=serializedRequest,proto3\" json:\"serialized_request,omitempty\"`\n}\n\nfunc (x *Test_Blueprint_Invocation) Reset() {\n\t*x = Test_Blueprint_Invocation{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[17]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Test_Blueprint_Invocation) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Test_Blueprint_Invocation) ProtoMessage() {}\n\nfunc (x *Test_Blueprint_Invocation) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_showcase_v1beta1_testing_proto_msgTypes[17]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Test_Blueprint_Invocation.ProtoReflect.Descriptor instead.\nfunc (*Test_Blueprint_Invocation) Descriptor() ([]byte, []int) {\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescGZIP(), []int{8, 0, 0}\n}\n\nfunc (x *Test_Blueprint_Invocation) GetMethod() string {\n\tif x != nil {\n\t\treturn x.Method\n\t}\n\treturn \"\"\n}\n\nfunc (x *Test_Blueprint_Invocation) GetSerializedRequest() []byte {\n\tif x != nil {\n\t\treturn x.SerializedRequest\n\t}\n\treturn nil\n}\n\nvar File_google_showcase_v1beta1_testing_proto protoreflect.FileDescriptor\n\nvar file_google_showcase_v1beta1_testing_proto_rawDesc = []byte{\n\t0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73,\n\t0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e,\n\t0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,\n\t0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e,\n\t0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,\n\t0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,\n\t0xd8, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e,\n\t0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,\n\t0x42, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,\n\t0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69,\n\t0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17,\n\t0x0a, 0x13, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,\n\t0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x31, 0x5f, 0x4c, 0x41,\n\t0x54, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x56, 0x31, 0x5f, 0x30, 0x10, 0x02,\n\t0x3a, 0x38, 0xea, 0x41, 0x35, 0x0a, 0x1f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53,\n\t0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,\n\t0x2f, 0x7b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0x52, 0x0a, 0x14, 0x43, 0x72,\n\t0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65,\n\t0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4d,\n\t0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x42, 0x24, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,\n\t0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a,\n\t0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,\n\t0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,\n\t0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,\n\t0x22, 0x7c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x73, 0x65, 0x73, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65,\n\t0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70,\n\t0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x50,\n\t0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,\n\t0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x22, 0x50, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,\n\t0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x73, 0x68, 0x6f,\n\t0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,\n\t0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61,\n\t0x6d, 0x65, 0x22, 0xef, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73,\n\t0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06,\n\t0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73,\n\t0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73,\n\t0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x74,\n\t0x65, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x75, 0x6e,\n\t0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x22, 0x48, 0x0a, 0x06, 0x52, 0x65,\n\t0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55,\n\t0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,\n\t0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c,\n\t0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45,\n\t0x54, 0x45, 0x10, 0x03, 0x22, 0xb6, 0x06, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,\n\t0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,\n\t0x65, 0x12, 0x5b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x65,\n\t0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x10, 0x65, 0x78,\n\t0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20,\n\t0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,\n\t0x12, 0x47, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04,\n\t0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68,\n\t0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54,\n\t0x65, 0x73, 0x74, 0x2e, 0x42, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x62,\n\t0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0xa9, 0x03, 0x0a, 0x09, 0x42, 0x6c,\n\t0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,\n\t0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a,\n\t0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6c,\n\t0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x13, 0x61,\n\t0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e,\n\t0x74, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x61, 0x64,\n\t0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,\n\t0x1a, 0x53, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,\n\t0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,\n\t0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c,\n\t0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x0c, 0x52, 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x5e, 0xea, 0x41, 0x5b, 0x0a, 0x21, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,\n\t0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x73,\n\t0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,\n\t0x7d, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x73, 0x74, 0x7d, 0x2f, 0x62,\n\t0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x75, 0x65, 0x70,\n\t0x72, 0x69, 0x6e, 0x74, 0x7d, 0x22, 0x62, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x58, 0x50,\n\t0x45, 0x43, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55,\n\t0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,\n\t0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45,\n\t0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4f,\n\t0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x3a, 0x42, 0xea, 0x41, 0x3f, 0x0a, 0x1c,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,\n\t0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x73, 0x65,\n\t0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x7d,\n\t0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x73, 0x74, 0x7d, 0x22, 0xb9, 0x02,\n\t0x0a, 0x05, 0x49, 0x73, 0x73, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x49, 0x73, 0x73, 0x75, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,\n\t0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x0e, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x73,\n\t0x75, 0x65, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76,\n\t0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,\n\t0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,\n\t0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x52, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12,\n\t0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,\n\t0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44,\n\t0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12,\n\t0x1a, 0x0a, 0x16, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x43, 0x4f, 0x4e,\n\t0x46, 0x49, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x3c, 0x0a, 0x08, 0x53,\n\t0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x56, 0x45, 0x52,\n\t0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,\n\t0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,\n\t0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4c, 0x69,\n\t0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c,\n\t0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24,\n\t0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x73,\n\t0x73, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09,\n\t0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,\n\t0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67,\n\t0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,\n\t0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x70, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74,\n\t0x54, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a,\n\t0x05, 0x74, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x05, 0x74, 0x65, 0x73,\n\t0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f,\n\t0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78,\n\t0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x76, 0x0a, 0x07, 0x54, 0x65,\n\t0x73, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,\n\t0x6d, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x52, 0x04, 0x74, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x05,\n\t0x69, 0x73, 0x73, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x05, 0x69, 0x73, 0x73,\n\t0x75, 0x65, 0x22, 0x4a, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x73, 0x74,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,\n\t0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7c,\n\t0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x42, 0x21, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,\n\t0x54, 0x65, 0x73, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e,\n\t0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77,\n\t0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20,\n\t0x03, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x22, 0x4a, 0x0a, 0x12,\n\t0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x69, 0x73, 0x73, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75,\n\t0x65, 0x52, 0x05, 0x69, 0x73, 0x73, 0x75, 0x65, 0x32, 0xed, 0x08, 0x0a, 0x07, 0x54, 0x65, 0x73,\n\t0x74, 0x69, 0x6e, 0x67, 0x12, 0x84, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,\n\t0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a,\n\t0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,\n\t0x61, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7e, 0x0a, 0x0a, 0x47,\n\t0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12,\n\t0x1a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,\n\t0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x0c,\n\t0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76,\n\t0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,\n\t0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,\n\t0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02,\n\t0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65,\n\t0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3,\n\t0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,\n\t0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d,\n\t0x12, 0x99, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,\n\t0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77,\n\t0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,\n\t0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63,\n\t0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f,\n\t0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,\n\t0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x8e, 0x01, 0x0a,\n\t0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,\n\t0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,\n\t0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x62, 0x65,\n\t0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x73, 0x65, 0x73, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x12, 0x7c, 0x0a,\n\t0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x73, 0x74,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,\n\t0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,\n\t0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,\n\t0x2f, 0x2a, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0a,\n\t0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,\n\t0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,\n\t0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31,\n\t0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x73, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,\n\t0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68,\n\t0x6f, 0x73, 0x74, 0x3a, 0x37, 0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e,\n\t0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75,\n\t0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,\n\t0x2f, 0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f,\n\t0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea,\n\t0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61,\n\t0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_showcase_v1beta1_testing_proto_rawDescOnce sync.Once\n\tfile_google_showcase_v1beta1_testing_proto_rawDescData = file_google_showcase_v1beta1_testing_proto_rawDesc\n)\n\nfunc file_google_showcase_v1beta1_testing_proto_rawDescGZIP() []byte {\n\tfile_google_showcase_v1beta1_testing_proto_rawDescOnce.Do(func() {\n\t\tfile_google_showcase_v1beta1_testing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_showcase_v1beta1_testing_proto_rawDescData)\n\t})\n\treturn file_google_showcase_v1beta1_testing_proto_rawDescData\n}\n\nvar file_google_showcase_v1beta1_testing_proto_enumTypes = make([]protoimpl.EnumInfo, 5)\nvar file_google_showcase_v1beta1_testing_proto_msgTypes = make([]protoimpl.MessageInfo, 18)\nvar file_google_showcase_v1beta1_testing_proto_goTypes = []interface{}{\n\t(Session_Version)(0),              // 0: google.showcase.v1beta1.Session.Version\n\t(ReportSessionResponse_Result)(0), // 1: google.showcase.v1beta1.ReportSessionResponse.Result\n\t(Test_ExpectationLevel)(0),        // 2: google.showcase.v1beta1.Test.ExpectationLevel\n\t(Issue_Type)(0),                   // 3: google.showcase.v1beta1.Issue.Type\n\t(Issue_Severity)(0),               // 4: google.showcase.v1beta1.Issue.Severity\n\t(*Session)(nil),                   // 5: google.showcase.v1beta1.Session\n\t(*CreateSessionRequest)(nil),      // 6: google.showcase.v1beta1.CreateSessionRequest\n\t(*GetSessionRequest)(nil),         // 7: google.showcase.v1beta1.GetSessionRequest\n\t(*ListSessionsRequest)(nil),       // 8: google.showcase.v1beta1.ListSessionsRequest\n\t(*ListSessionsResponse)(nil),      // 9: google.showcase.v1beta1.ListSessionsResponse\n\t(*DeleteSessionRequest)(nil),      // 10: google.showcase.v1beta1.DeleteSessionRequest\n\t(*ReportSessionRequest)(nil),      // 11: google.showcase.v1beta1.ReportSessionRequest\n\t(*ReportSessionResponse)(nil),     // 12: google.showcase.v1beta1.ReportSessionResponse\n\t(*Test)(nil),                      // 13: google.showcase.v1beta1.Test\n\t(*Issue)(nil),                     // 14: google.showcase.v1beta1.Issue\n\t(*ListTestsRequest)(nil),          // 15: google.showcase.v1beta1.ListTestsRequest\n\t(*ListTestsResponse)(nil),         // 16: google.showcase.v1beta1.ListTestsResponse\n\t(*TestRun)(nil),                   // 17: google.showcase.v1beta1.TestRun\n\t(*DeleteTestRequest)(nil),         // 18: google.showcase.v1beta1.DeleteTestRequest\n\t(*VerifyTestRequest)(nil),         // 19: google.showcase.v1beta1.VerifyTestRequest\n\t(*VerifyTestResponse)(nil),        // 20: google.showcase.v1beta1.VerifyTestResponse\n\t(*Test_Blueprint)(nil),            // 21: google.showcase.v1beta1.Test.Blueprint\n\t(*Test_Blueprint_Invocation)(nil), // 22: google.showcase.v1beta1.Test.Blueprint.Invocation\n\t(*emptypb.Empty)(nil),             // 23: google.protobuf.Empty\n}\nvar file_google_showcase_v1beta1_testing_proto_depIdxs = []int32{\n\t0,  // 0: google.showcase.v1beta1.Session.version:type_name -> google.showcase.v1beta1.Session.Version\n\t5,  // 1: google.showcase.v1beta1.CreateSessionRequest.session:type_name -> google.showcase.v1beta1.Session\n\t5,  // 2: google.showcase.v1beta1.ListSessionsResponse.sessions:type_name -> google.showcase.v1beta1.Session\n\t1,  // 3: google.showcase.v1beta1.ReportSessionResponse.result:type_name -> google.showcase.v1beta1.ReportSessionResponse.Result\n\t17, // 4: google.showcase.v1beta1.ReportSessionResponse.test_runs:type_name -> google.showcase.v1beta1.TestRun\n\t2,  // 5: google.showcase.v1beta1.Test.expectation_level:type_name -> google.showcase.v1beta1.Test.ExpectationLevel\n\t21, // 6: google.showcase.v1beta1.Test.blueprints:type_name -> google.showcase.v1beta1.Test.Blueprint\n\t3,  // 7: google.showcase.v1beta1.Issue.type:type_name -> google.showcase.v1beta1.Issue.Type\n\t4,  // 8: google.showcase.v1beta1.Issue.severity:type_name -> google.showcase.v1beta1.Issue.Severity\n\t13, // 9: google.showcase.v1beta1.ListTestsResponse.tests:type_name -> google.showcase.v1beta1.Test\n\t14, // 10: google.showcase.v1beta1.TestRun.issue:type_name -> google.showcase.v1beta1.Issue\n\t14, // 11: google.showcase.v1beta1.VerifyTestResponse.issue:type_name -> google.showcase.v1beta1.Issue\n\t22, // 12: google.showcase.v1beta1.Test.Blueprint.request:type_name -> google.showcase.v1beta1.Test.Blueprint.Invocation\n\t22, // 13: google.showcase.v1beta1.Test.Blueprint.additional_requests:type_name -> google.showcase.v1beta1.Test.Blueprint.Invocation\n\t6,  // 14: google.showcase.v1beta1.Testing.CreateSession:input_type -> google.showcase.v1beta1.CreateSessionRequest\n\t7,  // 15: google.showcase.v1beta1.Testing.GetSession:input_type -> google.showcase.v1beta1.GetSessionRequest\n\t8,  // 16: google.showcase.v1beta1.Testing.ListSessions:input_type -> google.showcase.v1beta1.ListSessionsRequest\n\t10, // 17: google.showcase.v1beta1.Testing.DeleteSession:input_type -> google.showcase.v1beta1.DeleteSessionRequest\n\t11, // 18: google.showcase.v1beta1.Testing.ReportSession:input_type -> google.showcase.v1beta1.ReportSessionRequest\n\t15, // 19: google.showcase.v1beta1.Testing.ListTests:input_type -> google.showcase.v1beta1.ListTestsRequest\n\t18, // 20: google.showcase.v1beta1.Testing.DeleteTest:input_type -> google.showcase.v1beta1.DeleteTestRequest\n\t19, // 21: google.showcase.v1beta1.Testing.VerifyTest:input_type -> google.showcase.v1beta1.VerifyTestRequest\n\t5,  // 22: google.showcase.v1beta1.Testing.CreateSession:output_type -> google.showcase.v1beta1.Session\n\t5,  // 23: google.showcase.v1beta1.Testing.GetSession:output_type -> google.showcase.v1beta1.Session\n\t9,  // 24: google.showcase.v1beta1.Testing.ListSessions:output_type -> google.showcase.v1beta1.ListSessionsResponse\n\t23, // 25: google.showcase.v1beta1.Testing.DeleteSession:output_type -> google.protobuf.Empty\n\t12, // 26: google.showcase.v1beta1.Testing.ReportSession:output_type -> google.showcase.v1beta1.ReportSessionResponse\n\t16, // 27: google.showcase.v1beta1.Testing.ListTests:output_type -> google.showcase.v1beta1.ListTestsResponse\n\t23, // 28: google.showcase.v1beta1.Testing.DeleteTest:output_type -> google.protobuf.Empty\n\t20, // 29: google.showcase.v1beta1.Testing.VerifyTest:output_type -> google.showcase.v1beta1.VerifyTestResponse\n\t22, // [22:30] is the sub-list for method output_type\n\t14, // [14:22] is the sub-list for method input_type\n\t14, // [14:14] is the sub-list for extension type_name\n\t14, // [14:14] is the sub-list for extension extendee\n\t0,  // [0:14] is the sub-list for field type_name\n}\n\nfunc init() { file_google_showcase_v1beta1_testing_proto_init() }\nfunc file_google_showcase_v1beta1_testing_proto_init() {\n\tif File_google_showcase_v1beta1_testing_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Session); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CreateSessionRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GetSessionRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListSessionsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListSessionsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DeleteSessionRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ReportSessionRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ReportSessionResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Test); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Issue); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListTestsRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ListTestsResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*TestRun); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DeleteTestRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*VerifyTestRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*VerifyTestResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Test_Blueprint); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_showcase_v1beta1_testing_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Test_Blueprint_Invocation); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_showcase_v1beta1_testing_proto_rawDesc,\n\t\t\tNumEnums:      5,\n\t\t\tNumMessages:   18,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_google_showcase_v1beta1_testing_proto_goTypes,\n\t\tDependencyIndexes: file_google_showcase_v1beta1_testing_proto_depIdxs,\n\t\tEnumInfos:         file_google_showcase_v1beta1_testing_proto_enumTypes,\n\t\tMessageInfos:      file_google_showcase_v1beta1_testing_proto_msgTypes,\n\t}.Build()\n\tFile_google_showcase_v1beta1_testing_proto = out.File\n\tfile_google_showcase_v1beta1_testing_proto_rawDesc = nil\n\tfile_google_showcase_v1beta1_testing_proto_goTypes = nil\n\tfile_google_showcase_v1beta1_testing_proto_depIdxs = nil\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// TestingClient is the client API for Testing service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype TestingClient interface {\n\t// Creates a new testing session.\n\t// Adding this comment with special characters for comment formatting tests:\n\t// 1. (abra->kadabra->alakazam)\n\t// 2) [Nonsense][]: `pokemon/*/psychic/*`\n\tCreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error)\n\t// Gets a testing session.\n\tGetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error)\n\t// Lists the current test sessions.\n\tListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)\n\t// Delete a test session.\n\tDeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Report on the status of a session.\n\t// This generates a report detailing which tests have been completed,\n\t// and an overall rollup.\n\tReportSession(ctx context.Context, in *ReportSessionRequest, opts ...grpc.CallOption) (*ReportSessionResponse, error)\n\t// List the tests of a sessesion.\n\tListTests(ctx context.Context, in *ListTestsRequest, opts ...grpc.CallOption) (*ListTestsResponse, error)\n\t// Explicitly decline to implement a test.\n\t//\n\t// This removes the test from subsequent `ListTests` calls, and\n\t// attempting to do the test will error.\n\t//\n\t// This method will error if attempting to delete a required test.\n\tDeleteTest(ctx context.Context, in *DeleteTestRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)\n\t// Register a response to a test.\n\t//\n\t// In cases where a test involves registering a final answer at the\n\t// end of the test, this method provides the means to do so.\n\tVerifyTest(ctx context.Context, in *VerifyTestRequest, opts ...grpc.CallOption) (*VerifyTestResponse, error)\n}\n\ntype testingClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewTestingClient(cc grpc.ClientConnInterface) TestingClient {\n\treturn &testingClient{cc}\n}\n\nfunc (c *testingClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error) {\n\tout := new(Session)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/CreateSession\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) {\n\tout := new(Session)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/GetSession\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {\n\tout := new(ListSessionsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/ListSessions\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/DeleteSession\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) ReportSession(ctx context.Context, in *ReportSessionRequest, opts ...grpc.CallOption) (*ReportSessionResponse, error) {\n\tout := new(ReportSessionResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/ReportSession\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) ListTests(ctx context.Context, in *ListTestsRequest, opts ...grpc.CallOption) (*ListTestsResponse, error) {\n\tout := new(ListTestsResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/ListTests\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) DeleteTest(ctx context.Context, in *DeleteTestRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {\n\tout := new(emptypb.Empty)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/DeleteTest\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *testingClient) VerifyTest(ctx context.Context, in *VerifyTestRequest, opts ...grpc.CallOption) (*VerifyTestResponse, error) {\n\tout := new(VerifyTestResponse)\n\terr := c.cc.Invoke(ctx, \"/google.showcase.v1beta1.Testing/VerifyTest\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// TestingServer is the server API for Testing service.\ntype TestingServer interface {\n\t// Creates a new testing session.\n\t// Adding this comment with special characters for comment formatting tests:\n\t// 1. (abra->kadabra->alakazam)\n\t// 2) [Nonsense][]: `pokemon/*/psychic/*`\n\tCreateSession(context.Context, *CreateSessionRequest) (*Session, error)\n\t// Gets a testing session.\n\tGetSession(context.Context, *GetSessionRequest) (*Session, error)\n\t// Lists the current test sessions.\n\tListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)\n\t// Delete a test session.\n\tDeleteSession(context.Context, *DeleteSessionRequest) (*emptypb.Empty, error)\n\t// Report on the status of a session.\n\t// This generates a report detailing which tests have been completed,\n\t// and an overall rollup.\n\tReportSession(context.Context, *ReportSessionRequest) (*ReportSessionResponse, error)\n\t// List the tests of a sessesion.\n\tListTests(context.Context, *ListTestsRequest) (*ListTestsResponse, error)\n\t// Explicitly decline to implement a test.\n\t//\n\t// This removes the test from subsequent `ListTests` calls, and\n\t// attempting to do the test will error.\n\t//\n\t// This method will error if attempting to delete a required test.\n\tDeleteTest(context.Context, *DeleteTestRequest) (*emptypb.Empty, error)\n\t// Register a response to a test.\n\t//\n\t// In cases where a test involves registering a final answer at the\n\t// end of the test, this method provides the means to do so.\n\tVerifyTest(context.Context, *VerifyTestRequest) (*VerifyTestResponse, error)\n}\n\n// UnimplementedTestingServer can be embedded to have forward compatible implementations.\ntype UnimplementedTestingServer struct {\n}\n\nfunc (*UnimplementedTestingServer) CreateSession(context.Context, *CreateSessionRequest) (*Session, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method CreateSession not implemented\")\n}\nfunc (*UnimplementedTestingServer) GetSession(context.Context, *GetSessionRequest) (*Session, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetSession not implemented\")\n}\nfunc (*UnimplementedTestingServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ListSessions not implemented\")\n}\nfunc (*UnimplementedTestingServer) DeleteSession(context.Context, *DeleteSessionRequest) (*emptypb.Empty, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteSession not implemented\")\n}\nfunc (*UnimplementedTestingServer) ReportSession(context.Context, *ReportSessionRequest) (*ReportSessionResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ReportSession not implemented\")\n}\nfunc (*UnimplementedTestingServer) ListTests(context.Context, *ListTestsRequest) (*ListTestsResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ListTests not implemented\")\n}\nfunc (*UnimplementedTestingServer) DeleteTest(context.Context, *DeleteTestRequest) (*emptypb.Empty, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteTest not implemented\")\n}\nfunc (*UnimplementedTestingServer) VerifyTest(context.Context, *VerifyTestRequest) (*VerifyTestResponse, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method VerifyTest not implemented\")\n}\n\nfunc RegisterTestingServer(s *grpc.Server, srv TestingServer) {\n\ts.RegisterService(&_Testing_serviceDesc, srv)\n}\n\nfunc _Testing_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateSessionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).CreateSession(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/CreateSession\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).CreateSession(ctx, req.(*CreateSessionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetSessionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).GetSession(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/GetSession\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).GetSession(ctx, req.(*GetSessionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListSessionsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).ListSessions(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/ListSessions\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).ListSessions(ctx, req.(*ListSessionsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DeleteSessionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).DeleteSession(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/DeleteSession\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).DeleteSession(ctx, req.(*DeleteSessionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_ReportSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ReportSessionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).ReportSession(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/ReportSession\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).ReportSession(ctx, req.(*ReportSessionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_ListTests_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListTestsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).ListTests(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/ListTests\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).ListTests(ctx, req.(*ListTestsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_DeleteTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DeleteTestRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).DeleteTest(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/DeleteTest\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).DeleteTest(ctx, req.(*DeleteTestRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Testing_VerifyTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(VerifyTestRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TestingServer).VerifyTest(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/google.showcase.v1beta1.Testing/VerifyTest\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TestingServer).VerifyTest(ctx, req.(*VerifyTestRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nvar _Testing_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"google.showcase.v1beta1.Testing\",\n\tHandlerType: (*TestingServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"CreateSession\",\n\t\t\tHandler:    _Testing_CreateSession_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetSession\",\n\t\t\tHandler:    _Testing_GetSession_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListSessions\",\n\t\t\tHandler:    _Testing_ListSessions_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteSession\",\n\t\t\tHandler:    _Testing_DeleteSession_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ReportSession\",\n\t\t\tHandler:    _Testing_ReportSession_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListTests\",\n\t\t\tHandler:    _Testing_ListTests_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteTest\",\n\t\t\tHandler:    _Testing_DeleteTest_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"VerifyTest\",\n\t\t\tHandler:    _Testing_VerifyTest_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"google/showcase/v1beta1/testing.proto\",\n}\n"
  },
  {
    "path": "server/genrest/README.md",
    "content": "# server/genrest\n\nThis directory contains auto-generated files used to implement a REST endpoint\nfor Showcase services.\n"
  },
  {
    "path": "server/genrest/compliance.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #0: \"Compliance\" (.google.showcase.v1beta1.Compliance).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleRepeatDataBody translates REST requests/responses on the wire to internal proto messages for RepeatDataBody\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/repeat:body\"\nfunc (backend *RESTBackend) HandleRepeatDataBody(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat:body': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat:body\")\n\tresponse, err := backend.ComplianceServer.RepeatDataBody(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataBodyInfo translates REST requests/responses on the wire to internal proto messages for RepeatDataBodyInfo\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/repeat:bodyinfo\"\nfunc (backend *RESTBackend) HandleRepeatDataBodyInfo(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat:bodyinfo': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.ComplianceData\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'info': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Info = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"info\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat:bodyinfo\")\n\tresponse, err := backend.ComplianceServer.RepeatDataBodyInfo(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataQuery translates REST requests/responses on the wire to internal proto messages for RepeatDataQuery\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/repeat:query\"\nfunc (backend *RESTBackend) HandleRepeatDataQuery(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat:query': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat:query\")\n\tresponse, err := backend.ComplianceServer.RepeatDataQuery(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataSimplePath translates REST requests/responses on the wire to internal proto messages for RepeatDataSimplePath\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath\"\nfunc (backend *RESTBackend) HandleRepeatDataSimplePath(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 5, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 5 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 5, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"info.f_string\", \"info.f_int32\", \"info.f_double\", \"info.f_bool\", \"info.f_kingdom\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath\")\n\tresponse, err := backend.ComplianceServer.RepeatDataSimplePath(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataPathResource translates REST requests/responses on the wire to internal proto messages for RepeatDataPathResource\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\"\nfunc (backend *RESTBackend) HandleRepeatDataPathResource(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 3, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 3 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 3, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"info.f_string\", \"info.f_child.f_string\", \"info.f_bool\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\")\n\tresponse, err := backend.ComplianceServer.RepeatDataPathResource(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataPathResource_1 translates REST requests/responses on the wire to internal proto messages for RepeatDataPathResource\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource\"\nfunc (backend *RESTBackend) HandleRepeatDataPathResource_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 3, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 3 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 3, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"info.f_child.f_string\", \"info.f_string\", \"info.f_bool\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource\")\n\tresponse, err := backend.ComplianceServer.RepeatDataPathResource(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataPathTrailingResource translates REST requests/responses on the wire to internal proto messages for RepeatDataPathTrailingResource\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource\"\nfunc (backend *RESTBackend) HandleRepeatDataPathTrailingResource(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 2, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 2 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 2, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"info.f_string\", \"info.f_child.f_string\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource\")\n\tresponse, err := backend.ComplianceServer.RepeatDataPathTrailingResource(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataBodyPut translates REST requests/responses on the wire to internal proto messages for RepeatDataBodyPut\n//\n//\tGenerated for HTTP binding pattern: PUT \"/v1beta1/repeat:bodyput\"\nfunc (backend *RESTBackend) HandleRepeatDataBodyPut(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat:bodyput': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat:bodyput\")\n\tresponse, err := backend.ComplianceServer.RepeatDataBodyPut(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleRepeatDataBodyPatch translates REST requests/responses on the wire to internal proto messages for RepeatDataBodyPatch\n//\n//\tGenerated for HTTP binding pattern: PATCH \"/v1beta1/repeat:bodypatch\"\nfunc (backend *RESTBackend) HandleRepeatDataBodyPatch(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/repeat:bodypatch': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.RepeatRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/repeat:bodypatch\")\n\tresponse, err := backend.ComplianceServer.RepeatDataBodyPatch(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetEnum translates REST requests/responses on the wire to internal proto messages for GetEnum\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/compliance/enum\"\nfunc (backend *RESTBackend) HandleGetEnum(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/compliance/enum': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.EnumRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/compliance/enum\")\n\tresponse, err := backend.ComplianceServer.GetEnum(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleVerifyEnum translates REST requests/responses on the wire to internal proto messages for VerifyEnum\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/compliance/enum\"\nfunc (backend *RESTBackend) HandleVerifyEnum(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/compliance/enum': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.EnumResponse{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/compliance/enum\")\n\tresponse, err := backend.ComplianceServer.VerifyEnum(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/genrest/echo.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #1: \"Echo\" (.google.showcase.v1beta1.Echo).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleEcho translates REST requests/responses on the wire to internal proto messages for Echo\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:echo\"\nfunc (backend *RESTBackend) HandleEcho(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:echo': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.EchoRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:echo\")\n\tresponse, err := backend.EchoServer.Echo(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleEchoErrorDetails translates REST requests/responses on the wire to internal proto messages for EchoErrorDetails\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:error-details\"\nfunc (backend *RESTBackend) HandleEchoErrorDetails(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:error-details': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.EchoErrorDetailsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:error-details\")\n\tresponse, err := backend.EchoServer.EchoErrorDetails(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleFailEchoWithDetails translates REST requests/responses on the wire to internal proto messages for FailEchoWithDetails\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:failWithDetails\"\nfunc (backend *RESTBackend) HandleFailEchoWithDetails(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:failWithDetails': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.FailEchoWithDetailsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:failWithDetails\")\n\tresponse, err := backend.EchoServer.FailEchoWithDetails(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleExpand translates REST requests/responses on the wire to internal proto messages for Expand\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:expand\"\nfunc (backend *RESTBackend) HandleExpand(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:expand': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ExpandRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tserverStreamer, err := resttools.NewServerStreamer(w, resttools.ServerStreamingChunkSize)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"server error: could not construct server streamer: %s\", err.Error())\n\t\treturn\n\t}\n\tdefer serverStreamer.End()\n\tstreamer := &Echo_ExpandServer{serverStreamer}\n\tif err := backend.EchoServer.Expand(request, streamer); err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t}\n}\n\n// HandleCollect translates REST requests/responses on the wire to internal proto messages for Collect\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:collect\"\nfunc (backend *RESTBackend) HandleCollect(w http.ResponseWriter, r *http.Request) {\n\tbackend.Error(w, http.StatusNotImplemented, \"client-streaming methods not implemented yet (request matched '/v1beta1/echo:collect': %q)\", r.URL)\n}\n\n// HandlePagedExpand translates REST requests/responses on the wire to internal proto messages for PagedExpand\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:pagedExpand\"\nfunc (backend *RESTBackend) HandlePagedExpand(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:pagedExpand': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.PagedExpandRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:pagedExpand\")\n\tresponse, err := backend.EchoServer.PagedExpand(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandlePagedExpandLegacy translates REST requests/responses on the wire to internal proto messages for PagedExpandLegacy\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:pagedExpandLegacy\"\nfunc (backend *RESTBackend) HandlePagedExpandLegacy(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:pagedExpandLegacy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.PagedExpandLegacyRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:pagedExpandLegacy\")\n\tresponse, err := backend.EchoServer.PagedExpandLegacy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandlePagedExpandLegacyMapped translates REST requests/responses on the wire to internal proto messages for PagedExpandLegacyMapped\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:pagedExpandLegacyMapped\"\nfunc (backend *RESTBackend) HandlePagedExpandLegacyMapped(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:pagedExpandLegacyMapped': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.PagedExpandRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:pagedExpandLegacyMapped\")\n\tresponse, err := backend.EchoServer.PagedExpandLegacyMapped(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleWait translates REST requests/responses on the wire to internal proto messages for Wait\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:wait\"\nfunc (backend *RESTBackend) HandleWait(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:wait': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.WaitRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:wait\")\n\tresponse, err := backend.EchoServer.Wait(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleBlock translates REST requests/responses on the wire to internal proto messages for Block\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/echo:block\"\nfunc (backend *RESTBackend) HandleBlock(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/echo:block': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.BlockRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/echo:block\")\n\tresponse, err := backend.EchoServer.Block(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// Echo_ExpandServer implements genprotopb.Echo_ExpandServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Echo_ExpandServer struct {\n\t*resttools.ServerStreamer\n}\n\n// Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Echo_ExpandServer) Send(response *genprotopb.EchoResponse) error {\n\treturn streamer.ServerStreamer.Send(response)\n}\n"
  },
  {
    "path": "server/genrest/genrest.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file registering the REST handlers.\n// for the various Showcase services.\n\npackage genrest\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/googleapis/gapic-showcase/server/services\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\n\tgmux \"github.com/gorilla/mux\"\n\t\"google.golang.org/grpc/status\"\n)\n\ntype RESTBackend services.Backend\n\nfunc RegisterHandlers(router *gmux.Router, backend *services.Backend) {\n\trest := (*RESTBackend)(backend)\n\trouter.HandleFunc(\"/v1beta1/repeat:body\", rest.HandleRepeatDataBody).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/repeat:bodyinfo\", rest.HandleRepeatDataBodyInfo).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/repeat:query\", rest.HandleRepeatDataQuery).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/repeat/{info.fString:[^:]+}/{info.fInt32:[^:]+}/{info.fDouble:[^:]+}/{info.fBool:[^:]+}/{info.fKingdom:[^:]+}:simplepath\", rest.HandleRepeatDataSimplePath).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/repeat/{info.fString:first/[^:]+}/{info.fChild.fString:second/[^:]+}/bool/{info.fBool:[^:]+}:pathresource\", rest.HandleRepeatDataPathResource).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/repeat/{info.fChild.fString:first/[^:]+}/{info.fString:second/[^:]+}/bool/{info.fBool:[^:]+}:childfirstpathresource\", rest.HandleRepeatDataPathResource_1).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/repeat/{info.fString:first/[^:]+}/{info.fChild.fString:second/[^:]+}:pathtrailingresource\", rest.HandleRepeatDataPathTrailingResource).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/repeat:bodyput\", rest.HandleRepeatDataBodyPut).Methods(\"PUT\")\n\trouter.HandleFunc(\"/v1beta1/repeat:bodypatch\", rest.HandleRepeatDataBodyPatch).Methods(\"PATCH\")\n\trouter.HandleFunc(\"/v1beta1/repeat:bodypatch\", rest.HandleRepeatDataBodyPatch).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/compliance/enum\", rest.HandleGetEnum).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/compliance/enum\", rest.HandleVerifyEnum).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:echo\", rest.HandleEcho).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:error-details\", rest.HandleEchoErrorDetails).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:failWithDetails\", rest.HandleFailEchoWithDetails).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:expand\", rest.HandleExpand).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:collect\", rest.HandleCollect).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:pagedExpand\", rest.HandlePagedExpand).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:pagedExpandLegacy\", rest.HandlePagedExpandLegacy).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:pagedExpandLegacyMapped\", rest.HandlePagedExpandLegacyMapped).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:wait\", rest.HandleWait).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/echo:block\", rest.HandleBlock).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/users\", rest.HandleCreateUser).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:users/[^:]+}\", rest.HandleGetUser).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{user.name:users/[^:]+}\", rest.HandleUpdateUser).Methods(\"PATCH\")\n\trouter.HandleFunc(\"/v1beta1/{user.name:users/[^:]+}\", rest.HandleUpdateUser).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:users/[^:]+}\", rest.HandleDeleteUser).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/users\", rest.HandleListUsers).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/rooms\", rest.HandleCreateRoom).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:rooms/[^:]+}\", rest.HandleGetRoom).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{room.name:rooms/[^:]+}\", rest.HandleUpdateRoom).Methods(\"PATCH\")\n\trouter.HandleFunc(\"/v1beta1/{room.name:rooms/[^:]+}\", rest.HandleUpdateRoom).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:rooms/[^:]+}\", rest.HandleDeleteRoom).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/rooms\", rest.HandleListRooms).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{parent:rooms/[^:]+}/blurbs\", rest.HandleCreateBlurb).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{parent:users/[^:]+/profile}/blurbs\", rest.HandleCreateBlurb_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:rooms/[^:]+/blurbs/[^:]+}\", rest.HandleGetBlurb).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:users/[^:]+/profile/blurbs/[^:]+}\", rest.HandleGetBlurb_1).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{blurb.name:rooms/[^:]+/blurbs/[^:]+}\", rest.HandleUpdateBlurb).Methods(\"PATCH\")\n\trouter.HandleFunc(\"/v1beta1/{blurb.name:rooms/[^:]+/blurbs/[^:]+}\", rest.HandleUpdateBlurb).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{blurb.name:users/[^:]+/profile/blurbs/[^:]+}\", rest.HandleUpdateBlurb_1).Methods(\"PATCH\")\n\trouter.HandleFunc(\"/v1beta1/{blurb.name:users/[^:]+/profile/blurbs/[^:]+}\", rest.HandleUpdateBlurb_1).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:rooms/[^:]+/blurbs/[^:]+}\", rest.HandleDeleteBlurb).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/{name:users/[^:]+/profile/blurbs/[^:]+}\", rest.HandleDeleteBlurb_1).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/{parent:rooms/[^:]+}/blurbs\", rest.HandleListBlurbs).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{parent:users/[^:]+/profile}/blurbs\", rest.HandleListBlurbs_1).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{parent:rooms/[^:]+}/blurbs:search\", rest.HandleSearchBlurbs).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{parent:users/[^:]+/profile}/blurbs:search\", rest.HandleSearchBlurbs_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:rooms/[^:]+}/blurbs:stream\", rest.HandleStreamBlurbs).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:users/[^:]+/profile}/blurbs:stream\", rest.HandleStreamBlurbs_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{parent:rooms/[^:]+}/blurbs:send\", rest.HandleSendBlurbs).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{parent:users/[^:]+/profile}/blurbs:send\", rest.HandleSendBlurbs_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/sequences\", rest.HandleCreateSequence).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/streamingSequences\", rest.HandleCreateStreamingSequence).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:sequences/[^:]+/sequenceReport}\", rest.HandleGetSequenceReport).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:streamingSequences/[^:]+/streamingSequenceReport}\", rest.HandleGetStreamingSequenceReport).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:sequences/[^:]+}\", rest.HandleAttemptSequence).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:streamingSequences/[^:]+}:stream\", rest.HandleAttemptStreamingSequence).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/sessions\", rest.HandleCreateSession).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:sessions/[^:]+}\", rest.HandleGetSession).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/sessions\", rest.HandleListSessions).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:sessions/[^:]+}\", rest.HandleDeleteSession).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/{name:sessions/[^:]+}:report\", rest.HandleReportSession).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{parent:sessions/[^:]+}/tests\", rest.HandleListTests).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:sessions/[^:]+/tests/[^:]+}\", rest.HandleDeleteTest).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/{name:sessions/[^:]+/tests/[^:]+}:check\", rest.HandleVerifyTest).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{name:projects/[^:]+}/locations\", rest.HandleListLocations).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:projects/[^:]+/locations/[^:]+}\", rest.HandleGetLocation).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{resource:users/[^:]+}:setIamPolicy\", rest.HandleSetIamPolicy).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+}:setIamPolicy\", rest.HandleSetIamPolicy_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+/blurbs/[^:]+}:setIamPolicy\", rest.HandleSetIamPolicy_2).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:sequences/[^:]+}:setIamPolicy\", rest.HandleSetIamPolicy_3).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:users/[^:]+}:getIamPolicy\", rest.HandleGetIamPolicy).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+}:getIamPolicy\", rest.HandleGetIamPolicy_1).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+/blurbs/[^:]+}:getIamPolicy\", rest.HandleGetIamPolicy_2).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{resource:sequences/[^:]+}:getIamPolicy\", rest.HandleGetIamPolicy_3).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{resource:users/[^:]+}:testIamPermissions\", rest.HandleTestIamPermissions).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+}:testIamPermissions\", rest.HandleTestIamPermissions_1).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:rooms/[^:]+/blurbs/[^:]+}:testIamPermissions\", rest.HandleTestIamPermissions_2).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/{resource:sequences/[^:]+}:testIamPermissions\", rest.HandleTestIamPermissions_3).Methods(\"POST\")\n\trouter.HandleFunc(\"/v1beta1/operations\", rest.HandleListOperations).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:operations/[^:]+}\", rest.HandleGetOperation).Methods(\"GET\")\n\trouter.HandleFunc(\"/v1beta1/{name:operations/[^:]+}\", rest.HandleDeleteOperation).Methods(\"DELETE\")\n\trouter.HandleFunc(\"/v1beta1/{name:operations/[^:]+}:cancel\", rest.HandleCancelOperation).Methods(\"POST\")\n\trouter.PathPrefix(\"/\").HandlerFunc(rest.catchAllHandler)\n}\n\nfunc (backend *RESTBackend) catchAllHandler(w http.ResponseWriter, r *http.Request) {\n\tbackend.Error(w, http.StatusBadRequest, \"unrecognized request: %s %q\", r.Method, r.URL)\n}\n\nfunc (backend *RESTBackend) Error(w http.ResponseWriter, httpStatus int, format string, args ...interface{}) {\n\tmessage := fmt.Sprintf(format, args...)\n\tbackend.ErrLog.Print(message)\n\tresttools.ErrorResponse(w, httpStatus, resttools.NoCodeGRPC, message)\n}\nfunc (backend *RESTBackend) ReportGRPCError(w http.ResponseWriter, err error) {\n\tst, ok := status.FromError(err)\n\tif !ok {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"server error: %s\", err.Error())\n\t\treturn\n\t}\n\n\tbackend.ErrLog.Print(st.Message())\n\tresttools.ErrorResponse(w, resttools.NoCodeHTTP, st.Code(), st.Message(), st.Details()...)\n}\n"
  },
  {
    "path": "server/genrest/iampolicy.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #7: \"IAMPolicy\" (.google.iam.v1.IAMPolicy).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\tiampbpb \"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"context\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleSetIamPolicy translates REST requests/responses on the wire to internal proto messages for SetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=users/*}:setIamPolicy\"\nfunc (backend *RESTBackend) HandleSetIamPolicy(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=users/*}:setIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.SetIamPolicyRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=users/*}:setIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.SetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleSetIamPolicy_1 translates REST requests/responses on the wire to internal proto messages for SetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=rooms/*}:setIamPolicy\"\nfunc (backend *RESTBackend) HandleSetIamPolicy_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*}:setIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.SetIamPolicyRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*}:setIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.SetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleSetIamPolicy_2 translates REST requests/responses on the wire to internal proto messages for SetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy\"\nfunc (backend *RESTBackend) HandleSetIamPolicy_2(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.SetIamPolicyRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.SetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleSetIamPolicy_3 translates REST requests/responses on the wire to internal proto messages for SetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=sequences/*}:setIamPolicy\"\nfunc (backend *RESTBackend) HandleSetIamPolicy_3(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=sequences/*}:setIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.SetIamPolicyRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=sequences/*}:setIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.SetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetIamPolicy translates REST requests/responses on the wire to internal proto messages for GetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{resource=users/*}:getIamPolicy\"\nfunc (backend *RESTBackend) HandleGetIamPolicy(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=users/*}:getIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.GetIamPolicyRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"resource\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=users/*}:getIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.GetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetIamPolicy_1 translates REST requests/responses on the wire to internal proto messages for GetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{resource=rooms/*}:getIamPolicy\"\nfunc (backend *RESTBackend) HandleGetIamPolicy_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*}:getIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.GetIamPolicyRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"resource\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*}:getIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.GetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetIamPolicy_2 translates REST requests/responses on the wire to internal proto messages for GetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy\"\nfunc (backend *RESTBackend) HandleGetIamPolicy_2(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.GetIamPolicyRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"resource\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.GetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetIamPolicy_3 translates REST requests/responses on the wire to internal proto messages for GetIamPolicy\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{resource=sequences/*}:getIamPolicy\"\nfunc (backend *RESTBackend) HandleGetIamPolicy_3(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=sequences/*}:getIamPolicy': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.GetIamPolicyRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"resource\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=sequences/*}:getIamPolicy\")\n\tresponse, err := backend.IAMPolicyServer.GetIamPolicy(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleTestIamPermissions translates REST requests/responses on the wire to internal proto messages for TestIamPermissions\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=users/*}:testIamPermissions\"\nfunc (backend *RESTBackend) HandleTestIamPermissions(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=users/*}:testIamPermissions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.TestIamPermissionsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=users/*}:testIamPermissions\")\n\tresponse, err := backend.IAMPolicyServer.TestIamPermissions(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleTestIamPermissions_1 translates REST requests/responses on the wire to internal proto messages for TestIamPermissions\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=rooms/*}:testIamPermissions\"\nfunc (backend *RESTBackend) HandleTestIamPermissions_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*}:testIamPermissions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.TestIamPermissionsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*}:testIamPermissions\")\n\tresponse, err := backend.IAMPolicyServer.TestIamPermissions(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleTestIamPermissions_2 translates REST requests/responses on the wire to internal proto messages for TestIamPermissions\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions\"\nfunc (backend *RESTBackend) HandleTestIamPermissions_2(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.TestIamPermissionsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions\")\n\tresponse, err := backend.IAMPolicyServer.TestIamPermissions(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleTestIamPermissions_3 translates REST requests/responses on the wire to internal proto messages for TestIamPermissions\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{resource=sequences/*}:testIamPermissions\"\nfunc (backend *RESTBackend) HandleTestIamPermissions_3(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{resource=sequences/*}:testIamPermissions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &iampbpb.TestIamPermissionsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{resource=sequences/*}:testIamPermissions\")\n\tresponse, err := backend.IAMPolicyServer.TestIamPermissions(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/genrest/identity.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #2: \"Identity\" (.google.showcase.v1beta1.Identity).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleCreateUser translates REST requests/responses on the wire to internal proto messages for CreateUser\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/users\"\nfunc (backend *RESTBackend) HandleCreateUser(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/users': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateUserRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/users\")\n\tresponse, err := backend.IdentityServer.CreateUser(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetUser translates REST requests/responses on the wire to internal proto messages for GetUser\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=users/*}\"\nfunc (backend *RESTBackend) HandleGetUser(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=users/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetUserRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=users/*}\")\n\tresponse, err := backend.IdentityServer.GetUser(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleUpdateUser translates REST requests/responses on the wire to internal proto messages for UpdateUser\n//\n//\tGenerated for HTTP binding pattern: PATCH \"/v1beta1/{user.name=users/*}\"\nfunc (backend *RESTBackend) HandleUpdateUser(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{user.name=users/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.UpdateUserRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.User\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'user': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.User = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"user\", \"user.name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{user.name=users/*}\")\n\tresponse, err := backend.IdentityServer.UpdateUser(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteUser translates REST requests/responses on the wire to internal proto messages for DeleteUser\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=users/*}\"\nfunc (backend *RESTBackend) HandleDeleteUser(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=users/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteUserRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=users/*}\")\n\tresponse, err := backend.IdentityServer.DeleteUser(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListUsers translates REST requests/responses on the wire to internal proto messages for ListUsers\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/users\"\nfunc (backend *RESTBackend) HandleListUsers(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/users': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListUsersRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/users\")\n\tresponse, err := backend.IdentityServer.ListUsers(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/genrest/locations.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #6: \"Locations\" (.google.cloud.location.Locations).\n\npackage genrest\n\nimport (\n\t\"context\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\tlocationpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"net/http\"\n)\n\n// HandleListLocations translates REST requests/responses on the wire to internal proto messages for ListLocations\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=projects/*}/locations\"\nfunc (backend *RESTBackend) HandleListLocations(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=projects/*}/locations': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &locationpb.ListLocationsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=projects/*}/locations\")\n\tresponse, err := backend.LocationsServer.ListLocations(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetLocation translates REST requests/responses on the wire to internal proto messages for GetLocation\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=projects/*/locations/*}\"\nfunc (backend *RESTBackend) HandleGetLocation(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=projects/*/locations/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &locationpb.GetLocationRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=projects/*/locations/*}\")\n\tresponse, err := backend.LocationsServer.GetLocation(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/genrest/messaging.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #3: \"Messaging\" (.google.showcase.v1beta1.Messaging).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleCreateRoom translates REST requests/responses on the wire to internal proto messages for CreateRoom\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/rooms\"\nfunc (backend *RESTBackend) HandleCreateRoom(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/rooms': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateRoomRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/rooms\")\n\tresponse, err := backend.MessagingServer.CreateRoom(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetRoom translates REST requests/responses on the wire to internal proto messages for GetRoom\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=rooms/*}\"\nfunc (backend *RESTBackend) HandleGetRoom(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=rooms/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetRoomRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=rooms/*}\")\n\tresponse, err := backend.MessagingServer.GetRoom(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleUpdateRoom translates REST requests/responses on the wire to internal proto messages for UpdateRoom\n//\n//\tGenerated for HTTP binding pattern: PATCH \"/v1beta1/{room.name=rooms/*}\"\nfunc (backend *RESTBackend) HandleUpdateRoom(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{room.name=rooms/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.UpdateRoomRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.Room\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'room': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Room = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"room\", \"room.name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{room.name=rooms/*}\")\n\tresponse, err := backend.MessagingServer.UpdateRoom(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteRoom translates REST requests/responses on the wire to internal proto messages for DeleteRoom\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=rooms/*}\"\nfunc (backend *RESTBackend) HandleDeleteRoom(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=rooms/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteRoomRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=rooms/*}\")\n\tresponse, err := backend.MessagingServer.DeleteRoom(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListRooms translates REST requests/responses on the wire to internal proto messages for ListRooms\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/rooms\"\nfunc (backend *RESTBackend) HandleListRooms(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/rooms': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListRoomsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/rooms\")\n\tresponse, err := backend.MessagingServer.ListRooms(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleCreateBlurb translates REST requests/responses on the wire to internal proto messages for CreateBlurb\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=rooms/*}/blurbs\"\nfunc (backend *RESTBackend) HandleCreateBlurb(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=rooms/*}/blurbs': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateBlurbRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=rooms/*}/blurbs\")\n\tresponse, err := backend.MessagingServer.CreateBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleCreateBlurb_1 translates REST requests/responses on the wire to internal proto messages for CreateBlurb\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=users/*/profile}/blurbs\"\nfunc (backend *RESTBackend) HandleCreateBlurb_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=users/*/profile}/blurbs': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateBlurbRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=users/*/profile}/blurbs\")\n\tresponse, err := backend.MessagingServer.CreateBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetBlurb translates REST requests/responses on the wire to internal proto messages for GetBlurb\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=rooms/*/blurbs/*}\"\nfunc (backend *RESTBackend) HandleGetBlurb(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=rooms/*/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetBlurbRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=rooms/*/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.GetBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetBlurb_1 translates REST requests/responses on the wire to internal proto messages for GetBlurb\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=users/*/profile/blurbs/*}\"\nfunc (backend *RESTBackend) HandleGetBlurb_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=users/*/profile/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetBlurbRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=users/*/profile/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.GetBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleUpdateBlurb translates REST requests/responses on the wire to internal proto messages for UpdateBlurb\n//\n//\tGenerated for HTTP binding pattern: PATCH \"/v1beta1/{blurb.name=rooms/*/blurbs/*}\"\nfunc (backend *RESTBackend) HandleUpdateBlurb(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{blurb.name=rooms/*/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.UpdateBlurbRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.Blurb\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'blurb': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Blurb = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"blurb\", \"blurb.name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{blurb.name=rooms/*/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.UpdateBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleUpdateBlurb_1 translates REST requests/responses on the wire to internal proto messages for UpdateBlurb\n//\n//\tGenerated for HTTP binding pattern: PATCH \"/v1beta1/{blurb.name=users/*/profile/blurbs/*}\"\nfunc (backend *RESTBackend) HandleUpdateBlurb_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{blurb.name=users/*/profile/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.UpdateBlurbRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.Blurb\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'blurb': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Blurb = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"blurb\", \"blurb.name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{blurb.name=users/*/profile/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.UpdateBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteBlurb translates REST requests/responses on the wire to internal proto messages for DeleteBlurb\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=rooms/*/blurbs/*}\"\nfunc (backend *RESTBackend) HandleDeleteBlurb(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=rooms/*/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteBlurbRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=rooms/*/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.DeleteBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteBlurb_1 translates REST requests/responses on the wire to internal proto messages for DeleteBlurb\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=users/*/profile/blurbs/*}\"\nfunc (backend *RESTBackend) HandleDeleteBlurb_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=users/*/profile/blurbs/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteBlurbRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=users/*/profile/blurbs/*}\")\n\tresponse, err := backend.MessagingServer.DeleteBlurb(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListBlurbs translates REST requests/responses on the wire to internal proto messages for ListBlurbs\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{parent=rooms/*}/blurbs\"\nfunc (backend *RESTBackend) HandleListBlurbs(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=rooms/*}/blurbs': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListBlurbsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"parent\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=rooms/*}/blurbs\")\n\tresponse, err := backend.MessagingServer.ListBlurbs(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListBlurbs_1 translates REST requests/responses on the wire to internal proto messages for ListBlurbs\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{parent=users/*/profile}/blurbs\"\nfunc (backend *RESTBackend) HandleListBlurbs_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=users/*/profile}/blurbs': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListBlurbsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"parent\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=users/*/profile}/blurbs\")\n\tresponse, err := backend.MessagingServer.ListBlurbs(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleSearchBlurbs translates REST requests/responses on the wire to internal proto messages for SearchBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=rooms/*}/blurbs:search\"\nfunc (backend *RESTBackend) HandleSearchBlurbs(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=rooms/*}/blurbs:search': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.SearchBlurbsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=rooms/*}/blurbs:search\")\n\tresponse, err := backend.MessagingServer.SearchBlurbs(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleSearchBlurbs_1 translates REST requests/responses on the wire to internal proto messages for SearchBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=users/*/profile}/blurbs:search\"\nfunc (backend *RESTBackend) HandleSearchBlurbs_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=users/*/profile}/blurbs:search': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.SearchBlurbsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"parent\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=users/*/profile}/blurbs:search\")\n\tresponse, err := backend.MessagingServer.SearchBlurbs(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleStreamBlurbs translates REST requests/responses on the wire to internal proto messages for StreamBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=rooms/*}/blurbs:stream\"\nfunc (backend *RESTBackend) HandleStreamBlurbs(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=rooms/*}/blurbs:stream': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.StreamBlurbsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tserverStreamer, err := resttools.NewServerStreamer(w, resttools.ServerStreamingChunkSize)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"server error: could not construct server streamer: %s\", err.Error())\n\t\treturn\n\t}\n\tdefer serverStreamer.End()\n\tstreamer := &Messaging_StreamBlurbsServer{serverStreamer}\n\tif err := backend.MessagingServer.StreamBlurbs(request, streamer); err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t}\n}\n\n// HandleStreamBlurbs_1 translates REST requests/responses on the wire to internal proto messages for StreamBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=users/*/profile}/blurbs:stream\"\nfunc (backend *RESTBackend) HandleStreamBlurbs_1(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=users/*/profile}/blurbs:stream': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.StreamBlurbsRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tserverStreamer, err := resttools.NewServerStreamer(w, resttools.ServerStreamingChunkSize)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"server error: could not construct server streamer: %s\", err.Error())\n\t\treturn\n\t}\n\tdefer serverStreamer.End()\n\tstreamer := &Messaging_StreamBlurbsServer{serverStreamer}\n\tif err := backend.MessagingServer.StreamBlurbs(request, streamer); err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t}\n}\n\n// HandleSendBlurbs translates REST requests/responses on the wire to internal proto messages for SendBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=rooms/*}/blurbs:send\"\nfunc (backend *RESTBackend) HandleSendBlurbs(w http.ResponseWriter, r *http.Request) {\n\tbackend.Error(w, http.StatusNotImplemented, \"client-streaming methods not implemented yet (request matched '/v1beta1/{parent=rooms/*}/blurbs:send': %q)\", r.URL)\n}\n\n// HandleSendBlurbs_1 translates REST requests/responses on the wire to internal proto messages for SendBlurbs\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{parent=users/*/profile}/blurbs:send\"\nfunc (backend *RESTBackend) HandleSendBlurbs_1(w http.ResponseWriter, r *http.Request) {\n\tbackend.Error(w, http.StatusNotImplemented, \"client-streaming methods not implemented yet (request matched '/v1beta1/{parent=users/*/profile}/blurbs:send': %q)\", r.URL)\n}\n\n// Messaging_StreamBlurbsServer implements genprotopb.Messaging_StreamBlurbsServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Messaging_StreamBlurbsServer struct {\n\t*resttools.ServerStreamer\n}\n\n// Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Messaging_StreamBlurbsServer) Send(response *genprotopb.StreamBlurbsResponse) error {\n\treturn streamer.ServerStreamer.Send(response)\n}\n"
  },
  {
    "path": "server/genrest/operations.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #8: \"Operations\" (.google.longrunning.Operations).\n\npackage genrest\n\nimport (\n\tlongrunningpbpb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"context\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"net/http\"\n)\n\n// HandleListOperations translates REST requests/responses on the wire to internal proto messages for ListOperations\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/operations\"\nfunc (backend *RESTBackend) HandleListOperations(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/operations': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &longrunningpbpb.ListOperationsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/operations\")\n\tresponse, err := backend.OperationsServer.ListOperations(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetOperation translates REST requests/responses on the wire to internal proto messages for GetOperation\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=operations/**}\"\nfunc (backend *RESTBackend) HandleGetOperation(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=operations/**}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &longrunningpbpb.GetOperationRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=operations/**}\")\n\tresponse, err := backend.OperationsServer.GetOperation(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteOperation translates REST requests/responses on the wire to internal proto messages for DeleteOperation\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=operations/**}\"\nfunc (backend *RESTBackend) HandleDeleteOperation(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=operations/**}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &longrunningpbpb.DeleteOperationRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=operations/**}\")\n\tresponse, err := backend.OperationsServer.DeleteOperation(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleCancelOperation translates REST requests/responses on the wire to internal proto messages for CancelOperation\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=operations/**}:cancel\"\nfunc (backend *RESTBackend) HandleCancelOperation(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=operations/**}:cancel': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &longrunningpbpb.CancelOperationRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=operations/**}:cancel\")\n\tresponse, err := backend.OperationsServer.CancelOperation(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/genrest/sequenceservice.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #4: \"SequenceService\" (.google.showcase.v1beta1.SequenceService).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleCreateSequence translates REST requests/responses on the wire to internal proto messages for CreateSequence\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/sequences\"\nfunc (backend *RESTBackend) HandleCreateSequence(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/sequences': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateSequenceRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.Sequence\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'sequence': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Sequence = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"sequence\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/sequences\")\n\tresponse, err := backend.SequenceServiceServer.CreateSequence(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleCreateStreamingSequence translates REST requests/responses on the wire to internal proto messages for CreateStreamingSequence\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/streamingSequences\"\nfunc (backend *RESTBackend) HandleCreateStreamingSequence(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/streamingSequences': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateStreamingSequenceRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.StreamingSequence\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'streaming_sequence': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.StreamingSequence = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"streaming_sequence\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/streamingSequences\")\n\tresponse, err := backend.SequenceServiceServer.CreateStreamingSequence(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetSequenceReport translates REST requests/responses on the wire to internal proto messages for GetSequenceReport\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=sequences/*/sequenceReport}\"\nfunc (backend *RESTBackend) HandleGetSequenceReport(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sequences/*/sequenceReport}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetSequenceReportRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sequences/*/sequenceReport}\")\n\tresponse, err := backend.SequenceServiceServer.GetSequenceReport(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetStreamingSequenceReport translates REST requests/responses on the wire to internal proto messages for GetStreamingSequenceReport\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=streamingSequences/*/streamingSequenceReport}\"\nfunc (backend *RESTBackend) HandleGetStreamingSequenceReport(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=streamingSequences/*/streamingSequenceReport}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetStreamingSequenceReportRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=streamingSequences/*/streamingSequenceReport}\")\n\tresponse, err := backend.SequenceServiceServer.GetStreamingSequenceReport(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleAttemptSequence translates REST requests/responses on the wire to internal proto messages for AttemptSequence\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=sequences/*}\"\nfunc (backend *RESTBackend) HandleAttemptSequence(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sequences/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.AttemptSequenceRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sequences/*}\")\n\tresponse, err := backend.SequenceServiceServer.AttemptSequence(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleAttemptStreamingSequence translates REST requests/responses on the wire to internal proto messages for AttemptStreamingSequence\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=streamingSequences/*}:stream\"\nfunc (backend *RESTBackend) HandleAttemptStreamingSequence(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=streamingSequences/*}:stream': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.AttemptStreamingSequenceRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body params '*': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\n\tif len(queryParams) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %v\", queryParams)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tserverStreamer, err := resttools.NewServerStreamer(w, resttools.ServerStreamingChunkSize)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"server error: could not construct server streamer: %s\", err.Error())\n\t\treturn\n\t}\n\tdefer serverStreamer.End()\n\tstreamer := &SequenceService_AttemptStreamingSequenceServer{serverStreamer}\n\tif err := backend.SequenceServiceServer.AttemptStreamingSequence(request, streamer); err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t}\n}\n\n// SequenceService_AttemptStreamingSequenceServer implements genprotopb.SequenceService_AttemptStreamingSequenceServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype SequenceService_AttemptStreamingSequenceServer struct {\n\t*resttools.ServerStreamer\n}\n\n// Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *SequenceService_AttemptStreamingSequenceServer) Send(response *genprotopb.AttemptStreamingSequenceResponse) error {\n\treturn streamer.ServerStreamer.Send(response)\n}\n"
  },
  {
    "path": "server/genrest/showcase-rest-sample-response.txt",
    "content": "Generated via \"google.golang.org/protobuf/compiler/protogen\" via ProtoModel!\nFiles:\ngoogle/showcase/v1beta1/compliance.proto\ngoogle/showcase/v1beta1/echo.proto\ngoogle/showcase/v1beta1/identity.proto\ngoogle/showcase/v1beta1/messaging.proto\ngoogle/showcase/v1beta1/rest_error.proto\ngoogle/showcase/v1beta1/sequence.proto\ngoogle/showcase/v1beta1/testing.proto\n\nProto Model:\nCompliance (.google.showcase.v1beta1.Compliance):\n  .google.showcase.v1beta1.Compliance.RepeatDataBody[0] : POST: \"/v1beta1/repeat:body\"\n  .google.showcase.v1beta1.Compliance.RepeatDataBodyInfo[0] : POST: \"/v1beta1/repeat:bodyinfo\"\n  .google.showcase.v1beta1.Compliance.RepeatDataQuery[0] : GET: \"/v1beta1/repeat:query\"\n  .google.showcase.v1beta1.Compliance.RepeatDataSimplePath[0] : GET: \"/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath\"\n  .google.showcase.v1beta1.Compliance.RepeatDataPathResource[0] : GET: \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\"\n  .google.showcase.v1beta1.Compliance.RepeatDataPathResource[1] : GET: \"/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource\"\n  .google.showcase.v1beta1.Compliance.RepeatDataPathTrailingResource[0] : GET: \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource\"\n  .google.showcase.v1beta1.Compliance.RepeatDataBodyPut[0] : PUT: \"/v1beta1/repeat:bodyput\"\n  .google.showcase.v1beta1.Compliance.RepeatDataBodyPatch[0] : PATCH: \"/v1beta1/repeat:bodypatch\"\n  .google.showcase.v1beta1.Compliance.GetEnum[0] : GET: \"/v1beta1/compliance/enum\"\n  .google.showcase.v1beta1.Compliance.VerifyEnum[0] : POST: \"/v1beta1/compliance/enum\"\n\nEcho (.google.showcase.v1beta1.Echo):\n  .google.showcase.v1beta1.Echo.Echo[0] : POST: \"/v1beta1/echo:echo\"\n  .google.showcase.v1beta1.Echo.EchoErrorDetails[0] : POST: \"/v1beta1/echo:error-details\"\n  .google.showcase.v1beta1.Echo.FailEchoWithDetails[0] : POST: \"/v1beta1/echo:failWithDetails\"\n  .google.showcase.v1beta1.Echo.Expand[0] : POST: \"/v1beta1/echo:expand\"\n  .google.showcase.v1beta1.Echo.Collect[0] : POST: \"/v1beta1/echo:collect\"\n  .google.showcase.v1beta1.Echo.PagedExpand[0] : POST: \"/v1beta1/echo:pagedExpand\"\n  .google.showcase.v1beta1.Echo.PagedExpandLegacy[0] : POST: \"/v1beta1/echo:pagedExpandLegacy\"\n  .google.showcase.v1beta1.Echo.PagedExpandLegacyMapped[0] : POST: \"/v1beta1/echo:pagedExpandLegacyMapped\"\n  .google.showcase.v1beta1.Echo.Wait[0] : POST: \"/v1beta1/echo:wait\"\n  .google.showcase.v1beta1.Echo.Block[0] : POST: \"/v1beta1/echo:block\"\n\nIdentity (.google.showcase.v1beta1.Identity):\n  .google.showcase.v1beta1.Identity.CreateUser[0] : POST: \"/v1beta1/users\"\n  .google.showcase.v1beta1.Identity.GetUser[0] : GET: \"/v1beta1/{name=users/*}\"\n  .google.showcase.v1beta1.Identity.UpdateUser[0] : PATCH: \"/v1beta1/{user.name=users/*}\"\n  .google.showcase.v1beta1.Identity.DeleteUser[0] : DELETE: \"/v1beta1/{name=users/*}\"\n  .google.showcase.v1beta1.Identity.ListUsers[0] : GET: \"/v1beta1/users\"\n\nMessaging (.google.showcase.v1beta1.Messaging):\n  .google.showcase.v1beta1.Messaging.CreateRoom[0] : POST: \"/v1beta1/rooms\"\n  .google.showcase.v1beta1.Messaging.GetRoom[0] : GET: \"/v1beta1/{name=rooms/*}\"\n  .google.showcase.v1beta1.Messaging.UpdateRoom[0] : PATCH: \"/v1beta1/{room.name=rooms/*}\"\n  .google.showcase.v1beta1.Messaging.DeleteRoom[0] : DELETE: \"/v1beta1/{name=rooms/*}\"\n  .google.showcase.v1beta1.Messaging.ListRooms[0] : GET: \"/v1beta1/rooms\"\n  .google.showcase.v1beta1.Messaging.CreateBlurb[0] : POST: \"/v1beta1/{parent=rooms/*}/blurbs\"\n  .google.showcase.v1beta1.Messaging.CreateBlurb[1] : POST: \"/v1beta1/{parent=users/*/profile}/blurbs\"\n  .google.showcase.v1beta1.Messaging.GetBlurb[0] : GET: \"/v1beta1/{name=rooms/*/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.GetBlurb[1] : GET: \"/v1beta1/{name=users/*/profile/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.UpdateBlurb[0] : PATCH: \"/v1beta1/{blurb.name=rooms/*/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.UpdateBlurb[1] : PATCH: \"/v1beta1/{blurb.name=users/*/profile/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.DeleteBlurb[0] : DELETE: \"/v1beta1/{name=rooms/*/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.DeleteBlurb[1] : DELETE: \"/v1beta1/{name=users/*/profile/blurbs/*}\"\n  .google.showcase.v1beta1.Messaging.ListBlurbs[0] : GET: \"/v1beta1/{parent=rooms/*}/blurbs\"\n  .google.showcase.v1beta1.Messaging.ListBlurbs[1] : GET: \"/v1beta1/{parent=users/*/profile}/blurbs\"\n  .google.showcase.v1beta1.Messaging.SearchBlurbs[0] : POST: \"/v1beta1/{parent=rooms/*}/blurbs:search\"\n  .google.showcase.v1beta1.Messaging.SearchBlurbs[1] : POST: \"/v1beta1/{parent=users/*/profile}/blurbs:search\"\n  .google.showcase.v1beta1.Messaging.StreamBlurbs[0] : POST: \"/v1beta1/{name=rooms/*}/blurbs:stream\"\n  .google.showcase.v1beta1.Messaging.StreamBlurbs[1] : POST: \"/v1beta1/{name=users/*/profile}/blurbs:stream\"\n  .google.showcase.v1beta1.Messaging.SendBlurbs[0] : POST: \"/v1beta1/{parent=rooms/*}/blurbs:send\"\n  .google.showcase.v1beta1.Messaging.SendBlurbs[1] : POST: \"/v1beta1/{parent=users/*/profile}/blurbs:send\"\n\nSequenceService (.google.showcase.v1beta1.SequenceService):\n  .google.showcase.v1beta1.SequenceService.CreateSequence[0] : POST: \"/v1beta1/sequences\"\n  .google.showcase.v1beta1.SequenceService.CreateStreamingSequence[0] : POST: \"/v1beta1/streamingSequences\"\n  .google.showcase.v1beta1.SequenceService.GetSequenceReport[0] : GET: \"/v1beta1/{name=sequences/*/sequenceReport}\"\n  .google.showcase.v1beta1.SequenceService.GetStreamingSequenceReport[0] : GET: \"/v1beta1/{name=streamingSequences/*/streamingSequenceReport}\"\n  .google.showcase.v1beta1.SequenceService.AttemptSequence[0] : POST: \"/v1beta1/{name=sequences/*}\"\n  .google.showcase.v1beta1.SequenceService.AttemptStreamingSequence[0] : POST: \"/v1beta1/{name=streamingSequences/*}:stream\"\n\nTesting (.google.showcase.v1beta1.Testing):\n  .google.showcase.v1beta1.Testing.CreateSession[0] : POST: \"/v1beta1/sessions\"\n  .google.showcase.v1beta1.Testing.GetSession[0] : GET: \"/v1beta1/{name=sessions/*}\"\n  .google.showcase.v1beta1.Testing.ListSessions[0] : GET: \"/v1beta1/sessions\"\n  .google.showcase.v1beta1.Testing.DeleteSession[0] : DELETE: \"/v1beta1/{name=sessions/*}\"\n  .google.showcase.v1beta1.Testing.ReportSession[0] : POST: \"/v1beta1/{name=sessions/*}:report\"\n  .google.showcase.v1beta1.Testing.ListTests[0] : GET: \"/v1beta1/{parent=sessions/*}/tests\"\n  .google.showcase.v1beta1.Testing.DeleteTest[0] : DELETE: \"/v1beta1/{name=sessions/*/tests/*}\"\n  .google.showcase.v1beta1.Testing.VerifyTest[0] : POST: \"/v1beta1/{name=sessions/*/tests/*}:check\"\n\nLocations (.google.cloud.location.Locations):\n  .google.cloud.location.Locations.ListLocations[0] : GET: \"/v1beta1/{name=projects/*}/locations\"\n  .google.cloud.location.Locations.GetLocation[0] : GET: \"/v1beta1/{name=projects/*/locations/*}\"\n\nIAMPolicy (.google.iam.v1.IAMPolicy):\n  .google.iam.v1.IAMPolicy.SetIamPolicy[0] : POST: \"/v1beta1/{resource=users/*}:setIamPolicy\"\n  .google.iam.v1.IAMPolicy.SetIamPolicy[1] : POST: \"/v1beta1/{resource=rooms/*}:setIamPolicy\"\n  .google.iam.v1.IAMPolicy.SetIamPolicy[2] : POST: \"/v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy\"\n  .google.iam.v1.IAMPolicy.SetIamPolicy[3] : POST: \"/v1beta1/{resource=sequences/*}:setIamPolicy\"\n  .google.iam.v1.IAMPolicy.GetIamPolicy[0] : GET: \"/v1beta1/{resource=users/*}:getIamPolicy\"\n  .google.iam.v1.IAMPolicy.GetIamPolicy[1] : GET: \"/v1beta1/{resource=rooms/*}:getIamPolicy\"\n  .google.iam.v1.IAMPolicy.GetIamPolicy[2] : GET: \"/v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy\"\n  .google.iam.v1.IAMPolicy.GetIamPolicy[3] : GET: \"/v1beta1/{resource=sequences/*}:getIamPolicy\"\n  .google.iam.v1.IAMPolicy.TestIamPermissions[0] : POST: \"/v1beta1/{resource=users/*}:testIamPermissions\"\n  .google.iam.v1.IAMPolicy.TestIamPermissions[1] : POST: \"/v1beta1/{resource=rooms/*}:testIamPermissions\"\n  .google.iam.v1.IAMPolicy.TestIamPermissions[2] : POST: \"/v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions\"\n  .google.iam.v1.IAMPolicy.TestIamPermissions[3] : POST: \"/v1beta1/{resource=sequences/*}:testIamPermissions\"\n\nOperations (.google.longrunning.Operations):\n  .google.longrunning.Operations.ListOperations[0] : GET: \"/v1beta1/operations\"\n  .google.longrunning.Operations.GetOperation[0] : GET: \"/v1beta1/{name=operations/**}\"\n  .google.longrunning.Operations.DeleteOperation[0] : DELETE: \"/v1beta1/{name=operations/**}\"\n  .google.longrunning.Operations.CancelOperation[0] : POST: \"/v1beta1/{name=operations/**}:cancel\"\n\n\n\nGoModel\n----------------------------------------\nShim \"Compliance\" (.google.showcase.v1beta1.Compliance)\n  Imports:\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n  Handlers (11):\n         GET                              /v1beta1/repeat:query func RepeatDataQuery(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \":\" \"query\"]\n\n         GET                           /v1beta1/compliance/enum func GetEnum(request genprotopb.EnumRequest) (response genprotopb.EnumResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"compliance\" \"/\" \"enum\"]\n\n         GET /v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource func RepeatDataPathResource(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \"/\" {info.f_child.f_string = [\"first\" \"/\" *]} \"/\" {info.f_string = [\"second\" \"/\" *]} \"/\" \"bool\" \"/\" {info.f_bool = []} \":\" \"childfirstpathresource\"]\n\n         GET /v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/**}:pathtrailingresource func RepeatDataPathTrailingResource(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \"/\" {info.f_string = [\"first\" \"/\" *]} \"/\" {info.f_child.f_string = [\"second\" \"/\" **]} \":\" \"pathtrailingresource\"]\n\n         GET /v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource func RepeatDataPathResource(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \"/\" {info.f_string = [\"first\" \"/\" *]} \"/\" {info.f_child.f_string = [\"second\" \"/\" *]} \"/\" \"bool\" \"/\" {info.f_bool = []} \":\" \"pathresource\"]\n\n         GET /v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath func RepeatDataSimplePath(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \"/\" {info.f_string = []} \"/\" {info.f_int32 = []} \"/\" {info.f_double = []} \"/\" {info.f_bool = []} \"/\" {info.f_kingdom = []} \":\" \"simplepath\"]\n\n         PUT                            /v1beta1/repeat:bodyput func RepeatDataBodyPut(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \":\" \"bodyput\"]\n\n        POST                               /v1beta1/repeat:body func RepeatDataBody(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \":\" \"body\"]\n\n        POST                           /v1beta1/compliance/enum func VerifyEnum(request genprotopb.EnumResponse) (response genprotopb.EnumResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"compliance\" \"/\" \"enum\"]\n\n        POST                           /v1beta1/repeat:bodyinfo func RepeatDataBodyInfo(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \":\" \"bodyinfo\"]\n\n       PATCH                          /v1beta1/repeat:bodypatch func RepeatDataBodyPatch(request genprotopb.RepeatRequest) (response genprotopb.RepeatResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"repeat\" \":\" \"bodypatch\"]\n\n----------------------------------------\nShim \"Echo\" (.google.showcase.v1beta1.Echo)\n  Imports:\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n    longrunningpbpb: \"cloud.google.com/go/longrunning/autogen/longrunningpb\" \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n  Handlers (10):\n        POST                                 /v1beta1/echo:echo func Echo(request genprotopb.EchoRequest) (response genprotopb.EchoResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"echo\"]\n\n        POST                                 /v1beta1/echo:wait func Wait(request genprotopb.WaitRequest) (response longrunningpbpb.Operation) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"wait\"]\n\n        POST                                /v1beta1/echo:block func Block(request genprotopb.BlockRequest) (response genprotopb.BlockResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"block\"]\n\n        POST                               /v1beta1/echo:expand func Expand(request genprotopb.ExpandRequest) (response genprotopb.EchoResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"expand\"]\n\n        POST                              /v1beta1/echo:collect func Collect(request genprotopb.EchoRequest) (response genprotopb.EchoResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"collect\"]\n\n        POST                          /v1beta1/echo:pagedExpand func PagedExpand(request genprotopb.PagedExpandRequest) (response genprotopb.PagedExpandResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"pagedExpand\"]\n\n        POST                        /v1beta1/echo:error-details func EchoErrorDetails(request genprotopb.EchoErrorDetailsRequest) (response genprotopb.EchoErrorDetailsResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"error-details\"]\n\n        POST                      /v1beta1/echo:failWithDetails func FailEchoWithDetails(request genprotopb.FailEchoWithDetailsRequest) (response genprotopb.FailEchoWithDetailsResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"failWithDetails\"]\n\n        POST                    /v1beta1/echo:pagedExpandLegacy func PagedExpandLegacy(request genprotopb.PagedExpandLegacyRequest) (response genprotopb.PagedExpandResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"pagedExpandLegacy\"]\n\n        POST              /v1beta1/echo:pagedExpandLegacyMapped func PagedExpandLegacyMapped(request genprotopb.PagedExpandRequest) (response genprotopb.PagedExpandLegacyMappedResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"echo\" \":\" \"pagedExpandLegacyMapped\"]\n\n----------------------------------------\nShim \"Identity\" (.google.showcase.v1beta1.Identity)\n  Imports:\n    emptypbpb: \"google.golang.org/protobuf/types/known/emptypb\" \"google.golang.org/protobuf/types/known/emptypb\"\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n  Handlers (5):\n         GET                                     /v1beta1/users func ListUsers(request genprotopb.ListUsersRequest) (response genprotopb.ListUsersResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"users\"]\n\n         GET                            /v1beta1/{name=users/*} func GetUser(request genprotopb.GetUserRequest) (response genprotopb.User) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"users\" \"/\" *]}]\n\n        POST                                     /v1beta1/users func CreateUser(request genprotopb.CreateUserRequest) (response genprotopb.User) {}\n[\"/\" \"v1beta1\" \"/\" \"users\"]\n\n       PATCH                       /v1beta1/{user.name=users/*} func UpdateUser(request genprotopb.UpdateUserRequest) (response genprotopb.User) {}\n[\"/\" \"v1beta1\" \"/\" {user.name = [\"users\" \"/\" *]}]\n\n      DELETE                            /v1beta1/{name=users/*} func DeleteUser(request genprotopb.DeleteUserRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"users\" \"/\" *]}]\n\n----------------------------------------\nShim \"Messaging\" (.google.showcase.v1beta1.Messaging)\n  Imports:\n    emptypbpb: \"google.golang.org/protobuf/types/known/emptypb\" \"google.golang.org/protobuf/types/known/emptypb\"\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n    longrunningpbpb: \"cloud.google.com/go/longrunning/autogen/longrunningpb\" \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n  Handlers (21):\n         GET                                     /v1beta1/rooms func ListRooms(request genprotopb.ListRoomsRequest) (response genprotopb.ListRoomsResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"rooms\"]\n\n         GET                            /v1beta1/{name=rooms/*} func GetRoom(request genprotopb.GetRoomRequest) (response genprotopb.Room) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"rooms\" \"/\" *]}]\n\n         GET                   /v1beta1/{name=rooms/*/blurbs/*} func GetBlurb(request genprotopb.GetBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]}]\n\n         GET                   /v1beta1/{parent=rooms/*}/blurbs func ListBlurbs(request genprotopb.ListBlurbsRequest) (response genprotopb.ListBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"rooms\" \"/\" *]} \"/\" \"blurbs\"]\n\n         GET           /v1beta1/{name=users/*/profile/blurbs/*} func GetBlurb(request genprotopb.GetBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"users\" \"/\" * \"/\" \"profile\" \"/\" \"blurbs\" \"/\" *]}]\n\n         GET           /v1beta1/{parent=users/*/profile}/blurbs func ListBlurbs(request genprotopb.ListBlurbsRequest) (response genprotopb.ListBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"users\" \"/\" * \"/\" \"profile\"]} \"/\" \"blurbs\"]\n\n        POST                                     /v1beta1/rooms func CreateRoom(request genprotopb.CreateRoomRequest) (response genprotopb.Room) {}\n[\"/\" \"v1beta1\" \"/\" \"rooms\"]\n\n        POST                   /v1beta1/{parent=rooms/*}/blurbs func CreateBlurb(request genprotopb.CreateBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"rooms\" \"/\" *]} \"/\" \"blurbs\"]\n\n        POST              /v1beta1/{name=rooms/*}/blurbs:stream func StreamBlurbs(request genprotopb.StreamBlurbsRequest) (response genprotopb.StreamBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"rooms\" \"/\" *]} \"/\" \"blurbs\" \":\" \"stream\"]\n\n        POST              /v1beta1/{parent=rooms/*}/blurbs:send func SendBlurbs(request genprotopb.CreateBlurbRequest) (response genprotopb.SendBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"rooms\" \"/\" *]} \"/\" \"blurbs\" \":\" \"send\"]\n\n        POST            /v1beta1/{parent=rooms/*}/blurbs:search func SearchBlurbs(request genprotopb.SearchBlurbsRequest) (response longrunningpbpb.Operation) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"rooms\" \"/\" *]} \"/\" \"blurbs\" \":\" \"search\"]\n\n        POST           /v1beta1/{parent=users/*/profile}/blurbs func CreateBlurb(request genprotopb.CreateBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"users\" \"/\" * \"/\" \"profile\"]} \"/\" \"blurbs\"]\n\n        POST      /v1beta1/{name=users/*/profile}/blurbs:stream func StreamBlurbs(request genprotopb.StreamBlurbsRequest) (response genprotopb.StreamBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"users\" \"/\" * \"/\" \"profile\"]} \"/\" \"blurbs\" \":\" \"stream\"]\n\n        POST      /v1beta1/{parent=users/*/profile}/blurbs:send func SendBlurbs(request genprotopb.CreateBlurbRequest) (response genprotopb.SendBlurbsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"users\" \"/\" * \"/\" \"profile\"]} \"/\" \"blurbs\" \":\" \"send\"]\n\n        POST    /v1beta1/{parent=users/*/profile}/blurbs:search func SearchBlurbs(request genprotopb.SearchBlurbsRequest) (response longrunningpbpb.Operation) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"users\" \"/\" * \"/\" \"profile\"]} \"/\" \"blurbs\" \":\" \"search\"]\n\n       PATCH                       /v1beta1/{room.name=rooms/*} func UpdateRoom(request genprotopb.UpdateRoomRequest) (response genprotopb.Room) {}\n[\"/\" \"v1beta1\" \"/\" {room.name = [\"rooms\" \"/\" *]}]\n\n       PATCH             /v1beta1/{blurb.name=rooms/*/blurbs/*} func UpdateBlurb(request genprotopb.UpdateBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {blurb.name = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]}]\n\n       PATCH     /v1beta1/{blurb.name=users/*/profile/blurbs/*} func UpdateBlurb(request genprotopb.UpdateBlurbRequest) (response genprotopb.Blurb) {}\n[\"/\" \"v1beta1\" \"/\" {blurb.name = [\"users\" \"/\" * \"/\" \"profile\" \"/\" \"blurbs\" \"/\" *]}]\n\n      DELETE                            /v1beta1/{name=rooms/*} func DeleteRoom(request genprotopb.DeleteRoomRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"rooms\" \"/\" *]}]\n\n      DELETE                   /v1beta1/{name=rooms/*/blurbs/*} func DeleteBlurb(request genprotopb.DeleteBlurbRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]}]\n\n      DELETE           /v1beta1/{name=users/*/profile/blurbs/*} func DeleteBlurb(request genprotopb.DeleteBlurbRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"users\" \"/\" * \"/\" \"profile\" \"/\" \"blurbs\" \"/\" *]}]\n\n----------------------------------------\nShim \"SequenceService\" (.google.showcase.v1beta1.SequenceService)\n  Imports:\n    emptypbpb: \"google.golang.org/protobuf/types/known/emptypb\" \"google.golang.org/protobuf/types/known/emptypb\"\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n  Handlers (6):\n         GET         /v1beta1/{name=sequences/*/sequenceReport} func GetSequenceReport(request genprotopb.GetSequenceReportRequest) (response genprotopb.SequenceReport) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sequences\" \"/\" * \"/\" \"sequenceReport\"]}]\n\n         GET /v1beta1/{name=streamingSequences/*/streamingSequenceReport} func GetStreamingSequenceReport(request genprotopb.GetStreamingSequenceReportRequest) (response genprotopb.StreamingSequenceReport) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"streamingSequences\" \"/\" * \"/\" \"streamingSequenceReport\"]}]\n\n        POST                                 /v1beta1/sequences func CreateSequence(request genprotopb.CreateSequenceRequest) (response genprotopb.Sequence) {}\n[\"/\" \"v1beta1\" \"/\" \"sequences\"]\n\n        POST                        /v1beta1/streamingSequences func CreateStreamingSequence(request genprotopb.CreateStreamingSequenceRequest) (response genprotopb.StreamingSequence) {}\n[\"/\" \"v1beta1\" \"/\" \"streamingSequences\"]\n\n        POST                        /v1beta1/{name=sequences/*} func AttemptSequence(request genprotopb.AttemptSequenceRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sequences\" \"/\" *]}]\n\n        POST        /v1beta1/{name=streamingSequences/*}:stream func AttemptStreamingSequence(request genprotopb.AttemptStreamingSequenceRequest) (response genprotopb.AttemptStreamingSequenceResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"streamingSequences\" \"/\" *]} \":\" \"stream\"]\n\n----------------------------------------\nShim \"Testing\" (.google.showcase.v1beta1.Testing)\n  Imports:\n    emptypbpb: \"google.golang.org/protobuf/types/known/emptypb\" \"google.golang.org/protobuf/types/known/emptypb\"\n    genprotopb: \"github.com/googleapis/gapic-showcase/server/genproto\" \"github.com/googleapis/gapic-showcase/server/genproto\"\n  Handlers (8):\n         GET                                  /v1beta1/sessions func ListSessions(request genprotopb.ListSessionsRequest) (response genprotopb.ListSessionsResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"sessions\"]\n\n         GET                         /v1beta1/{name=sessions/*} func GetSession(request genprotopb.GetSessionRequest) (response genprotopb.Session) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sessions\" \"/\" *]}]\n\n         GET                 /v1beta1/{parent=sessions/*}/tests func ListTests(request genprotopb.ListTestsRequest) (response genprotopb.ListTestsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {parent = [\"sessions\" \"/\" *]} \"/\" \"tests\"]\n\n        POST                                  /v1beta1/sessions func CreateSession(request genprotopb.CreateSessionRequest) (response genprotopb.Session) {}\n[\"/\" \"v1beta1\" \"/\" \"sessions\"]\n\n        POST                  /v1beta1/{name=sessions/*}:report func ReportSession(request genprotopb.ReportSessionRequest) (response genprotopb.ReportSessionResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sessions\" \"/\" *]} \":\" \"report\"]\n\n        POST           /v1beta1/{name=sessions/*/tests/*}:check func VerifyTest(request genprotopb.VerifyTestRequest) (response genprotopb.VerifyTestResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sessions\" \"/\" * \"/\" \"tests\" \"/\" *]} \":\" \"check\"]\n\n      DELETE                         /v1beta1/{name=sessions/*} func DeleteSession(request genprotopb.DeleteSessionRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sessions\" \"/\" *]}]\n\n      DELETE                 /v1beta1/{name=sessions/*/tests/*} func DeleteTest(request genprotopb.DeleteTestRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"sessions\" \"/\" * \"/\" \"tests\" \"/\" *]}]\n\n----------------------------------------\nShim \"Locations\" (.google.cloud.location.Locations)\n  Imports:\n    locationpb: \"google.golang.org/genproto/googleapis/cloud/location\" \"google.golang.org/genproto/googleapis/cloud/location\"\n  Handlers (2):\n         GET               /v1beta1/{name=projects/*}/locations func ListLocations(request locationpb.ListLocationsRequest) (response locationpb.ListLocationsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"projects\" \"/\" *]} \"/\" \"locations\"]\n\n         GET             /v1beta1/{name=projects/*/locations/*} func GetLocation(request locationpb.GetLocationRequest) (response locationpb.Location) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"projects\" \"/\" * \"/\" \"locations\" \"/\" *]}]\n\n----------------------------------------\nShim \"IAMPolicy\" (.google.iam.v1.IAMPolicy)\n  Imports:\n    iampbpb: \"cloud.google.com/go/iam/apiv1/iampb\" \"cloud.google.com/go/iam/apiv1/iampb\"\n  Handlers (12):\n         GET           /v1beta1/{resource=rooms/*}:getIamPolicy func GetIamPolicy(request iampbpb.GetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" *]} \":\" \"getIamPolicy\"]\n\n         GET           /v1beta1/{resource=users/*}:getIamPolicy func GetIamPolicy(request iampbpb.GetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"users\" \"/\" *]} \":\" \"getIamPolicy\"]\n\n         GET       /v1beta1/{resource=sequences/*}:getIamPolicy func GetIamPolicy(request iampbpb.GetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"sequences\" \"/\" *]} \":\" \"getIamPolicy\"]\n\n         GET  /v1beta1/{resource=rooms/*/blurbs/*}:getIamPolicy func GetIamPolicy(request iampbpb.GetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]} \":\" \"getIamPolicy\"]\n\n        POST           /v1beta1/{resource=rooms/*}:setIamPolicy func SetIamPolicy(request iampbpb.SetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" *]} \":\" \"setIamPolicy\"]\n\n        POST           /v1beta1/{resource=users/*}:setIamPolicy func SetIamPolicy(request iampbpb.SetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"users\" \"/\" *]} \":\" \"setIamPolicy\"]\n\n        POST       /v1beta1/{resource=sequences/*}:setIamPolicy func SetIamPolicy(request iampbpb.SetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"sequences\" \"/\" *]} \":\" \"setIamPolicy\"]\n\n        POST     /v1beta1/{resource=rooms/*}:testIamPermissions func TestIamPermissions(request iampbpb.TestIamPermissionsRequest) (response iampbpb.TestIamPermissionsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" *]} \":\" \"testIamPermissions\"]\n\n        POST     /v1beta1/{resource=users/*}:testIamPermissions func TestIamPermissions(request iampbpb.TestIamPermissionsRequest) (response iampbpb.TestIamPermissionsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"users\" \"/\" *]} \":\" \"testIamPermissions\"]\n\n        POST  /v1beta1/{resource=rooms/*/blurbs/*}:setIamPolicy func SetIamPolicy(request iampbpb.SetIamPolicyRequest) (response iampbpb.Policy) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]} \":\" \"setIamPolicy\"]\n\n        POST /v1beta1/{resource=rooms/*/blurbs/*}:testIamPermissions func TestIamPermissions(request iampbpb.TestIamPermissionsRequest) (response iampbpb.TestIamPermissionsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"rooms\" \"/\" * \"/\" \"blurbs\" \"/\" *]} \":\" \"testIamPermissions\"]\n\n        POST /v1beta1/{resource=sequences/*}:testIamPermissions func TestIamPermissions(request iampbpb.TestIamPermissionsRequest) (response iampbpb.TestIamPermissionsResponse) {}\n[\"/\" \"v1beta1\" \"/\" {resource = [\"sequences\" \"/\" *]} \":\" \"testIamPermissions\"]\n\n----------------------------------------\nShim \"Operations\" (.google.longrunning.Operations)\n  Imports:\n    emptypbpb: \"google.golang.org/protobuf/types/known/emptypb\" \"google.golang.org/protobuf/types/known/emptypb\"\n    longrunningpbpb: \"cloud.google.com/go/longrunning/autogen/longrunningpb\" \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n  Handlers (4):\n         GET                                /v1beta1/operations func ListOperations(request longrunningpbpb.ListOperationsRequest) (response longrunningpbpb.ListOperationsResponse) {}\n[\"/\" \"v1beta1\" \"/\" \"operations\"]\n\n         GET                      /v1beta1/{name=operations/**} func GetOperation(request longrunningpbpb.GetOperationRequest) (response longrunningpbpb.Operation) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"operations\" \"/\" **]}]\n\n        POST               /v1beta1/{name=operations/**}:cancel func CancelOperation(request longrunningpbpb.CancelOperationRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"operations\" \"/\" **]} \":\" \"cancel\"]\n\n      DELETE                      /v1beta1/{name=operations/**} func DeleteOperation(request longrunningpbpb.DeleteOperationRequest) (response emptypbpb.Empty) {}\n[\"/\" \"v1beta1\" \"/\" {name = [\"operations\" \"/\" **]}]\n\n"
  },
  {
    "path": "server/genrest/testing.go",
    "content": "// Copyright 2026 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//     https://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\n// DO NOT EDIT. This is an auto-generated file containing the REST handlers\n// for service #5: \"Testing\" (.google.showcase.v1beta1.Testing).\n\npackage genrest\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\tgmux \"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\n// HandleCreateSession translates REST requests/responses on the wire to internal proto messages for CreateSession\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/sessions\"\nfunc (backend *RESTBackend) HandleCreateSession(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/sessions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.CreateSessionRequest{}\n\t// Intentional: Field values in the URL path override those set in the body.\n\tvar bodyField genprotopb.Session\n\tvar jsonReader bytes.Buffer\n\tbodyReader := io.TeeReader(r.Body, &jsonReader)\n\trBytes, err := io.ReadAll(bodyReader)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body content: %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.FromJSON().Unmarshal(rBytes, &bodyField); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading body into request field 'session': %s\", err)\n\t\treturn\n\t}\n\n\tif err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\trequest.Session = &bodyField\n\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"session\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/sessions\")\n\tresponse, err := backend.TestingServer.CreateSession(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleGetSession translates REST requests/responses on the wire to internal proto messages for GetSession\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{name=sessions/*}\"\nfunc (backend *RESTBackend) HandleGetSession(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sessions/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.GetSessionRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sessions/*}\")\n\tresponse, err := backend.TestingServer.GetSession(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListSessions translates REST requests/responses on the wire to internal proto messages for ListSessions\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/sessions\"\nfunc (backend *RESTBackend) HandleListSessions(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/sessions': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 0, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 0, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListSessionsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/sessions\")\n\tresponse, err := backend.TestingServer.ListSessions(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteSession translates REST requests/responses on the wire to internal proto messages for DeleteSession\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=sessions/*}\"\nfunc (backend *RESTBackend) HandleDeleteSession(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sessions/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteSessionRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sessions/*}\")\n\tresponse, err := backend.TestingServer.DeleteSession(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleReportSession translates REST requests/responses on the wire to internal proto messages for ReportSession\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=sessions/*}:report\"\nfunc (backend *RESTBackend) HandleReportSession(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sessions/*}:report': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ReportSessionRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sessions/*}:report\")\n\tresponse, err := backend.TestingServer.ReportSession(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleListTests translates REST requests/responses on the wire to internal proto messages for ListTests\n//\n//\tGenerated for HTTP binding pattern: GET \"/v1beta1/{parent=sessions/*}/tests\"\nfunc (backend *RESTBackend) HandleListTests(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{parent=sessions/*}/tests': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.ListTestsRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"parent\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{parent=sessions/*}/tests\")\n\tresponse, err := backend.TestingServer.ListTests(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleDeleteTest translates REST requests/responses on the wire to internal proto messages for DeleteTest\n//\n//\tGenerated for HTTP binding pattern: DELETE \"/v1beta1/{name=sessions/*/tests/*}\"\nfunc (backend *RESTBackend) HandleDeleteTest(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sessions/*/tests/*}': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.DeleteTestRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sessions/*/tests/*}\")\n\tresponse, err := backend.TestingServer.DeleteTest(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n\n// HandleVerifyTest translates REST requests/responses on the wire to internal proto messages for VerifyTest\n//\n//\tGenerated for HTTP binding pattern: POST \"/v1beta1/{name=sessions/*/tests/*}:check\"\nfunc (backend *RESTBackend) HandleVerifyTest(w http.ResponseWriter, r *http.Request) {\n\turlPathParams := gmux.Vars(r)\n\tnumUrlPathParams := len(urlPathParams)\n\n\tbackend.StdLog.Printf(\"Received %s request matching '/v1beta1/{name=sessions/*/tests/*}:check': %q\", r.Method, r.URL)\n\tbackend.StdLog.Printf(\"  urlPathParams (expect 1, have %d): %q\", numUrlPathParams, urlPathParams)\n\tbackend.StdLog.Printf(\"  urlRequestHeaders:\\n%s\", resttools.PrettyPrintHeaders(r, \"    \"))\n\n\tresttools.IncludeRequestHeadersInResponse(w, r)\n\n\tif numUrlPathParams != 1 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected 1, have %d: %#v\", numUrlPathParams, urlPathParams)\n\t\treturn\n\t}\n\n\tsystemParameters, queryParams, err := resttools.GetSystemParameters(r)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error in query string: %s\", err)\n\t\treturn\n\t}\n\n\trequest := &genprotopb.VerifyTestRequest{}\n\tif err := resttools.CheckRequestFormat(nil, r, request.ProtoReflect()); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"REST request failed format check: %s\", err)\n\t\treturn\n\t}\n\tif err := resttools.PopulateSingularFields(request, urlPathParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading URL path params: %s\", err)\n\t\treturn\n\t}\n\n\t// TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\n\texcludedQueryParams := []string{\"name\"}\n\tif duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\n\t\tbackend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %v\", duplicates)\n\t\treturn\n\t}\n\tif err := resttools.PopulateFields(request, queryParams); err != nil {\n\t\tbackend.Error(w, http.StatusBadRequest, \"error reading query params: %s\", err)\n\t\treturn\n\t}\n\n\tmarshaler := resttools.ToJSON()\n\tmarshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\n\trequestJSON, _ := marshaler.Marshal(request)\n\tbackend.StdLog.Printf(\"  request: %s\", requestJSON)\n\n\tctx := context.WithValue(r.Context(), resttools.BindingURIKey, \"/v1beta1/{name=sessions/*/tests/*}:check\")\n\tresponse, err := backend.TestingServer.VerifyTest(ctx, request)\n\tif err != nil {\n\t\tbackend.ReportGRPCError(w, err)\n\t\treturn\n\t}\n\n\tjson, err := marshaler.Marshal(response)\n\tif err != nil {\n\t\tbackend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %s\", err.Error())\n\t\treturn\n\t}\n\n\tw.Write(json)\n}\n"
  },
  {
    "path": "server/observer.go",
    "content": "// Copyright 2019 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//     https://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\npackage server\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc\"\n)\n\n// UnaryObserver provides an interface for observing unary requests and responses.\ntype UnaryObserver interface {\n\tGetName() string\n\tObserveUnary(\n\t\tctx context.Context,\n\t\treq interface{},\n\t\tresp interface{},\n\t\tinfo *grpc.UnaryServerInfo,\n\t\terr error)\n}\n\n// StreamRequestObserver provides an interface for observing streaming requests.\ntype StreamRequestObserver interface {\n\tGetName() string\n\tObserveStreamRequest(\n\t\tctx context.Context,\n\t\treq interface{},\n\t\tinfo *grpc.StreamServerInfo,\n\t\terr error)\n}\n\n// StreamResponseObserver provides an interface for observing streaming responses.\ntype StreamResponseObserver interface {\n\tGetName() string\n\tObserveStreamResponse(\n\t\tctx context.Context,\n\t\tresp interface{},\n\t\tinfo *grpc.StreamServerInfo,\n\t\terr error)\n}\n\n// GrpcObserverRegistry is a registry of observers. These observers are hooked into the\n// grpc interceptors that are provided by this interface.\ntype GrpcObserverRegistry interface {\n\t// UnaryInterceptor implements the grpc.UnaryServerInterceptor type to allow the\n\t// registry to hook into unary grpc methods.\n\tUnaryInterceptor(\n\t\tcontext.Context,\n\t\tinterface{},\n\t\t*grpc.UnaryServerInfo,\n\t\tgrpc.UnaryHandler) (interface{}, error)\n\t// StreamInterceptor implements the grpc.StreamServerInterceptor type to allow the\n\t// registry to hook into streaming grpc methods.\n\tStreamInterceptor(\n\t\tinterface{},\n\t\tgrpc.ServerStream,\n\t\t*grpc.StreamServerInfo,\n\t\tgrpc.StreamHandler) error\n\tRegisterUnaryObserver(UnaryObserver)\n\tDeleteUnaryObserver(name string)\n\tRegisterStreamRequestObserver(StreamRequestObserver)\n\tDeleteStreamRequestObserver(name string)\n\tRegisterStreamResponseObserver(StreamResponseObserver)\n\tDeleteStreamResponseObserver(name string)\n}\n\n// ShowcaseObserverRegistry returns the showcase specific observer registry.\nfunc ShowcaseObserverRegistry() GrpcObserverRegistry {\n\treturn &showcaseObserverRegistry{\n\t\tuObservers:     map[string]UnaryObserver{},\n\t\tsReqObservers:  map[string]StreamRequestObserver{},\n\t\tsRespObservers: map[string]StreamResponseObserver{},\n\t}\n}\n\n// showcaseObserverRegistry is an implementation of the ObserverRegistry. This registry\n// automatically handles DeleteTest requests and deletes the appropriate observers\n// for that request.\ntype showcaseObserverRegistry struct {\n\tmu             sync.Mutex\n\tuObservers     map[string]UnaryObserver\n\tsReqObservers  map[string]StreamRequestObserver\n\tsRespObservers map[string]StreamResponseObserver\n}\n\nfunc (r *showcaseObserverRegistry) UnaryInterceptor(\n\tctx context.Context,\n\treq interface{},\n\tinfo *grpc.UnaryServerInfo,\n\thandler grpc.UnaryHandler) (interface{}, error) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\n\tresp, err := handler(ctx, req)\n\n\tfor _, obs := range r.uObservers {\n\t\tobs.ObserveUnary(ctx, req, resp, info, err)\n\t}\n\n\treturn resp, err\n}\n\ntype showcaseStream struct {\n\tinfo     *grpc.StreamServerInfo\n\tregistry *showcaseObserverRegistry\n\n\tgrpc.ServerStream\n}\n\nfunc (s *showcaseStream) SendMsg(m interface{}) error {\n\ts.registry.mu.Lock()\n\tdefer s.registry.mu.Unlock()\n\n\terr := s.ServerStream.SendMsg(m)\n\tfor _, obs := range s.registry.sRespObservers {\n\t\tobs.ObserveStreamResponse(s.ServerStream.Context(), m, s.info, err)\n\t}\n\treturn err\n}\n\nfunc (s *showcaseStream) RecvMsg(m interface{}) error {\n\ts.registry.mu.Lock()\n\tdefer s.registry.mu.Unlock()\n\n\terr := s.ServerStream.RecvMsg(m)\n\tfor _, obs := range s.registry.sReqObservers {\n\t\tobs.ObserveStreamRequest(s.ServerStream.Context(), m, s.info, err)\n\t}\n\treturn err\n}\n\nfunc (r *showcaseObserverRegistry) StreamInterceptor(\n\tsrv interface{},\n\tss grpc.ServerStream,\n\tinfo *grpc.StreamServerInfo,\n\thandler grpc.StreamHandler) error {\n\treturn handler(srv, &showcaseStream{info, r, ss})\n}\n\n// RegisterUnaryObserver registers a unary observer. If an observer of the same name\n// has already been registered, the new observer will override it.\nfunc (r *showcaseObserverRegistry) RegisterUnaryObserver(obs UnaryObserver) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tr.uObservers[obs.GetName()] = obs\n}\n\nfunc (r *showcaseObserverRegistry) DeleteUnaryObserver(name string) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tdelete(r.uObservers, name)\n}\n\n// RegisterStreamRequestObserver registers a stream observer. If an observer of the same name\n// has already been registered, the new observer will override it.\nfunc (r *showcaseObserverRegistry) RegisterStreamRequestObserver(obs StreamRequestObserver) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tr.sReqObservers[obs.GetName()] = obs\n}\n\nfunc (r *showcaseObserverRegistry) DeleteStreamRequestObserver(name string) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tdelete(r.sReqObservers, name)\n}\n\n// RegisterStreamResponseObserver registers a stream observer. If an observer of the same name\n// has already been registered, the new observer will override it.\nfunc (r *showcaseObserverRegistry) RegisterStreamResponseObserver(obs StreamResponseObserver) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tr.sRespObservers[obs.GetName()] = obs\n}\n\nfunc (r *showcaseObserverRegistry) DeleteStreamResponseObserver(name string) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tdelete(r.sRespObservers, name)\n}\n"
  },
  {
    "path": "server/observer_test.go",
    "content": "// Copyright 2019 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//     https://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\npackage server\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"google.golang.org/grpc\"\n)\n\ntype testUnaryObserver struct {\n\tname string\n\treq  interface{}\n\tresp interface{}\n\tinfo *grpc.UnaryServerInfo\n\terr  error\n}\n\nfunc (o *testUnaryObserver) GetName() string { return o.name }\n\nfunc (o *testUnaryObserver) ObserveUnary(\n\tctx context.Context,\n\treq interface{},\n\tresp interface{},\n\tinfo *grpc.UnaryServerInfo,\n\terr error) {\n\to.req = req\n\to.resp = resp\n\to.info = info\n\to.err = err\n}\n\nfunc Test_showcaseObserverRegistry_UnaryInterceptor(t *testing.T) {\n\tobserverName := \"observerName\"\n\ttests := []struct {\n\t\tname            string\n\t\treq             interface{}\n\t\tresp            interface{}\n\t\terr             error\n\t\tinfo            *grpc.UnaryServerInfo\n\t\tobserverDeleted bool\n\t}{\n\t\t{\n\t\t\t\"Passes through request and response\",\n\t\t\t\"test req\",\n\t\t\t\"test resp\",\n\t\t\tnil,\n\t\t\t&grpc.UnaryServerInfo{},\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"Passes through request and error\",\n\t\t\t\"test req\",\n\t\t\tnil,\n\t\t\terrors.New(\"test error\"),\n\t\t\t&grpc.UnaryServerInfo{},\n\t\t\tfalse,\n\t\t},\n\t}\n\tfor _, tt := range tests {\n\t\tobs := &testUnaryObserver{name: observerName}\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tr := &showcaseObserverRegistry{\n\t\t\t\tuObservers: map[string]UnaryObserver{obs.GetName(): obs},\n\t\t\t}\n\t\t\thandler := func(_ context.Context, req interface{}) (interface{}, error) {\n\t\t\t\tif req != tt.req {\n\t\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() want to invoke handler with %v, got %v\", tt.req, req)\n\t\t\t\t}\n\t\t\t\treturn tt.resp, tt.err\n\t\t\t}\n\t\t\tgot, err := r.UnaryInterceptor(context.Background(), tt.req, tt.info, handler)\n\t\t\tif err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() error = %v, want %v\", err, tt.err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif !reflect.DeepEqual(got, tt.resp) {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() = %v, want %v\", got, tt.resp)\n\t\t\t}\n\t\t\tif tt.observerDeleted && r.uObservers[observerName] != nil {\n\t\t\t\tt.Error(\"showcaseObserverRegistry.UnaryInterceptor() want delete observers but did not\")\n\t\t\t}\n\t\t\tif !tt.observerDeleted && obs.req != tt.req {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() want to invoke observers with %v, got %v\", tt.req, obs.req)\n\t\t\t}\n\t\t\tif !tt.observerDeleted && obs.resp != tt.resp {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() want to invoke observers with %v, got %v\", tt.resp, obs.resp)\n\n\t\t\t}\n\t\t\tif !tt.observerDeleted && obs.err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() want to invoke observers with %v, got %v\", tt.err, obs.err)\n\n\t\t\t}\n\t\t\tif !tt.observerDeleted && obs.info != tt.info {\n\t\t\t\tt.Errorf(\"showcaseObserverRegistry.UnaryInterceptor() want to invoke observers with %v, got %v\", tt.info, obs.info)\n\t\t\t}\n\t\t})\n\t}\n}\n\ntype testServerStream struct {\n\terr      error\n\tsent     interface{}\n\treceived interface{}\n\n\tgrpc.ServerStream\n}\n\nfunc (ss *testServerStream) Context() context.Context { return context.Background() }\n\nfunc (ss *testServerStream) SendMsg(m interface{}) error {\n\tss.sent = m\n\treturn ss.err\n}\n\nfunc (ss *testServerStream) RecvMsg(m interface{}) error {\n\tss.received = m\n\treturn ss.err\n}\n\ntype testStreamResponseObserver struct {\n\tname string\n\tresp interface{}\n\tinfo *grpc.StreamServerInfo\n\terr  error\n}\n\nfunc (o *testStreamResponseObserver) GetName() string { return o.name }\n\nfunc (o *testStreamResponseObserver) ObserveStreamResponse(\n\tctx context.Context,\n\tresp interface{},\n\tinfo *grpc.StreamServerInfo,\n\terr error) {\n\to.resp = resp\n\to.info = info\n\to.err = err\n}\n\nfunc Test_showcaseStream_SendMsg(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tinfo *grpc.StreamServerInfo\n\t\tmsg  interface{}\n\t\terr  error\n\t}{\n\t\t{\n\t\t\t\"Passes msg, info, and error to observer\",\n\t\t\t&grpc.StreamServerInfo{},\n\t\t\t\"sent msg\",\n\t\t\terrors.New(\"test error\"),\n\t\t},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tregistry := &showcaseObserverRegistry{sRespObservers: map[string]StreamResponseObserver{}}\n\t\t\tobs := &testStreamResponseObserver{name: \"streamObserver\"}\n\t\t\tregistry.RegisterStreamResponseObserver(obs)\n\t\t\tss := &testServerStream{err: tt.err}\n\t\t\ts := &showcaseStream{tt.info, registry, ss}\n\t\t\tif err := s.SendMsg(tt.msg); err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() error = %v, want %v\", err, tt.err)\n\t\t\t}\n\t\t\tif obs.resp != tt.msg {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.msg, obs.resp)\n\t\t\t}\n\t\t\tif ss.sent != tt.msg {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke server stream with %v, got %v\", tt.msg, ss.sent)\n\t\t\t}\n\t\t\tif obs.info != tt.info {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.info, obs.info)\n\t\t\t}\n\t\t\tif obs.err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.err, obs.err)\n\t\t\t}\n\t\t})\n\t}\n}\n\ntype testStreamRequestObserver struct {\n\tname string\n\treq  interface{}\n\tinfo *grpc.StreamServerInfo\n\terr  error\n}\n\nfunc (o *testStreamRequestObserver) GetName() string { return o.name }\n\nfunc (o *testStreamRequestObserver) ObserveStreamRequest(\n\tctx context.Context,\n\treq interface{},\n\tinfo *grpc.StreamServerInfo,\n\terr error) {\n\to.req = req\n\to.info = info\n\to.err = err\n}\n\nfunc Test_showcaseStream_RecvMsg(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tinfo *grpc.StreamServerInfo\n\t\tmsg  interface{}\n\t\terr  error\n\t}{\n\t\t{\n\t\t\t\"Passes msg, info, and error to observer\",\n\t\t\t&grpc.StreamServerInfo{},\n\t\t\t\"received msg\",\n\t\t\terrors.New(\"test error\"),\n\t\t},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tregistry := &showcaseObserverRegistry{sReqObservers: map[string]StreamRequestObserver{}}\n\t\t\tobs := &testStreamRequestObserver{name: \"streamObserver\"}\n\t\t\tregistry.RegisterStreamRequestObserver(obs)\n\t\t\tss := &testServerStream{err: tt.err}\n\t\t\ts := &showcaseStream{tt.info, registry, ss}\n\t\t\tif err := s.RecvMsg(tt.msg); err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseStream.RecvMsg() error = %v, want %v\", err, tt.err)\n\t\t\t}\n\t\t\tif obs.req != tt.msg {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.msg, obs.req)\n\t\t\t}\n\t\t\tif ss.received != tt.msg {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke server stream with %v, got %v\", tt.msg, ss.received)\n\t\t\t}\n\t\t\tif obs.info != tt.info {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.info, obs.info)\n\t\t\t}\n\t\t\tif obs.err != tt.err {\n\t\t\t\tt.Errorf(\"showcaseStream.SendMsg() want to invoke observers with %v, got %v\", tt.err, obs.err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc Test_showcaseObserverRegistry_StreamInterceptor(t *testing.T) {\n\tr := ShowcaseObserverRegistry()\n\tsrv := \"server\"\n\tss := &testServerStream{}\n\tinfo := &grpc.StreamServerInfo{}\n\ttErr := errors.New(\"test error\")\n\thandler := func(gotSrv interface{}, gotSs grpc.ServerStream) error {\n\t\tif srv != gotSrv {\n\t\t\tt.Errorf(\"showcaseObserverRegistry.StreamInterceptor() want to invoke handler with %v got %v\", srv, gotSrv)\n\t\t}\n\t\tshowcaseStream, ok := gotSs.(*showcaseStream)\n\t\tif !ok {\n\t\t\tt.Error(\"showcaseObserverRegistry.StreamInterceptor() expected to wrap server stream with showcase stream\")\n\t\t}\n\t\tif info != showcaseStream.info {\n\t\t\tt.Errorf(\"showcaseObserverRegistry.StreamInterceptor() want to instantiate showcase stream with %v got %v\", info, showcaseStream.info)\n\t\t}\n\t\tif r != showcaseStream.registry {\n\t\t\tt.Errorf(\"showcaseObserverRegistry.StreamInterceptor() want to instantiate showcase stream with %v got %v\", r, showcaseStream.registry)\n\t\t}\n\t\treturn tErr\n\t}\n\tif err := r.StreamInterceptor(srv, ss, info, handler); err != tErr {\n\t\tt.Errorf(\"showcaseObserverRegistry.StreamInterceptor() error = %v, wantErr %v\", err, tErr)\n\t}\n}\n"
  },
  {
    "path": "server/page_token.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// NewTokenGenerator provides a new instance of a TokenGenerator.\nfunc NewTokenGenerator() TokenGenerator {\n\treturn &tokenGenerator{salt: strconv.FormatInt(time.Now().Unix(), 10)}\n}\n\n// TokenGeneratorWithSalt provieds an instance of a TokenGenerator which\n// uses the given salt.\nfunc TokenGeneratorWithSalt(salt string) TokenGenerator {\n\treturn &tokenGenerator{salt}\n}\n\n// TokenGenerator generates a page token for a given index.\ntype TokenGenerator interface {\n\tForIndex(int) string\n\tGetIndex(string) (int, error)\n}\n\n// InvalidTokenErr is the error returned if the token provided is not\n// parseable by the TokenGenerator.\nvar InvalidTokenErr = status.Errorf(\n\tcodes.InvalidArgument,\n\t\"The field `page_token` is invalid.\")\n\ntype tokenGenerator struct {\n\tsalt string\n}\n\nfunc (t *tokenGenerator) ForIndex(i int) string {\n\treturn base64.StdEncoding.EncodeToString(\n\t\t[]byte(fmt.Sprintf(\"%s%d\", t.salt, i)))\n}\n\nfunc (t *tokenGenerator) GetIndex(s string) (int, error) {\n\tif s == \"\" {\n\t\treturn 0, nil\n\t}\n\n\tbs, err := base64.StdEncoding.DecodeString(s)\n\n\tif err != nil {\n\t\treturn -1, InvalidTokenErr\n\t}\n\n\tif !strings.HasPrefix(string(bs), t.salt) {\n\t\treturn -1, InvalidTokenErr\n\t}\n\n\ti, err := strconv.Atoi(strings.TrimPrefix(string(bs), t.salt))\n\tif err != nil {\n\t\treturn -1, InvalidTokenErr\n\t}\n\treturn i, nil\n}\n"
  },
  {
    "path": "server/page_token_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"encoding/base64\"\n\t\"testing\"\n)\n\nfunc Test_tokenGenerator_ForIndex(t *testing.T) {\n\tsalt := \"salt\"\n\tindex := 1\n\twant := base64.StdEncoding.EncodeToString(\n\t\t[]byte(\"salt1\"))\n\ttok := TokenGeneratorWithSalt(salt)\n\tif got := tok.ForIndex(index); got != want {\n\t\tt.Errorf(\"tokenGenerator.ForIndex() = %v, want %v\", got, want)\n\t}\n}\n\nfunc Test_tokenGenerator_GetIndex_notParseable(t *testing.T) {\n\ttok := NewTokenGenerator()\n\t_, err := tok.GetIndex(\"invalid\")\n\tif err == nil {\n\t\tt.Error(\"GetIndex: want error for invalid token.\")\n\t}\n}\nfunc Test_tokenGenerator_GetIndex_noSalt(t *testing.T) {\n\ttok := NewTokenGenerator()\n\t_, err := tok.GetIndex(base64.StdEncoding.EncodeToString([]byte(\"invalid\")))\n\tif err == nil {\n\t\tt.Error(\"GetIndex: want error for invalid token.\")\n\t}\n}\n\nfunc Test_tokenGenerator_GetIndex_invalidIndex(t *testing.T) {\n\ttok := TokenGeneratorWithSalt(\"salt\")\n\t_, err := tok.GetIndex(base64.StdEncoding.EncodeToString([]byte(\"saltinvalid\")))\n\tif err == nil {\n\t\tt.Error(\"GetIndex: want error for invalid token.\")\n\t}\n}\n\nfunc Test_tokenGenerator_GetIndex(t *testing.T) {\n\ttok := TokenGeneratorWithSalt(\"salt\")\n\ti, err := tok.GetIndex(base64.StdEncoding.EncodeToString([]byte(\"salt1\")))\n\tif err != nil {\n\t\tt.Error(\"GetIndex: unexpected err\")\n\t}\n\tif i != 1 {\n\t\tt.Errorf(\"GetIndex: want 1, got %d\", i)\n\t}\n}\n"
  },
  {
    "path": "server/services/compliance_service.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t_ \"embed\" // for storing compliance suite data, used to verify  incoming requests\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// NewComplianceServer returns a new ComplianceServer for the Showcase API.\nfunc NewComplianceServer() pb.ComplianceServer {\n\treturn &complianceServerImpl{waiter: server.GetWaiterInstance()}\n}\n\ntype complianceServerImpl struct {\n\twaiter server.Waiter\n}\n\n// requestMatchesExpectations returns an error iff the received request asks for server verification and its\n// contents do not match a known suite testing request with the same name.\nfunc (csi *complianceServerImpl) requestMatchesExpectation(received *pb.RepeatRequest, binding string) error {\n\tif !received.GetServerVerify() {\n\t\treturn nil\n\t}\n\n\tif ComplianceSuiteStatus == ComplianceSuiteError {\n\t\treturn fmt.Errorf(\"%s\", ComplianceSuiteStatusMessage)\n\t}\n\n\tname := received.GetName()\n\texpectedRequest, ok := ComplianceSuiteRequests[name]\n\tif !ok {\n\t\treturn fmt.Errorf(\"(ComplianceSuiteRequestNotFoundError) compliance suite does not contain a request %q\", name)\n\t}\n\n\t// Checking that the binding in the test suite matches actual binding used.\n\tif expectedRequest.IntendedBindingUri != nil {\n\t\tintendedBinding := expectedRequest.GetIntendedBindingUri()\n\t\tif intendedBinding != binding {\n\t\t\treturn fmt.Errorf(\"(ComplianceSuiteWrongBindingError) request %q was transcoded to the wrong binding (expected: %s; actual %s)\", name, intendedBinding, binding)\n\t\t}\n\t}\n\n\t// Separately checking that the binding in the client request matches binding in the test suite.\n\t// This guards against the test suite file being wrong on the client.\n\tif expectedRequest.GetIntendedBindingUri() != received.GetIntendedBindingUri() {\n\t\treturn fmt.Errorf(\"(ComplianceSuiteRequestBindingMismatchError) intended binding of request %q does not match test suite (expected: %s, received: %s)\", name, expectedRequest.GetIntendedBindingUri(), received.GetIntendedBindingUri())\n\t}\n\n\tif diff := cmp.Diff(received.GetInfo(), expectedRequest.GetInfo(), cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\treturn fmt.Errorf(\"(ComplianceSuiteRequestMismatchError) contents of request %q do not match test suite\", name)\n\t}\n\n\treturn nil\n}\n\nfunc (csi *complianceServerImpl) Repeat(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\techoTrailers(ctx)\n\n\tbindingURI, ok := ctx.Value(resttools.BindingURIKey).(string)\n\tif !ok {\n\t\tbindingURI = \"\"\n\t}\n\n\tif err := csi.requestMatchesExpectation(in, bindingURI); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pb.RepeatResponse{Request: in, BindingUri: bindingURI}, nil\n}\n\nfunc (csi *complianceServerImpl) RepeatDataBody(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataBodyInfo(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataQuery(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataSimplePath(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataPathResource(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataPathTrailingResource(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataBodyPut(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\nfunc (csi *complianceServerImpl) RepeatDataBodyPatch(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error) {\n\treturn csi.Repeat(ctx, in)\n}\n\n// complianceSuiteBytes contains the contents of the compliance suite JSON file. This requires Go\n// 1.16. Note that embedding can only be applied to global variables at package scope.\n//\n//go:embed compliance_suite.json\nvar complianceSuiteBytes []byte\n\n//// Enum support testing.\n\n// These enums are not part of the current compliance suite because they don't\n// have the server echo the client's request.\nvar existingEnumValue, unknownEnumValue pb.Continent\n\n// storeEnumTestValues stores the values for known and unknown enums used in GetEnum() and\n// VerifyEnum() in this session. This function should be run from init()\nfunc storeEnumTestValues() {\n\tdeterministicInt := os.Getpid()\n\tunknownEnumValue = pb.Continent(-deterministicInt)\n\texistingEnumValue = pb.Continent(deterministicInt%(len(pb.Continent_name)-1) + 1)\n\n}\n\nfunc (csi *complianceServerImpl) GetEnum(ctx context.Context, in *pb.EnumRequest) (*pb.EnumResponse, error) {\n\tresponse := &pb.EnumResponse{\n\t\tRequest: in,\n\t}\n\n\tif in.GetUnknownEnum() {\n\t\tresponse.Continent = unknownEnumValue\n\t} else {\n\t\tresponse.Continent = existingEnumValue\n\t}\n\n\treturn response, nil\n}\n\nfunc (csi *complianceServerImpl) VerifyEnum(ctx context.Context, in *pb.EnumResponse) (*pb.EnumResponse, error) {\n\tusingUnknownEnum := in.Request.GetUnknownEnum()\n\n\texpectedEnum := existingEnumValue\n\tif usingUnknownEnum {\n\t\texpectedEnum = unknownEnumValue\n\t}\n\n\tif actualEnum := in.GetContinent(); actualEnum != expectedEnum {\n\t\treturn nil, fmt.Errorf(\"(UnexpectedEnumError) enum received (%d) is not the value expected (%d) when unknown_enum = %t\", actualEnum, expectedEnum, usingUnknownEnum)\n\t}\n\n\treturn in, nil\n}\n\n//// Compliance suite support.\n\n// ComplianceSuiteInitStatus contains the status result of loading the compliance test suite\ntype ComplianceSuiteInitStatus int\n\nconst (\n\t// ComplianceSuiteUninitialized means we have not attempted to parse the compliance suite data into services.ComplianceSuite.\n\tComplianceSuiteUninitialized ComplianceSuiteInitStatus = iota\n\n\t// ComplianceSuiteLoaded means we have successfully parsed the compliance suite data into services.ComplianceSuite.\n\tComplianceSuiteLoaded\n\n\t// ComplianceSuiteError means we failed parsing the compliance suite data into services.ComplianceSuite.\n\tComplianceSuiteError\n)\n\nvar (\n\t// ComplianceSuite holds the protocol buffer representation of the compliance suite data.\n\tComplianceSuite *pb.ComplianceSuite\n\n\t// ComplianceSuiteRequests holds all the requests in ComplianceSuite, indexed by the `name` field of the request.\n\tComplianceSuiteRequests map[string]*pb.RepeatRequest\n\n\t// ComplianceSuiteStatus reports the status of loading the compliance suite data into services.ComplianceSuite.\n\tComplianceSuiteStatus ComplianceSuiteInitStatus\n\n\t// ComplianceSuiteStatusMessage holds a message explaining ComplianceSuiteStatus. This is\n\t// typically used to provide more information in the case\n\t// ComplianceSuiteStatus==ComplianceSuiteError.\n\tComplianceSuiteStatusMessage string\n)\n\n// IndexComplianceSuite creates a map by request name of the the requests in the\n// suite, for easy retrieval later.\nfunc IndexComplianceSuite(suite *pb.ComplianceSuite) (map[string]*pb.RepeatRequest, error) {\n\tindexedSuite := make(map[string]*pb.RepeatRequest)\n\tfor _, group := range suite.GetGroup() {\n\t\tfor _, requestProto := range group.GetRequests() {\n\t\t\tname := requestProto.GetName()\n\t\t\tif _, exists := indexedSuite[name]; exists {\n\t\t\t\treturn nil, fmt.Errorf(\"multiple requests in compliance suite have name %q\", name)\n\t\t\t}\n\t\t\tindexedSuite[name] = requestProto\n\t\t}\n\t}\n\treturn indexedSuite, nil\n}\n\n// indexTestingRequests creates a map by request name of the requests in suiteBytes (a\n// JSON-formatted encoding of pb.ComplianceSuite), for easy retrieval later.\nfunc indexTestingRequests(suiteBytes []byte) (err error) {\n\tif ComplianceSuiteStatus == ComplianceSuiteLoaded {\n\t\treturn nil\n\t}\n\n\tComplianceSuite = &pb.ComplianceSuite{}\n\tif err := protojson.Unmarshal(suiteBytes, ComplianceSuite); err != nil {\n\t\tComplianceSuiteStatus = ComplianceSuiteError\n\t\tComplianceSuiteStatusMessage = fmt.Sprintf(\"(ComplianceServiceReadError) could not read compliance suite file: %s\", err)\n\t\treturn fmt.Errorf(\"%s\", ComplianceSuiteStatusMessage)\n\n\t}\n\n\tindexedSuite, err := IndexComplianceSuite(ComplianceSuite)\n\tif err != nil {\n\t\tComplianceSuiteStatus = ComplianceSuiteError\n\t\tComplianceSuiteStatusMessage = fmt.Sprintf(\"(ComplianceServiceSetupError) %s\", err)\n\t\treturn fmt.Errorf(\"%s\", ComplianceSuiteStatusMessage)\n\t}\n\tComplianceSuiteRequests = indexedSuite\n\tComplianceSuiteStatus = ComplianceSuiteLoaded\n\tComplianceSuiteStatusMessage = \"OK\"\n\treturn nil\n}\n\nfunc init() {\n\tindexTestingRequests(complianceSuiteBytes)\n\tstoreEnumTestValues()\n}\n"
  },
  {
    "path": "server/services/compliance_service_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestComplianceRepeats(t *testing.T) {\n\t// Note that additional thorough test cases are exercised in\n\t// cmd/gapic-showcase/compliance_suite_test.go.\n\tserver := NewComplianceServer()\n\tinfo := &pb.ComplianceData{\n\t\tFString:   \"Terra Incognita\",\n\t\tFInt32:    1,\n\t\tFSint32:   -2,\n\t\tFSfixed32: -300000000,\n\t\tFUint32:   5,\n\t\tFFixed32:  700000000,\n\t\tFInt64:    9,\n\t\tFSint64:   -1100000000,\n\t\tFSfixed64: -1300000000,\n\t\tFUint64:   1700000000000000000,\n\t\tFFixed64:  1900000000000000000,\n\n\t\tFDouble: 6.02e23,\n\t\tFFloat:  3.1415,\n\t\tFBool:   true,\n\t\tFBytes:  []byte(\"Lorem ipsum\"),\n\t}\n\trequest := &pb.RepeatRequest{Info: info}\n\n\tfor idx, rpc := range [](func(ctx context.Context, in *pb.RepeatRequest) (*pb.RepeatResponse, error)){\n\t\tserver.RepeatDataQuery,\n\t\tserver.RepeatDataBody,\n\t\tserver.RepeatDataBodyInfo,\n\t\tserver.RepeatDataSimplePath,\n\t\tserver.RepeatDataPathResource,\n\t\tserver.RepeatDataPathTrailingResource,\n\t\tserver.RepeatDataBodyPut,\n\t\tserver.RepeatDataBodyPatch,\n\t} {\n\t\tresponse, err := rpc(context.Background(), request)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"call %d: error: %s\", idx, err)\n\t\t}\n\t\tif diff := cmp.Diff(response.GetRequest(), request, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\t\tt.Errorf(\"call %d: got=-, want=+:%s\", idx, diff)\n\t\t}\n\t}\n}\n\nfunc TestMatchingComplianceSuiteRequests(t *testing.T) {\n\tserver := &complianceServerImpl{}\n\n\tinfo := &pb.ComplianceData{\n\t\tFString:   \"Terra Incognita\",\n\t\tFInt32:    1,\n\t\tFSint32:   -2,\n\t\tFSfixed32: -300000000,\n\t}\n\trequest := &pb.RepeatRequest{\n\t\tName: \"Basic data types\", // matches a name in compliance_suite.json\n\t\tInfo: info,\n\t}\n\n\tif got := server.requestMatchesExpectation(request, \"\"); got != nil {\n\t\tt.Errorf(\"expected request to trivially match when serverVerify unset. Got error: %s\", got)\n\t}\n\n\trequest.ServerVerify = true\n\tif err := server.requestMatchesExpectation(request, \"\"); err == nil {\n\t\tt.Errorf(\"expected verified request with differing data to not match\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceSuiteRequestMismatchError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t\tif _, got := server.Repeat(context.Background(), request); got == nil {\n\t\t\tt.Errorf(\"expected Repeat() to error with unverified request, but it didn't\")\n\t\t}\n\t}\n\n\trequest.Name = \"non-existent case\"\n\tif err := server.requestMatchesExpectation(request, \"\"); err == nil {\n\t\tt.Errorf(\"expected verified request with unmatched name to cause an error\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceSuiteRequestNotFoundError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t\tif _, got := server.Repeat(context.Background(), request); got == nil {\n\t\t\tt.Errorf(\"expected Repeat() to error with unverified request, but it didn't\")\n\t\t}\n\t}\n\n\trequest = ComplianceSuiteRequests[\"Basic data types\"] // matches a name in compliance_suite.json\n\tif got := server.requestMatchesExpectation(request, \"\"); got != nil {\n\t\tt.Errorf(\"expected test suite case to match. Got error: %s\", got)\n\t}\n\tif _, got := server.Repeat(context.Background(), request); got != nil {\n\t\tt.Errorf(\"expected Repeat() to succeed with verified request, but got error: %s\", got)\n\t}\n}\n\n// Tests for the binding verification parts of the request verification\n// in the compliance service.\nfunc TestBindingComplianceSuiteRequests(t *testing.T) {\n\tserver := &complianceServerImpl{}\n\n\tinfo := &pb.ComplianceData{\n\t\tFString: \"first/hello\",\n\t\tPBool:   &[]bool{true}[0],\n\t\tFChild: &pb.ComplianceDataChild{\n\t\t\tFString: \"second/greetings\",\n\t\t},\n\t}\n\n\tnoURIVerifyRequest := &pb.RepeatRequest{\n\t\tName:         \"Binding testing baseline no Uri verification\", // matches a name in compliance_suite.json\n\t\tInfo:         info,\n\t\tServerVerify: true,\n\t}\n\twrongBindingURI := \"/foo/{id=bar/*}\"\n\n\tif got := server.requestMatchesExpectation(noURIVerifyRequest, wrongBindingURI); got != nil {\n\t\tt.Errorf(\"expected request to match when intended Uri is not set on server. Got error: %s\", got)\n\t}\n\n\t// realBindingUri matches the value in compliance_suite.json\n\trealBindingURI := \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\"\n\turiVerifyRequest := &pb.RepeatRequest{\n\t\tName:               \"Binding testing first binding\", // matches a name in compliance_suite.json\n\t\tInfo:               info,\n\t\tServerVerify:       true,\n\t\tIntendedBindingUri: &realBindingURI,\n\t}\n\n\t// There are three sources of binding Uri:\n\t// - actualUri: what actual Uri the request was bound to in runtime\n\t//   (the second parameter of the `requestMatchesExpectation` method)\n\t// - serverUri: what server thinks the binding Uri should be\n\t//   (in the server-side json testing suite data's `IntendedBindingUri` field)\n\t// - clientUri: what client thinks the binding Uri should be\n\t//   (in the client-side json testing suite data `IntendedBindingUri` field)\n\t// The `requestMatchesExpectation` method verifies\n\t// \t- actualUri <- vs -> serverUri (looking for incorrect runtime binding)\n\t//  - clientUri <- vs -> serverUri (looking for wrong client test suite)\n\n\t// In this case the request is simulated to get bound to a wrong Uri\n\t// (the second parameter of the `requestMatchesExpectation` method),\n\t// therefore actualUri will differ from serverUri.\n\tif err := server.requestMatchesExpectation(uriVerifyRequest, wrongBindingURI); err == nil {\n\t\tt.Errorf(\"expected request that got bound to a wrong uri to not match\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceSuiteWrongBindingError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t}\n\n\t// In this case the actualUri is set to the correct value\n\t// (matching the serverUri), but the clientUri is set to the wrong value,\n\t// simulating a corrupt or outdated client testing suite.\n\turiVerifyRequest.IntendedBindingUri = &wrongBindingURI\n\tif err := server.requestMatchesExpectation(uriVerifyRequest, realBindingURI); err == nil {\n\t\tt.Errorf(\"expected request with an incorrect bindingUri to not match\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceSuiteRequestBindingMismatchError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t}\n\n\turiVerifyRequest.IntendedBindingUri = &realBindingURI\n\tif got := server.requestMatchesExpectation(uriVerifyRequest, realBindingURI); got != nil {\n\t\tt.Errorf(\"expected request to match when binding Uri is same everywhere. Got error: %s\", got)\n\t}\n}\n\nfunc TestIndexingComplianceSuite(t *testing.T) {\n\t// set up\n\tComplianceSuiteStatus = ComplianceSuiteUninitialized\n\n\tsuiteBytes := []byte(\"nonexistent_field: 5 \")\n\n\tif err := indexTestingRequests(suiteBytes); err == nil {\n\t\tt.Errorf(\"expected JSON unmarshaling to fail, but it succeeded\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceServiceReadError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t}\n\n\tsuiteBytes = []byte(`\n            {\n              \"group\": [\n                 {\n                  \"name\": \"sample suite\",\n                  \"requests\": [\n                     { \"name\": \"Alpha\"},\n                     { \"name\": \"Beta\"},\n                     { \"name\": \"Alpha\"}\n                  ]\n                 }\n                ]\n             }\n               `)\n\n\tif err := indexTestingRequests(suiteBytes); err == nil {\n\t\tt.Errorf(\"expected JSON unmarshaling to fail, but it succeeded\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceServiceSetupError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t}\n\n\t// test that the indexing error gets properly propagated\n\tserver := &complianceServerImpl{}\n\trequest := &pb.RepeatRequest{\n\t\tName:         \"Basic data types\", // matches a name in compliance_suite.json\n\t\tServerVerify: true,\n\t}\n\tif err := server.requestMatchesExpectation(request, \"\"); err == nil {\n\t\tt.Errorf(\"expected verified request with differing data to not match\")\n\t} else {\n\t\tif got, want := err.Error(), \"(ComplianceServiceSetupError)\"; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"error message does not contain expected substring: want: %q  got %q\", want, got)\n\t\t}\n\t\tif _, got := server.Repeat(context.Background(), request); got == nil {\n\t\t\tt.Errorf(\"expected Repeat() to error with unverified request, but it didn't\")\n\t\t}\n\t}\n\n\t// clean up\n\tComplianceSuiteStatus = ComplianceSuiteUninitialized\n\tif err := indexTestingRequests(complianceSuiteBytes); err != nil {\n\t\tt.Errorf(\"initializing ComplianceSuite with real suite data should not have errored, but got: %s\", err)\n\t}\n\n\tif err := indexTestingRequests(complianceSuiteBytes); err != nil {\n\t\tt.Errorf(\"initializing ComplianceSuite a second time should not have errored, but got: %s\", err)\n\t}\n}\n"
  },
  {
    "path": "server/services/compliance_suite.json",
    "content": "{\n  \"group\": [\n    {\n      \"name\": \"Fully working conversions, no resources\",\n      \"rpcs\": [\"Compliance.RepeatDataBody\", \"Compliance.RepeatDataBodyPut\", \"Compliance.RepeatDataBodyPatch\", \"Compliance.RepeatDataQuery\", \"Compliance.RepeatDataSimplePath\", \"Compliance.RepeatDataBodyInfo\"],\n      \"requests\": [\n        {\n          \"name\": \"Basic data types\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello\",\n\t    \"fInt32\": -1,\n\t    \"fSint32\" : -2,\n\t    \"fSfixed32\": -3,\n\t    \"fUint32\": 5,\n\t    \"fFixed32\": 7,\n\t    \"fInt64\": -11,\n\t    \"fSint64\": -13,\n\t    \"fSfixed64\": -17,\n\t    \"fUint64\": 19,\n\t    \"fFixed64\":23,\n\t    \"fDouble\": -29e4,\n\t    \"fFloat\": -31,\n\t    \"fBool\": true,\n\t    \"fKingdom\": \"ANIMALIA\", \n\n\t    \"pString\": \"Goodbye\",\n\t    \"pInt32\": -37,\n\t    \"pDouble\": -41.43,\n\t    \"pBool\": true,\n\t    \"pKingdom\": \"PLANTAE\",\n\n            \"fChild\": {\n              \"fString\": \"second/bool/salutation\"\n            }\n          },\n\t  \"fInt32\": -10,\n\t  \"fInt64\": -110,\n\t  \"fDouble\": -54e4,\n          \n\t  \"pInt32\": -47,\n          \"pInt64\": -477,\n\t  \"pDouble\": -61.73\n        },\n        {\n          \"name\": \"Basic types, no optional fields\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello\",\n\t    \"fInt32\": -1,\n\t    \"fSint32\" : -2,\n\t    \"fSfixed32\": -3,\n\t    \"fUint32\": 5,\n\t    \"fFixed32\": 7,\n\t    \"fInt64\": -11,\n\t    \"fSint64\": -13,\n\t    \"fSfixed64\": -17,\n\t    \"fUint64\": 19,\n\t    \"fFixed64\":23,\n\t    \"fDouble\": -29e4,\n\t    \"fFloat\": -31,\n\t    \"fBool\": true,\n\t    \"fKingdom\": \"ANIMALIA\", \n\n            \"fChild\": {\n              \"fString\": \"second/bool/salutation\"\n            }\n          }\n        },\n        \n        {\n          \"name\": \"Zero values for non-string fields\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello\",\n\t    \"fInt32\": 0,\n\t    \"fSint32\" : 0,\n\t    \"fSfixed32\": 0,\n\t    \"fUint32\": 0,\n\t    \"fFixed32\": 0,\n\t    \"fInt64\": 0,\n\t    \"fSint64\": 0,\n\t    \"fSfixed64\": 0,\n\t    \"fUint64\": 0,\n\t    \"fFixed64\": 0,\n\t    \"fDouble\": 0,\n\t    \"fFloat\": 0,\n\t    \"fBool\": false,\n\t    \"fKingdom\": \"LIFE_KINGDOM_UNSPECIFIED\",\n\n\t    \"pString\": \"Goodbye\",\n\t    \"pInt32\": 0,\n\t    \"pDouble\": 0,\n\t    \"pBool\": false,\n\t    \"pKingdom\": \"LIFE_KINGDOM_UNSPECIFIED\"\n\t  }\n\t},\n\t{\n\t  \"name\": \"Extreme values\",\n          \"serverVerify\": true,\n\t  \"info\": {\n            \"fString\": \"non-ASCII+non-printable string ☺ → ← \\\"\\\\\\/\\b\\f\\r\\t\\u1234 works, not newlines yet\",\n            \"fInt32\": 2147483647,\n            \"fSint32\" : 2147483647,\n            \"fSfixed32\": 2147483647,\n            \"fUint32\": 4294967295,\n            \"fFixed32\": 4294967295,\n            \"fInt64\": \"9223372036854775807\",\n            \"fSint64\": \"9223372036854775807\",\n            \"fSfixed64\": \"9223372036854775807\",\n            \"fUint64\": \"18446744073709551615\",\n            \"fFixed64\": \"18446744073709551615\",\n            \"fDouble\": 1.797693134862315708145274237317043567981e+308,\n            \"fFloat\": 3.40282346638528859811704183484516925440e+38,\n            \"fBool\": false,\n\n            \"pString\": \"Goodbye\",\n            \"pInt32\": 2147483647,\n            \"pDouble\": 1.797693134862315708145274237317043567981e+308,\n            \"pBool\": false\n          }\n        },\n        {\n          \"name\": \"Strings with spaces\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello there\"\n          }\n        },\n        {\n          \"name\": \"Strings with quotes\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello \\\"You\\\"\"\n          }\n        },\n        {\n          \"name\": \"Strings with percents\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"Hello 100%\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"Fully working conversions, resources\",\n      \"rpcs\": [\"Compliance.RepeatDataBody\", \"Compliance.RepeatDataBodyPut\", \"Compliance.RepeatDataBodyPatch\", \"Compliance.RepeatDataQuery\"],\n      \"requests\": [\n        {\n          \"name\": \"Strings with slashes and values that resemble subsequent resource templates\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"first/hello/second/greetings\",\n            \"pBool\": true,\n\n            \"fChild\": {\n              \"fString\": \"second/zzz/bool/true\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"Binding selection testing\",\n      \"rpcs\": [\"Compliance.RepeatDataPathResource\"],\n      \"requests\": [\n        {\n          \"name\": \"Binding testing baseline no Uri verification\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"first/hello\",\n            \"pBool\": true,\n\n            \"fChild\": {\n              \"fString\": \"second/greetings\"\n            }\n          }\n        },\n        {\n          \"name\": \"Binding testing first binding\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"first/hello\",\n            \"pBool\": true,\n\n            \"fChild\": {\n              \"fString\": \"second/greetings\"\n            }\n          },\n          \"intendedBindingUri\": \"/v1beta1/repeat/{info.f_string=first/*}/{info.f_child.f_string=second/*}/bool/{info.f_bool}:pathresource\"\n        },\n        {\n          \"name\": \"Binding testing additional binding\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"second/greetings\",\n            \"pBool\": true,\n\n            \"fChild\": {\n              \"fString\": \"first/hello\"\n            }\n          },\n          \"intendedBindingUri\": \"/v1beta1/repeat/{info.f_child.f_string=first/*}/{info.f_string=second/*}/bool/{info.f_bool}:childfirstpathresource\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Cases that apply to non-path requests\",\n      \"rpcs\": [\"Compliance.RepeatDataBody\", \"Compliance.RepeatDataBodyPut\", \"Compliance.RepeatDataBodyPatch\", \"Compliance.RepeatDataQuery\"],\n      \"requests\": [\n        {\n          \"name\": \"Zero values for all fields\",\n          \"serverVerify\": true,\n          \"info\": {\n            \"fString\": \"\",\n            \"fInt32\": 0,\n            \"fSint32\" : 0,\n            \"fSfixed32\": 0,\n            \"fUint32\": 0,\n            \"fFixed32\": 0,\n            \"fInt64\": 0,\n            \"fSint64\": 0,\n            \"fSfixed64\": 0,\n            \"fUint64\": 0,\n            \"fFixed64\":20,\n            \"fDouble\": 0,\n            \"fFloat\": 0,\n            \"fBool\": false,\n\n            \"pString\": \"\",\n            \"pInt32\": 0,\n            \"pDouble\": 0,\n            \"pBool\": false\n          }\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "server/services/echo_service.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\terrdetails \"google.golang.org/genproto/googleapis/rpc/errdetails\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n\t\"google.golang.org/protobuf/types/known/durationpb\"\n)\n\n// NewEchoServer returns a new EchoServer for the Showcase API.\nfunc NewEchoServer() pb.EchoServer {\n\treturn &echoServerImpl{waiter: server.GetWaiterInstance()}\n}\n\ntype echoServerImpl struct {\n\twaiter server.Waiter\n}\n\nfunc (s *echoServerImpl) Echo(ctx context.Context, in *pb.EchoRequest) (*pb.EchoResponse, error) {\n\terr := status.ErrorProto(in.GetError())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\treturn &pb.EchoResponse{Content: in.GetContent(), Severity: in.GetSeverity(), RequestId: in.GetRequestId(), OtherRequestId: in.GetOtherRequestId()}, nil\n}\n\nfunc (s *echoServerImpl) EchoErrorDetails(ctx context.Context, in *pb.EchoErrorDetailsRequest) (*pb.EchoErrorDetailsResponse, error) {\n\tvar singleDetailError *pb.EchoErrorDetailsResponse_SingleDetail\n\tsingleDetailText := in.GetSingleDetailText()\n\tif len(singleDetailText) > 0 {\n\t\tsingleErrorInfo := &errdetails.ErrorInfo{Reason: singleDetailText}\n\t\tsingleMarshalledError, err := anypb.New(singleErrorInfo)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failure with single error detail in EchoErrorDetails: %w\", err)\n\t\t}\n\t\tsingleDetailError = &pb.EchoErrorDetailsResponse_SingleDetail{\n\t\t\tError: &pb.ErrorWithSingleDetail{Details: singleMarshalledError},\n\t\t}\n\t}\n\n\tvar multipleDetailsError *pb.EchoErrorDetailsResponse_MultipleDetails\n\tmultipleDetailText := in.GetMultiDetailText()\n\tif len(multipleDetailText) > 0 {\n\t\tdetails := []*anypb.Any{}\n\t\tfor idx, text := range multipleDetailText {\n\t\t\terrorInfo := &errdetails.ErrorInfo{\n\t\t\t\tReason: text,\n\t\t\t}\n\t\t\tmarshalledError, err := anypb.New(errorInfo)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failure in EchoErrorDetails[%d]: %w\", idx, err)\n\t\t\t}\n\n\t\t\tdetails = append(details, marshalledError)\n\t\t}\n\n\t\tmultipleDetailsError = &pb.EchoErrorDetailsResponse_MultipleDetails{\n\t\t\tError: &pb.ErrorWithMultipleDetails{Details: details},\n\t\t}\n\t}\n\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\tresponse := &pb.EchoErrorDetailsResponse{\n\t\tSingleDetail:    singleDetailError,\n\t\tMultipleDetails: multipleDetailsError,\n\t}\n\treturn response, nil\n}\n\n// DetailedError satisfies the interface defined in https://pkg.go.dev/google.golang.org/grpc/status#FromError to convert an error to a status.Status.\ntype DetailedError struct {\n\tgrpcStatus *status.Status\n}\n\nfunc (de DetailedError) Error() string {\n\treturn fmt.Sprintf(\"DetailedError.Error(): %d: %s [(%d details)]\", de.grpcStatus.Code(), de.grpcStatus.Message(), len(de.grpcStatus.Details()))\n}\n\n// GRPCStatus returns the gRPC status associated with the given\n// DetailedError as a way of satisfying the interface defined in\n// https://pkg.go.dev/google.golang.org/grpc/status#FromError\nfunc (de *DetailedError) GRPCStatus() *status.Status {\n\treturn de.grpcStatus\n}\n\nfunc (s *echoServerImpl) FailEchoWithDetails(ctx context.Context, in *pb.FailEchoWithDetailsRequest) (*pb.FailEchoWithDetailsResponse, error) {\n\n\tdetailInfo := &errdetails.ErrorInfo{\n\t\tReason: \"some ErrorInfo reason\",\n\t}\n\n\tdetailLocalized := &errdetails.LocalizedMessage{\n\t\tLocale:  \"fr-CH\",\n\t\tMessage: \"This LocalizedMessage should be treated specially\",\n\t}\n\n\tpoem := in.GetMessage()\n\tif poem == \"\" {\n\t\tpoem = \"roses are red\"\n\t}\n\tdetailPoetry := &pb.PoetryError{\n\t\tPoem: poem,\n\t}\n\n\tduration, _ := time.ParseDuration(\"11s\")\n\tdetailRetry := &errdetails.RetryInfo{\n\t\tRetryDelay: durationpb.New(duration),\n\t}\n\n\tdetailDebug := &errdetails.DebugInfo{\n\t\tDetail: \"a DebugInfo detail\",\n\t}\n\n\tdetailQuotaFailure := &errdetails.QuotaFailure{\n\t\tViolations: []*errdetails.QuotaFailure_Violation{\n\t\t\t{Description: \"First QuotaFailure description\"},\n\t\t\t{Description: \"Second QuotaFailure description\"},\n\t\t},\n\t}\n\n\tdetailPreconditionFailure := &errdetails.PreconditionFailure{\n\t\tViolations: []*errdetails.PreconditionFailure_Violation{\n\t\t\t{Description: \"First PreconditionFailure description\"},\n\t\t\t{Description: \"Second PreconditionFailure description\"},\n\t\t},\n\t}\n\n\tdetailBadRequest := &errdetails.BadRequest{\n\t\tFieldViolations: []*errdetails.BadRequest_FieldViolation{\n\t\t\t{Description: \"First BadRequest description\"},\n\t\t\t{Description: \"Second BadRequest description\"},\n\t\t},\n\t}\n\n\tdetailRequestInfo := &errdetails.RequestInfo{\n\t\tRequestId:   \"RequestInfo: showcase-request-id\",\n\t\tServingData: \"RequestInfo: showcase serving data\",\n\t}\n\n\tdetailResourceInfo := &errdetails.ResourceInfo{\n\t\tResourceType: \"ResourceInfo: showcase resource\",\n\t}\n\n\tdetailHelp := &errdetails.Help{\n\t\tLinks: []*errdetails.Help_Link{\n\t\t\t{Description: \"Help: first showcase help link\"},\n\t\t\t{Description: \"Help: second showcase help link\"},\n\t\t},\n\t}\n\n\ttheStatus, err := status.New(codes.Aborted, \"This is an error generated by the server\").WithDetails(\n\t\tdetailInfo,\n\t\tdetailLocalized,\n\t\tdetailPoetry,\n\t\tdetailRetry,\n\t\tdetailDebug,\n\t\tdetailQuotaFailure,\n\t\tdetailPreconditionFailure,\n\t\tdetailBadRequest,\n\t\tdetailRequestInfo,\n\t\tdetailResourceInfo,\n\t\tdetailHelp)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failure in FailEchoWithDetails: %w\", err)\n\t}\n\n\tdetailedError := &DetailedError{\n\t\tgrpcStatus: theStatus,\n\t}\n\n\treturn nil, detailedError\n}\n\nfunc (s *echoServerImpl) Expand(in *pb.ExpandRequest, stream pb.Echo_ExpandServer) error {\n\tfor _, word := range strings.Fields(in.GetContent()) {\n\t\terr := stream.Send(&pb.EchoResponse{Content: word})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttime.Sleep(in.GetStreamWaitTime().AsDuration())\n\t}\n\techoStreamingHeaders(stream)\n\tif in.GetError() != nil {\n\t\treturn status.ErrorProto(in.GetError())\n\t}\n\techoStreamingTrailers(stream)\n\treturn nil\n}\n\nfunc (s *echoServerImpl) Collect(stream pb.Echo_CollectServer) error {\n\tvar resp []string\n\n\tfor {\n\t\treq, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\techoStreamingHeaders(stream)\n\t\t\techoStreamingTrailers(stream)\n\t\t\treturn stream.SendAndClose(&pb.EchoResponse{Content: strings.Join(resp, \" \")})\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts := status.ErrorProto(req.GetError())\n\t\tif s != nil {\n\t\t\treturn s\n\t\t}\n\t\tif req.GetContent() != \"\" {\n\t\t\tresp = append(resp, req.GetContent())\n\t\t}\n\t}\n}\n\nfunc (s *echoServerImpl) Chat(stream pb.Echo_ChatServer) error {\n\tfor {\n\t\treq, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\t// Echo headers and trailers when the stream ends\n\t\t\techoStreamingHeaders(stream)\n\t\t\techoStreamingTrailers(stream)\n\t\t\treturn nil\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\ts := status.ErrorProto(req.GetError())\n\t\tif s != nil {\n\t\t\treturn s\n\t\t}\n\t\tstream.Send(&pb.EchoResponse{Content: req.GetContent()})\n\t}\n}\n\nfunc (s *echoServerImpl) PagedExpandLegacy(ctx context.Context, in *pb.PagedExpandLegacyRequest) (*pb.PagedExpandResponse, error) {\n\treq := &pb.PagedExpandRequest{\n\t\tContent:   in.Content,\n\t\tPageSize:  in.MaxResults,\n\t\tPageToken: in.PageToken,\n\t}\n\treturn s.PagedExpand(ctx, req)\n}\n\nfunc (s *echoServerImpl) PagedExpand(ctx context.Context, in *pb.PagedExpandRequest) (*pb.PagedExpandResponse, error) {\n\twords := strings.Fields(in.GetContent())\n\n\tstart, end, nextToken, err := processPageTokens(len(words), in.GetPageSize(), in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresponses := []*pb.EchoResponse{}\n\tfor _, word := range words[start:end] {\n\t\tresponses = append(responses, &pb.EchoResponse{Content: word})\n\t}\n\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\treturn &pb.PagedExpandResponse{\n\t\tResponses:     responses,\n\t\tNextPageToken: nextToken,\n\t}, nil\n}\n\nfunc (s *echoServerImpl) PagedExpandLegacyMapped(ctx context.Context, in *pb.PagedExpandRequest) (*pb.PagedExpandLegacyMappedResponse, error) {\n\twords := strings.Fields(in.GetContent())\n\tstart, end, nextToken, err := processPageTokens(len(words), in.GetPageSize(), in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Construct a map with the following properties:\n\t//\n\t// 1. The map has a one-rune string key corresponding to the first rune of EVERY word in words.\n\t// 2. The value corresponding to a given rune key is a list of only those words between\n\t// `start` and `end` whose first rune is that key.\n\t// 3. Consequently, initial runes that only appear outside the [start,end) range will have\n\t// empty list entries, even if they are non-empty in subsequent pages.\n\talphabetized := make(map[string]*pb.PagedExpandResponseList, 255) //assume most input is ASCII\n\tfor idx, word := range words {\n\t\tinitialRune, _ := utf8.DecodeRuneInString(word)\n\t\tkey := string(initialRune) // enforces #1\n\t\tprev, ok := alphabetized[key]\n\t\tif !ok {\n\t\t\tprev = &pb.PagedExpandResponseList{} // enforces #3\n\t\t\talphabetized[key] = prev\n\t\t}\n\t\tif int32(idx) >= start && int32(idx) < end { // enforces #2\n\t\t\tprev.Words = append(prev.Words, word)\n\t\t}\n\t}\n\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\treturn &pb.PagedExpandLegacyMappedResponse{\n\t\tAlphabetized:  alphabetized,\n\t\tNextPageToken: nextToken,\n\t}, nil\n}\n\nfunc processPageTokens(numElements int, pageSize int32, pageToken string) (start, end int32, nextToken string, err error) {\n\tif pageSize < 0 {\n\t\treturn 0, 0, \"\", status.Error(codes.InvalidArgument, \"the page size provided must not be negative.\")\n\t}\n\n\tif pageToken != \"\" {\n\t\ttoken, err := strconv.Atoi(pageToken)\n\t\ttoken32 := int32(token)\n\t\tif err != nil || token32 < 0 || token32 >= int32(numElements) {\n\t\t\treturn 0, 0, \"\", status.Errorf(\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\t\"invalid page token: %s. Token must be within the range [0, %d)\",\n\t\t\t\tpageToken,\n\t\t\t\tnumElements)\n\t\t}\n\t\tstart = token32\n\t}\n\n\tif pageSize == 0 {\n\t\tpageSize = int32(numElements)\n\t}\n\tend = min(start+pageSize, int32(numElements))\n\n\tif end < int32(numElements) {\n\t\tnextToken = strconv.Itoa(int(end))\n\t}\n\n\treturn start, end, nextToken, nil\n}\n\nfunc min(x int32, y int32) int32 {\n\tif x < y {\n\t\treturn x\n\t}\n\treturn y\n}\n\nfunc (s *echoServerImpl) Wait(ctx context.Context, in *pb.WaitRequest) (*lropb.Operation, error) {\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\treturn s.waiter.Wait(in), nil\n}\n\nfunc (s *echoServerImpl) Block(ctx context.Context, in *pb.BlockRequest) (*pb.BlockResponse, error) {\n\td, _ := ptypes.Duration(in.GetResponseDelay())\n\ttime.Sleep(d)\n\tif in.GetError() != nil {\n\t\treturn nil, status.ErrorProto(in.GetError())\n\t}\n\techoHeaders(ctx)\n\techoTrailers(ctx)\n\treturn in.GetSuccess(), nil\n}\n\n// echo any provided headers in the metadata\nfunc echoHeaders(ctx context.Context) {\n\tmd, ok := metadata.FromIncomingContext(ctx)\n\tif !ok {\n\t\treturn\n\t}\n\tfmt.Printf(\"Received headers: %v\\n\", md)\n\n\theadersToEcho := []string{\"x-goog-request-params\", \"traceparent\", \"tracestate\"}\n\tfor _, headerName := range headersToEcho {\n\t\tvalues := md.Get(headerName)\n\t\tfor _, value := range values {\n\t\t\theader := metadata.Pairs(headerName, value)\n\t\t\tgrpc.SetHeader(ctx, header)\n\t\t}\n\t}\n}\n\nfunc echoStreamingHeaders(stream grpc.ServerStream) {\n\tmd, ok := metadata.FromIncomingContext(stream.Context())\n\tif !ok {\n\t\treturn\n\t}\n\n\theadersToEcho := []string{\"x-goog-request-params\", \"traceparent\", \"tracestate\"}\n\tfor _, headerName := range headersToEcho {\n\t\tvalues := md.Get(headerName)\n\t\tfor _, value := range values {\n\t\t\theader := metadata.Pairs(headerName, value)\n\t\t\tif stream.SetHeader(header) != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// echo any provided trailing metadata\nfunc echoTrailers(ctx context.Context) {\n\tmd, ok := metadata.FromIncomingContext(ctx)\n\tif !ok {\n\t\treturn\n\t}\n\n\tfor k, v := range md {\n\t\tfor _, value := range v {\n\t\t\ttrailer := metadata.Pairs(k, value)\n\t\t\tgrpc.SetTrailer(ctx, trailer)\n\t\t}\n\t}\n}\n\nfunc echoStreamingTrailers(stream grpc.ServerStream) {\n\tmd, ok := metadata.FromIncomingContext(stream.Context())\n\tif !ok {\n\t\treturn\n\t}\n\n\tfor k, v := range md {\n\t\tfor _, value := range v {\n\t\t\ttrailer := metadata.Pairs(k, value)\n\t\t\tstream.SetTrailer(trailer)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "server/services/echo_service_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n\tdurpb \"github.com/golang/protobuf/ptypes/duration\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/genproto/googleapis/rpc/errdetails\"\n\tspb \"google.golang.org/genproto/googleapis/rpc/status\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n)\n\nfunc TestEcho_success(t *testing.T) {\n\ttable := []string{\"hello world\", \"\"}\n\n\tserver := NewEchoServer()\n\tfor _, val := range table {\n\t\tin := &pb.EchoRequest{\n\t\t\tResponse: &pb.EchoRequest_Content{Content: val},\n\t\t\tSeverity: pb.Severity_CRITICAL,\n\t\t}\n\t\tmockStream := &mockUnaryStream{t: t}\n\t\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t\tout, err := server.Echo(ctx, in)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t}\n\t\tif out.GetContent() != in.GetContent() {\n\t\t\tt.Errorf(\"Echo(%s) returned %s\", in.GetContent(), out.GetContent())\n\t\t}\n\t\tif out.Severity != in.Severity {\n\t\t\tt.Errorf(\"Echo severity(%d) returned %d\", in.Severity, out.Severity)\n\t\t}\n\t\tmockStream.verify(err != nil)\n\t}\n\tin := &pb.EchoRequest{\n\t\tResponse: &pb.EchoRequest_Error{\n\t\t\tError: &spb.Status{Code: int32(codes.OK)}}}\n\n\tmockStream := &mockUnaryStream{t: t}\n\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t_, err := server.Echo(ctx, in)\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n\tmockStream.verify(err != nil)\n}\n\nfunc TestEcho_error(t *testing.T) {\n\ttable := []codes.Code{codes.Canceled, codes.InvalidArgument}\n\n\tserver := NewEchoServer()\n\tfor _, val := range table {\n\t\tin := &pb.EchoRequest{\n\t\t\tResponse: &pb.EchoRequest_Error{\n\t\t\t\tError: &spb.Status{Code: int32(val)}}}\n\t\tout, err := server.Echo(context.Background(), in)\n\t\tif out != nil {\n\t\t\tt.Errorf(\"Echo called with code %d returned a non-nil response proto.\", val)\n\t\t}\n\t\tif err == nil {\n\t\t\tt.Errorf(\"Echo called with code %d did not return an error.\", val)\n\t\t}\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != val {\n\t\t\tt.Errorf(\"Echo called with code %d returned an error with code %d\", val, status.Code())\n\t\t}\n\t}\n}\n\ntype mockSTS struct {\n\tstream grpc.ServerStream\n\tt      *testing.T\n}\n\nfunc (m *mockSTS) Method() string                  { return \"\" }\nfunc (m *mockSTS) SetHeader(md metadata.MD) error  { m.stream.SetHeader(md); return nil }\nfunc (m *mockSTS) SendHeader(md metadata.MD) error { return m.stream.SendHeader(md) }\nfunc (m *mockSTS) SetTrailer(md metadata.MD) error { m.stream.SetTrailer(md); return nil }\n\ntype mockUnaryStream struct {\n\thead  []string\n\ttrail []string\n\tt     *testing.T\n\tgrpc.ServerStream\n}\n\nfunc (m *mockUnaryStream) Method() string                   { return \"\" }\nfunc (m *mockUnaryStream) Send(resp *pb.EchoResponse) error { return nil }\nfunc (m *mockUnaryStream) Context() context.Context         { return nil }\nfunc (m *mockUnaryStream) SetTrailer(md metadata.MD) {\n\tm.trail = append(m.trail, md.Get(\"showcase-trailer\")...)\n\tm.trail = append(m.trail, md.Get(\"x-goog-api-version\")...)\n\t// Sort the trailer values as having a guaranteed order will help with array comparison\n\tsort.Strings(m.trail)\n}\nfunc (m *mockUnaryStream) SetHeader(md metadata.MD) error {\n\tm.head = append(m.head, md.Get(\"x-goog-request-params\")...)\n\tm.head = append(m.head, md.Get(\"traceparent\")...)\n\tm.head = append(m.head, md.Get(\"tracestate\")...)\n\treturn nil\n}\nfunc (m *mockUnaryStream) verify(expectHeadersAndTrailers bool) {\n\tif expectHeadersAndTrailers && (!reflect.DeepEqual([]string{\"apiVersion\", \"case\", \"show\"}, m.trail) || !reflect.DeepEqual([]string{\"showcaseHeader\", \"anotherHeader\", \"00-traceid-spanid-01\", \"some-state\"}, m.head)) {\n\t\tm.t.Errorf(\"Unary stream did not get all expected headers and trailers.\\nGot these headers: %+v\\nGot these trailers: %+v\", m.head, m.trail)\n\t}\n}\n\ntype mockExpandStream struct {\n\texp   []string\n\thead  []string\n\ttrail []string\n\tt     *testing.T\n\tpb.Echo_ExpandServer\n}\n\nfunc (m *mockExpandStream) Send(resp *pb.EchoResponse) error {\n\tif resp.GetContent() != m.exp[0] {\n\t\tm.t.Errorf(\"Expand expected to send %s but sent %s\", m.exp[0], resp.GetContent())\n\t}\n\tm.exp = m.exp[1:]\n\treturn nil\n}\n\nfunc (m *mockExpandStream) Context() context.Context {\n\treturn appendTestOutgoingMetadata(context.Background(), &mockSTS{stream: m, t: m.t})\n}\n\nfunc (m *mockExpandStream) SetTrailer(md metadata.MD) {\n\tm.trail = append(m.trail, md.Get(\"showcase-trailer\")...)\n}\n\nfunc (m *mockExpandStream) SetHeader(md metadata.MD) error {\n\tm.head = append(m.head, md.Get(\"x-goog-request-params\")...)\n\tm.head = append(m.head, md.Get(\"traceparent\")...)\n\tm.head = append(m.head, md.Get(\"tracestate\")...)\n\tm.head = append(m.head, md.Get(\"x-goog-api-version\")...)\n\treturn nil\n}\n\nfunc (m *mockExpandStream) verify(expectHeadersAndTrailers bool) {\n\tif len(m.exp) > 0 {\n\t\tm.t.Errorf(\"Expand did not stream all expected values. %d expected values remaining.\", len(m.exp))\n\t}\n\tif expectHeadersAndTrailers && (!reflect.DeepEqual([]string{\"show\", \"case\"}, m.trail) || !reflect.DeepEqual([]string{\"showcaseHeader\", \"anotherHeader\", \"00-traceid-spanid-01\", \"some-state\"}, m.head)) {\n\t\tm.t.Errorf(\"Expand did not get all expected headers and trailers.\\nGot these headers: %+v\\nGot these trailers: %+v\", m.head, m.trail)\n\t}\n}\n\nfunc TestExpand(t *testing.T) {\n\tcontentTable := []string{\"Hello World\", \"Hola\", \"\"}\n\terrTable := []*spb.Status{\n\t\t{Code: int32(codes.OK)},\n\t\t{Code: int32(codes.InvalidArgument)},\n\t\tnil,\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, c := range contentTable {\n\t\tfor _, e := range errTable {\n\t\t\tstream := &mockExpandStream{exp: strings.Fields(c), t: t}\n\t\t\terr := server.Expand(&pb.ExpandRequest{Content: c, Error: e}, stream)\n\t\t\tstatus, _ := status.FromError(err)\n\t\t\tif int32(status.Code()) != e.GetCode() {\n\t\t\t\tt.Errorf(\"Expand expected stream to return status with code %d but code %d\", status.Code(), e.GetCode())\n\t\t\t}\n\t\t\tstream.verify(e == nil)\n\t\t}\n\t}\n}\n\nfunc TestExpandWithWaitTime(t *testing.T) {\n\tserver := NewEchoServer()\n\t//This stream should take at least 300ms to complete because there are 7 messages, and we wait 50ms between sending each message.\n\tcontent := \"This stream should take 300ms to complete\"\n\tstream := &mockExpandStream{exp: strings.Fields(content), t: t}\n\tstreamWaitTime := durationpb.New(time.Duration(50) * time.Millisecond)\n\tstart := time.Now()\n\n\terr := server.Expand(&pb.ExpandRequest{Content: content, StreamWaitTime: streamWaitTime}, stream)\n\n\tactualTimeSpent := int(time.Since(start).Milliseconds())\n\texpectedTimeSpent := 300\n\tif actualTimeSpent < expectedTimeSpent {\n\t\tt.Errorf(\"Expand stream should take at least %d ms to complete, but it only took %d ms\", expectedTimeSpent, actualTimeSpent)\n\t}\n\tstream.verify(err == nil)\n}\n\ntype errorExpandStream struct {\n\terr error\n\tpb.Echo_ExpandServer\n}\n\nfunc (s *errorExpandStream) Send(resp *pb.EchoResponse) error {\n\treturn s.err\n}\n\nfunc TestExpand_streamErr(t *testing.T) {\n\te := errors.New(\"Test Error\")\n\tstream := &errorExpandStream{err: e}\n\tserver := NewEchoServer()\n\terr := server.Expand(&pb.ExpandRequest{Content: \"Hello World\"}, stream)\n\tif e != err {\n\t\tt.Error(\"Expand expected to pass through stream errors.\")\n\t}\n}\n\ntype mockCollectStream struct {\n\treqs  []*pb.EchoRequest\n\thead  []string\n\ttrail []string\n\texp   *string\n\tt     *testing.T\n\tpb.Echo_CollectServer\n}\n\nfunc (m *mockCollectStream) SendAndClose(r *pb.EchoResponse) error {\n\tif m.exp == nil {\n\t\tm.t.Errorf(\"Collect Stream SendAndClose called unexpectedly\")\n\t}\n\tif r.GetContent() != *m.exp {\n\t\tm.t.Errorf(\"Collect expected to return '%s', but returned '%s'\", *m.exp, r.GetContent())\n\t}\n\treturn nil\n}\n\nfunc (m *mockCollectStream) Recv() (*pb.EchoRequest, error) {\n\tif len(m.reqs) > 0 {\n\t\tret := m.reqs[0]\n\t\tm.reqs = m.reqs[1:]\n\t\treturn ret, nil\n\t}\n\treturn nil, io.EOF\n}\n\nfunc (m *mockCollectStream) Context() context.Context {\n\treturn appendTestOutgoingMetadata(context.Background(), &mockSTS{stream: m, t: m.t})\n}\n\nfunc (m *mockCollectStream) SetHeader(md metadata.MD) error {\n\tm.head = append(m.head, md.Get(\"x-goog-request-params\")...)\n\tm.head = append(m.head, md.Get(\"traceparent\")...)\n\tm.head = append(m.head, md.Get(\"tracestate\")...)\n\treturn nil\n}\n\nfunc (m *mockCollectStream) SetTrailer(md metadata.MD) {\n\tm.trail = append(m.trail, md.Get(\"showcase-trailer\")...)\n}\n\nfunc (m *mockCollectStream) verify(expectHeadersAndTrailers bool) {\n\tif expectHeadersAndTrailers && (!reflect.DeepEqual([]string{\"show\", \"case\"}, m.trail) || !reflect.DeepEqual([]string{\"showcaseHeader\", \"anotherHeader\", \"00-traceid-spanid-01\", \"some-state\"}, m.head)) {\n\t\tm.t.Errorf(\"Collect did not get all expected trailers.\\nGot these headers: %+v\\nGot these trailers: %+v\", m.head, m.trail)\n\t}\n}\n\nfunc TestCollect(t *testing.T) {\n\tstrPtr := func(s string) *string { return &s }\n\ttests := []struct {\n\t\treqs []string\n\t\texp  *string\n\t\terr  *spb.Status\n\t}{\n\t\t{[]string{\"Hello\", \"\", \"World\"}, strPtr(\"Hello World\"), nil},\n\t\t{[]string{\"Hello\", \"World\"}, strPtr(\"Hello World\"), &spb.Status{Code: int32(codes.OK)}},\n\t\t{[]string{\"Hello\", \"World\"}, nil, &spb.Status{Code: int32(codes.InvalidArgument)}},\n\t\t{[]string{}, nil, &spb.Status{Code: int32(codes.InvalidArgument)}},\n\t\t{[]string{}, strPtr(\"\"), nil},\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, test := range tests {\n\t\treqs := []*pb.EchoRequest{}\n\t\tfor _, req := range test.reqs {\n\t\t\treqs = append(reqs, &pb.EchoRequest{Response: &pb.EchoRequest_Content{Content: req}})\n\t\t}\n\t\tif test.err != nil {\n\t\t\treqs = append(reqs, &pb.EchoRequest{Response: &pb.EchoRequest_Error{Error: test.err}})\n\t\t}\n\t\tmockStream := &mockCollectStream{reqs: reqs, exp: test.exp, t: t}\n\t\terr := server.Collect(mockStream)\n\t\texpCode := status.FromProto(test.err).Code()\n\t\ts, _ := status.FromError(err)\n\t\tif expCode != s.Code() {\n\t\t\tt.Errorf(\"Collect expected to return with code %d, but returned %d\", expCode, s.Code())\n\t\t}\n\t\tmockStream.verify(test.err == nil)\n\t}\n}\n\ntype errorCollectStream struct {\n\terr error\n\tpb.Echo_CollectServer\n}\n\nfunc (s *errorCollectStream) Recv() (*pb.EchoRequest, error) {\n\treturn nil, s.err\n}\n\nfunc TestCollect_streamErr(t *testing.T) {\n\te := errors.New(\"Test Error\")\n\tstream := &errorCollectStream{err: e}\n\tserver := NewEchoServer()\n\terr := server.Collect(stream)\n\tif e != err {\n\t\tt.Error(\"Collect expected to pass through stream errors.\")\n\t}\n}\n\ntype mockChatStream struct {\n\treqs  []*pb.EchoRequest\n\thead  []string\n\ttrail []string\n\tcurr  *pb.EchoRequest\n\tt     *testing.T\n\tpb.Echo_ChatServer\n}\n\nfunc (m *mockChatStream) Recv() (*pb.EchoRequest, error) {\n\tif len(m.reqs) > 0 {\n\t\tm.curr = m.reqs[0]\n\t\tm.reqs = m.reqs[1:]\n\t\treturn m.curr, nil\n\t}\n\treturn nil, io.EOF\n}\n\nfunc (m *mockChatStream) Send(r *pb.EchoResponse) error {\n\tif m.curr == nil {\n\t\tm.t.Errorf(\"Chat unexpectedly tried to send content.\")\n\t}\n\tif r.GetContent() != m.curr.GetContent() {\n\t\tm.t.Errorf(\"Chat expected to send content %s, but sent %s\", m.curr.GetContent(), r.GetContent())\n\t\tm.curr = nil\n\t}\n\treturn nil\n}\n\nfunc (m *mockChatStream) Context() context.Context {\n\treturn appendTestOutgoingMetadata(context.Background(), &mockSTS{stream: m, t: m.t})\n}\n\nfunc (m *mockChatStream) SetHeader(md metadata.MD) error {\n\tm.head = append(m.head, md.Get(\"x-goog-request-params\")...)\n\tm.head = append(m.head, md.Get(\"traceparent\")...)\n\tm.head = append(m.head, md.Get(\"tracestate\")...)\n\treturn nil\n}\n\nfunc (m *mockChatStream) SetTrailer(md metadata.MD) {\n\tm.trail = append(m.trail, md.Get(\"showcase-trailer\")...)\n}\n\nfunc (m *mockChatStream) verify(expectHeadersAndTrailers bool) {\n\tif expectHeadersAndTrailers && (!reflect.DeepEqual([]string{\"show\", \"case\"}, m.trail) || !reflect.DeepEqual([]string{\"showcaseHeader\", \"anotherHeader\", \"00-traceid-spanid-01\", \"some-state\"}, m.head)) {\n\t\tm.t.Errorf(\"Chat did not get all expected trailers.\\nGot these headers: %+v\\nGot these trailers: %+v\", m.head, m.trail)\n\t}\n}\n\nfunc TestChat(t *testing.T) {\n\ttests := []struct {\n\t\treqs []string\n\t\terr  *spb.Status\n\t}{\n\t\t{[]string{\"Hello\", \"World\"}, nil},\n\t\t{[]string{\"Hello\", \"World\"}, &spb.Status{Code: int32(codes.InvalidArgument)}},\n\t\t{[]string{}, &spb.Status{Code: int32(codes.InvalidArgument)}},\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, test := range tests {\n\t\treqs := []*pb.EchoRequest{}\n\t\tfor _, req := range test.reqs {\n\t\t\treqs = append(reqs, &pb.EchoRequest{Response: &pb.EchoRequest_Content{Content: req}})\n\t\t}\n\t\tif test.err != nil {\n\t\t\treqs = append(reqs, &pb.EchoRequest{Response: &pb.EchoRequest_Error{Error: test.err}})\n\t\t}\n\n\t\tmockStream := &mockChatStream{reqs: reqs, t: t}\n\t\terr := server.Chat(mockStream)\n\t\texpCode := status.FromProto(test.err).Code()\n\t\ts, _ := status.FromError(err)\n\t\tif expCode != s.Code() {\n\t\t\tt.Errorf(\"Chat expected to return status with code %d, but returned %d\", expCode, s.Code())\n\t\t}\n\t\tmockStream.verify(test.err == nil)\n\t}\n}\n\nfunc TestEchoErrorDetails_single(t *testing.T) {\n\ttests := []struct {\n\t\ttext     string\n\t\texpected *errdetails.ErrorInfo\n\t}{\n\t\t{\"Spanish rain\", &errdetails.ErrorInfo{Reason: \"Spanish rain\"}},\n\t\t{\"\", &errdetails.ErrorInfo{Reason: \"\"}},\n\t}\n\n\tserver := NewEchoServer()\n\tfor idx, test := range tests {\n\t\trequest := &pb.EchoErrorDetailsRequest{SingleDetailText: test.text}\n\t\tout, err := server.EchoErrorDetails(context.Background(), request)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"[%d] error calling EchoErrorSingleDetail(): %v\", idx, err)\n\t\t\tcontinue\n\t\t}\n\t\tif out.MultipleDetails != nil {\n\t\t\tt.Errorf(\"[%d] expected no MultipleDetails, but got: %#v\", idx, out.MultipleDetails)\n\t\t}\n\t\tif len(test.text) == 0 {\n\t\t\tif out.SingleDetail != nil {\n\t\t\t\tt.Errorf(\"[%d] expected no SingleDetail, but got: %#v\", idx, out.SingleDetail)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif out.SingleDetail == nil {\n\t\t\tt.Errorf(\"[%d] no SingleDetail returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif out.SingleDetail.Error == nil {\n\t\t\tt.Errorf(\"[%d] no SingleDetail.Error returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif out.SingleDetail.Error.Details == nil {\n\t\t\tt.Errorf(\"[%d] no SingleDetail.Error.Details returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif got, want := out.SingleDetail.Error.Details.TypeUrl, \"type.googleapis.com/google.rpc.ErrorInfo\"; got != want {\n\t\t\tt.Errorf(\"[%d] expected type URL %q; got %q \", idx, want, got)\n\t\t}\n\t\tunmarshalledError := &errdetails.ErrorInfo{}\n\t\tif err := out.SingleDetail.Error.Details.UnmarshalTo(unmarshalledError); err != nil {\n\t\t\tt.Errorf(\"[%d] error unmarshalling to ErrorInfo: %v\", idx, err)\n\t\t}\n\t\tif got, want := unmarshalledError, test.expected; !proto.Equal(got, want) {\n\t\t\tt.Errorf(\"[%d] expected ErrorInfo %v; got %v \", idx, want, got)\n\t\t}\n\t}\n}\n\nfunc TestEchoErrorDetails_multiple(t *testing.T) {\n\ttests := []struct {\n\t\ttext     []string\n\t\texpected []*errdetails.ErrorInfo\n\t}{\n\t\t{\n\t\t\t[]string{\"rain\", \"snow\", \"hail\", \"sleet\", \"fog\"},\n\t\t\t[]*errdetails.ErrorInfo{\n\t\t\t\t{Reason: \"rain\"},\n\t\t\t\t{Reason: \"snow\"},\n\t\t\t\t{Reason: \"hail\"},\n\t\t\t\t{Reason: \"sleet\"},\n\t\t\t\t{Reason: \"fog\"},\n\t\t\t},\n\t\t},\n\t\t{nil, nil},\n\t}\n\n\tserver := NewEchoServer()\n\tfor idx, test := range tests {\n\t\trequest := &pb.EchoErrorDetailsRequest{MultiDetailText: test.text}\n\t\tout, err := server.EchoErrorDetails(context.Background(), request)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"[%d] error calling EchoErrorDetails(): %v\", idx, err)\n\t\t\tcontinue\n\t\t}\n\t\tif out.SingleDetail != nil {\n\t\t\tt.Errorf(\"[%d] expected no SingleDetail, but got: %#v\", idx, out.SingleDetail)\n\t\t}\n\t\tif len(test.text) == 0 {\n\t\t\tif out.MultipleDetails != nil {\n\t\t\t\tt.Errorf(\"[%d] expected no MultipleDetails, but got %#v\", idx, out.MultipleDetails)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif out.MultipleDetails == nil {\n\t\t\tt.Errorf(\"[%d] no MultipleDetails returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif out.MultipleDetails.Error == nil {\n\t\t\tt.Errorf(\"[%d] no MultipleDetails.Error returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif out.MultipleDetails.Error.Details == nil {\n\t\t\tt.Errorf(\"[%d] no MultipleDetails.Error.Details returned\", idx)\n\t\t\tcontinue\n\t\t}\n\t\tif got, want := len(out.MultipleDetails.Error.Details), len(test.expected); got != want {\n\t\t\tt.Errorf(\"[%d] expected %d MultipleDetails.Error.Details, got %d\", idx, want, got)\n\t\t}\n\t\tfor whichDetail, detail := range out.MultipleDetails.Error.Details {\n\t\t\tif got, want := detail.TypeUrl, \"type.googleapis.com/google.rpc.ErrorInfo\"; got != want {\n\t\t\t\tt.Errorf(\"[%d:%d] expected type URL %q; got %q \", idx, whichDetail, want, got)\n\t\t\t}\n\t\t\tunmarshalledError := &errdetails.ErrorInfo{}\n\t\t\tif err := detail.UnmarshalTo(unmarshalledError); err != nil {\n\t\t\t\tt.Errorf(\"[%d:%d] error unmarshalling to ErrorInfo: %v\", idx, whichDetail, err)\n\t\t\t}\n\t\t\tif got, want := unmarshalledError, test.expected[whichDetail]; !proto.Equal(got, want) {\n\t\t\t\tt.Errorf(\"[%d:%d] expected ErrorInfo %v; got %v \", idx, whichDetail, want, got)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestFailEchoWithDetails(t *testing.T) {\n\t// We only check that all RPC calls to FailEchoWithDetails\n\t// return the expected sequence of error detail types. We\n\t// don't check the contents of the messages, except for the\n\t// PoetryError detail.\n\texpectedDetailTypes := []reflect.Type{\n\t\treflect.TypeOf((*errdetails.ErrorInfo)(nil)),\n\t\treflect.TypeOf((*errdetails.LocalizedMessage)(nil)),\n\t\treflect.TypeOf((*pb.PoetryError)(nil)),\n\t\treflect.TypeOf((*errdetails.RetryInfo)(nil)),\n\t\treflect.TypeOf((*errdetails.DebugInfo)(nil)),\n\t\treflect.TypeOf((*errdetails.QuotaFailure)(nil)),\n\t\treflect.TypeOf((*errdetails.PreconditionFailure)(nil)),\n\t\treflect.TypeOf((*errdetails.BadRequest)(nil)),\n\t\treflect.TypeOf((*errdetails.RequestInfo)(nil)),\n\t\treflect.TypeOf((*errdetails.ResourceInfo)(nil)),\n\t\treflect.TypeOf((*errdetails.Help)(nil)),\n\t}\n\n\ttests := []struct{ message string }{\n\t\t{\"\"}, // error response will have a default value\n\t\t{\"two paths diverged in a wood\"},\n\t}\n\n\tserver := NewEchoServer()\n\tfor testIdx, oneTest := range tests {\n\t\trequest := &pb.FailEchoWithDetailsRequest{}\n\t\tif oneTest.message != \"\" {\n\t\t\trequest.Message = oneTest.message\n\t\t}\n\t\tresponse, err := server.FailEchoWithDetails(context.Background(), request)\n\t\tif err == nil {\n\t\t\tt.Errorf(\"[%d] expected error upon calling FailEchoWithDetails. Response was: %+v\", testIdx, response)\n\t\t}\n\t\tstatus, _ := status.FromError(err)\n\t\tif got, want := status.Code(), codes.Aborted; got != want {\n\t\t\tt.Errorf(\"[%d] unexpected gRPC code: want %v, got %v\", testIdx, want, got)\n\t\t}\n\t\tallDetails := status.Details()\n\t\tif got, want := len(allDetails), len(expectedDetailTypes); got != want {\n\t\t\tt.Errorf(\"[%d] detail list length: : want %v, got %v\", testIdx, want, got)\n\t\t}\n\t\tfor detailIdx, oneDetail := range allDetails {\n\t\t\tif got, want := reflect.TypeOf(oneDetail), expectedDetailTypes[detailIdx]; got != want {\n\t\t\t\tt.Errorf(\"[%d:%d] want detail of type %v, got %v\", testIdx, detailIdx, want, got)\n\t\t\t}\n\n\t\t\t// In what follows, we check the internals of PoetryError.\n\n\t\t\tif detailIdx != 2 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tpoetryError, ok := oneDetail.(*pb.PoetryError)\n\t\t\tif !ok {\n\t\t\t\tt.Fatalf(\"[%d:%d] could not convert detail to a PoetryError\", testIdx, detailIdx)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\twantPoem := \"roses are red\"\n\t\t\tif oneTest.message != \"\" {\n\t\t\t\twantPoem = oneTest.message\n\t\t\t}\n\t\t\tif got, want := poetryError.Poem, wantPoem; got != want {\n\t\t\t\tt.Errorf(\"[%d:%d] PoetryError.poem: want %q, got %q\", testIdx, detailIdx, want, got)\n\t\t\t}\n\t\t}\n\t}\n}\n\ntype errorChatStream struct {\n\terr error\n\tpb.Echo_ChatServer\n}\n\nfunc (s *errorChatStream) Recv() (*pb.EchoRequest, error) {\n\treturn nil, s.err\n}\n\nfunc TestChat_streamErr(t *testing.T) {\n\te := errors.New(\"Test Error\")\n\tstream := &errorChatStream{err: e}\n\tserver := NewEchoServer()\n\terr := server.Chat(stream)\n\tif e != err {\n\t\tt.Error(\"Chat expected to pass through stream errors.\")\n\t}\n}\n\nfunc TestPagedExpand_invalidArgs(t *testing.T) {\n\ttests := []*pb.PagedExpandRequest{\n\t\t{PageSize: -1},\n\t\t{PageToken: \"-1\"},\n\t\t{PageToken: \"BOGUS\"},\n\t\t{Content: \"one\", PageToken: \"1\"},\n\t\t{Content: \"one\", PageToken: \"2\"},\n\t}\n\tserver := NewEchoServer()\n\tfor _, in := range tests {\n\t\t_, err := server.PagedExpand(context.Background(), in)\n\t\ts, _ := status.FromError(err)\n\t\tif s.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\"PagedExpand() expected error code: %d, got error code %d\",\n\t\t\t\tcodes.InvalidArgument, s.Code())\n\t\t}\n\t}\n}\n\nfunc TestPagedExpand(t *testing.T) {\n\ttests := []struct {\n\t\tin  *pb.PagedExpandRequest\n\t\tout *pb.PagedExpandResponse\n\t}{\n\t\t{\n\t\t\t&pb.PagedExpandRequest{Content: \"Hello world!\"},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Hello\"},\n\t\t\t\t\t{Content: \"world!\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{PageSize: 3, Content: \"Hello world!\"},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Hello\"},\n\t\t\t\t\t{Content: \"world!\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{\n\t\t\t\tPageSize: 3,\n\t\t\t\tContent:  \"The rain in Spain falls mainly on the plain!\",\n\t\t\t},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"The\"},\n\t\t\t\t\t{Content: \"rain\"},\n\t\t\t\t\t{Content: \"in\"},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"3\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{\n\t\t\t\tPageSize:  3,\n\t\t\t\tPageToken: \"3\",\n\t\t\t\tContent:   \"The rain in Spain falls mainly on the plain!\",\n\t\t\t},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Spain\"},\n\t\t\t\t\t{Content: \"falls\"},\n\t\t\t\t\t{Content: \"mainly\"},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"6\",\n\t\t\t},\n\t\t},\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, test := range tests {\n\t\tmockStream := &mockUnaryStream{t: t}\n\t\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t\tout, err := server.PagedExpand(ctx, test.in)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t}\n\t\tif !proto.Equal(test.out, out) {\n\t\t\tt.Errorf(\"PagedExpand with input %q, expected: %q, got: %q\",\n\t\t\t\ttest.in.String(), test.out.String(), out.String())\n\t\t}\n\t\tmockStream.verify(err == nil)\n\t}\n}\n\n// NOTE: The TestPagedExpandLegacy*() tests mirror the TestPagedExpand*() tests.\n\nfunc TestPagedExpandLegacy_invalidArgs(t *testing.T) {\n\ttests := []*pb.PagedExpandLegacyRequest{\n\t\t{MaxResults: -1},\n\t\t{PageToken: \"-1\"},\n\t\t{PageToken: \"BOGUS\"},\n\t\t{Content: \"one\", PageToken: \"1\"},\n\t\t{Content: \"one\", PageToken: \"2\"},\n\t}\n\tserver := NewEchoServer()\n\tfor _, in := range tests {\n\t\t_, err := server.PagedExpandLegacy(context.Background(), in)\n\t\ts, _ := status.FromError(err)\n\t\tif s.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\"PagedExpandLegacy() expected error code: %d, got error code %d\",\n\t\t\t\tcodes.InvalidArgument, s.Code())\n\t\t}\n\t}\n}\n\nfunc TestPagedExpandLegacy(t *testing.T) {\n\ttests := []struct {\n\t\tin  *pb.PagedExpandLegacyRequest\n\t\tout *pb.PagedExpandResponse\n\t}{\n\t\t{\n\t\t\t&pb.PagedExpandLegacyRequest{Content: \"Hello world!\"},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Hello\"},\n\t\t\t\t\t{Content: \"world!\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandLegacyRequest{MaxResults: 3, Content: \"Hello world!\"},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Hello\"},\n\t\t\t\t\t{Content: \"world!\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandLegacyRequest{\n\t\t\t\tMaxResults: 3,\n\t\t\t\tContent:    \"The rain in Spain falls mainly on the plain!\",\n\t\t\t},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"The\"},\n\t\t\t\t\t{Content: \"rain\"},\n\t\t\t\t\t{Content: \"in\"},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"3\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandLegacyRequest{\n\t\t\t\tMaxResults: 3,\n\t\t\t\tPageToken:  \"3\",\n\t\t\t\tContent:    \"The rain in Spain falls mainly on the plain!\",\n\t\t\t},\n\t\t\t&pb.PagedExpandResponse{\n\t\t\t\tResponses: []*pb.EchoResponse{\n\t\t\t\t\t{Content: \"Spain\"},\n\t\t\t\t\t{Content: \"falls\"},\n\t\t\t\t\t{Content: \"mainly\"},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"6\",\n\t\t\t},\n\t\t},\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, test := range tests {\n\t\tmockStream := &mockUnaryStream{t: t}\n\t\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t\tout, err := server.PagedExpandLegacy(ctx, test.in)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t}\n\t\tif !proto.Equal(test.out, out) {\n\t\t\tt.Errorf(\"PagedExpandLegacy with input %q, expected: %q, got: %q\",\n\t\t\t\ttest.in.String(), test.out.String(), out.String())\n\t\t}\n\t\tmockStream.verify(err == nil)\n\t}\n}\n\nfunc TestPagedExpandLegacyMapped_invalidArgs(t *testing.T) {\n\ttests := []*pb.PagedExpandRequest{\n\t\t{PageSize: -1},\n\t\t{PageToken: \"-1\"},\n\t\t{PageToken: \"BOGUS\"},\n\t\t{Content: \"one\", PageToken: \"1\"},\n\t\t{Content: \"one\", PageToken: \"2\"},\n\t}\n\tserver := NewEchoServer()\n\tfor _, in := range tests {\n\t\t_, err := server.PagedExpandLegacyMapped(context.Background(), in)\n\t\ts, _ := status.FromError(err)\n\t\tif s.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\"PagedExpandLegacyMapped() expected error code: %d, got error code %d\",\n\t\t\t\tcodes.InvalidArgument, s.Code())\n\t\t}\n\t}\n}\n\nfunc TestPagedExpandLegacyMapped(t *testing.T) {\n\ttext := \"It was the best of times, it was the worst of times\"\n\ttests := []struct {\n\t\tin  *pb.PagedExpandRequest\n\t\tout *pb.PagedExpandLegacyMappedResponse\n\t}{\n\t\t{\n\t\t\t&pb.PagedExpandRequest{Content: text},\n\t\t\t&pb.PagedExpandLegacyMappedResponse{\n\t\t\t\tAlphabetized: map[string]*pb.PagedExpandResponseList{\n\t\t\t\t\t\"b\": {Words: []string{\"best\"}},\n\t\t\t\t\t\"I\": {Words: []string{\"It\"}},\n\t\t\t\t\t\"i\": {Words: []string{\"it\"}},\n\t\t\t\t\t\"o\": {Words: []string{\"of\", \"of\"}},\n\t\t\t\t\t\"t\": {Words: []string{\"the\", \"times,\", \"the\", \"times\"}},\n\t\t\t\t\t\"w\": {Words: []string{\"was\", \"was\", \"worst\"}},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{PageSize: 1, Content: text},\n\t\t\t&pb.PagedExpandLegacyMappedResponse{\n\t\t\t\tAlphabetized: map[string]*pb.PagedExpandResponseList{\n\t\t\t\t\t\"I\": {Words: []string{\"It\"}},\n\t\t\t\t\t\"b\": {Words: []string{}},\n\t\t\t\t\t\"i\": {Words: []string{}},\n\t\t\t\t\t\"o\": {Words: []string{}},\n\t\t\t\t\t\"t\": {Words: []string{}},\n\t\t\t\t\t\"w\": {Words: []string{}},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"1\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{PageSize: 4, PageToken: \"2\", Content: text},\n\t\t\t&pb.PagedExpandLegacyMappedResponse{\n\t\t\t\tAlphabetized: map[string]*pb.PagedExpandResponseList{\n\t\t\t\t\t\"b\": {Words: []string{\"best\"}},\n\t\t\t\t\t\"I\": {Words: []string{}},\n\t\t\t\t\t\"i\": {Words: []string{}},\n\t\t\t\t\t\"o\": {Words: []string{\"of\"}},\n\t\t\t\t\t\"t\": {Words: []string{\"the\", \"times,\"}},\n\t\t\t\t\t\"w\": {Words: []string{}},\n\t\t\t\t},\n\t\t\t\tNextPageToken: \"6\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t&pb.PagedExpandRequest{PageSize: 4, PageToken: \"8\", Content: text},\n\t\t\t&pb.PagedExpandLegacyMappedResponse{\n\t\t\t\tAlphabetized: map[string]*pb.PagedExpandResponseList{\n\t\t\t\t\t\"b\": {Words: []string{}},\n\t\t\t\t\t\"I\": {Words: []string{}},\n\t\t\t\t\t\"i\": {Words: []string{}},\n\t\t\t\t\t\"o\": {Words: []string{\"of\"}},\n\t\t\t\t\t\"t\": {Words: []string{\"the\", \"times\"}},\n\t\t\t\t\t\"w\": {Words: []string{\"worst\"}},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tserver := NewEchoServer()\n\tfor _, test := range tests {\n\t\tmockStream := &mockUnaryStream{t: t}\n\t\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t\tout, err := server.PagedExpandLegacyMapped(ctx, test.in)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t}\n\t\tif !proto.Equal(test.out, out) {\n\t\t\tt.Errorf(\"PagedExpandLegacyMapped with input %q:\\n  expected: %#v\\n       got: %#v\\n\",\n\t\t\t\ttest.in.String(), test.out.String(), out.String())\n\t\t}\n\t\tmockStream.verify(err == nil)\n\t}\n}\n\nfunc TestWait(t *testing.T) {\n\tendTime, _ := ptypes.TimestampProto(time.Now())\n\treq := &pb.WaitRequest{End: &pb.WaitRequest_EndTime{EndTime: endTime}}\n\twaiter := &mockWaiter{}\n\tserver := &echoServerImpl{waiter: waiter}\n\tmockStream := &mockUnaryStream{t: t}\n\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\tserver.Wait(ctx, req)\n\tif !proto.Equal(waiter.req, req) {\n\t\tt.Error(\"Expected echo.Wait to defer to waiter.\")\n\t}\n\tmockStream.verify(true)\n}\n\nfunc TestBlockSuccess(t *testing.T) {\n\ttests := []struct {\n\t\tseconds int64\n\t\tnanos   int32\n\t\tresp    string\n\t}{\n\t\t{1, int32(1000), \"hello\"},\n\t\t{5, int32(10), \"world\"},\n\t}\n\tfor _, test := range tests {\n\t\twaiter := &mockWaiter{}\n\t\tserver := &echoServerImpl{waiter: waiter}\n\t\tin := &pb.BlockRequest{\n\t\t\tResponseDelay: &durpb.Duration{\n\t\t\t\tSeconds: test.seconds,\n\t\t\t\tNanos:   test.nanos,\n\t\t\t},\n\t\t\tResponse: &pb.BlockRequest_Success{\n\t\t\t\tSuccess: &pb.BlockResponse{Content: test.resp},\n\t\t\t},\n\t\t}\n\t\tmockStream := &mockUnaryStream{t: t}\n\t\tctx := appendTestOutgoingMetadata(context.Background(), &mockSTS{t: t, stream: mockStream})\n\t\tout, err := server.Block(ctx, in)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t}\n\t\tif out.GetContent() != test.resp {\n\t\t\tt.Errorf(\"Expected Wait test to return %s, but returned %s\", out.GetContent(), test.resp)\n\t\t}\n\t\tmockStream.verify(err == nil)\n\t}\n}\n\nfunc TestBlockError(t *testing.T) {\n\ttests := []struct {\n\t\tseconds int64\n\t\tnanos   int32\n\t\tcode    codes.Code\n\t}{\n\t\t{0, int32(0), codes.InvalidArgument},\n\t\t{2, int32(1000), codes.Unavailable},\n\t}\n\n\tfor _, test := range tests {\n\t\twaiter := &mockWaiter{}\n\t\tserver := &echoServerImpl{waiter: waiter}\n\t\tin := &pb.BlockRequest{\n\t\t\tResponseDelay: &durpb.Duration{\n\t\t\t\tSeconds: test.seconds,\n\t\t\t\tNanos:   test.nanos,\n\t\t\t},\n\t\t\tResponse: &pb.BlockRequest_Error{\n\t\t\t\tError: status.New(test.code, \"\").Proto(),\n\t\t\t},\n\t\t}\n\t\tout, err := server.Block(context.Background(), in)\n\t\tif out != nil {\n\t\t\tt.Errorf(\"Block: Expected to error with code %d but returned success\", test.code)\n\t\t}\n\t\ts, _ := status.FromError(err)\n\t\tif s.Code() != test.code {\n\t\t\tt.Errorf(\"Block: Expected to error with code %d but errored with code %d\", test.code, s.Code())\n\t\t}\n\t}\n}\n\nfunc appendTestOutgoingMetadata(ctx context.Context, stream grpc.ServerTransportStream) context.Context {\n\tctx = grpc.NewContextWithServerTransportStream(ctx, stream)\n\tctx = metadata.NewIncomingContext(ctx, metadata.Pairs(\"showcase-trailer\", \"show\", \"showcase-trailer\", \"case\", \"trailer\", \"trail\", \"x-goog-request-params\", \"showcaseHeader\", \"x-goog-request-params\", \"anotherHeader\", \"header\", \"head\", \"x-goog-api-version\", \"apiVersion\", \"traceparent\", \"00-traceid-spanid-01\", \"tracestate\", \"some-state\"))\n\treturn ctx\n}\n"
  },
  {
    "path": "server/services/iam_policy_service.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar missingResource error = status.Error(codes.InvalidArgument, \"Missing required argument: resource\")\nvar missingPolicy error = status.Error(codes.InvalidArgument, \"Missing required argument: policy\")\nvar resourceDoesNotExist error = status.Error(codes.NotFound, \"Requested resource has no Policy\")\n\n// NewIAMPolicyServer returns a new LocationsServer for the Showcase API.\nfunc NewIAMPolicyServer() iampb.IAMPolicyServer {\n\treturn &iamPolicyServerImpl{\n\t\tpolicies: map[string]*iampb.Policy{},\n\t}\n}\n\ntype iamPolicyServerImpl struct {\n\tmu sync.Mutex\n\t// The key is the resource name.\n\t// The value is the IAM Policy assigned to the resource.\n\tpolicies map[string]*iampb.Policy\n}\n\n// GetIamPolicy retrieves the Policy for the named resource, if it has one.\nfunc (i *iamPolicyServerImpl) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest) (*iampb.Policy, error) {\n\tif in.GetResource() == \"\" {\n\t\treturn nil, missingResource\n\t}\n\n\ti.mu.Lock()\n\tdefer i.mu.Unlock()\n\n\tp, ok := i.policies[in.GetResource()]\n\tif !ok {\n\t\treturn nil, resourceDoesNotExist\n\t}\n\tres := proto.Clone(p)\n\n\treturn res.(*iampb.Policy), nil\n}\n\n// SetIamPolicy assigns the given Policy to the resource.\nfunc (i *iamPolicyServerImpl) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest) (*iampb.Policy, error) {\n\tif in.GetResource() == \"\" {\n\t\treturn nil, missingResource\n\t}\n\tif in.GetPolicy() == nil {\n\t\treturn nil, missingPolicy\n\t}\n\n\ti.mu.Lock()\n\tdefer i.mu.Unlock()\n\n\tclone := proto.Clone(in.GetPolicy())\n\tp := clone.(*iampb.Policy)\n\ti.policies[in.GetResource()] = p\n\n\treturn in.GetPolicy(), nil\n}\n\n// TestIamPermissions verifies that the requested resource has been Set at one point, and echoes the back permissions to be tested.\nfunc (i *iamPolicyServerImpl) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) {\n\tif in.GetResource() == \"\" {\n\t\treturn nil, missingResource\n\t}\n\n\ti.mu.Lock()\n\tdefer i.mu.Unlock()\n\n\tif _, ok := i.policies[in.GetResource()]; !ok {\n\t\treturn nil, resourceDoesNotExist\n\t}\n\n\treturn &iampb.TestIamPermissionsResponse{\n\t\tPermissions: in.GetPermissions(),\n\t}, nil\n}\n"
  },
  {
    "path": "server/services/iam_policy_service_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/google/go-cmp/cmp/cmpopts\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestIamPolicySetGetTest(t *testing.T) {\n\ts := NewIAMPolicyServer()\n\n\tresource := \"projects/myproject/foos/foo123\"\n\tpolicy := &iampb.Policy{\n\t\tVersion: 1,\n\t\tBindings: []*iampb.Binding{\n\t\t\t{Role: \"project/fooEditor\"},\n\t\t},\n\t}\n\tpermissions := []string{\"foo.write\", \"foo.read\"}\n\n\tp, err := s.SetIamPolicy(context.Background(), &iampb.SetIamPolicyRequest{Resource: resource, Policy: policy})\n\tif err != nil {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > SetIamPolicy: unexpected error %q\", err)\n\t}\n\n\tif diff := cmp.Diff(p, policy, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > SetIamPolicy: got(-),want(+):\\n%s\", diff)\n\t}\n\n\tp, err = s.GetIamPolicy(context.Background(), &iampb.GetIamPolicyRequest{Resource: resource})\n\tif err != nil {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > GetIamPolicy: unexpected error %q\", err)\n\t}\n\n\tif diff := cmp.Diff(p, policy, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > GetIamPolicy: got(-),want(+):\\n%s\", diff)\n\t}\n\n\tres, err := s.TestIamPermissions(context.Background(), &iampb.TestIamPermissionsRequest{\n\t\tResource:    resource,\n\t\tPermissions: permissions,\n\t})\n\tif err != nil {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > TestIamPermissions: unexpected error %q\", err)\n\t}\n\n\tif diff := cmp.Diff(res.Permissions, permissions); diff != \"\" {\n\t\tt.Errorf(\"TestIamPolicySetGetTest > TestIamPermissions: got(-),want(+):\\n%s\", diff)\n\t}\n}\n\nfunc TestGetIamPolicy_errors(t *testing.T) {\n\ts := NewIAMPolicyServer()\n\n\tfor _, tst := range []struct {\n\t\tname, resource string\n\t\terr            error\n\t}{\n\t\t{\n\t\t\tname: \"missing resource field\",\n\t\t\terr:  missingResource,\n\t\t},\n\t\t{\n\t\t\tname:     \"resource does not exist\",\n\t\t\tresource: \"foo/bar\",\n\t\t\terr:      resourceDoesNotExist,\n\t\t},\n\t} {\n\t\tres, err := s.GetIamPolicy(context.Background(), &iampb.GetIamPolicyRequest{Resource: tst.resource})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"GetIamPolicy_errors(%s): expected an error but got response: %v\", tst.name, res)\n\t\t}\n\n\t\tif diff := cmp.Diff(err, tst.err, cmpopts.EquateErrors()); diff != \"\" {\n\t\t\tt.Errorf(\"GetIamPolicy_errors(%s): got(-),want(+):\\n%s\", tst.name, diff)\n\t\t}\n\t}\n}\n\nfunc TestSetIamPolicy_errors(t *testing.T) {\n\ts := NewIAMPolicyServer()\n\n\tfor _, tst := range []struct {\n\t\tname, resource string\n\t\terr            error\n\t}{\n\t\t{\n\t\t\tname: \"missing resource field\",\n\t\t\terr:  missingResource,\n\t\t},\n\t\t{\n\t\t\tname:     \"missing policy field\",\n\t\t\tresource: \"foo/bar\",\n\t\t\terr:      missingPolicy,\n\t\t},\n\t} {\n\t\tres, err := s.SetIamPolicy(context.Background(), &iampb.SetIamPolicyRequest{Resource: tst.resource})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"SetIamPolicy_errors(%s): expected an error but got response: %v\", tst.name, res)\n\t\t}\n\n\t\tif diff := cmp.Diff(err, tst.err, cmpopts.EquateErrors()); diff != \"\" {\n\t\t\tt.Errorf(\"SetIamPolicy_errors(%s): got(-),want(+):\\n%s\", tst.name, diff)\n\t\t}\n\t}\n}\n\nfunc TestTestIamPermissions_errors(t *testing.T) {\n\ts := NewIAMPolicyServer()\n\n\tfor _, tst := range []struct {\n\t\tname, resource string\n\t\terr            error\n\t}{\n\t\t{\n\t\t\tname: \"missing resource field\",\n\t\t\terr:  missingResource,\n\t\t},\n\t\t{\n\t\t\tname:     \"resource does not exist\",\n\t\t\tresource: \"foo/bar\",\n\t\t\terr:      resourceDoesNotExist,\n\t\t},\n\t} {\n\t\tres, err := s.TestIamPermissions(context.Background(), &iampb.TestIamPermissionsRequest{Resource: tst.resource})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"TestIamPermissions_errors(%s): expected an error but got response: %v\", tst.name, res)\n\t\t}\n\n\t\tif diff := cmp.Diff(err, tst.err, cmpopts.EquateErrors()); diff != \"\" {\n\t\t\tt.Errorf(\"TestIamPermissions_errors(%s): got(-),want(+):\\n%s\", tst.name, diff)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "server/services/identity_service.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// NewIdentityServer returns a new instance of showcase identity server.\nfunc NewIdentityServer() pb.IdentityServer {\n\treturn &identityServerImpl{\n\t\ttoken: server.NewTokenGenerator(),\n\t\tkeys:  map[string]int{},\n\t}\n}\n\ntype userEntry struct {\n\tuser    *pb.User\n\tdeleted bool\n}\n\n// ReadOnlyIdentityServer provides a read-only interface of an identity server.\ntype ReadOnlyIdentityServer interface {\n\tGetUser(context.Context, *pb.GetUserRequest) (*pb.User, error)\n\tListUsers(context.Context, *pb.ListUsersRequest) (*pb.ListUsersResponse, error)\n}\n\ntype identityServerImpl struct {\n\tuid   server.UniqID\n\ttoken server.TokenGenerator\n\n\tmu    sync.Mutex\n\tkeys  map[string]int\n\tusers []userEntry\n}\n\n// Creates a user.\nfunc (s *identityServerImpl) CreateUser(_ context.Context, in *pb.CreateUserRequest) (*pb.User, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tu := in.GetUser()\n\n\t// Ignore passed in name.\n\tu.Name = \"\"\n\n\terr := s.validate(u)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Assign info.\n\tid := s.uid.Next()\n\tname := fmt.Sprintf(\"users/%d\", id)\n\tnow := ptypes.TimestampNow()\n\n\tu.Name = name\n\tu.CreateTime = now\n\tu.UpdateTime = now\n\n\t// Insert.\n\tindex := len(s.users)\n\ts.users = append(s.users, userEntry{user: u})\n\ts.keys[name] = index\n\n\treturn u, nil\n}\n\n// Retrieves the User with the given uri.\nfunc (s *identityServerImpl) GetUser(_ context.Context, in *pb.GetUserRequest) (*pb.User, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tname := in.GetName()\n\tif i, ok := s.keys[name]; ok {\n\t\tentry := s.users[i]\n\t\tif !entry.deleted {\n\t\t\treturn entry.user, nil\n\t\t}\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound, \"A user with name %s not found.\",\n\t\tname)\n}\n\n// Updates a user.\nfunc (s *identityServerImpl) UpdateUser(_ context.Context, in *pb.UpdateUserRequest) (*pb.User, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tmask := in.GetUpdateMask()\n\tu := in.GetUser()\n\ti, ok := s.keys[u.GetName()]\n\tif !ok || s.users[i].deleted {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A user with name %s not found.\", u.GetName())\n\t}\n\n\terr := s.validate(u)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Update store.\n\texisting := s.users[i].user\n\tupdated := proto.Clone(existing).(*pb.User)\n\tapplyFieldMask(u.ProtoReflect(), updated.ProtoReflect(), mask.GetPaths())\n\tupdated.CreateTime = existing.GetCreateTime()\n\tupdated.UpdateTime = ptypes.TimestampNow()\n\n\ts.users[i] = userEntry{user: updated}\n\treturn updated, nil\n}\n\n// Deletes a user, their profile, and all of their authored messages.\nfunc (s *identityServerImpl) DeleteUser(_ context.Context, in *pb.DeleteUserRequest) (*empty.Empty, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ti, ok := s.keys[in.GetName()]\n\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A user with name %s not found.\", in.GetName())\n\t}\n\n\tentry := s.users[i]\n\ts.users[i] = userEntry{user: entry.user, deleted: true}\n\n\treturn &empty.Empty{}, nil\n}\n\n// Lists all users.\nfunc (s *identityServerImpl) ListUsers(_ context.Context, in *pb.ListUsersRequest) (*pb.ListUsersResponse, error) {\n\tstart, err := s.token.GetIndex(in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\toffset := 0\n\tusers := []*pb.User{}\n\tfor _, entry := range s.users[start:] {\n\t\toffset++\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\tusers = append(users, entry.user)\n\t\tif len(users) >= int(in.GetPageSize()) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnextToken := \"\"\n\tif start+offset < len(s.users) {\n\t\tnextToken = s.token.ForIndex(start + offset)\n\t}\n\n\treturn &pb.ListUsersResponse{Users: users, NextPageToken: nextToken}, nil\n}\n\nfunc (s *identityServerImpl) validate(u *pb.User) error {\n\t// Validate Required Fields.\n\tif u.GetDisplayName() == \"\" {\n\t\treturn status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `display_name` is required.\")\n\t}\n\tif u.GetEmail() == \"\" {\n\t\treturn status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `email` is required.\")\n\t}\n\t// Validate Unique Fields.\n\tfor _, x := range s.users {\n\t\tif x.deleted {\n\t\t\tcontinue\n\t\t}\n\t\tif (u.GetEmail() == x.user.GetEmail()) &&\n\t\t\t(u.GetName() != x.user.GetName()) {\n\t\t\treturn status.Errorf(\n\t\t\t\tcodes.AlreadyExists,\n\t\t\t\t\"A user with email %s already exists.\",\n\t\t\t\tu.GetEmail())\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "server/services/identity_service_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/types/known/fieldmaskpb\"\n)\n\nfunc Test_User_lifecycle(t *testing.T) {\n\ts := NewIdentityServer()\n\n\tfirst, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"ekkodog\", Email: \"ekko@example.com\", Nickname: proto.String(\"ekko\"), Age: proto.Int32(26)},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tdelete, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"mishacat\", Email: \"misha@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteUser(\n\t\tcontext.Background(),\n\t\t&pb.DeleteUserRequest{Name: delete.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\tcreated, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{\n\t\t\t\tDisplayName:         \"rumbledog\",\n\t\t\t\tEmail:               \"rumble@example.com\",\n\t\t\t\tAge:                 proto.Int32(42),\n\t\t\t\tEnableNotifications: proto.Bool(false),\n\t\t\t\tHeightFeet:          proto.Float64(3.5),\n\t\t\t\tNickname:            proto.String(\"rumble\"),\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tgot, err := s.GetUser(\n\t\tcontext.Background(),\n\t\t&pb.GetUserRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(created, got) {\n\t\tt.Error(\"Expected to get created user.\")\n\t}\n\n\t// Make a copy of the User value, then unset proto3_optional fields\n\t// to scope the update to DisplayName and Nickname.\n\tclone := proto.Clone(got)\n\tu := clone.(*pb.User)\n\tu.DisplayName = \"musubi\"\n\tu.Nickname = proto.String(\"musu\")\n\tu.Age = nil\n\tu.HeightFeet = nil\n\tu.EnableNotifications = nil\n\tupdated, err := s.UpdateUser(\n\t\tcontext.Background(),\n\t\t&pb.UpdateUserRequest{User: u, UpdateMask: nil})\n\tif err != nil {\n\t\tt.Errorf(\"Update: unexpected err %+v\", err)\n\t}\n\t// Ensure the proto3_optional fields that were unset did not get updated.\n\tif updated.Age == nil {\n\t\tt.Errorf(\"UpdateUser().Age was unexpectedly set to nil\")\n\t}\n\tif updated.HeightFeet == nil {\n\t\tt.Errorf(\"UpdateUser().HeightFeet was unexpectedly set to nil\")\n\t}\n\tif updated.EnableNotifications == nil {\n\t\tt.Errorf(\"UpdateUser().EnableNotifications was unexpectedly set to nil\")\n\t}\n\n\tgot, err = s.GetUser(\n\t\tcontext.Background(),\n\t\t&pb.GetUserRequest{Name: updated.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(updated, got) {\n\t\tt.Errorf(\"UpdateUser() = %+v, want %+v\", got, updated)\n\t}\n\n\tr, err := s.ListUsers(\n\t\tcontext.Background(),\n\t\t&pb.ListUsersRequest{PageSize: 1, PageToken: \"\"})\n\tif len(r.GetUsers()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetUsers()))\n\t}\n\tif !proto.Equal(first, r.GetUsers()[0]) {\n\t\tt.Errorf(\"List want: first user %+v, got %+v\", first, r.GetUsers()[0])\n\t}\n\tif r.GetNextPageToken() == \"\" {\n\t\tt.Error(\"List want: non empty next page token\")\n\t}\n\n\tr, err = s.ListUsers(\n\t\tcontext.Background(),\n\t\t&pb.ListUsersRequest{PageSize: 10, PageToken: r.GetNextPageToken()})\n\tif len(r.GetUsers()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetUsers()))\n\t}\n\tif !proto.Equal(got, r.GetUsers()[0]) {\n\t\tt.Errorf(\"List want: updated user %+v, got %+v\", got, r.GetUsers()[0])\n\t}\n\tif r.GetNextPageToken() != \"\" {\n\t\tt.Error(\"List want: empty next page token\")\n\t}\n}\n\nfunc Test_Create_invalid(t *testing.T) {\n\ttests := []*pb.User{\n\t\t{DisplayName: \"\", Email: \"rumble@example.com\"},\n\t\t{DisplayName: \"Rumble\", Email: \"\"},\n\t}\n\ts := NewIdentityServer()\n\tfor _, u := range tests {\n\t\t_, err := s.CreateUser(\n\t\t\tcontext.Background(),\n\t\t\t&pb.CreateUserRequest{User: u})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"Create: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n\nfunc Test_Create_alreadyPresent(t *testing.T) {\n\tfirst := &pb.User{DisplayName: \"Rumble\", Email: \"rumble@example.com\"}\n\tsecond := &pb.User{DisplayName: \"Musubi\", Email: \"rumble@example.com\"}\n\tthird := &pb.User{DisplayName: \"Rumble\", Email: \"rumble@example.com\"}\n\n\ts := NewIdentityServer()\n\tcreated, err := s.CreateUser(context.Background(), &pb.CreateUserRequest{User: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.CreateUser(context.Background(), &pb.CreateUserRequest{User: second})\n\tstat, _ := status.FromError(err)\n\tif stat.Code() != codes.AlreadyExists {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.AlreadyExists,\n\t\t\tstat.Code())\n\t}\n\n\tthird.Name = created.GetName()\n\t_, err = s.CreateUser(context.Background(), &pb.CreateUserRequest{User: third})\n\tstat, _ = status.FromError(err)\n\tif stat.Code() != codes.AlreadyExists {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.AlreadyExists,\n\t\t\tstat.Code())\n\t}\n}\n\nfunc Test_Create_deleted(t *testing.T) {\n\ts := NewIdentityServer()\n\tu := &pb.User{DisplayName: \"Rumble\", Email: \"rumble@example.com\"}\n\tu, err := s.CreateUser(context.Background(), &pb.CreateUserRequest{User: u})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected error: %v\", err)\n\t}\n\t_, err = s.DeleteUser(context.Background(), &pb.DeleteUserRequest{Name: u.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected error: %v\", err)\n\t}\n\tu, err = s.CreateUser(context.Background(), &pb.CreateUserRequest{User: u})\n\tif err != nil {\n\t\tt.Errorf(\"Create: a using a deleted email should be allowed, got: %v\", err)\n\t}\n}\n\nfunc Test_Get_notFound(t *testing.T) {\n\ts := NewIdentityServer()\n\t_, err := s.GetUser(\n\t\tcontext.Background(),\n\t\t&pb.GetUserRequest{Name: \"Rumble\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_Get_deleted(t *testing.T) {\n\ts := NewIdentityServer()\n\tcreated, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"rumbledog\", Email: \"rumble@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteUser(\n\t\tcontext.Background(),\n\t\t&pb.DeleteUserRequest{Name: created.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.GetUser(\n\t\tcontext.Background(),\n\t\t&pb.GetUserRequest{Name: created.Name})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get deleted: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_Update_fieldmask(t *testing.T) {\n\tfirst := &pb.User{DisplayName: \"Ekko\", Email: \"ekko@example.com\"}\n\tsecond := &pb.User{DisplayName: \"Foo\", Email: \"ekko@example.com\"}\n\tpaths := []string{\"display_name\"}\n\ts := NewIdentityServer()\n\tcreated, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{User: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tsecond.Name = created.GetName()\n\n\tgot, err := s.UpdateUser(\n\t\tcontext.Background(),\n\t\t&pb.UpdateUserRequest{User: second, UpdateMask: &fieldmaskpb.FieldMask{Paths: paths}})\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif diff := cmp.Diff(got.GetDisplayName(), second.GetDisplayName()); diff != \"\" {\n\t\tt.Errorf(\"Using update_mask %s, got(-),want(+):\\n%s\", strings.Join(paths, \",\"), diff)\n\t}\n}\n\nfunc Test_Update_notFound(t *testing.T) {\n\ts := NewIdentityServer()\n\t_, err := s.UpdateUser(\n\t\tcontext.Background(),\n\t\t&pb.UpdateUserRequest{\n\t\t\tUser: &pb.User{\n\t\t\t\tName:        \"Rumble\",\n\t\t\t\tDisplayName: \"rumbledog\",\n\t\t\t\tEmail:       \"rumble@example.com\",\n\t\t\t},\n\t\t\tUpdateMask: nil,\n\t\t})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_Update_invalid(t *testing.T) {\n\tfirst := []*pb.User{\n\t\t{DisplayName: \"Ekko\", Email: \"ekko@example.com\"},\n\t\t{DisplayName: \"Rumble\", Email: \"rumble@example.com\"},\n\t}\n\tsecond := []*pb.User{\n\t\t{DisplayName: \"\", Email: \"ekko@example.com\"},\n\t\t{DisplayName: \"Rumble\", Email: \"\"},\n\t}\n\ts := NewIdentityServer()\n\tfor i, u := range first {\n\t\tcreated, err := s.CreateUser(\n\t\t\tcontext.Background(),\n\t\t\t&pb.CreateUserRequest{User: u})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t\t}\n\t\tsecond[i].Name = created.GetName()\n\t}\n\tfor _, u := range second {\n\t\t_, err := s.UpdateUser(\n\t\t\tcontext.Background(),\n\t\t\t&pb.UpdateUserRequest{User: u, UpdateMask: nil})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"Update: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n\nfunc Test_Update_alreadyPresent(t *testing.T) {\n\tfirst := &pb.User{DisplayName: \"Rumble\", Email: \"rumble@example.com\"}\n\tsecond := &pb.User{DisplayName: \"Ekko\", Email: \"ekko@example.com\"}\n\n\ts := NewIdentityServer()\n\n\tfirst, err := s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{User: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tsecond, err = s.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{User: second})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tsecond.Email = first.GetEmail()\n\n\t_, err = s.UpdateUser(\n\t\tcontext.Background(),\n\t\t&pb.UpdateUserRequest{User: second, UpdateMask: nil})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.AlreadyExists {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.AlreadyExists,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_Delete_notFound(t *testing.T) {\n\ts := NewIdentityServer()\n\t_, err := s.DeleteUser(\n\t\tcontext.Background(),\n\t\t&pb.DeleteUserRequest{Name: \"Rumble\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Delete: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_List_invalidToken(t *testing.T) {\n\ts := &identityServerImpl{\n\t\ttoken: server.NewTokenGenerator(),\n\t\tkeys:  map[string]int{},\n\t}\n\n\ttests := []string{\n\t\t\"1\", // Not base64 encoded\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"1\")),          // No salt\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"EkkoRumble\")), // Invalid index\n\t}\n\n\tfor _, token := range tests {\n\t\t_, err := s.ListUsers(\n\t\t\tcontext.Background(),\n\t\t\t&pb.ListUsersRequest{PageSize: 1, PageToken: token})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"List: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "server/services/locations_service.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"strings\"\n\n\tlocpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\nvar missingName error = status.Error(codes.InvalidArgument, \"Missing required argument: name\")\n\n// NewLocationsServer returns a new LocationsServer for the Showcase API.\nfunc NewLocationsServer() locpb.LocationsServer {\n\treturn &locationsServerImpl{}\n}\n\ntype locationsServerImpl struct{}\n\n// GetLocation echoes back a Location with the same name as\n// in.name and has the last segment of name as the display_name.\nfunc (l *locationsServerImpl) GetLocation(ctx context.Context, in *locpb.GetLocationRequest) (*locpb.Location, error) {\n\tif in.GetName() == \"\" {\n\t\treturn nil, missingName\n\t}\n\n\tname := in.GetName()\n\tdisplay := name[strings.LastIndex(name, \"/\")+1:]\n\n\treturn &locpb.Location{\n\t\tName:        name,\n\t\tDisplayName: display,\n\t}, nil\n}\n\n// ListLocations returns a fixed list of Locations prefixed with the\n// in.name value.\nfunc (l *locationsServerImpl) ListLocations(ctx context.Context, in *locpb.ListLocationsRequest) (*locpb.ListLocationsResponse, error) {\n\tif in.GetName() == \"\" {\n\t\treturn nil, missingName\n\t}\n\n\treturn &locpb.ListLocationsResponse{\n\t\tLocations: []*locpb.Location{\n\t\t\t{\n\t\t\t\tName:        in.GetName() + \"/locations/us-north\",\n\t\t\t\tDisplayName: \"us-north\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        in.GetName() + \"/locations/us-south\",\n\t\t\t\tDisplayName: \"us-south\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        in.GetName() + \"/locations/us-east\",\n\t\t\t\tDisplayName: \"us-east\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        in.GetName() + \"/locations/us-west\",\n\t\t\t\tDisplayName: \"us-west\",\n\t\t\t},\n\t\t},\n\t}, nil\n}\n"
  },
  {
    "path": "server/services/locations_service_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/google/go-cmp/cmp/cmpopts\"\n\tlocpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestListLocations(t *testing.T) {\n\ts := NewLocationsServer()\n\tname := \"projects/foo\"\n\n\tgot, err := s.ListLocations(context.Background(), &locpb.ListLocationsRequest{Name: name})\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n\n\twant := &locpb.ListLocationsResponse{\n\t\tLocations: []*locpb.Location{\n\t\t\t{\n\t\t\t\tName:        name + \"/locations/us-north\",\n\t\t\t\tDisplayName: \"us-north\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        name + \"/locations/us-south\",\n\t\t\t\tDisplayName: \"us-south\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        name + \"/locations/us-east\",\n\t\t\t\tDisplayName: \"us-east\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tName:        name + \"/locations/us-west\",\n\t\t\t\tDisplayName: \"us-west\",\n\t\t\t},\n\t\t},\n\t}\n\n\tif diff := cmp.Diff(got, want, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\tt.Errorf(\"ListLocations: got(-),want(+):\\n%s\", diff)\n\t}\n}\n\nfunc TestListLocations_missingName(t *testing.T) {\n\ts := NewLocationsServer()\n\n\tres, err := s.ListLocations(context.Background(), &locpb.ListLocationsRequest{})\n\tif err == nil {\n\t\tt.Errorf(\"ListLocations_missingName: expected an error but got response: %v\", res)\n\t}\n\n\tif diff := cmp.Diff(err, missingName, cmpopts.EquateErrors()); diff != \"\" {\n\t\tt.Errorf(\"ListLocations_missingName: got(-),want(+):\\n%s\", diff)\n\t}\n}\n\nfunc TestGetLocation(t *testing.T) {\n\ts := NewLocationsServer()\n\tname := \"projects/foo/locations/us-west\"\n\twant := &locpb.Location{\n\t\tName:        name,\n\t\tDisplayName: \"us-west\",\n\t}\n\n\tgot, err := s.GetLocation(context.Background(), &locpb.GetLocationRequest{Name: name})\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n\n\tif diff := cmp.Diff(got, want, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\tt.Errorf(\"GetLocation: got(-),want(+):\\n%s\", diff)\n\t}\n}\n\nfunc TestGetLocation_missingName(t *testing.T) {\n\ts := NewLocationsServer()\n\n\tres, err := s.GetLocation(context.Background(), &locpb.GetLocationRequest{})\n\tif err == nil {\n\t\tt.Errorf(\"GetLocation_missingName: expected an error but got response: %v\", res)\n\t}\n\n\tif diff := cmp.Diff(err, missingName, cmpopts.EquateErrors()); diff != \"\" {\n\t\tt.Errorf(\"GetLocation_missingName: got(-),want(+):\\n%s\", diff)\n\t}\n}\n"
  },
  {
    "path": "server/services/messaging_service.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\terrdetails \"google.golang.org/genproto/googleapis/rpc/errdetails\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// NewMessagingServer returns an instance of a messaging server.\nfunc NewMessagingServer(identityServer ReadOnlyIdentityServer) MessagingServer {\n\treturn &messagingServerImpl{\n\t\tidentityServer: identityServer,\n\t\tnowF:           time.Now,\n\t\ttoken:          server.NewTokenGenerator(),\n\t\troomKeys:       map[string]int{},\n\t\tblurbKeys:      map[string]blurbIndex{},\n\t\tblurbs:         map[string][]blurbEntry{},\n\t\tparentUids:     map[string]*server.UniqID{},\n\t\tobservers:      map[string]map[string]blurbObserver{},\n\t}\n}\n\n// MessagingServer provides an interface which is the implementation of the\n// MessagingServer proto and as well as a method for filtering the blurbs.\ntype MessagingServer interface {\n\tFilteredListBlurbs(context.Context, *pb.ListBlurbsRequest, func(*pb.Blurb) bool) (*pb.ListBlurbsResponse, error)\n\n\tpb.MessagingServer\n}\n\ntype messagingServerImpl struct {\n\tnowF           func() time.Time\n\ttoken          server.TokenGenerator\n\tidentityServer ReadOnlyIdentityServer\n\n\troomUID  server.UniqID\n\troomMu   sync.Mutex\n\troomKeys map[string]int\n\trooms    []roomEntry\n\n\tblurbMu    sync.Mutex\n\tblurbKeys  map[string]blurbIndex\n\tblurbs     map[string][]blurbEntry\n\tparentUids map[string]*server.UniqID\n\n\tobsMu     sync.Mutex\n\tobsUID    server.UniqID\n\tobservers map[string]map[string]blurbObserver\n}\n\ntype roomEntry struct {\n\troom    *pb.Room\n\tdeleted bool\n}\n\ntype blurbIndex struct {\n\t// The parent of the blurb.\n\trow string\n\t// The index within the list of blurbs of a parent.\n\tcol int\n}\n\ntype blurbEntry struct {\n\tblurb   *pb.Blurb\n\tdeleted bool\n}\n\ntype blurbObserver interface {\n\tOnCreate(b *pb.Blurb)\n\tOnUpdate(b *pb.Blurb)\n\tOnDelete(b *pb.Blurb)\n}\n\n// Creates a room.\nfunc (s *messagingServerImpl) CreateRoom(ctx context.Context, in *pb.CreateRoomRequest) (*pb.Room, error) {\n\ts.roomMu.Lock()\n\tdefer s.roomMu.Unlock()\n\n\tr := in.GetRoom()\n\terr := validateRoom(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Validate Unique Fields.\n\tuniqName := func(x *pb.Room) bool {\n\t\treturn (r.GetDisplayName() == x.GetDisplayName())\n\t}\n\tif s.anyRoom(uniqName) {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.AlreadyExists,\n\t\t\t\"A room with display_name %s already exists.\",\n\t\t\tr.GetDisplayName())\n\t}\n\n\t// Assign info.\n\tid := s.roomUID.Next()\n\tname := fmt.Sprintf(\"rooms/%d\", id)\n\tnow := ptypes.TimestampNow()\n\n\tr.Name = name\n\tr.CreateTime = now\n\tr.UpdateTime = now\n\n\t// Insert.\n\tindex := len(s.rooms)\n\ts.rooms = append(s.rooms, roomEntry{room: r})\n\ts.roomKeys[name] = index\n\n\treturn r, nil\n}\n\n// Retrieves the Room with the given resource name.\nfunc (s *messagingServerImpl) GetRoom(ctx context.Context, in *pb.GetRoomRequest) (*pb.Room, error) {\n\ts.roomMu.Lock()\n\tdefer s.roomMu.Unlock()\n\n\tname := in.GetName()\n\tif i, ok := s.roomKeys[name]; ok {\n\t\tentry := s.rooms[i]\n\t\tif !entry.deleted {\n\t\t\treturn entry.room, nil\n\t\t}\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound, \"A room with name %s not found.\",\n\t\tname)\n}\n\n// Updates a room.\nfunc (s *messagingServerImpl) UpdateRoom(ctx context.Context, in *pb.UpdateRoomRequest) (*pb.Room, error) {\n\tmask := in.GetUpdateMask()\n\tr := in.GetRoom()\n\n\ts.roomMu.Lock()\n\tdefer s.roomMu.Unlock()\n\n\terr := validateRoom(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ti, ok := s.roomKeys[r.GetName()]\n\n\tif !ok || s.rooms[i].deleted {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A room with name %s not found.\", r.GetName())\n\t}\n\texisting := s.rooms[i].room\n\n\t// Validate Unique Fields.\n\tuniqName := func(x *pb.Room) bool {\n\t\treturn x != existing && (r.GetDisplayName() == x.GetDisplayName())\n\t}\n\tif s.anyRoom(uniqName) {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.AlreadyExists,\n\t\t\t\"A room with either display_name, %s already exists.\",\n\t\t\tr.GetDisplayName())\n\t}\n\n\t// Update store.\n\tupdated := proto.Clone(existing).(*pb.Room)\n\tapplyFieldMask(r.ProtoReflect(), updated.ProtoReflect(), mask.GetPaths())\n\tupdated.CreateTime = existing.GetCreateTime()\n\tupdated.UpdateTime = ptypes.TimestampNow()\n\n\ts.rooms[i] = roomEntry{room: updated}\n\treturn updated, nil\n}\n\n// Deletes a room and all of its blurbs.\nfunc (s *messagingServerImpl) DeleteRoom(ctx context.Context, in *pb.DeleteRoomRequest) (*empty.Empty, error) {\n\ts.roomMu.Lock()\n\tdefer s.roomMu.Unlock()\n\n\ti, ok := s.roomKeys[in.GetName()]\n\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A room with name %s not found.\", in.GetName())\n\t}\n\n\tentry := s.rooms[i]\n\ts.rooms[i] = roomEntry{room: entry.room, deleted: true}\n\n\treturn &empty.Empty{}, nil\n}\n\n// Lists all chat rooms.\nfunc (s *messagingServerImpl) ListRooms(ctx context.Context, in *pb.ListRoomsRequest) (*pb.ListRoomsResponse, error) {\n\tstart, err := s.token.GetIndex(in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\toffset := 0\n\trooms := []*pb.Room{}\n\tfor _, entry := range s.rooms[start:] {\n\t\toffset++\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\trooms = append(rooms, entry.room)\n\t\tif len(rooms) >= int(in.GetPageSize()) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnextToken := \"\"\n\tif start+offset < len(s.rooms) {\n\t\tnextToken = s.token.ForIndex(start + offset)\n\t}\n\n\treturn &pb.ListRoomsResponse{Rooms: rooms, NextPageToken: nextToken}, nil\n}\n\nfunc (s *messagingServerImpl) anyRoom(f func(*pb.Room) bool) bool {\n\tfor _, entry := range s.rooms {\n\t\tif !entry.deleted && f(entry.room) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc validateRoom(r *pb.Room) error {\n\t// Validate Required Fields.\n\tif r.GetDisplayName() == \"\" {\n\t\treturn status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `display_name` is required.\")\n\t}\n\treturn nil\n}\n\n// Creates a blurb. If the parent is a room, the blurb is understood to be a\n// message in that room. If the parent is a profile, the blurb is understood\n// to be a post on the profile.\nfunc (s *messagingServerImpl) CreateBlurb(ctx context.Context, in *pb.CreateBlurbRequest) (*pb.Blurb, error) {\n\tparent := in.GetParent()\n\tif err := s.validateParent(parent); err != nil {\n\t\treturn nil, err\n\t}\n\n\ts.blurbMu.Lock()\n\tdefer s.blurbMu.Unlock()\n\n\tb := in.GetBlurb()\n\tif err := validateBlurb(b); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Assign info.\n\tparentBs, ok := s.blurbs[parent]\n\tif !ok {\n\t\tparentBs = []blurbEntry{}\n\t}\n\tpuid, ok := s.parentUids[parent]\n\tif !ok {\n\t\tpuid = &server.UniqID{}\n\t\ts.parentUids[parent] = puid\n\t}\n\n\tid := puid.Next()\n\tname := fmt.Sprintf(\"%s/blurbs/%d\", parent, id)\n\tnow := ptypes.TimestampNow()\n\tswitch legacyID := b.LegacyId.(type) {\n\tcase *pb.Blurb_LegacyRoomId:\n\t\tname = fmt.Sprintf(\"%s/blurbs/legacy/%s.%d\", parent, legacyID.LegacyRoomId, id)\n\tcase *pb.Blurb_LegacyUserId:\n\t\tname = fmt.Sprintf(\"%s/blurbs/legacy/%s~%d\", parent, legacyID.LegacyUserId, id)\n\t}\n\tb.Name = name\n\tb.CreateTime = now\n\tb.UpdateTime = now\n\n\t// Insert.\n\tindex := len(parentBs)\n\ts.blurbs[parent] = append(parentBs, blurbEntry{blurb: b})\n\ts.blurbKeys[name] = blurbIndex{row: parent, col: index}\n\n\t// Call observers.\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tif parentObservers, ok := s.observers[parent]; ok {\n\t\tfor _, o := range parentObservers {\n\t\t\to.OnCreate(b)\n\t\t}\n\t}\n\n\treturn b, nil\n}\n\n// Retrieves the Blurb with the given resource name.\nfunc (s *messagingServerImpl) GetBlurb(ctx context.Context, in *pb.GetBlurbRequest) (*pb.Blurb, error) {\n\ts.blurbMu.Lock()\n\tdefer s.blurbMu.Unlock()\n\n\tif i, ok := s.blurbKeys[in.GetName()]; ok {\n\t\tentry := s.blurbs[i.row][i.col]\n\t\tif !entry.deleted {\n\t\t\treturn entry.blurb, nil\n\t\t}\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound,\n\t\t\"A blurb with name %s not found.\",\n\t\tin.GetName())\n}\n\n// Updates a blurb.\nfunc (s *messagingServerImpl) UpdateBlurb(ctx context.Context, in *pb.UpdateBlurbRequest) (*pb.Blurb, error) {\n\ts.blurbMu.Lock()\n\tdefer s.blurbMu.Unlock()\n\n\tmask := in.GetUpdateMask()\n\tb := in.GetBlurb()\n\ti, ok := s.blurbKeys[b.GetName()]\n\tif !ok || s.blurbs[i.row][i.col].deleted {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A blurb with name %s not found.\", b.GetName())\n\t}\n\n\tif err := validateBlurb(b); err != nil {\n\t\treturn nil, err\n\t}\n\t// Update store.\n\texisting := s.blurbs[i.row][i.col].blurb\n\tupdated := proto.Clone(existing).(*pb.Blurb)\n\tapplyFieldMask(b.ProtoReflect(), updated.ProtoReflect(), mask.GetPaths())\n\tupdated.CreateTime = existing.GetCreateTime()\n\tupdated.UpdateTime = ptypes.TimestampNow()\n\ts.blurbs[i.row][i.col] = blurbEntry{blurb: updated}\n\n\t// Call observers.\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tif parentObservers, ok := s.observers[i.row]; ok {\n\t\tfor _, o := range parentObservers {\n\t\t\to.OnUpdate(updated)\n\t\t}\n\t}\n\n\treturn updated, nil\n}\n\n// Deletes a blurb.\nfunc (s *messagingServerImpl) DeleteBlurb(ctx context.Context, in *pb.DeleteBlurbRequest) (*empty.Empty, error) {\n\ts.blurbMu.Lock()\n\tdefer s.blurbMu.Unlock()\n\n\ti, ok := s.blurbKeys[in.GetName()]\n\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A blurb with name %s not found.\", in.GetName())\n\t}\n\n\tentry := s.blurbs[i.row][i.col]\n\ts.blurbs[i.row][i.col] = blurbEntry{blurb: entry.blurb, deleted: true}\n\n\t// Call observers.\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tif parentObservers, ok := s.observers[i.row]; ok {\n\t\tfor _, o := range parentObservers {\n\t\t\to.OnDelete(entry.blurb)\n\t\t}\n\t}\n\n\treturn &empty.Empty{}, nil\n}\n\n// Lists blurbs for a specific chat room or user profile depending on the\n// parent resource name.\nfunc (s *messagingServerImpl) ListBlurbs(ctx context.Context, in *pb.ListBlurbsRequest) (*pb.ListBlurbsResponse, error) {\n\tpassFilter := func(_ *pb.Blurb) bool { return true }\n\treturn s.FilteredListBlurbs(ctx, in, passFilter)\n}\n\nfunc (s *messagingServerImpl) FilteredListBlurbs(ctx context.Context, in *pb.ListBlurbsRequest, f func(*pb.Blurb) bool) (*pb.ListBlurbsResponse, error) {\n\tif err := s.validateParent(in.GetParent()); err != nil {\n\t\treturn nil, err\n\t}\n\n\tbs, ok := s.blurbs[in.GetParent()]\n\tif !ok {\n\t\treturn &pb.ListBlurbsResponse{}, nil\n\t}\n\n\tstart, err := s.token.GetIndex(in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\toffset := 0\n\tblurbs := []*pb.Blurb{}\n\tfor _, entry := range bs[start:] {\n\t\toffset++\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\tif f(entry.blurb) {\n\t\t\tblurbs = append(blurbs, entry.blurb)\n\t\t}\n\t\tif len(blurbs) >= int(in.GetPageSize()) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnextToken := \"\"\n\tif start+offset < len(s.blurbs[in.GetParent()]) {\n\t\tnextToken = s.token.ForIndex(start + offset)\n\t}\n\n\treturn &pb.ListBlurbsResponse{Blurbs: blurbs, NextPageToken: nextToken}, nil\n}\n\n// This method searches through all blurbs across all rooms and profiles\n// for blurbs containing to words found in the query. Only posts that\n// contain an exact match of a queried word will be returned.\nfunc (s *messagingServerImpl) SearchBlurbs(ctx context.Context, in *pb.SearchBlurbsRequest) (*longrunningpb.Operation, error) {\n\tif err := s.validateParent(in.GetParent()); err != nil {\n\t\treturn nil, err\n\t}\n\treqBytes, _ := proto.Marshal(in)\n\n\tname := fmt.Sprintf(\n\t\t\"operations/google.showcase.v1beta1.Messaging/SearchBlurbs/%s\",\n\t\tbase64.StdEncoding.EncodeToString(reqBytes))\n\t// TODO(landrito) Add randomization to the retry delay.\n\tmeta, _ := ptypes.MarshalAny(\n\t\t&pb.SearchBlurbsMetadata{\n\t\t\tRetryInfo: &errdetails.RetryInfo{\n\t\t\t\tRetryDelay: ptypes.DurationProto(time.Duration(1) * time.Second),\n\t\t\t},\n\t\t},\n\t)\n\treturn &longrunningpb.Operation{Name: name, Done: false, Metadata: meta}, nil\n}\n\n// This returns a stream that emits the blurbs that are created for a\n// particular chat room or user profile.\nfunc (s *messagingServerImpl) StreamBlurbs(in *pb.StreamBlurbsRequest, stream pb.Messaging_StreamBlurbsServer) error {\n\tparent := in.GetName()\n\tif err := s.validateParent(parent); err != nil {\n\t\treturn err\n\t}\n\n\texpireTime, err := ptypes.Timestamp(in.GetExpireTime())\n\tif err != nil {\n\t\treturn status.Error(codes.InvalidArgument, err.Error())\n\t}\n\tobserver := &streamBlurbsObserver{\n\t\tstream: stream.(BlurbsOutStream),\n\t\tmu:     sync.Mutex{},\n\t}\n\tname := s.registerObserver(parent, observer)\n\tdefer s.removeObserver(parent, name)\n\tfor {\n\t\tif s.nowF().After(expireTime) {\n\t\t\tbreak\n\t\t}\n\t\tif observer.getError() != nil {\n\t\t\treturn observer.getError()\n\t\t}\n\t\tif err := s.validateParent(parent); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// This is a stream to create multiple blurbs. If an invalid blurb is\n// requested to be created, the stream will close with an error.\nfunc (s *messagingServerImpl) SendBlurbs(stream pb.Messaging_SendBlurbsServer) error {\n\tnames := []string{}\n\n\tfor {\n\t\treq, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\treturn stream.SendAndClose(\n\t\t\t\t&pb.SendBlurbsResponse{Names: names})\n\t\t}\n\t\tif err != nil {\n\t\t\treturn withCreatedNames(err, names)\n\t\t}\n\t\tparent := req.GetParent()\n\t\tif err := s.validateParent(parent); err != nil {\n\t\t\treturn withCreatedNames(err, names)\n\t\t}\n\t\tblurb, err := s.CreateBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.CreateBlurbRequest{Parent: parent, Blurb: req.GetBlurb()})\n\t\tif err != nil {\n\t\t\treturn withCreatedNames(err, names)\n\t\t}\n\t\tnames = append(names, blurb.GetName())\n\t}\n}\n\nfunc withCreatedNames(err error, names []string) error {\n\ts, _ := status.FromError(err)\n\tspb := s.Proto()\n\n\tdetails, err := ptypes.MarshalAny(&pb.SendBlurbsResponse{Names: names})\n\tif err == nil {\n\t\tspb.Details = append(spb.Details, details)\n\t}\n\n\treturn status.ErrorProto(spb)\n}\n\n// This method starts a bidirectional stream that receives all blurbs that\n// are being created after the stream has started and sends requests to create\n// blurbs. If an invalid blurb is requested to be created, the stream will\n// close with an error.\nfunc (s *messagingServerImpl) Connect(stream pb.Messaging_ConnectServer) error {\n\tconfigured := false\n\tparent := \"\"\n\tvar observer *streamBlurbsObserver\n\n\tfor {\n\t\treq, err := stream.Recv()\n\n\t\t// Handle stream errors.\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Setup Configuration\n\t\tif !configured && req != nil {\n\t\t\tif req.GetConfig() == nil {\n\t\t\t\treturn status.Error(\n\t\t\t\t\tcodes.InvalidArgument,\n\t\t\t\t\t\"The first request to Connect, must contain a config field\")\n\t\t\t}\n\n\t\t\tparent = req.GetConfig().GetParent()\n\t\t\tif err := s.validateParent(parent); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tobserver = &streamBlurbsObserver{\n\t\t\t\tstream: stream.(BlurbsOutStream),\n\t\t\t\tmu:     sync.Mutex{},\n\t\t\t}\n\t\t\tconfigured = true\n\t\t\tname := s.registerObserver(parent, observer)\n\t\t\tdefer s.removeObserver(parent, name)\n\t\t\tcontinue\n\t\t}\n\t\t// Check if there was a send error.\n\t\tif err := observer.getError(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Check if the parent still exists.\n\t\tif err := s.validateParent(parent); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Create the blurb\n\t\tif req == nil || req.GetBlurb() == nil {\n\t\t\tcontinue\n\t\t}\n\t\t_, err = s.CreateBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.CreateBlurbRequest{Parent: parent, Blurb: req.GetBlurb()})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n}\n\nfunc validateBlurb(b *pb.Blurb) error {\n\t// Validate Required Fields.\n\tif b.GetUser() == \"\" {\n\t\treturn status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `user` is required.\")\n\t}\n\treturn nil\n}\n\nfunc (s *messagingServerImpl) validateParent(p string) error {\n\t_, uErr := s.identityServer.GetUser(\n\t\tcontext.Background(),\n\t\t&pb.GetUserRequest{\n\t\t\tName: strings.TrimSuffix(p, \"/profile\"),\n\t\t},\n\t)\n\t_, rErr := s.GetRoom(context.Background(), &pb.GetRoomRequest{Name: p})\n\tif uErr != nil && rErr != nil {\n\t\treturn status.Errorf(codes.NotFound, \"Parent %s not found.\", p)\n\t}\n\treturn nil\n}\n\n// Observer\ntype streamBlurbsObserver struct {\n\t// The stream to send the blurbs.\n\tstream BlurbsOutStream\n\n\t// Blurb parent to observe.\n\tparent string\n\n\t// Holds an error that occurred when sending a blurb.\n\tmu  sync.Mutex\n\terr error\n}\n\n// BlurbsOutStream is the common interface of the connect and streamblurbs streams.\n// This interface allows the observer to handle both streams.\ntype BlurbsOutStream interface {\n\tSend(*pb.StreamBlurbsResponse) error\n}\n\nfunc (o *streamBlurbsObserver) getError() error {\n\to.mu.Lock()\n\tdefer o.mu.Unlock()\n\treturn o.err\n}\n\nfunc (o *streamBlurbsObserver) updateError(err error) {\n\to.mu.Lock()\n\tdefer o.mu.Unlock()\n\tif o.err == nil {\n\t\to.err = err\n\t}\n}\n\nfunc (o *streamBlurbsObserver) OnCreate(b *pb.Blurb) {\n\to.updateError(\n\t\to.stream.Send(\n\t\t\t&pb.StreamBlurbsResponse{\n\t\t\t\tBlurb:  b,\n\t\t\t\tAction: pb.StreamBlurbsResponse_CREATE,\n\t\t\t}))\n}\n\nfunc (o *streamBlurbsObserver) OnUpdate(b *pb.Blurb) {\n\to.updateError(\n\t\to.stream.Send(\n\t\t\t&pb.StreamBlurbsResponse{\n\t\t\t\tBlurb:  b,\n\t\t\t\tAction: pb.StreamBlurbsResponse_UPDATE,\n\t\t\t}))\n}\n\n// Do nothing for now. Need to change the\nfunc (o *streamBlurbsObserver) OnDelete(b *pb.Blurb) {\n\to.updateError(\n\t\to.stream.Send(\n\t\t\t&pb.StreamBlurbsResponse{\n\t\t\t\tBlurb:  b,\n\t\t\t\tAction: pb.StreamBlurbsResponse_DELETE,\n\t\t\t}))\n}\n\nfunc (s *messagingServerImpl) registerObserver(parent string, o blurbObserver) string {\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tname := strconv.FormatInt(s.obsUID.Next(), 10)\n\tif _, ok := s.observers[parent]; !ok {\n\t\ts.observers[parent] = map[string]blurbObserver{}\n\t}\n\ts.observers[parent][name] = o\n\treturn name\n}\n\nfunc (s *messagingServerImpl) hasObservers(parent string) bool {\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tif os, ok := s.observers[parent]; ok && len(os) > 0 {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (s *messagingServerImpl) removeObserver(parent string, name string) {\n\ts.obsMu.Lock()\n\tdefer s.obsMu.Unlock()\n\tdelete(s.observers[parent], name)\n\tif len(s.observers[parent]) <= 0 {\n\t\tdelete(s.observers, parent)\n\t}\n}\n"
  },
  {
    "path": "server/services/messaging_service_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/timestamp\"\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"golang.org/x/sync/errgroup\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/types/known/fieldmaskpb\"\n)\n\nfunc Test_Room_lifecycle(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\n\tfirst, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{\n\t\t\tRoom: &pb.Room{DisplayName: \"Living Room\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tdelete, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{\n\t\t\tRoom: &pb.Room{DisplayName: \"Library\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteRoom(\n\t\tcontext.Background(),\n\t\t&pb.DeleteRoomRequest{Name: delete.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\tcreated, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{\n\t\t\tRoom: &pb.Room{DisplayName: \"Weight Room\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tgot, err := s.GetRoom(\n\t\tcontext.Background(),\n\t\t&pb.GetRoomRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(created, got) {\n\t\tt.Error(\"Expected to get created room.\")\n\t}\n\n\tgot.DisplayName = \"Library\"\n\t_, err = s.UpdateRoom(\n\t\tcontext.Background(),\n\t\t&pb.UpdateRoomRequest{Room: got, UpdateMask: nil})\n\tif err != nil {\n\t\tt.Errorf(\"Update: unexpected err %+v\", err)\n\t}\n\n\tupdated, err := s.GetRoom(\n\t\tcontext.Background(),\n\t\t&pb.GetRoomRequest{Name: got.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\t// Cannot use proto.Equal here because the update time is changed on updates.\n\tif updated.GetName() != got.GetName() ||\n\t\tupdated.GetDisplayName() != got.GetDisplayName() ||\n\t\t!proto.Equal(updated.GetCreateTime(), got.GetCreateTime()) ||\n\t\tproto.Equal(updated.GetUpdateTime(), got.GetUpdateTime()) {\n\t\tt.Errorf(\"Expected to get updated room. Want: %+v, got %+v\", got, updated)\n\t}\n\n\tr, err := s.ListRooms(\n\t\tcontext.Background(),\n\t\t&pb.ListRoomsRequest{PageSize: 1, PageToken: \"\"})\n\tif len(r.GetRooms()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetRooms()))\n\t}\n\tif !proto.Equal(first, r.GetRooms()[0]) {\n\t\tt.Errorf(\"List want: first room %+v, got %+v\", first, r.GetRooms()[0])\n\t}\n\tif r.GetNextPageToken() == \"\" {\n\t\tt.Error(\"List want: non empty next page token\")\n\t}\n\n\tr, err = s.ListRooms(\n\t\tcontext.Background(),\n\t\t&pb.ListRoomsRequest{PageSize: 10, PageToken: r.GetNextPageToken()})\n\tif len(r.GetRooms()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetRooms()))\n\t}\n\tif !proto.Equal(updated, r.GetRooms()[0]) {\n\t\tt.Errorf(\"List want: updated room %+v, got %+v\", updated, r.GetRooms()[0])\n\t}\n\tif r.GetNextPageToken() != \"\" {\n\t\tt.Error(\"List want: empty next page token\")\n\t}\n}\n\nfunc Test_CreateRoom_invalid(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{Room: &pb.Room{DisplayName: \"\"}})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_CreateRoom_alreadyPresent(t *testing.T) {\n\troom := &pb.Room{DisplayName: \"Living Room\"}\n\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.CreateRoom(context.Background(), &pb.CreateRoomRequest{Room: room})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\t_, err = s.CreateRoom(context.Background(), &pb.CreateRoomRequest{Room: room})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.AlreadyExists {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.AlreadyExists,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_GetRoom_notFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.GetRoom(\n\t\tcontext.Background(),\n\t\t&pb.GetRoomRequest{Name: \"Weight Room\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_GetRoom_deleted(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\tcreated, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{\n\t\t\tRoom: &pb.Room{DisplayName: \"Weight Room\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteRoom(\n\t\tcontext.Background(),\n\t\t&pb.DeleteRoomRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.GetRoom(\n\t\tcontext.Background(),\n\t\t&pb.GetRoomRequest{Name: created.GetName()})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get deleted: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_UpdateRoom_fieldmask(t *testing.T) {\n\tfirst := &pb.Room{DisplayName: \"Living Room\"}\n\tsecond := &pb.Room{DisplayName: \"Dining Room\"}\n\tpaths := []string{\"display_name\"}\n\ts := NewMessagingServer(NewIdentityServer())\n\tcreated, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{Room: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tsecond.Name = created.GetName()\n\tgot, err := s.UpdateRoom(\n\t\tcontext.Background(),\n\t\t&pb.UpdateRoomRequest{\n\t\t\tRoom:       second,\n\t\t\tUpdateMask: &fieldmaskpb.FieldMask{Paths: paths}})\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif diff := cmp.Diff(got.GetDisplayName(), second.GetDisplayName()); diff != \"\" {\n\t\tt.Errorf(\"Using update_mask %s, got(-),want(+):\\n%s\", strings.Join(paths, \",\"), diff)\n\t}\n}\n\nfunc Test_UpdateRoom_notFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.UpdateRoom(\n\t\tcontext.Background(),\n\t\t&pb.UpdateRoomRequest{\n\t\t\tRoom: &pb.Room{\n\t\t\t\tName:        \"rooms/abc\",\n\t\t\t\tDisplayName: \"Weight Room\",\n\t\t\t},\n\t\t\tUpdateMask: nil,\n\t\t})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_UpdateRoom_invalid(t *testing.T) {\n\tfirst := &pb.Room{DisplayName: \"Living Room\"}\n\tsecond := &pb.Room{DisplayName: \"\"}\n\ts := NewMessagingServer(NewIdentityServer())\n\tcreated, err := s.CreateRoom(\n\t\tcontext.Background(),\n\t\t&pb.CreateRoomRequest{Room: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tsecond.Name = created.GetName()\n\t_, err = s.UpdateRoom(\n\t\tcontext.Background(),\n\t\t&pb.UpdateRoomRequest{Room: second, UpdateMask: nil})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_UpdateRoom_alreadyPresent(t *testing.T) {\n\tfirst := []*pb.Room{\n\t\t{DisplayName: \"Living Room\"},\n\t\t{DisplayName: \"Weight Room\"},\n\t}\n\tsecond := &pb.Room{DisplayName: \"Weight Room\"}\n\n\ts := NewMessagingServer(NewIdentityServer())\n\tfor i, r := range first {\n\t\tcreated, err := s.CreateRoom(\n\t\t\tcontext.Background(),\n\t\t\t&pb.CreateRoomRequest{Room: r})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t\t}\n\t\tfirst[i].Name = created.GetName()\n\t}\n\tsecond.Name = first[0].GetName()\n\t_, err := s.UpdateRoom(\n\t\tcontext.Background(),\n\t\t&pb.UpdateRoomRequest{Room: second, UpdateMask: nil})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.AlreadyExists {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.AlreadyExists,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_DeleteRoom_notFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.DeleteRoom(\n\t\tcontext.Background(),\n\t\t&pb.DeleteRoomRequest{Name: \"Weight Room\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Delete: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ListRooms_invalidToken(t *testing.T) {\n\ts := messagingServerImpl{\n\t\ttoken:    server.TokenGeneratorWithSalt(\"salt\"),\n\t\troomKeys: map[string]int{},\n\t}\n\n\ttests := []string{\n\t\t\"1\", // Not base64 encoded\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"1\")),        // No salt\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"saltblah\")), // Invalid index\n\t}\n\n\tfor _, token := range tests {\n\t\t_, err := s.ListRooms(\n\t\t\tcontext.Background(),\n\t\t\t&pb.ListRoomsRequest{PageSize: 1, PageToken: token})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"List: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n\ntype mockIdentityServer struct{}\n\nfunc (m *mockIdentityServer) GetUser(_ context.Context, _ *pb.GetUserRequest) (*pb.User, error) {\n\treturn &pb.User{}, nil\n}\n\nfunc (m *mockIdentityServer) ListUsers(_ context.Context, _ *pb.ListUsersRequest) (*pb.ListUsersResponse, error) {\n\treturn nil, nil\n}\n\nfunc Test_Blurb_lifecycle(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\tfirst, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\t// create a Blurb with legacy_user_id\n\tsecond, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:     \"users/rumble\",\n\t\t\t\tContent:  &pb.Blurb_Text{Text: \"non-slash resource test.\"},\n\t\t\t\tLegacyId: &pb.Blurb_LegacyUserId{LegacyUserId: \"legacy_rumble\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\t// get the second Blurb from database and verify the legacy_user_id, then delete it.\n\tgotSecond, err := s.GetBlurb(\n\t\tcontext.Background(),\n\t\t&pb.GetBlurbRequest{Name: second.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(second, gotSecond) {\n\t\tt.Error(\"Expected to get created blurb.\")\n\t}\n\t_, err = s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: second.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\tdelete, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/ekko\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: delete.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tgot, err := s.GetBlurb(\n\t\tcontext.Background(),\n\t\t&pb.GetBlurbRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(created, got) {\n\t\tt.Error(\"Expected to get created blurb.\")\n\t}\n\n\tgot.Content = &pb.Blurb_Text{Text: \"purrr\"}\n\t_, err = s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{Blurb: got, UpdateMask: nil})\n\tif err != nil {\n\t\tt.Errorf(\"Update: unexpected err %+v\", err)\n\t}\n\n\tupdated, err := s.GetBlurb(\n\t\tcontext.Background(),\n\t\t&pb.GetBlurbRequest{Name: got.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\t// Cannot use proto.Equal here because the update time is changed on updates.\n\tif updated.GetName() != got.GetName() ||\n\t\tupdated.GetUser() != got.GetUser() ||\n\t\tupdated.GetText() != got.GetText() ||\n\t\t!proto.Equal(updated.GetCreateTime(), got.GetCreateTime()) ||\n\t\tproto.Equal(updated.GetUpdateTime(), got.GetUpdateTime()) {\n\t\tt.Errorf(\"Expected to get updated blurb. Want: %+v, got %+v\", got, updated)\n\t}\n\n\tr, err := s.ListBlurbs(\n\t\tcontext.Background(),\n\t\t&pb.ListBlurbsRequest{\n\t\t\tParent:    \"users/rumble/profile\",\n\t\t\tPageSize:  1,\n\t\t\tPageToken: \"\",\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"List: unexpected err %+v\", err)\n\t}\n\tif len(r.GetBlurbs()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetBlurbs()))\n\t}\n\tif !proto.Equal(first, r.GetBlurbs()[0]) {\n\t\tt.Errorf(\"List want: first blurb %+v, got %+v\", first, r.GetBlurbs()[0])\n\t}\n\tif r.GetNextPageToken() == \"\" {\n\t\tt.Error(\"List want: non empty next page token\")\n\t}\n\n\tr, err = s.ListBlurbs(\n\t\tcontext.Background(),\n\t\t&pb.ListBlurbsRequest{\n\t\t\tParent:    \"users/rumble/profile\",\n\t\t\tPageSize:  10,\n\t\t\tPageToken: r.GetNextPageToken(),\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"List: unexpected err %+v\", err)\n\t}\n\tif len(r.GetBlurbs()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetBlurbs()))\n\t}\n\tif !proto.Equal(updated, r.GetBlurbs()[0]) {\n\t\tt.Errorf(\"List want: updated blurb %+v, got %+v\", updated, r.GetBlurbs()[0])\n\t}\n\tif r.GetNextPageToken() != \"\" {\n\t\tt.Error(\"List want: empty next page token\")\n\t}\n}\n\nfunc Test_CreateBlurb_invalid(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\t_, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{Blurb: &pb.Blurb{}})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_CreateBlurb_parentNotFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\n\t_, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{Parent: \"users/rumble/profile\", Blurb: &pb.Blurb{}})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_GetBlurb_notFound(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\t_, err := s.GetBlurb(\n\t\tcontext.Background(),\n\t\t&pb.GetBlurbRequest{Name: \"users/rumble/profile/blurbs/1\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_GetBlurb_deleted(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.GetBlurb(\n\t\tcontext.Background(),\n\t\t&pb.GetBlurbRequest{Name: created.GetName()})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get deleted: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_UpdateBlurb_fieldmask(t *testing.T) {\n\tfirst := &pb.Blurb{\n\t\tUser:    \"users/rumble\",\n\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t}\n\tsecond := &pb.Blurb{\n\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t}\n\tpaths := []string{\"text\"}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{Blurb: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tsecond.Name = created.GetName()\n\tsecond.User = created.GetUser()\n\tgot, err := s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{Blurb: second, UpdateMask: &fieldmaskpb.FieldMask{Paths: paths}})\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif diff := cmp.Diff(got.GetText(), second.GetText()); diff != \"\" {\n\t\tt.Errorf(\"Using update_mask %s, got(-),want(+):\\n%s\", strings.Join(paths, \",\"), diff)\n\t}\n}\n\nfunc Test_UpdateBlurb_notFound(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\t_, err := s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t\tUpdateMask: nil,\n\t\t})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_UpdateBlurb_invalid(t *testing.T) {\n\tfirst := &pb.Blurb{\n\t\tUser:    \"users/rumble\",\n\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t}\n\tsecond := &pb.Blurb{\n\t\tUser:    \"\",\n\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{Blurb: first})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tsecond.Name = created.GetName()\n\t_, err = s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{Blurb: second, UpdateMask: nil})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Update: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_DeleteBlurb_notFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\t_, err := s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: \"user/rumble/profile/blurbs/1\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Delete: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ListBlurbs_invalidToken(t *testing.T) {\n\ts := messagingServerImpl{\n\t\tidentityServer: &mockIdentityServer{},\n\t\ttoken:          server.TokenGeneratorWithSalt(\"salt\"),\n\t\troomKeys:       map[string]int{},\n\t\tblurbKeys:      map[string]blurbIndex{},\n\t\tblurbs:         map[string][]blurbEntry{},\n\t\tparentUids:     map[string]*server.UniqID{},\n\t\tobservers:      map[string]map[string]blurbObserver{},\n\t}\n\n\ttests := []string{\n\t\t\"1\", // Not base64 encoded\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"1\")),        // No salt\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"saltblah\")), // Invalid index\n\t}\n\n\t_, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tfor _, token := range tests {\n\t\t_, err := s.ListBlurbs(\n\t\t\tcontext.Background(),\n\t\t\t&pb.ListBlurbsRequest{\n\t\t\t\tParent:    \"users/rumble/profile\",\n\t\t\t\tPageSize:  1,\n\t\t\t\tPageToken: token})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"List: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n\nfunc Test_ListBlurbs_parentNotFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\n\t_, err := s.ListBlurbs(\n\t\tcontext.Background(),\n\t\t&pb.ListBlurbsRequest{Parent: \"users/rumble/profile\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"List: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ListBlurbs_noneCreated(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\tresp, err := s.ListBlurbs(\n\t\tcontext.Background(),\n\t\t&pb.ListBlurbsRequest{Parent: \"users/rumble/profile\"})\n\tif err != nil {\n\t\tt.Errorf(\"List: unexpected err %+v\", err)\n\t}\n\tif len(resp.GetBlurbs()) > 0 {\n\t\tt.Errorf(\"List none created: want empty list got %+v\", resp)\n\t}\n}\n\nfunc Test_SearchBlurbs(t *testing.T) {\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\treq := &pb.SearchBlurbsRequest{\n\t\tQuery:    \"woof bark\",\n\t\tParent:   \"users/rumble/profile\",\n\t\tPageSize: 100,\n\t}\n\n\top, err := s.SearchBlurbs(\n\t\tcontext.Background(),\n\t\treq)\n\tif err != nil {\n\t\tt.Errorf(\"SearchBlurbs: unexpected err %+v\", err)\n\t}\n\n\texpName := \"operations/google.showcase.v1beta1.Messaging/SearchBlurbs/\"\n\tif !strings.HasPrefix(op.Name, expName) {\n\t\tt.Errorf(\n\t\t\t\"SearchBlurbs op.Name prefex want: '%s', got: %s'\",\n\t\t\texpName,\n\t\t\top.Name)\n\t}\n\n\treqProto := &pb.SearchBlurbsRequest{}\n\tencodedBytes := strings.TrimPrefix(\n\t\top.Name,\n\t\texpName)\n\tbytes, _ := base64.StdEncoding.DecodeString(encodedBytes)\n\tproto.Unmarshal(bytes, reqProto)\n\tif !proto.Equal(reqProto, req) {\n\t\tt.Errorf(\n\t\t\t\"SearchBlurbs for %q expected unmarshalled %q, got %q\",\n\t\t\treq,\n\t\t\treq,\n\t\t\treqProto)\n\t}\n}\n\nfunc Test_SearchBlurbs_parentNotFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\n\treq := &pb.SearchBlurbsRequest{\n\t\tQuery:  \"woof bark\",\n\t\tParent: \"users/rumble/profile\",\n\t}\n\n\t_, err := s.SearchBlurbs(\n\t\tcontext.Background(),\n\t\treq)\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"SearchBlurbs: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\ntype mockStreamBlurbsStream struct {\n\tmu    sync.Mutex\n\tresps []*pb.StreamBlurbsResponse\n\tpb.Messaging_StreamBlurbsServer\n}\n\nfunc (m *mockStreamBlurbsStream) Send(resp *pb.StreamBlurbsResponse) error {\n\tm.mu.Lock()\n\tdefer m.mu.Unlock()\n\tm.resps = append(m.resps, resp)\n\treturn nil\n}\n\nfunc TestStreamBlurbs_lifecycle(t *testing.T) {\n\t// We specify the now function so we can control when the stream ends.\n\ts := &messagingServerImpl{\n\t\tidentityServer: &mockIdentityServer{},\n\t\ttoken:          server.NewTokenGenerator(),\n\t\troomKeys:       map[string]int{},\n\t\tblurbKeys:      map[string]blurbIndex{},\n\t\tblurbs:         map[string][]blurbEntry{},\n\t\tparentUids:     map[string]*server.UniqID{},\n\t\tobservers:      map[string]map[string]blurbObserver{},\n\t\tnowF: func() time.Time {\n\t\t\treturn time.Unix(int64(0), int64(0))\n\t\t},\n\t}\n\n\t// Set up the mock stream.\n\tm := &mockStreamBlurbsStream{resps: []*pb.StreamBlurbsResponse{}}\n\n\t// Make the end time some time after the time the now function will return.\n\tendTime, err := ptypes.TimestampProto(time.Unix(int64(1), int64(0)))\n\tif err != nil {\n\t\tt.Errorf(\"TimestampProto: unexpected err %+v\", err)\n\t}\n\n\t// The parent to stream\n\tp := \"users/rumble/profile\"\n\n\t// Start the stream.\n\twg := &sync.WaitGroup{}\n\twg.Add(1)\n\tgo (func() {\n\t\terr := s.StreamBlurbs(\n\t\t\t&pb.StreamBlurbsRequest{\n\t\t\t\tName:       p,\n\t\t\t\tExpireTime: endTime,\n\t\t\t},\n\t\t\tm,\n\t\t)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"StreamBlurbs: unexpected err %+v\", err)\n\t\t}\n\t\twg.Done()\n\t})()\n\n\t// Wait for the stream request to propogate the observer to the database.\n\tfor {\n\t\tif s.hasObservers(p) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Create a blurb.\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: p,\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.mu.Lock()\n\tstreamResp := m.resps[len(m.resps)-1]\n\tm.mu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_CREATE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_CREATE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), created) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want created blurb %+v, got %+v\",\n\t\t\tcreated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Update the blurb.\n\tcreated.Content = &pb.Blurb_Text{Text: \"purrr\"}\n\tupdated, err := s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{Blurb: created, UpdateMask: nil})\n\tif err != nil {\n\t\tt.Errorf(\"Update: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.mu.Lock()\n\tstreamResp = m.resps[len(m.resps)-1]\n\tm.mu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_UPDATE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_UPDATE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), updated) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want updated blurb %+v, got %+v\",\n\t\t\tupdated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Delete the blurb.\n\t_, err = s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: updated.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.mu.Lock()\n\tstreamResp = m.resps[len(m.resps)-1]\n\tm.mu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_DELETE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_DELETE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), updated) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want deleted blurb %+v, got %+v\",\n\t\t\tupdated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Set the now function to return a time after the expire time to close the\n\t// stream.\n\ts.nowF = func() time.Time {\n\t\treturn time.Unix(int64(2), int64(0))\n\t}\n\n\t// Wait til the stream is closed.\n\twg.Wait()\n}\n\nfunc Test_StreamBlurbs_parentNotFound(t *testing.T) {\n\ts := NewMessagingServer(NewIdentityServer())\n\n\terr := s.StreamBlurbs(\n\t\t&pb.StreamBlurbsRequest{Name: \"users/rumble/profile\"},\n\t\tnil)\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_StreamBlurbs_invalidTimestamp(t *testing.T) {\n\tis := NewIdentityServer()\n\tfirst, err := is.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"rumbledog\", Email: \"rumble@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\ts := NewMessagingServer(is)\n\n\tmaxValidSeconds := int64(253402300800)\n\terr = s.StreamBlurbs(\n\t\t&pb.StreamBlurbsRequest{Name: first.GetName(), ExpireTime: &timestamp.Timestamp{Seconds: maxValidSeconds + 1}},\n\t\tnil)\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Create: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\ntype errorStreamBlurbsStream struct {\n\tpb.Messaging_StreamBlurbsServer\n}\n\nfunc (m *errorStreamBlurbsStream) Send(_ *pb.StreamBlurbsResponse) error {\n\treturn status.Error(codes.Unknown, \"Error\")\n}\n\nfunc Test_StreamBlurbs_sendError(t *testing.T) {\n\t// We specify the now function so we can control when the stream ends.\n\ts := &messagingServerImpl{\n\n\t\tidentityServer: &mockIdentityServer{},\n\t\ttoken:          server.NewTokenGenerator(),\n\t\troomKeys:       map[string]int{},\n\t\tblurbKeys:      map[string]blurbIndex{},\n\t\tblurbs:         map[string][]blurbEntry{},\n\t\tparentUids:     map[string]*server.UniqID{},\n\t\tobservers:      map[string]map[string]blurbObserver{},\n\t\tnowF: func() time.Time {\n\t\t\treturn time.Unix(int64(0), int64(0))\n\t\t},\n\t}\n\n\t// Make the end time some time after the time the now function will return.\n\tendTime, err := ptypes.TimestampProto(time.Unix(int64(1), int64(0)))\n\tif err != nil {\n\t\tt.Errorf(\"TimestampProto: unexpected err %+v\", err)\n\t}\n\n\t// The parent to stream.\n\tp := \"users/rumble/profile\"\n\n\t// Start Stream.\n\twg := &sync.WaitGroup{}\n\twg.Add(1)\n\tgo (func() {\n\t\terr = s.StreamBlurbs(\n\t\t\t&pb.StreamBlurbsRequest{Name: p, ExpireTime: endTime},\n\t\t\t&errorStreamBlurbsStream{})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.Unknown {\n\t\t\tt.Errorf(\n\t\t\t\t\"Create: Want error code %d got %d\",\n\t\t\t\tcodes.Unknown,\n\t\t\t\tstatus.Code())\n\t\t}\n\t\twg.Done()\n\t})()\n\n\t// Wait for the stream request to propogate the observer to the database.\n\tfor {\n\t\tif s.hasObservers(p) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Create a blurb to trigger observer.\n\t_, err = s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: p,\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\twg.Wait()\n}\n\ntype nilStreamBlurbsStream struct {\n\tpb.Messaging_StreamBlurbsServer\n}\n\nfunc (m *nilStreamBlurbsStream) Send(resp *pb.StreamBlurbsResponse) error {\n\treturn nil\n}\n\nfunc Test_StreamBlurbs_parentNotFoundLater(t *testing.T) {\n\t// Setup Identity server to validate parent against.\n\tis := NewIdentityServer()\n\tfirst, err := is.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"rumbledog\", Email: \"rumble@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t// We specify the now function so we can control when the stream ends.\n\ts := &messagingServerImpl{\n\t\tidentityServer: is,\n\n\t\ttoken:      server.NewTokenGenerator(),\n\t\troomKeys:   map[string]int{},\n\t\tblurbKeys:  map[string]blurbIndex{},\n\t\tblurbs:     map[string][]blurbEntry{},\n\t\tparentUids: map[string]*server.UniqID{},\n\t\tobservers:  map[string]map[string]blurbObserver{},\n\t\tnowF: func() time.Time {\n\t\t\treturn time.Unix(int64(0), int64(0))\n\t\t},\n\t}\n\n\t// Make the end time some time after the time the now function will return.\n\tendTime, err := ptypes.TimestampProto(time.Unix(int64(1), int64(0)))\n\tif err != nil {\n\t\tt.Errorf(\"TimestampProto: unexpected err %+v\", err)\n\t}\n\n\tparent := fmt.Sprintf(\"%s/profile\", first.GetName())\n\n\t// Start Stream.\n\twg := &sync.WaitGroup{}\n\twg.Add(1)\n\tgo (func() {\n\t\terr := s.StreamBlurbs(\n\t\t\t&pb.StreamBlurbsRequest{\n\t\t\t\tName:       parent,\n\t\t\t\tExpireTime: endTime,\n\t\t\t},\n\t\t\t&nilStreamBlurbsStream{})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.NotFound {\n\t\t\tt.Errorf(\n\t\t\t\t\"StreamBlurbs: Want error code %d got %d\",\n\t\t\t\tcodes.NotFound,\n\t\t\t\tstatus.Code())\n\t\t}\n\t\twg.Done()\n\t})()\n\n\tfor {\n\t\tif s.hasObservers(parent) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Delete the user so that the parent is invalid.\n\tis.DeleteUser(\n\t\tcontext.Background(),\n\t\t&pb.DeleteUserRequest{Name: first.GetName()})\n\n\t// Wait til the stream closes.\n\twg.Wait()\n}\n\ntype mockSendBlurbsStream struct {\n\treqs []*pb.CreateBlurbRequest\n\tresp *pb.SendBlurbsResponse\n\tt    *testing.T\n\n\tmu   sync.Mutex\n\tnext int\n\tpb.Messaging_SendBlurbsServer\n}\n\nfunc (m *mockSendBlurbsStream) SendAndClose(r *pb.SendBlurbsResponse) error {\n\tm.resp = r\n\treturn nil\n}\n\nfunc (m *mockSendBlurbsStream) Recv() (*pb.CreateBlurbRequest, error) {\n\tm.mu.Lock()\n\tdefer m.mu.Unlock()\n\tif m.next < len(m.reqs) {\n\t\tcur := m.next\n\t\tm.next++\n\t\treturn m.reqs[cur], nil\n\t}\n\treturn nil, io.EOF\n}\n\nfunc TestSendBlurbs(t *testing.T) {\n\treqs := []*pb.CreateBlurbRequest{\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/musubi/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/ekko\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockSendBlurbsStream{\n\t\treqs: reqs,\n\t\tt:    t,\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.SendBlurbs(m)\n\tif err != nil {\n\t\tt.Errorf(\"SendBlurbs: unexpected err %+v\", err)\n\t}\n\tfor i, name := range m.resp.GetNames() {\n\t\tgot, err := s.GetBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.GetBlurbRequest{Name: name})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t\t}\n\t\tif reqs[i].GetBlurb().GetUser() != got.GetUser() ||\n\t\t\treqs[i].GetBlurb().GetText() != got.GetText() {\n\t\t\tt.Errorf(\n\t\t\t\t\"Expected to get created blurb. Want: %+v, got %+v\",\n\t\t\t\treqs[i].GetBlurb(),\n\t\t\t\tgot)\n\t\t}\n\t}\n}\n\ntype errorSendBlurbsStream struct {\n\treqs []*pb.CreateBlurbRequest\n\tresp *pb.SendBlurbsResponse\n\tt    *testing.T\n\n\tmu   sync.Mutex\n\tnext int\n\tpb.Messaging_SendBlurbsServer\n}\n\nfunc (m *errorSendBlurbsStream) SendAndClose(r *pb.SendBlurbsResponse) error {\n\tm.resp = r\n\treturn nil\n}\n\nfunc (m *errorSendBlurbsStream) Recv() (*pb.CreateBlurbRequest, error) {\n\tm.mu.Lock()\n\tdefer m.mu.Unlock()\n\tif m.next < len(m.reqs) {\n\t\tcur := m.next\n\t\tm.next++\n\t\treturn m.reqs[cur], nil\n\t}\n\treturn nil, status.Error(codes.Unknown, \"Error\")\n}\n\nfunc TestSendBlurbs_error(t *testing.T) {\n\treqs := []*pb.CreateBlurbRequest{\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/musubi/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/ekko\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t\t},\n\t\t},\n\t}\n\tm := &errorSendBlurbsStream{\n\t\treqs: reqs,\n\t\tt:    t,\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.SendBlurbs(m)\n\tif err == nil {\n\t\tt.Error(\"SendBlurbs: expected err\")\n\t}\n\n\tst, ok := status.FromError(err)\n\tif !ok {\n\t\tt.Errorf(\"SendBlurbs: expected err to be status %+v\", err)\n\t}\n\tdetails := st.Proto().GetDetails()\n\tif len(details) > 1 {\n\t\tt.Errorf(\"SendBlurbs: expected err details to be of length 1\")\n\t}\n\tresp := &pb.SendBlurbsResponse{}\n\tptypes.UnmarshalAny(details[0], resp)\n\n\tfor i, name := range resp.GetNames() {\n\t\tgot, err := s.GetBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.GetBlurbRequest{Name: name})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t\t}\n\t\tif reqs[i].GetBlurb().GetName() != got.GetName() ||\n\t\t\treqs[i].GetBlurb().GetUser() != got.GetUser() ||\n\t\t\treqs[i].GetBlurb().GetText() != got.GetText() {\n\t\t\tt.Errorf(\"Expected to get updated blurb. Want: %+v, got %+v\", reqs, got)\n\t\t}\n\t}\n}\n\nfunc TestSendBlurbs_invalidParent(t *testing.T) {\n\t// Setup Identity server to validate parent against.\n\tis := NewIdentityServer()\n\tfirst, err := is.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"rumbledog\", Email: \"rumble@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tparent := fmt.Sprintf(\"%s/profile\", first.GetName())\n\treqs := []*pb.CreateBlurbRequest{\n\t\t{\n\t\t\tParent: parent,\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: parent,\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"does/not/exist\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/ekko\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockSendBlurbsStream{\n\t\treqs: reqs,\n\t\tt:    t,\n\t}\n\ts := NewMessagingServer(is)\n\n\terr = s.SendBlurbs(m)\n\tif err == nil {\n\t\tt.Error(\"SendBlurbs: expected err\")\n\t}\n\n\tst, ok := status.FromError(err)\n\tif !ok {\n\t\tt.Errorf(\"SendBlurbs: expected err to be status %+v\", err)\n\t}\n\tdetails := st.Proto().GetDetails()\n\tif len(details) > 1 {\n\t\tt.Errorf(\"SendBlurbs: expected err details to be of length 1\")\n\t}\n\tresp := &pb.SendBlurbsResponse{}\n\tptypes.UnmarshalAny(details[0], resp)\n\n\tfor i, name := range resp.GetNames() {\n\t\tgot, err := s.GetBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.GetBlurbRequest{Name: name})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t\t}\n\t\tif reqs[i].GetBlurb().GetName() != got.GetName() ||\n\t\t\treqs[i].GetBlurb().GetUser() != got.GetUser() ||\n\t\t\treqs[i].GetBlurb().GetText() != got.GetText() {\n\t\t\tt.Errorf(\"Expected to get updated blurb. Want: %+v, got %+v\", reqs, got)\n\t\t}\n\t}\n}\n\nfunc TestSendBlurbs_invalidBlurb(t *testing.T) {\n\treqs := []*pb.CreateBlurbRequest{\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tParent: \"users/musubi/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockSendBlurbsStream{\n\t\treqs: reqs,\n\t\tt:    t,\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.SendBlurbs(m)\n\tif err == nil {\n\t\tt.Error(\"SendBlurbs: expected err\")\n\t}\n\n\tst, ok := status.FromError(err)\n\tif !ok {\n\t\tt.Errorf(\"SendBlurbs: expected err to be status %+v\", err)\n\t}\n\tdetails := st.Proto().GetDetails()\n\tif len(details) > 1 {\n\t\tt.Errorf(\"SendBlurbs: expected err details to be of length 1\")\n\t}\n\tresp := &pb.SendBlurbsResponse{}\n\tptypes.UnmarshalAny(details[0], resp)\n\n\tfor i, name := range resp.GetNames() {\n\t\tgot, err := s.GetBlurb(\n\t\t\tcontext.Background(),\n\t\t\t&pb.GetBlurbRequest{Name: name})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t\t}\n\t\tif reqs[i].GetBlurb().GetName() != got.GetName() ||\n\t\t\treqs[i].GetBlurb().GetUser() != got.GetUser() ||\n\t\t\treqs[i].GetBlurb().GetText() != got.GetText() {\n\t\t\tt.Errorf(\"Expected to get updated blurb. Want: %+v, got %+v\", reqs, got)\n\t\t}\n\t}\n}\n\ntype mockConnectStream struct {\n\treqs []*pb.ConnectRequest\n\tt    *testing.T\n\tstop bool\n\n\trespMu sync.Mutex\n\tresps  []*pb.StreamBlurbsResponse\n\n\tnextMu sync.Mutex\n\tnext   int\n\n\tpb.Messaging_ConnectServer\n}\n\nfunc (m *mockConnectStream) Recv() (*pb.ConnectRequest, error) {\n\tif m.next < len(m.reqs) {\n\t\treq := m.reqs[m.next]\n\t\tm.next++\n\t\treturn req, nil\n\t}\n\tif m.stop {\n\t\treturn nil, io.EOF\n\t}\n\treturn nil, nil\n}\n\nfunc (m *mockConnectStream) Send(r *pb.StreamBlurbsResponse) error {\n\tm.respMu.Lock()\n\tdefer m.respMu.Unlock()\n\tm.resps = append(m.resps, r)\n\treturn nil\n}\n\nfunc TestConnect(t *testing.T) {\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Config{\n\t\t\t\tConfig: &pb.ConnectRequest_ConnectConfig{\n\t\t\t\t\tParent: \"users/rumble/profile\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Blurb{\n\t\t\t\tBlurb: &pb.Blurb{\n\t\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\tg := new(errgroup.Group)\n\tg.Go(func() error {\n\t\terr := s.Connect(m)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Connect: unexpected err %+v\", err)\n\t\t}\n\t\treturn nil\n\t})\n\n\tfor {\n\t\tif len(m.resps) > 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.respMu.Lock()\n\tstreamResp := m.resps[len(m.resps)-1]\n\tm.respMu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_CREATE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_CREATE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif reqs[1].GetBlurb().GetName() != streamResp.GetBlurb().GetName() ||\n\t\treqs[1].GetBlurb().GetUser() != streamResp.GetBlurb().GetUser() ||\n\t\treqs[1].GetBlurb().GetText() != streamResp.GetBlurb().GetText() {\n\t\tt.Errorf(\n\t\t\t\"Expected to get created blurb. Want: %+v, got %+v\",\n\t\t\treqs[1].GetBlurb(),\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Create a blurb.\n\tcreated, err := s.CreateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.CreateBlurbRequest{\n\t\t\tParent: \"users/rumble/profile\",\n\t\t\tBlurb: &pb.Blurb{\n\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.respMu.Lock()\n\tstreamResp = m.resps[len(m.resps)-1]\n\tm.respMu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_CREATE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_CREATE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), created) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want created blurb %+v, got %+v\",\n\t\t\tcreated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Update the blurb.\n\tcreated.Content = &pb.Blurb_Text{Text: \"purrr\"}\n\tupdated, err := s.UpdateBlurb(\n\t\tcontext.Background(),\n\t\t&pb.UpdateBlurbRequest{Blurb: created, UpdateMask: nil})\n\tif err != nil {\n\t\tt.Errorf(\"Update: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.respMu.Lock()\n\tstreamResp = m.resps[len(m.resps)-1]\n\tm.respMu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_UPDATE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_UPDATE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), updated) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want updated blurb %+v, got %+v\",\n\t\t\tupdated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\t// Delete the blurb.\n\t_, err = s.DeleteBlurb(\n\t\tcontext.Background(),\n\t\t&pb.DeleteBlurbRequest{Name: updated.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t// Check that the stream sent the blurb info.\n\tm.respMu.Lock()\n\tstreamResp = m.resps[len(m.resps)-1]\n\tm.respMu.Unlock()\n\tif streamResp.GetAction() != pb.StreamBlurbsResponse_DELETE {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want blurb with action %s, got %s\",\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(pb.StreamBlurbsResponse_DELETE)],\n\t\t\tpb.StreamBlurbsResponse_Action_name[int32(streamResp.GetAction())])\n\t}\n\tif !proto.Equal(streamResp.GetBlurb(), updated) {\n\t\tt.Errorf(\n\t\t\t\"StreamBlurbs: want deleted blurb %+v, got %+v\",\n\t\t\tupdated,\n\t\t\tstreamResp.GetBlurb())\n\t}\n\n\tm.stop = true\n\tif err := g.Wait(); err != nil {\n\t\tt.Error(err)\n\t}\n}\n\ntype errorConnectStream struct {\n\tpb.Messaging_ConnectServer\n}\n\nfunc (m *errorConnectStream) Recv() (*pb.ConnectRequest, error) {\n\treturn nil, status.Error(codes.Unknown, \"Error\")\n}\n\nfunc TestConnect_error(t *testing.T) {\n\tm := &errorConnectStream{}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.Connect(m)\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.Unknown {\n\t\tt.Errorf(\n\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\tcodes.Unknown,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc TestConnect_notConfigured(t *testing.T) {\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Blurb{\n\t\t\t\tBlurb: &pb.Blurb{\n\t\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.Connect(m)\n\tif err == nil {\n\t\tt.Fatalf(\"Connect: expected err\")\n\t}\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc TestConnect_parentNotFound(t *testing.T) {\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Config{\n\t\t\t\tConfig: &pb.ConnectRequest_ConnectConfig{\n\t\t\t\t\tParent: \"users/rumble/profile\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\ts := NewMessagingServer(NewIdentityServer())\n\n\terr := s.Connect(m)\n\tif err == nil {\n\t\tt.Fatalf(\"Connect: expected err\")\n\t}\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\ntype sendErrorConnectStream struct {\n\treqs []*pb.ConnectRequest\n\tt    *testing.T\n\tstop bool\n\n\trespMu sync.Mutex\n\tresps  []*pb.StreamBlurbsResponse\n\n\tnextMu sync.Mutex\n\tnext   int\n\n\tpb.Messaging_ConnectServer\n}\n\nfunc (m *sendErrorConnectStream) Recv() (*pb.ConnectRequest, error) {\n\tif m.next < len(m.reqs) {\n\t\treq := m.reqs[m.next]\n\t\tm.next++\n\t\treturn req, nil\n\t}\n\tif m.stop {\n\t\treturn nil, io.EOF\n\t}\n\treturn nil, nil\n}\n\nfunc (m *sendErrorConnectStream) Send(r *pb.StreamBlurbsResponse) error {\n\treturn status.Error(codes.Unknown, \"Error\")\n}\n\nfunc TestConnect_sendError(t *testing.T) {\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Config{\n\t\t\t\tConfig: &pb.ConnectRequest_ConnectConfig{\n\t\t\t\t\tParent: \"users/rumble/profile\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Blurb{\n\t\t\t\tBlurb: &pb.Blurb{\n\t\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &sendErrorConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.Connect(m)\n\tif err == nil {\n\t\tt.Fatalf(\"Connect: expected err\")\n\t}\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.Unknown {\n\t\tt.Errorf(\n\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\tcodes.Unknown,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc TestConnect_parentNotFoundLater(t *testing.T) {\n\t// Setup Identity server to validate parent against.\n\tis := NewIdentityServer()\n\tfirst, err := is.CreateUser(\n\t\tcontext.Background(),\n\t\t&pb.CreateUserRequest{\n\t\t\tUser: &pb.User{DisplayName: \"rumbledog\", Email: \"rumble@example.com\"},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\tparent := fmt.Sprintf(\"%s/profile\", first.GetName())\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Config{\n\t\t\t\tConfig: &pb.ConnectRequest_ConnectConfig{\n\t\t\t\t\tParent: parent,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Blurb{\n\t\t\t\tBlurb: &pb.Blurb{\n\t\t\t\t\tUser:    \"users/rumble\",\n\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\n\t// We specify the now function so we can control when the stream ends.\n\ts := &messagingServerImpl{\n\t\tidentityServer: is,\n\n\t\ttoken:      server.NewTokenGenerator(),\n\t\troomKeys:   map[string]int{},\n\t\tblurbKeys:  map[string]blurbIndex{},\n\t\tblurbs:     map[string][]blurbEntry{},\n\t\tparentUids: map[string]*server.UniqID{},\n\t\tobservers:  map[string]map[string]blurbObserver{},\n\t\tnowF:       time.Now,\n\t}\n\n\tg := new(errgroup.Group)\n\tg.Go(func() error {\n\t\terr := s.Connect(m)\n\t\tif err == nil {\n\t\t\treturn fmt.Errorf(\"Connect: expected err, but did not get one\")\n\t\t}\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.NotFound {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\t\tcodes.NotFound,\n\t\t\t\tstatus.Code())\n\t\t}\n\t\treturn nil\n\t})\n\n\tfor {\n\t\tif s.hasObservers(parent) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Delete the user so that the parent is invalid.\n\tis.DeleteUser(\n\t\tcontext.Background(),\n\t\t&pb.DeleteUserRequest{Name: first.GetName()})\n\n\tif err := g.Wait(); err != nil {\n\t\tt.Error(err)\n\t}\n}\n\nfunc Test_Connect_creationFailure(t *testing.T) {\n\treqs := []*pb.ConnectRequest{\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Config{\n\t\t\t\tConfig: &pb.ConnectRequest_ConnectConfig{\n\t\t\t\t\tParent: \"users/rumble/profile\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tRequest: &pb.ConnectRequest_Blurb{\n\t\t\t\tBlurb: &pb.Blurb{\n\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tm := &mockConnectStream{\n\t\treqs:  reqs,\n\t\tt:     t,\n\t\tresps: []*pb.StreamBlurbsResponse{},\n\t}\n\ts := NewMessagingServer(&mockIdentityServer{})\n\n\terr := s.Connect(m)\n\tif err == nil {\n\t\tt.Fatalf(\"Connect: expected err\")\n\t}\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.InvalidArgument {\n\t\tt.Errorf(\n\t\t\t\"Connect: Want error code %d got %d\",\n\t\t\tcodes.InvalidArgument,\n\t\t\tstatus.Code())\n\t}\n}\n"
  },
  {
    "path": "server/services/operations_service.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"math/rand\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// NewOperationsServer returns a new OperationsServer for the Showcase API.\nfunc NewOperationsServer(messagingServer MessagingServer) lropb.OperationsServer {\n\treturn &operationsServerImpl{waiter: server.GetWaiterInstance(), messagingServer: messagingServer}\n}\n\ntype operationsServerImpl struct {\n\tmessagingServer MessagingServer\n\twaiter          server.Waiter\n}\n\nfunc (s *operationsServerImpl) GetOperation(ctx context.Context, in *lropb.GetOperationRequest) (*lropb.Operation, error) {\n\tif op, err := s.handleWait(in); op != nil || err != nil {\n\t\treturn op, err\n\t}\n\tif op, err := s.handleSearchBlurbs(in); op != nil || err != nil {\n\t\treturn op, err\n\t}\n\treturn nil, status.Errorf(codes.NotFound, \"Operation %q not found.\", in.Name)\n}\n\nfunc (s *operationsServerImpl) handleWait(in *lropb.GetOperationRequest) (*lropb.Operation, error) {\n\tprefix := \"operations/google.showcase.v1beta1.Echo/Wait/\"\n\tif !strings.HasPrefix(in.Name, prefix) {\n\t\treturn nil, nil\n\t}\n\n\twaitReq := &pb.WaitRequest{}\n\tencodedBytes := strings.TrimPrefix(in.Name, prefix)\n\twaitReqBytes, err := base64.StdEncoding.DecodeString(encodedBytes)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"Operation %q not found.\", in.Name)\n\t}\n\n\terr = proto.Unmarshal(waitReqBytes, waitReq)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"Operation %q not found.\", in.Name)\n\t}\n\n\treturn s.waiter.Wait(waitReq), nil\n}\n\nfunc (s *operationsServerImpl) handleSearchBlurbs(in *lropb.GetOperationRequest) (*lropb.Operation, error) {\n\tprefix := \"operations/google.showcase.v1beta1.Messaging/SearchBlurbs/\"\n\tif !strings.HasPrefix(in.GetName(), prefix) {\n\t\treturn nil, nil\n\t}\n\n\treq := &pb.SearchBlurbsRequest{}\n\tencodedBytes := strings.TrimPrefix(in.GetName(), prefix)\n\twaitReqBytes, err := base64.StdEncoding.DecodeString(encodedBytes)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"Operation %q not found.\", in.Name)\n\t}\n\n\terr = proto.Unmarshal(waitReqBytes, req)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"Operation %q not found.\", in.Name)\n\t}\n\n\t// TODO(landrito): add some randomization here so that the search blurbs\n\t// operation could take multiple get calls to complete.\n\tlistResp, err := s.messagingServer.FilteredListBlurbs(\n\t\tcontext.Background(),\n\t\t&pb.ListBlurbsRequest{\n\t\t\tParent:    req.GetParent(),\n\t\t\tPageSize:  req.GetPageSize(),\n\t\t\tPageToken: req.GetPageToken(),\n\t\t},\n\t\tsearchFilterFunc(req.GetQuery()))\n\n\tanswer := &lropb.Operation{\n\t\tName: in.GetName(),\n\t\tDone: true,\n\t}\n\n\tresp, _ := ptypes.MarshalAny(\n\t\t&pb.SearchBlurbsResponse{\n\t\t\tBlurbs:        listResp.GetBlurbs(),\n\t\t\tNextPageToken: listResp.GetNextPageToken(),\n\t\t})\n\tanswer.Result = &lropb.Operation_Response{Response: resp}\n\n\treturn answer, nil\n}\n\nfunc searchFilterFunc(query string) func(b *pb.Blurb) bool {\n\treturn func(b *pb.Blurb) bool {\n\t\tfor _, s := range strings.Fields(query) {\n\t\t\tif strings.Index(b.GetText(), s) >= 0 {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n}\n\n// CancelOperation returns a successful response if the resource name is not blank\nfunc (s operationsServerImpl) CancelOperation(ctx context.Context, in *lropb.CancelOperationRequest) (*empty.Empty, error) {\n\tif in.Name == \"\" {\n\t\treturn nil, status.Error(codes.NotFound, \"cannot cancel operation without a name.\")\n\t}\n\treturn &empty.Empty{}, nil\n}\n\n// ListOperations returns a fixed response matching the given PageSize if the resource name is not blank\nfunc (s operationsServerImpl) ListOperations(ctx context.Context, in *lropb.ListOperationsRequest) (*lropb.ListOperationsResponse, error) {\n\tif in.Name == \"\" {\n\t\treturn nil, status.Error(codes.NotFound, \"cannot list operation without a name.\")\n\t}\n\n\tvar operations []*lropb.Operation\n\tif in.PageSize > 0 {\n\t\tfor i := 1; i <= int(in.PageSize); i++ {\n\t\t\tvar result *lropb.Operation_Response\n\t\t\tif i%2 == 0 {\n\t\t\t\tresult = &lropb.Operation_Response{}\n\t\t\t}\n\t\t\toperations = append(operations, &lropb.Operation{\n\t\t\t\tName:   \"the/thing/\" + strconv.Itoa(i),\n\t\t\t\tDone:   result != nil,\n\t\t\t\tResult: result,\n\t\t\t})\n\t\t}\n\t} else {\n\t\toperations = append(operations, &lropb.Operation{\n\t\t\tName: \"a/pending/thing\",\n\t\t\tDone: false,\n\t\t})\n\t}\n\n\treturn &lropb.ListOperationsResponse{\n\t\tOperations: operations,\n\t}, nil\n}\n\n// DeleteOperation returns a successful response if the resource name is not blank\nfunc (s operationsServerImpl) DeleteOperation(ctx context.Context, in *lropb.DeleteOperationRequest) (*empty.Empty, error) {\n\tif in.Name == \"\" {\n\t\treturn nil, status.Error(codes.NotFound, \"cannot delete operation without a name.\")\n\t}\n\treturn &empty.Empty{}, nil\n}\n\n// WaitOperation randomly waits and returns an operation with the same name\nfunc (s operationsServerImpl) WaitOperation(ctx context.Context, in *lropb.WaitOperationRequest) (*lropb.Operation, error) {\n\tif in.Name == \"\" {\n\t\treturn nil, status.Error(codes.NotFound, \"cannot wait on a operation without a name.\")\n\t}\n\n\tnum := rand.Intn(500)\n\ttime.Sleep(time.Duration(num) * time.Millisecond)\n\n\tvar result *lropb.Operation_Response\n\tif num%2 == 0 {\n\t\tresult = &lropb.Operation_Response{}\n\t}\n\treturn &lropb.Operation{\n\t\tName:   in.Name,\n\t\tDone:   result != nil,\n\t\tResult: result,\n\t}, nil\n}\n"
  },
  {
    "path": "server/services/operations_service_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestGetOperation_wait(t *testing.T) {\n\tendTime, _ := ptypes.TimestampProto(time.Now())\n\twaitReq := &pb.WaitRequest{End: &pb.WaitRequest_EndTime{EndTime: endTime}}\n\tnameBytes, _ := proto.Marshal(waitReq)\n\treq := &lropb.GetOperationRequest{\n\t\tName: fmt.Sprintf(\n\t\t\t\"operations/google.showcase.v1beta1.Echo/Wait/%s\",\n\t\t\tbase64.StdEncoding.EncodeToString(nameBytes)),\n\t}\n\n\twaiter := &mockWaiter{}\n\tserver := &operationsServerImpl{waiter: waiter}\n\tserver.GetOperation(context.Background(), req)\n\tif !proto.Equal(waiter.req, waitReq) {\n\t\tt.Error(\"Expected echo.Wait to defer to waiter.\")\n\t}\n}\n\ntype messagingServerWrapper struct {\n\tlistReq *pb.ListBlurbsRequest\n\n\tMessagingServer\n}\n\nfunc (m *messagingServerWrapper) FilteredListBlurbs(ctx context.Context, r *pb.ListBlurbsRequest, f func(*pb.Blurb) bool) (*pb.ListBlurbsResponse, error) {\n\tm.listReq = r\n\treturn m.MessagingServer.FilteredListBlurbs(ctx, r, f)\n}\n\nfunc TestGetOperation_searchBlurbs(t *testing.T) {\n\texpected := []*pb.Blurb{\n\t\t{\n\t\t\tUser:    \"users/rumble\",\n\t\t\tContent: &pb.Blurb_Text{Text: \"woof\"},\n\t\t},\n\t\t{\n\t\t\tUser:    \"users/ekko\",\n\t\t\tContent: &pb.Blurb_Text{Text: \"bark\"},\n\t\t},\n\t}\n\twrapped := &messagingServerWrapper{\n\t\tMessagingServer: &messagingServerImpl{\n\t\t\tidentityServer: &mockIdentityServer{},\n\t\t\troomKeys:       map[string]int{},\n\t\t\tparentUids:     map[string]*server.UniqID{},\n\t\t\ttoken:          server.NewTokenGenerator(),\n\t\t\tblurbKeys: map[string]blurbIndex{\n\t\t\t\t\"users/rumble/profile/messages/1\": {\n\t\t\t\t\trow: \"users/rumble/profile\",\n\t\t\t\t\tcol: 1},\n\t\t\t\t\"users/rumble/profile/messages/2\": {\n\t\t\t\t\trow: \"users/rumble/profile\",\n\t\t\t\t\tcol: 2},\n\t\t\t\t\"users/rumble/profile/messages/3\": {\n\t\t\t\t\trow: \"users/rumble/profile\",\n\t\t\t\t\tcol: 3},\n\t\t\t\t\"users/rumble/profile/messages/4\": {\n\t\t\t\t\trow: \"users/rumble/profile\",\n\t\t\t\t\tcol: 4},\n\t\t\t},\n\t\t\tblurbs: map[string][]blurbEntry{\n\t\t\t\t\"users/rumble/profile\": {\n\t\t\t\t\tblurbEntry{blurb: expected[0]},\n\t\t\t\t\tblurbEntry{\n\t\t\t\t\t\tblurb: &pb.Blurb{\n\t\t\t\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tblurbEntry{blurb: expected[1]},\n\t\t\t\t\tblurbEntry{blurb: expected[1], deleted: true},\n\t\t\t\t\tblurbEntry{\n\t\t\t\t\t\tblurb: &pb.Blurb{\n\t\t\t\t\t\t\tUser:    \"users/musubi\",\n\t\t\t\t\t\t\tContent: &pb.Blurb_Text{Text: \"meow\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tserver := NewOperationsServer(wrapped)\n\n\tsearchReq := &pb.SearchBlurbsRequest{\n\t\tQuery:    \"woof bark\",\n\t\tParent:   \"users/rumble/profile\",\n\t\tPageSize: 2,\n\t}\n\treqBytes, _ := proto.Marshal(searchReq)\n\treq := &lropb.GetOperationRequest{\n\t\tName: fmt.Sprintf(\n\t\t\t\"operations/google.showcase.v1beta1.Messaging/SearchBlurbs/%s\",\n\t\t\tbase64.StdEncoding.EncodeToString(reqBytes)),\n\t}\n\top, err := server.GetOperation(context.Background(), req)\n\tif err != nil {\n\t\tt.Errorf(\"GetOperation: unexpected err %+v\", err)\n\t}\n\n\tlistReq := wrapped.listReq\n\tif listReq.Parent != searchReq.GetParent() {\n\t\tt.Errorf(\n\t\t\t\"GetOperation searchBlurbs: list request parent expected %s got %s\",\n\t\t\tsearchReq.GetParent(),\n\t\t\tlistReq.Parent)\n\t}\n\tif listReq.PageSize != searchReq.GetPageSize() {\n\t\tt.Errorf(\n\t\t\t\"GetOperation searchBlurbs: list request page size expected %d got %d\",\n\t\t\tsearchReq.GetPageSize(),\n\t\t\tlistReq.PageSize)\n\t}\n\tif listReq.PageToken != searchReq.GetPageToken() {\n\t\tt.Errorf(\n\t\t\t\"GetOperation searchBlurbs: list request page token expected %s got %s\",\n\t\t\tsearchReq.GetPageToken(),\n\t\t\tlistReq.PageToken)\n\t}\n\n\tif !op.Done {\n\t\tt.Errorf(\"SearchBlurbs() for %q expected done=true got done=false\", req)\n\t}\n\tif op.Metadata != nil {\n\t\tt.Errorf(\"SearchBlurbs() for %q expected nil metadata, got %q\", req, op.Metadata)\n\t}\n\tif op.GetError() != nil {\n\t\tt.Errorf(\"SearchBlurbs() expected op.Error=nil, got %q\", op.GetError())\n\t}\n\tif op.GetResponse() == nil {\n\t\tt.Error(\"SearchBlurbs() expected op.Response!=nil\")\n\t}\n\tresp := &pb.SearchBlurbsResponse{}\n\tptypes.UnmarshalAny(op.GetResponse(), resp)\n\tif len(resp.GetBlurbs()) != len(expected) {\n\t\tt.Errorf(\n\t\t\t\"SearchBlurbs() expected blurbs size %d, got %d\",\n\t\t\tlen(expected),\n\t\t\tlen(resp.GetBlurbs()))\n\t}\n\tfor i, b := range expected {\n\t\tif !proto.Equal(b, resp.GetBlurbs()[i]) {\n\t\t\tt.Errorf(\n\t\t\t\t\"SearchBlurbs().blurbs[%d] want %+v, got %+v\",\n\t\t\t\ti,\n\t\t\t\tb,\n\t\t\t\tresp.GetBlurbs()[i],\n\t\t\t)\n\t\t}\n\t}\n}\n\nfunc TestGetOperation_notFoundOperation(t *testing.T) {\n\treq := &lropb.GetOperationRequest{\n\t\tName: \"BOGUS\",\n\t}\n\tserver := NewOperationsServer(nil)\n\t_, err := server.GetOperation(context.Background(), req)\n\ts, _ := status.FromError(err)\n\tif codes.NotFound != s.Code() {\n\t\tt.Errorf(\"GetOperation with invalid name expected code=%d, got %d\", codes.NotFound, s.Code())\n\t}\n}\n\nfunc TestGetOperation_invalidEncodedName(t *testing.T) {\n\tprefixes := []string{\n\t\t\"operations/google.showcase.v1beta1.Echo/Wait\",\n\t\t\"operations/google.showcase.v1beta1.Messaging/SearchBlurbs\",\n\t}\n\tfor _, p := range prefixes {\n\t\treq := &lropb.GetOperationRequest{\n\t\t\tName: fmt.Sprintf(\"%s/BOGUS\", p),\n\t\t}\n\t\tserver := NewOperationsServer(nil)\n\t\t_, err := server.GetOperation(context.Background(), req)\n\t\ts, _ := status.FromError(err)\n\t\tif codes.NotFound != s.Code() {\n\t\t\tt.Errorf(\"GetOperation with invalid name expected code=%d, got %d\", codes.NotFound, s.Code())\n\t\t}\n\t}\n}\n\nfunc TestGetOperation_invalidMarshalledProto(t *testing.T) {\n\tprefixes := []string{\n\t\t\"operations/google.showcase.v1beta1.Echo/Wait\",\n\t\t\"operations/google.showcase.v1beta1.Messaging/SearchBlurbs\",\n\t}\n\tfor _, p := range prefixes {\n\t\tname := fmt.Sprintf(\n\t\t\t\"%s/%s\",\n\t\t\tp,\n\t\t\tbase64.StdEncoding.EncodeToString([]byte(\"BOGUS\")))\n\t\treq := &lropb.GetOperationRequest{\n\t\t\tName: name,\n\t\t}\n\t\tserver := NewOperationsServer(nil)\n\t\t_, err := server.GetOperation(context.Background(), req)\n\t\ts, _ := status.FromError(err)\n\t\tif codes.NotFound != s.Code() {\n\t\t\tt.Errorf(\"GetOperation with invalid name expected code=%d, got %d\", codes.NotFound, s.Code())\n\t\t}\n\t}\n}\n\nfunc TestCancelOperation(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.CancelOperation(context.Background(), &lropb.CancelOperationRequest{\n\t\tName: \"a/thing\",\n\t})\n\tif err != nil {\n\t\tt.Error(\"CancelOperation should have been successful\")\n\t}\n}\n\nfunc TestCancelOperation_notFound(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.CancelOperation(context.Background(), &lropb.CancelOperationRequest{})\n\ts, _ := status.FromError(err)\n\tif codes.NotFound != s.Code() {\n\t\tt.Errorf(\"CancelOperation expected code=%d, got %d\", codes.NotFound, s.Code())\n\t}\n}\n\nfunc TestServerListOperation(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\tres, err := server.ListOperations(context.Background(), &lropb.ListOperationsRequest{\n\t\tName: \"something\",\n\t})\n\tif err != nil {\n\t\tt.Error(\"ListOperations should have been successful\")\n\t}\n\tif len(res.Operations) != 1 {\n\t\tt.Error(\"ListOperations should have a result\")\n\t}\n\n\tres, err = server.ListOperations(context.Background(), &lropb.ListOperationsRequest{\n\t\tName:     \"other\",\n\t\tPageSize: 8,\n\t})\n\tif err != nil {\n\t\tt.Error(\"ListOperations should have been successful\")\n\t}\n\tif len(res.Operations) != 8 {\n\t\tt.Error(\"ListOperations should have 8 results\")\n\t}\n\tif len(res.NextPageToken) > 0 {\n\t\tt.Error(\"ListOperations should not have more than 1 page\")\n\t}\n}\n\nfunc TestServerListOperation_notFound(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.ListOperations(context.Background(), &lropb.ListOperationsRequest{})\n\ts, _ := status.FromError(err)\n\tif codes.NotFound != s.Code() {\n\t\tt.Errorf(\"ListOperations expected code=%d, got %d\", codes.NotFound, s.Code())\n\t}\n}\n\nfunc TestServerDeleteOperation(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.DeleteOperation(context.Background(), &lropb.DeleteOperationRequest{\n\t\tName: \"/delete/the/thing\",\n\t})\n\tif err != nil {\n\t\tt.Errorf(\"DeleteOperations should have been successful\")\n\t}\n}\n\nfunc TestServerDeleteOperation_notFound(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.DeleteOperation(context.Background(), &lropb.DeleteOperationRequest{})\n\ts, _ := status.FromError(err)\n\tif codes.NotFound != s.Code() {\n\t\tt.Errorf(\"DeleteOperations expected code=%d, got %d\", codes.NotFound, s.Code())\n\t}\n}\n\nfunc TestServerWaitOperation(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\tdone, notDone := false, false\n\n\tfor {\n\t\tres, err := server.WaitOperation(context.Background(), &lropb.WaitOperationRequest{\n\t\t\tName: \"some/op\",\n\t\t})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"DeleteOperations should have been successful\")\n\t\t}\n\n\t\tif res.Done {\n\t\t\tdone = true\n\t\t} else {\n\t\t\tnotDone = true\n\t\t}\n\t\tif done && notDone {\n\t\t\tbreak\n\t\t}\n\t}\n}\n\nfunc TestServerWaitOperation_notFound(t *testing.T) {\n\tserver := NewOperationsServer(nil)\n\t_, err := server.WaitOperation(context.Background(), &lropb.WaitOperationRequest{})\n\ts, _ := status.FromError(err)\n\tif codes.NotFound != s.Code() {\n\t\tt.Errorf(\"WaitOperations expected code=%d, got %d\", codes.NotFound, s.Code())\n\t}\n}\n"
  },
  {
    "path": "server/services/sequence_service.go",
    "content": "// Copyright 2020 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/duration\"\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// NewSequenceServer returns a new SequenceServer for the Showcase API.\nfunc NewSequenceServer() pb.SequenceServiceServer {\n\treturn &sequenceServerImpl{\n\t\ttoken:              server.NewTokenGenerator(),\n\t\tsequences:          sync.Map{},\n\t\treports:            sync.Map{},\n\t\tstreamingSequences: sync.Map{},\n\t\tstreamingReports:   sync.Map{},\n\t}\n}\n\ntype sequenceServerImpl struct {\n\tuid   server.UniqID\n\ttoken server.TokenGenerator\n\n\tsequences sync.Map\n\treports   sync.Map\n\n\tstreamingSequences sync.Map\n\tstreamingReports   sync.Map\n}\n\nfunc (s *sequenceServerImpl) CreateSequence(ctx context.Context, in *pb.CreateSequenceRequest) (*pb.Sequence, error) {\n\tseq := clone(in.GetSequence())\n\n\t// Assign Name.\n\tid := s.uid.Next()\n\tseq.Name = fmt.Sprintf(\"sequences/%d\", id)\n\treport := &pb.SequenceReport{\n\t\tName: report(seq.GetName()),\n\t}\n\n\ts.sequences.Store(seq.GetName(), seq)\n\ts.reports.Store(report.GetName(), report)\n\n\treturn seq, nil\n}\n\nfunc (s *sequenceServerImpl) AttemptSequence(ctx context.Context, in *pb.AttemptSequenceRequest) (*empty.Empty, error) {\n\treceived := time.Now()\n\tname := in.GetName()\n\tif name == \"\" {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `name` is required.\")\n\t}\n\n\t// Retrieve Sequence and associated SequenceReport.\n\ti, ok := s.sequences.Load(name)\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"The Sequence with %q does not exist.\",\n\t\t\tname,\n\t\t)\n\t}\n\tseq := i.(*pb.Sequence)\n\n\ti, _ = s.reports.Load(report(name))\n\trep, _ := i.(*pb.SequenceReport)\n\n\t// Retrieve the attempt deadline.\n\tdeadline, _ := ctx.Deadline()\n\tdpb, err := ptypes.TimestampProto(deadline)\n\tif err != nil {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.Internal,\n\t\t\t\"%s\", err.Error(),\n\t\t)\n\t}\n\n\t// Get the number of attempts, which coincides with this attempt's number.\n\tn := len(rep.Attempts)\n\n\t// Prepare the attempt response defined by the Sequence.\n\tst := status.New(codes.OK, \"Successful attempt\")\n\tvar delay time.Duration\n\tresponses := seq.GetResponses()\n\tif l := len(responses); l > 0 && n < l {\n\t\tresp := responses[n]\n\t\tdelay = resp.GetDelay().AsDuration()\n\t\tst = status.FromProto(resp.GetStatus())\n\t} else if n > l {\n\t\tst = status.New(codes.OutOfRange, \"Attempt exceeded predefined responses\")\n\t}\n\n\t// A delay of 0 returns immediately.\n\ttime.Sleep(delay)\n\n\t// Calculate the perceived delay since the last RPC attempt.\n\tattDelay := &duration.Duration{}\n\tif n > 0 {\n\t\tprev := rep.GetAttempts()[n-1]\n\t\trespTime := prev.GetResponseTime()\n\t\td := received.Sub(respTime.AsTime())\n\t\tattDelay = ptypes.DurationProto(d)\n\t}\n\n\t// Clock the time that the server is sending the response\n\tresponseTime := time.Now()\n\trpb, err := ptypes.TimestampProto(responseTime)\n\tif err != nil {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.Internal,\n\t\t\t\"%s\", err.Error(),\n\t\t)\n\t}\n\n\trep.Attempts = append(rep.Attempts, &pb.SequenceReport_Attempt{\n\t\tAttemptNumber:   int32(n),\n\t\tAttemptDeadline: dpb,\n\t\tResponseTime:    rpb,\n\t\tAttemptDelay:    attDelay,\n\t\tStatus:          st.Proto(),\n\t})\n\n\treturn &empty.Empty{}, st.Err()\n}\n\nfunc (s *sequenceServerImpl) GetSequenceReport(ctx context.Context, in *pb.GetSequenceReportRequest) (*pb.SequenceReport, error) {\n\tname := in.GetName()\n\tif name == \"\" {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `name` is required.\")\n\t}\n\n\treport, ok := s.reports.Load(name)\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"The sequence report with %q does not exist.\",\n\t\t\tname,\n\t\t)\n\t}\n\n\treturn report.(*pb.SequenceReport), nil\n}\n\nfunc report(n string) string {\n\treturn fmt.Sprintf(\"%s/sequenceReport\", n)\n}\n\nfunc clone(s *pb.Sequence) *pb.Sequence {\n\tr := make([]*pb.Sequence_Response, len(s.GetResponses()))\n\tcopy(r, s.GetResponses())\n\n\treturn &pb.Sequence{\n\t\tName:      s.GetName(),\n\t\tResponses: r,\n\t}\n}\n\nfunc (s *sequenceServerImpl) CreateStreamingSequence(ctx context.Context, in *pb.CreateStreamingSequenceRequest) (*pb.StreamingSequence, error) {\n\tseq := cloneStreamingSequence(in.GetStreamingSequence())\n\n\t// Assign Name.\n\tid := s.uid.Next()\n\tseq.Name = fmt.Sprintf(\"streamingSequences/%d\", id)\n\treport := &pb.StreamingSequenceReport{\n\t\tName: streamingReport(seq.GetName()),\n\t}\n\n\ts.streamingSequences.Store(seq.GetName(), seq)\n\ts.streamingReports.Store(report.GetName(), report)\n\n\treturn seq, nil\n}\n\nfunc (s *sequenceServerImpl) AttemptStreamingSequence(in *pb.AttemptStreamingSequenceRequest, stream pb.SequenceService_AttemptStreamingSequenceServer) error {\n\treceived := time.Now()\n\tname := in.GetName()\n\tlastFailIndex := in.GetLastFailIndex()\n\tif name == \"\" {\n\t\treturn status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `name` is required.\")\n\t}\n\n\t// Retrieve Sequence and associated SequenceReport.\n\ti, ok := s.streamingSequences.Load(name)\n\tif !ok {\n\t\treturn status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"The Sequence with %q does not exist.\",\n\t\t\tname,\n\t\t)\n\t}\n\tseq := i.(*pb.StreamingSequence)\n\n\ti, _ = s.streamingReports.Load(streamingReport(name))\n\trep, _ := i.(*pb.StreamingSequenceReport)\n\n\t// Get the number of attempts, which coincides with this attempt's number.\n\tn := len(rep.Attempts)\n\n\t// Prepare the attempt response defined by the Sequence.\n\tst := status.New(codes.OK, \"Successful attempt\")\n\trespIndex := 0\n\tvar delay time.Duration\n\tresponses := seq.GetResponses()\n\tcontent := strings.Fields(seq.GetContent())\n\tif l := len(responses); l > 0 && n < l {\n\t\tresp := responses[n]\n\t\tdelay = resp.GetDelay().AsDuration()\n\t\tst = status.FromProto(resp.GetStatus())\n\t\trespIndex = int(resp.ResponseIndex)\n\n\t} else if n > l {\n\t\tst = status.New(codes.OutOfRange, \"Attempt exceeded predefined responses\")\n\t}\n\n\tif lastFailIndex < 0 {\n\t\tlastFailIndex = 0\n\t}\n\n\tfor idx, word := range content[lastFailIndex:] {\n\t\tif idx >= respIndex {\n\t\t\tbreak\n\t\t}\n\t\terr := stream.Send(&pb.AttemptStreamingSequenceResponse{Content: word})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\techoStreamingHeaders(stream)\n\n\techoStreamingTrailers(stream)\n\n\ttime.Sleep(delay)\n\n\t// Calculate the perceived delay since the last RPC attempt.\n\tattDelay := &duration.Duration{}\n\tif n > 0 {\n\t\tprev := rep.GetAttempts()[n-1]\n\t\trespTime := prev.GetResponseTime()\n\t\td := received.Sub(respTime.AsTime())\n\t\tattDelay = ptypes.DurationProto(d)\n\t}\n\n\t// Clock the time that the server is sending the response\n\tresponseTime := time.Now()\n\trpb, err := ptypes.TimestampProto(responseTime)\n\tif err != nil {\n\t\treturn status.Errorf(\n\t\t\tcodes.Internal,\n\t\t\t\"%s\", err.Error(),\n\t\t)\n\t}\n\n\trep.Attempts = append(rep.Attempts, &pb.StreamingSequenceReport_Attempt{\n\t\tAttemptNumber: int32(n),\n\t\tResponseTime:  rpb,\n\t\tAttemptDelay:  attDelay,\n\t\tStatus:        st.Proto(),\n\t})\n\treturn st.Err()\n\n}\n\nfunc (s *sequenceServerImpl) GetStreamingSequenceReport(ctx context.Context, in *pb.GetStreamingSequenceReportRequest) (*pb.StreamingSequenceReport, error) {\n\tname := in.GetName()\n\tif name == \"\" {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.InvalidArgument,\n\t\t\t\"The field `name` is required.\")\n\t}\n\n\treport, ok := s.streamingReports.Load(name)\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"The sequence report with %q does not exist.\",\n\t\t\tname,\n\t\t)\n\t}\n\n\treturn report.(*pb.StreamingSequenceReport), nil\n}\n\nfunc cloneStreamingSequence(s *pb.StreamingSequence) *pb.StreamingSequence {\n\tr := make([]*pb.StreamingSequence_Response, len(s.GetResponses()))\n\tcopy(r, s.GetResponses())\n\n\treturn &pb.StreamingSequence{\n\t\tName:      s.GetName(),\n\t\tContent:   s.GetContent(),\n\t\tResponses: r,\n\t}\n}\n\nfunc streamingReport(n string) string {\n\treturn fmt.Sprintf(\"%s/streamingSequenceReport\", n)\n}\n"
  },
  {
    "path": "server/services/sequence_service_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n)\n\nfunc TestSequenceEmpty(t *testing.T) {\n\ts := NewSequenceServer()\n\n\tseq, err := s.CreateSequence(context.Background(), &pb.CreateSequenceRequest{})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(empty): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\te, err := s.AttemptSequence(ctx, &pb.AttemptSequenceRequest{Name: seq.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"AttemptSequence(empty): unexpected err %+v\", err)\n\t}\n\n\tif e == nil {\n\t\tt.Errorf(\"AttemptSequence(empty): unexpected nil Empty response\")\n\t}\n\n\tr := report(seq.GetName())\n\treport, err := s.GetSequenceReport(context.Background(), &pb.GetSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(empty): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != 1 {\n\t\tt.Errorf(\"%s: expected number of attempts to be 1 but was %d\", t.Name(), len(attempts))\n\t}\n\n\ta := attempts[0]\n\tad := a.GetAttemptDeadline().AsTime()\n\td, _ := ctx.Deadline()\n\n\tif !ad.Equal(d) {\n\t\tt.Errorf(\"%s: server deadline = %v client deadline = %v\", t.Name(), ad, d)\n\t}\n}\n\nfunc TestSequenceRetry(t *testing.T) {\n\ts := NewSequenceServer()\n\tresponses := []*pb.Sequence_Response{\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(1 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(2 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.OK, \"OK\").Proto(),\n\t\t},\n\t}\n\n\tseq, err := s.CreateSequence(context.Background(), &pb.CreateSequenceRequest{\n\t\tSequence: &pb.Sequence{Responses: responses},\n\t})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(retry): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\tdelay := 100 * time.Millisecond\n\tfor n, r := range responses {\n\t\tres := status.FromProto(r.GetStatus())\n\t\t_, err = s.AttemptSequence(ctx, &pb.AttemptSequenceRequest{Name: seq.GetName()})\n\t\tif c := status.Code(err); c != res.Code() {\n\t\t\tt.Errorf(\"%s: status #%d was %v wanted %v\", t.Name(), n, c, res.Code())\n\t\t}\n\n\t\tif n != len(responses)-1 {\n\t\t\ttime.Sleep(delay)\n\t\t\tdelay *= 2\n\t\t}\n\t}\n\n\tr := report(seq.GetName())\n\treport, err := s.GetSequenceReport(context.Background(), &pb.GetSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(retry): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != len(responses) {\n\t\tt.Errorf(\"%s: expected number of attempts to be %d but was %d\", t.Name(), len(responses), len(attempts))\n\t}\n\n\td, _ := ctx.Deadline()\n\tfor n, a := range attempts {\n\t\tif got, want := a.GetAttemptNumber(), int32(n); got != want {\n\t\t\tt.Errorf(\"%s: expected attempt #%d but was #%d\", t.Name(), want, got)\n\t\t}\n\n\t\tif got, want := a.GetAttemptDeadline().AsTime(), d; !got.Equal(want) {\n\t\t\tt.Errorf(\"%s: server deadline = %v client deadline = %v\", t.Name(), got, want)\n\t\t}\n\n\t\tif got, want := a.GetStatus().GetCode(), responses[n].GetStatus().GetCode(); got != want {\n\t\t\tt.Errorf(\"%s: expected response %v but was %v\", t.Name(), want, got)\n\t\t}\n\n\t\t// Check that perceived delay between attempts was changing as expected.\n\t\tif n > 0 {\n\t\t\tif cur, prev := a.GetAttemptDelay().AsDuration(), attempts[n-1].GetAttemptDelay().AsDuration(); cur <= prev {\n\t\t\t\tt.Errorf(\"%s: expected attempt delay: %v to be larger than previous: %v\", t.Name(), cur, prev)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestSequenceOutOfRange(t *testing.T) {\n\ts := NewSequenceServer()\n\n\tseq, err := s.CreateSequence(context.Background(), &pb.CreateSequenceRequest{})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(out_of_range): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\te, err := s.AttemptSequence(ctx, &pb.AttemptSequenceRequest{Name: seq.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"AttemptSequence(out_of_range): unexpected err %+v\", err)\n\t}\n\n\tif e == nil {\n\t\tt.Errorf(\"AttemptSequence(out_of_range): unexpected nil Empty response\")\n\t}\n\n\t_, err = s.AttemptSequence(ctx, &pb.AttemptSequenceRequest{Name: seq.GetName()})\n\tif c := status.Code(err); c != codes.OutOfRange {\n\t\tt.Errorf(\"%s: status was %v wanted %v\", t.Name(), c, codes.OutOfRange)\n\t}\n\n\t_, err = s.AttemptSequence(ctx, &pb.AttemptSequenceRequest{Name: seq.GetName()})\n\tif c := status.Code(err); c != codes.OutOfRange {\n\t\tt.Errorf(\"%s: status was %v wanted %v\", t.Name(), c, codes.OutOfRange)\n\t}\n\n\tr := report(seq.GetName())\n\treport, err := s.GetSequenceReport(context.Background(), &pb.GetSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(out_of_range): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != 3 {\n\t\tt.Errorf(\"%s: expected number of attempts to be 3 but was %d\", t.Name(), len(attempts))\n\t}\n\n\ta := attempts[0]\n\tad := a.GetAttemptDeadline().AsTime()\n\td, _ := ctx.Deadline()\n\n\tif !ad.Equal(d) {\n\t\tt.Errorf(\"%s: server deadline = %v client deadline = %v\", t.Name(), ad, d)\n\t}\n}\n\nfunc TestGetSequenceReportNotFound(t *testing.T) {\n\ts := NewSequenceServer()\n\t_, err := s.GetSequenceReport(context.Background(), &pb.GetSequenceReportRequest{Name: \"foo/bar/baz\"})\n\tif c := status.Code(err); c != codes.NotFound {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.NotFound, c)\n\t}\n}\n\nfunc TestGetSequenceReportMissingName(t *testing.T) {\n\ts := NewSequenceServer()\n\t_, err := s.GetSequenceReport(context.Background(), &pb.GetSequenceReportRequest{Name: \"\"})\n\tif c := status.Code(err); c != codes.InvalidArgument {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.InvalidArgument, c)\n\t}\n}\n\nfunc TestAttemptSequenceNotFound(t *testing.T) {\n\ts := NewSequenceServer()\n\t_, err := s.AttemptSequence(context.Background(), &pb.AttemptSequenceRequest{Name: \"foo/bar/baz\"})\n\tif c := status.Code(err); c != codes.NotFound {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.NotFound, c)\n\t}\n}\n\nfunc TestAttemptSequenceMissingName(t *testing.T) {\n\ts := NewSequenceServer()\n\t_, err := s.AttemptSequence(context.Background(), &pb.AttemptSequenceRequest{Name: \"\"})\n\tif c := status.Code(err); c != codes.InvalidArgument {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.InvalidArgument, c)\n\t}\n}\n\ntype mockStreamSequence struct {\n\texp   []string\n\thead  []string\n\ttrail []string\n\tt     *testing.T\n\tpb.SequenceService_AttemptStreamingSequenceServer\n}\n\nfunc (m *mockStreamSequence) Context() context.Context {\n\treturn appendTestOutgoingMetadata(context.Background(), &mockSTS{stream: m, t: m.t})\n}\n\nfunc (m *mockStreamSequence) SetTrailer(md metadata.MD) {\n\tm.trail = append(m.trail, md.Get(\"showcase-trailer\")...)\n}\n\nfunc (m *mockStreamSequence) SetHeader(md metadata.MD) error {\n\tm.head = append(m.head, md.Get(\"x-goog-request-params\")...)\n\treturn nil\n}\n\nfunc (m *mockStreamSequence) verify(expectHeadersAndTrailers bool) {\n\tif len(m.exp) > 0 {\n\t\tm.t.Errorf(\"Expand did not stream all expected values. %d expected values remaining.\", len(m.exp))\n\t}\n\tif expectHeadersAndTrailers && (!reflect.DeepEqual([]string{\"show\", \"case\"}, m.trail) || !reflect.DeepEqual([]string{\"showcaseHeader\", \"anotherHeader\"}, m.head)) {\n\t\tm.t.Errorf(\"Expand did not get all expected headers and trailers.\\nGot these headers: %+v\\nGot these trailers: %+v\", m.head, m.trail)\n\t}\n}\n\nfunc TestStreamingSequenceEmpty(t *testing.T) {\n\ts := NewSequenceServer()\n\n\tseq, err := s.CreateStreamingSequence(context.Background(), &pb.CreateStreamingSequenceRequest{})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(empty): unexpected err %+v\", err)\n\t}\n\n\tstream := &mockStreamSequence{}\n\n\ttimeout := 5 * time.Second\n\t_, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName()}, stream)\n\tif err != nil {\n\t\tt.Errorf(\"AttemptSequence(empty): unexpected err %+v\", err)\n\t}\n\n\tr := streamingReport(seq.GetName())\n\treport, err := s.GetStreamingSequenceReport(context.Background(), &pb.GetStreamingSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(empty): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\n\tif len(attempts) != 1 {\n\t\tt.Errorf(\"%s: expected number of attempts to be 1 but was %d\", t.Name(), len(attempts))\n\t}\n}\n\nfunc TestStreamingSequenceRetry(t *testing.T) {\n\ts := NewSequenceServer()\n\tresponses := []*pb.StreamingSequence_Response{\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(1 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(2 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.OK, \"OK\").Proto(),\n\t\t},\n\t}\n\n\tseq, err := s.CreateStreamingSequence(context.Background(), &pb.CreateStreamingSequenceRequest{\n\t\tStreamingSequence: &pb.StreamingSequence{Responses: responses, Content: \"Hello World\"},\n\t})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(retry): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\t_, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\tdelay := 100 * time.Millisecond\n\tstream := &mockStreamSequence{}\n\n\tfor n, r := range responses {\n\t\tres := status.FromProto(r.GetStatus())\n\t\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName()}, stream)\n\t\tif c := status.Code(err); c != res.Code() {\n\t\t\tt.Errorf(\"%s: status #%d was %v wanted %v\", t.Name(), n, c, res.Code())\n\t\t}\n\n\t\tif n != len(responses)-1 {\n\t\t\ttime.Sleep(delay)\n\t\t\tdelay *= 2\n\t\t}\n\t}\n\n\tr := streamingReport(seq.GetName())\n\treport, err := s.GetStreamingSequenceReport(context.Background(), &pb.GetStreamingSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(retry): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != len(responses) {\n\t\tt.Errorf(\"%s: expected number of attempts to be %d but was %d\", t.Name(), len(responses), len(attempts))\n\t}\n\n\tfor n, a := range attempts {\n\t\tif got, want := a.GetAttemptNumber(), int32(n); got != want {\n\t\t\tt.Errorf(\"%s: expected attempt #%d but was #%d\", t.Name(), want, got)\n\t\t}\n\n\t\tif got, want := a.GetStatus().GetCode(), responses[n].GetStatus().GetCode(); got != want {\n\t\t\tt.Errorf(\"%s: expected response %v but was %v\", t.Name(), want, got)\n\t\t}\n\t}\n}\n\nfunc TestStreamingSequenceWithLastFailIndex(t *testing.T) {\n\ts := NewSequenceServer()\n\tresponses := []*pb.StreamingSequence_Response{\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(1 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.Unavailable, \"Unavailable\").Proto(),\n\t\t\tDelay:  ptypes.DurationProto(2 * time.Second),\n\t\t},\n\t\t{\n\t\t\tStatus: status.New(codes.OK, \"OK\").Proto(),\n\t\t},\n\t}\n\n\tseq, err := s.CreateStreamingSequence(context.Background(), &pb.CreateStreamingSequenceRequest{\n\t\tStreamingSequence: &pb.StreamingSequence{Responses: responses, Content: \"Hello World, nice to see you\"},\n\t})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(retry): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\t_, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\tdelay := 100 * time.Millisecond\n\tstream := &mockStreamSequence{}\n\n\tfor n, r := range responses {\n\t\tres := status.FromProto(r.GetStatus())\n\t\t// by passing the LastFailIndex as 3, we force the response to be the 3rd index of content, which is \"to\"\n\t\t// the number of responses will still be the same though - the length of the sequence\n\t\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName(), LastFailIndex: 3}, stream)\n\t\tif c := status.Code(err); c != res.Code() {\n\t\t\tt.Errorf(\"%s: status #%d was %v wanted %v\", t.Name(), n, c, res.Code())\n\t\t}\n\n\t\tif n != len(responses)-1 {\n\t\t\ttime.Sleep(delay)\n\t\t\tdelay *= 2\n\t\t}\n\t}\n\n\tr := streamingReport(seq.GetName())\n\treport, err := s.GetStreamingSequenceReport(context.Background(), &pb.GetStreamingSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(retry): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != len(responses) {\n\t\tt.Errorf(\"%s: expected number of attempts to be %d but was %d\", t.Name(), len(responses), len(attempts))\n\t}\n\n\tfor n, a := range attempts {\n\t\tif got, want := a.GetAttemptNumber(), int32(n); got != want {\n\t\t\tt.Errorf(\"%s: expected attempt #%d but was #%d\", t.Name(), want, got)\n\t\t}\n\n\t\tif got, want := a.GetStatus().GetCode(), responses[n].GetStatus().GetCode(); got != want {\n\t\t\tt.Errorf(\"%s: expected response %v but was %v\", t.Name(), want, got)\n\t\t}\n\t}\n}\n\nfunc TestStreamingSequenceOutOfRange(t *testing.T) {\n\ts := NewSequenceServer()\n\n\tseq, err := s.CreateStreamingSequence(context.Background(), &pb.CreateStreamingSequenceRequest{})\n\tif err != nil {\n\t\tt.Errorf(\"CreateSequence(out_of_range): unexpected err %+v\", err)\n\t}\n\n\ttimeout := 5 * time.Second\n\tstream := &mockStreamSequence{}\n\n\t_, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\n\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName()}, stream)\n\tif err != nil {\n\t\tt.Errorf(\"AttemptSequence(out_of_range): unexpected err %+v\", err)\n\t}\n\n\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName()}, stream)\n\tif c := status.Code(err); c != codes.OutOfRange {\n\t\tt.Errorf(\"%s: status was %v wanted %v\", t.Name(), c, codes.OutOfRange)\n\t}\n\n\terr = s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: seq.GetName()}, stream)\n\tif c := status.Code(err); c != codes.OutOfRange {\n\t\tt.Errorf(\"%s: status was %v wanted %v\", t.Name(), c, codes.OutOfRange)\n\t}\n\n\tr := streamingReport(seq.GetName())\n\treport, err := s.GetStreamingSequenceReport(context.Background(), &pb.GetStreamingSequenceReportRequest{Name: r})\n\tif err != nil {\n\t\tt.Errorf(\"GetSequenceReport(out_of_range): unexpected err %+v\", err)\n\t}\n\n\tattempts := report.GetAttempts()\n\tif len(attempts) != 3 {\n\t\tt.Errorf(\"%s: expected number of attempts to be 3 but was %d\", t.Name(), len(attempts))\n\t}\n}\n\nfunc TestAttemptStreamingSequenceNotFound(t *testing.T) {\n\ts := NewSequenceServer()\n\tstream := &mockStreamSequence{exp: strings.Fields(\"\"), t: t}\n\tattemptRequest := &pb.AttemptStreamingSequenceRequest{Name: \"sequences/0\"}\n\terr := s.AttemptStreamingSequence(attemptRequest, stream)\n\tif c := status.Code(err); c != codes.NotFound {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.NotFound, c)\n\t}\n}\n\nfunc TestAttemptStreamingSequenceMissingName(t *testing.T) {\n\ts := NewSequenceServer()\n\tstream := &mockStreamSequence{exp: strings.Fields(\"\"), t: t}\n\terr := s.AttemptStreamingSequence(&pb.AttemptStreamingSequenceRequest{Name: \"\"}, stream)\n\tif c := status.Code(err); c != codes.InvalidArgument {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.InvalidArgument, c)\n\t}\n}\n\nfunc TestGetStreamingSequenceReportMissingName(t *testing.T) {\n\ts := NewSequenceServer()\n\t_, err := s.GetStreamingSequenceReport(context.Background(), &pb.GetStreamingSequenceReportRequest{Name: \"\"})\n\tif c := status.Code(err); c != codes.InvalidArgument {\n\t\tt.Errorf(\"%s: expected error to be %s but was %s\", t.Name(), codes.InvalidArgument, c)\n\t}\n}\n"
  },
  {
    "path": "server/services/services.go",
    "content": "// Copyright 2020 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//     https://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\npackage services\n\nimport (\n\t\"log\"\n\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tlocpb \"google.golang.org/genproto/googleapis/cloud/location\"\n\n\tiampb \"cloud.google.com/go/iam/apiv1/iampb\"\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n)\n\n// Backend contains the various service backends that will be\n// accessible via one or more transport endpoints.\ntype Backend struct {\n\t// Showcase schema\n\tEchoServer            pb.EchoServer\n\tIdentityServer        pb.IdentityServer\n\tMessagingServer       pb.MessagingServer\n\tSequenceServiceServer pb.SequenceServiceServer\n\tComplianceServer      pb.ComplianceServer\n\tTestingServer         pb.TestingServer\n\n\t// Supporting protos\n\tOperationsServer lropb.OperationsServer\n\tLocationsServer  locpb.LocationsServer\n\tIAMPolicyServer  iampb.IAMPolicyServer\n\n\t// Other supporting data structures\n\tStdLog, ErrLog   *log.Logger\n\tObserverRegistry server.GrpcObserverRegistry\n}\n"
  },
  {
    "path": "server/services/test_common.go",
    "content": "// Copyright 2019 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//     https://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\npackage services\n\nimport (\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n)\n\n// Mock waiter type used in echo_service_test and operations_service_test to\n// check that they defer to the waiter.\ntype mockWaiter struct {\n\treq *pb.WaitRequest\n}\n\nfunc (w *mockWaiter) Wait(req *pb.WaitRequest) *lropb.Operation {\n\tw.req = req\n\treturn nil\n}\n"
  },
  {
    "path": "server/services/testing_service.go",
    "content": "// Copyright 2019 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"github.com/googleapis/gapic-showcase/server/spec\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// NewTestingServer returns a new TestingServer for the Showcase API.\nfunc NewTestingServer(observerRegistry server.GrpcObserverRegistry) pb.TestingServer {\n\tname := fmt.Sprintf(\"sessions/-\")\n\tdefaultSession := server.NewSession(name, pb.Session_V1_LATEST, observerRegistry)\n\tdefaultSession.RegisterTests(spec.ShowcaseTests(name, pb.Session_V1_LATEST))\n\tsessions := []sessionEntry{{session: defaultSession}}\n\tkeys := map[string]int{name: len(sessions) - 1}\n\n\ts := &testingServerImpl{\n\t\ttoken:            server.NewTokenGenerator(),\n\t\tobserverRegistry: observerRegistry,\n\t\tkeys:             keys,\n\t\tsessions:         sessions,\n\t}\n\n\treturn s\n}\n\ntype sessionEntry struct {\n\tsession server.Session\n\tdeleted bool\n}\n\ntype testingServerImpl struct {\n\tuid              server.UniqID\n\ttoken            server.TokenGenerator\n\tobserverRegistry server.GrpcObserverRegistry\n\n\tmu       sync.Mutex\n\tkeys     map[string]int\n\tsessions []sessionEntry\n}\n\nfunc (s *testingServerImpl) CreateSession(_ context.Context, req *pb.CreateSessionRequest) (*pb.Session, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tseshProto := req.GetSession()\n\tid := s.uid.Next()\n\tname := fmt.Sprintf(\"sessions/%d\", id)\n\tsesh := server.NewSession(name, seshProto.GetVersion(), s.observerRegistry)\n\tsesh.RegisterTests(spec.ShowcaseTests(name, seshProto.GetVersion()))\n\n\tindex := len(s.sessions)\n\ts.sessions = append(s.sessions, sessionEntry{session: sesh})\n\ts.keys[name] = index\n\n\treturn server.SessionProto(sesh), nil\n}\n\nfunc (s *testingServerImpl) GetSession(_ context.Context, req *pb.GetSessionRequest) (*pb.Session, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tname := req.GetName()\n\tif i, ok := s.keys[name]; ok && !s.sessions[i].deleted {\n\t\treturn server.SessionProto(s.sessions[i].session), nil\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound, \"A session with name %s not found.\",\n\t\tname)\n}\n\nfunc (s *testingServerImpl) ListSessions(_ context.Context, in *pb.ListSessionsRequest) (*pb.ListSessionsResponse, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tstart, err := s.token.GetIndex(in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif start >= len(s.sessions) {\n\t\treturn nil, server.InvalidTokenErr\n\t}\n\n\toffset := 0\n\tsessions := []*pb.Session{}\n\tfor _, entry := range s.sessions[start:] {\n\t\toffset++\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\tsessions = append(sessions, server.SessionProto(entry.session))\n\t\tif len(sessions) >= int(in.GetPageSize()) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnextToken := \"\"\n\tif next := start + offset; next < len(s.sessions) {\n\t\tnextToken = s.token.ForIndex(next)\n\t}\n\n\treturn &pb.ListSessionsResponse{Sessions: sessions, NextPageToken: nextToken}, nil\n}\n\nfunc (s *testingServerImpl) DeleteSession(_ context.Context, req *pb.DeleteSessionRequest) (*empty.Empty, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ti, ok := s.keys[req.GetName()]\n\n\tif !ok {\n\t\treturn nil, status.Errorf(\n\t\t\tcodes.NotFound,\n\t\t\t\"A session with name %s not found.\", req.GetName())\n\t}\n\n\tentry := s.sessions[i]\n\ts.sessions[i] = sessionEntry{session: entry.session, deleted: true}\n\n\treturn &empty.Empty{}, nil\n}\n\nfunc (s *testingServerImpl) ReportSession(_ context.Context, req *pb.ReportSessionRequest) (*pb.ReportSessionResponse, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif i, ok := s.keys[req.GetName()]; ok && !s.sessions[i].deleted {\n\t\treturn s.sessions[i].session.GetReport(), nil\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound, \"A session with name %s not found.\",\n\t\treq.GetName())\n}\n\nfunc (s *testingServerImpl) ListTests(_ context.Context, in *pb.ListTestsRequest) (*pb.ListTestsResponse, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tname := in.GetParent()\n\n\tif i, ok := s.keys[name]; ok && !s.sessions[i].deleted {\n\t\treturn s.sessions[i].session.ListTests(in)\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound, \"A session with name %s not found.\",\n\t\tname)\n}\n\nfunc (s *testingServerImpl) DeleteTest(_ context.Context, req *pb.DeleteTestRequest) (*empty.Empty, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tfor name, i := range s.keys {\n\t\tif strings.HasPrefix(req.GetName(), name) && !s.sessions[i].deleted {\n\t\t\treturn s.sessions[i].session.DeleteTest(req.GetName())\n\t\t}\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound,\n\t\t\"A test with name %s not found.\", req.GetName())\n}\n\nfunc (s *testingServerImpl) VerifyTest(context.Context, *pb.VerifyTestRequest) (*pb.VerifyTestResponse, error) {\n\t// This should be handled by the test observers.\n\treturn &pb.VerifyTestResponse{}, nil\n}\n"
  },
  {
    "path": "server/services/testing_service_test.go",
    "content": "// Copyright 2019 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//     https://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\npackage services\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"testing\"\n\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc Test_Session_lifecycle(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\n\tfirst, err := s.CreateSession(\n\t\tcontext.Background(),\n\t\t&pb.CreateSessionRequest{\n\t\t\tSession: &pb.Session{Version: pb.Session_V1_0},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tdelete, err := s.CreateSession(\n\t\tcontext.Background(),\n\t\t&pb.CreateSessionRequest{\n\t\t\tSession: &pb.Session{Version: pb.Session_V1_0},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteSession(\n\t\tcontext.Background(),\n\t\t&pb.DeleteSessionRequest{Name: delete.Name})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\tcreated, err := s.CreateSession(\n\t\tcontext.Background(),\n\t\t&pb.CreateSessionRequest{\n\t\t\tSession: &pb.Session{Version: pb.Session_V1_0},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tgot, err := s.GetSession(\n\t\tcontext.Background(),\n\t\t&pb.GetSessionRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Get: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(created, got) {\n\t\tt.Error(\"Expected to get created session.\")\n\t}\n\n\tr, err := s.ListSessions(\n\t\tcontext.Background(),\n\t\t&pb.ListSessionsRequest{PageSize: 1, PageToken: \"\"})\n\tif len(r.GetSessions()) != 1 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 1, len(r.GetSessions()))\n\t}\n\tif r.GetSessions()[0].GetName() != \"sessions/-\" {\n\t\tt.Errorf(\"List want: first session 'sessions/-', got %+v\", r.GetSessions()[0])\n\t}\n\tif r.GetNextPageToken() == \"\" {\n\t\tt.Error(\"List want: non empty next page token\")\n\t}\n\n\tr, err = s.ListSessions(\n\t\tcontext.Background(),\n\t\t&pb.ListSessionsRequest{PageSize: 10, PageToken: r.GetNextPageToken()})\n\tif len(r.GetSessions()) != 2 {\n\t\tt.Errorf(\"List want: page size %d, got %d\", 2, len(r.GetSessions()))\n\t}\n\tif !proto.Equal(first, r.GetSessions()[0]) {\n\t\tt.Errorf(\"List want: first session %+v, got %+v\", got, r.GetSessions()[0])\n\t}\n\tif !proto.Equal(got, r.GetSessions()[1]) {\n\t\tt.Errorf(\"List want: second session %+v, got %+v\", got, r.GetSessions()[1])\n\t}\n\tif r.GetNextPageToken() != \"\" {\n\t\tt.Error(\"List want: empty next page token\")\n\t}\n}\n\nfunc Test_GetSession_deleted(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\tcreated, err := s.CreateSession(\n\t\tcontext.Background(),\n\t\t&pb.CreateSessionRequest{\n\t\t\tSession: &pb.Session{Version: pb.Session_V1_0},\n\t\t})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.DeleteSession(\n\t\tcontext.Background(),\n\t\t&pb.DeleteSessionRequest{Name: created.GetName()})\n\tif err != nil {\n\t\tt.Errorf(\"Delete: unexpected err %+v\", err)\n\t}\n\n\t_, err = s.GetSession(\n\t\tcontext.Background(),\n\t\t&pb.GetSessionRequest{Name: created.GetName()})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Get deleted: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ListSessions_invalidToken(t *testing.T) {\n\tsessions := []sessionEntry{{session: &sessionMock{}}}\n\tkeys := map[string]int{\"name\": len(sessions) - 1}\n\n\ts := &testingServerImpl{\n\t\ttoken:    server.TokenGeneratorWithSalt(\"salt\"),\n\t\tkeys:     keys,\n\t\tsessions: sessions,\n\t}\n\n\ttests := []string{\n\t\t\"0\", // Not base64 encoded\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"0\")),        // No salt\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"saltblah\")), // Invalid index\n\t\tbase64.StdEncoding.EncodeToString([]byte(\"salt1000\")), // index out of range.\n\t}\n\n\tfor _, token := range tests {\n\t\t_, err := s.ListSessions(\n\t\t\tcontext.Background(),\n\t\t\t&pb.ListSessionsRequest{\n\t\t\t\tPageSize:  1,\n\t\t\t\tPageToken: token})\n\t\tstatus, _ := status.FromError(err)\n\t\tif status.Code() != codes.InvalidArgument {\n\t\t\tt.Errorf(\n\t\t\t\t\"List: Want error code %d got %d\",\n\t\t\t\tcodes.InvalidArgument,\n\t\t\t\tstatus.Code())\n\t\t}\n\t}\n}\n\nfunc Test_DeleteSession_notFound(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\t_, err := s.DeleteSession(\n\t\tcontext.Background(),\n\t\t&pb.DeleteSessionRequest{Name: \"invalid\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"Delete: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ReportSession_notFound(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\t_, err := s.ReportSession(\n\t\tcontext.Background(),\n\t\t&pb.ReportSessionRequest{Name: \"not found\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"ReportSession: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\ntype sessionMock struct {\n\twantReport   *pb.ReportSessionResponse\n\twantList     *pb.ListTestsResponse\n\tdeleteCalled bool\n\n\tserver.Session\n}\n\nfunc (s *sessionMock) GetReport() *pb.ReportSessionResponse { return s.wantReport }\n\nfunc (s *sessionMock) ListTests(in *pb.ListTestsRequest) (*pb.ListTestsResponse, error) {\n\treturn s.wantList, nil\n}\n\nfunc (s *sessionMock) DeleteTest(name string) (*empty.Empty, error) {\n\ts.deleteCalled = true\n\treturn &empty.Empty{}, nil\n}\n\nfunc Test_ReportSession(t *testing.T) {\n\twant := &pb.ReportSessionResponse{\n\t\tResult: pb.ReportSessionResponse_PASSED,\n\t}\n\tsessions := []sessionEntry{{session: &sessionMock{wantReport: want}}}\n\tkeys := map[string]int{\"name\": 0}\n\n\ts := &testingServerImpl{\n\t\tkeys:     keys,\n\t\tsessions: sessions,\n\t}\n\n\tgot, err := s.ReportSession(\n\t\tcontext.Background(),\n\t\t&pb.ReportSessionRequest{Name: \"name\"})\n\tif err != nil {\n\t\tt.Errorf(\"Create: unexpected err %+v\", err)\n\t}\n\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\n\t\t\t\"ReportSession: Want %+v got %+v\",\n\t\t\twant,\n\t\t\tgot)\n\t}\n}\n\nfunc Test_ListTests_notFound(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\t_, err := s.ListTests(\n\t\tcontext.Background(),\n\t\t&pb.ListTestsRequest{Parent: \"not found\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"ListTests: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_ListTests(t *testing.T) {\n\twant := &pb.ListTestsResponse{\n\t\tTests: []*pb.Test{},\n\t}\n\tsessions := []sessionEntry{{session: &sessionMock{wantList: want}}}\n\tkeys := map[string]int{\"name\": 0}\n\n\ts := &testingServerImpl{\n\t\ttoken:    server.NewTokenGenerator(),\n\t\tkeys:     keys,\n\t\tsessions: sessions,\n\t}\n\n\tgot, err := s.ListTests(\n\t\tcontext.Background(),\n\t\t&pb.ListTestsRequest{Parent: \"name\"})\n\tif err != nil {\n\t\tt.Errorf(\"ListTests: unexpected err %+v\", err)\n\t}\n\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\n\t\t\t\"ListTests: Want %+v got %+v\",\n\t\t\twant,\n\t\t\tgot)\n\t}\n}\n\nfunc Test_DeleteTest_notFound(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\t_, err := s.DeleteTest(\n\t\tcontext.Background(),\n\t\t&pb.DeleteTestRequest{Name: \"not found\"})\n\tstatus, _ := status.FromError(err)\n\tif status.Code() != codes.NotFound {\n\t\tt.Errorf(\n\t\t\t\"DeleteTest: Want error code %d got %d\",\n\t\t\tcodes.NotFound,\n\t\t\tstatus.Code())\n\t}\n}\n\nfunc Test_DeleteTests(t *testing.T) {\n\tsesh := &sessionMock{}\n\tsessions := []sessionEntry{{session: sesh}}\n\tkeys := map[string]int{\"name\": 0}\n\n\ts := &testingServerImpl{\n\t\ttoken:    server.NewTokenGenerator(),\n\t\tkeys:     keys,\n\t\tsessions: sessions,\n\t}\n\n\t_, err := s.DeleteTest(\n\t\tcontext.Background(),\n\t\t&pb.DeleteTestRequest{Name: \"name\"})\n\tif err != nil {\n\t\tt.Errorf(\"DeleteTest: unexpected err %+v\", err)\n\t}\n\n\tif !sesh.deleteCalled {\n\t\tt.Error(\"DeleteTest: expected to delegate call to session.\")\n\t}\n}\n\nfunc Test_VerifyTest(t *testing.T) {\n\ts := NewTestingServer(server.ShowcaseObserverRegistry())\n\tgot, err := s.VerifyTest(context.Background(), &pb.VerifyTestRequest{})\n\tif err != nil {\n\t\tt.Errorf(\"VerifyTest: unexpected err %+v\", err)\n\t}\n\tif !proto.Equal(got, &pb.VerifyTestResponse{}) {\n\t\tt.Errorf(\"VerifyTest want %+v got %+v\", &pb.VerifyTestResponse{}, got)\n\t}\n}\n"
  },
  {
    "path": "server/services/util.go",
    "content": "// Copyright 2022 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//     https://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\npackage services\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc strContains(haystack []string, needle string) bool {\n\tfor _, s := range haystack {\n\t\tif s == needle {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// applyFieldMask applies the values from the src message to the values of the\n// dst message according to the contents of the given field mask paths.\n// If paths is empty/nil, or contains *, it is considered a full update.\n//\n// TODO: Does not support nested message paths. Currently only used with flat\n// resource messages.\nfunc applyFieldMask(src, dst protoreflect.Message, paths []string) {\n\tfullUpdate := len(paths) == 0 || strContains(paths, \"*\")\n\n\tfields := dst.Descriptor().Fields()\n\tfor i := 0; i < fields.Len(); i++ {\n\t\tfield := fields.Get(i)\n\t\tisOneof := field.ContainingOneof() != nil && !field.ContainingOneof().IsSynthetic()\n\n\t\t// Set field in dst with value from src, skipping true oneofs, while\n\t\t// handling proto3_optional fields represented as synthetic oneofs.\n\t\tif (fullUpdate || strContains(paths, string(field.Name()))) && !isOneof {\n\t\t\tdst.Set(field, src.Get(field))\n\t\t}\n\t}\n\n\toneofs := dst.Descriptor().Oneofs()\n\tfor i := 0; i < oneofs.Len(); i++ {\n\t\toneof := oneofs.Get(i)\n\t\t// Skip proto3_optional synthetic oneofs.\n\t\tif oneof.IsSynthetic() {\n\t\t\tcontinue\n\t\t}\n\n\t\tsetOneof := src.WhichOneof(oneof)\n\t\tif setOneof == nil && fullUpdate {\n\t\t\t// Full update with no field set in this oneof of\n\t\t\t// src means clear all fields for this oneof in dst.\n\t\t\tfields := oneof.Fields()\n\t\t\tfor j := 0; j < fields.Len(); j++ {\n\t\t\t\tdst.Clear(fields.Get(j))\n\t\t\t}\n\t\t} else if setOneof != nil && (fullUpdate || strContains(paths, string(setOneof.Name()))) {\n\t\t\t// Full update or targeted updated with a field set in this oneof of\n\t\t\t// src means set that field for the same oneof in dst, which implicitly\n\t\t\t// clears any previously set field for this oneof.\n\t\t\tdst.Set(setOneof, src.Get(setOneof))\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "server/session.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// Session represents a suite of tests, generally being made in the context\n// of testing code generation.\n//\n// A session defines tests it may expect, based on which version of the\n// code generation spec is in use.\ntype Session interface {\n\tGetName() string\n\tGetVersion() pb.Session_Version\n\tGetReport() *pb.ReportSessionResponse\n\tRegisterTests(tests []Test)\n\tListTests(in *pb.ListTestsRequest) (*pb.ListTestsResponse, error)\n\tDeleteTest(name string) (*empty.Empty, error)\n}\n\n// SessionProto returns a proto representation of the Session.\nfunc SessionProto(s Session) *pb.Session {\n\treturn &pb.Session{\n\t\tName:    s.GetName(),\n\t\tVersion: s.GetVersion(),\n\t}\n}\n\n// NewSession returns a session for a given name, version and observerRegistry.\nfunc NewSession(name string, version pb.Session_Version, observerRegistry GrpcObserverRegistry) Session {\n\tsession := &sessionImpl{\n\t\tname:             name,\n\t\tversion:          version,\n\t\tobserverRegistry: observerRegistry,\n\t\ttoken:            NewTokenGenerator(),\n\t\tkeys:             map[string]int{},\n\t\ttests:            []testEntry{},\n\t}\n\treturn session\n}\n\ntype testEntry struct {\n\ttest    Test\n\tdeleted bool\n}\n\ntype sessionImpl struct {\n\tname             string\n\tversion          pb.Session_Version\n\tobserverRegistry GrpcObserverRegistry\n\ttoken            TokenGenerator\n\n\tmu    sync.Mutex\n\tkeys  map[string]int\n\ttests []testEntry\n}\n\nfunc (s *sessionImpl) GetName() string {\n\treturn s.name\n}\n\nfunc (s *sessionImpl) GetVersion() pb.Session_Version {\n\treturn s.version\n}\n\nfunc (s *sessionImpl) GetReport() *pb.ReportSessionResponse {\n\tresult := pb.ReportSessionResponse_PASSED\n\tfor _, entry := range s.tests {\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\ttest := entry.test\n\t\tissue := test.GetIssue()\n\t\tif issue == nil {\n\t\t\tcontinue\n\t\t}\n\t\t// TODO: Add severity handling\n\t\tif issue.GetType() == pb.Issue_INCORRECT_CONFIRMATION {\n\t\t\tresult = pb.ReportSessionResponse_FAILED\n\t\t\tcontinue\n\t\t}\n\t\tif result != pb.ReportSessionResponse_FAILED {\n\t\t\tresult = pb.ReportSessionResponse_INCOMPLETE\n\t\t}\n\t}\n\n\ttestRuns := []*pb.TestRun{}\n\tfor _, entry := range s.tests {\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\ttestRuns = append(testRuns, TestRunProto(entry.test))\n\t}\n\treturn &pb.ReportSessionResponse{\n\t\tResult:   result,\n\t\tTestRuns: testRuns,\n\t}\n}\n\nfunc (s *sessionImpl) ListTests(in *pb.ListTestsRequest) (*pb.ListTestsResponse, error) {\n\tstart, err := s.token.GetIndex(in.GetPageToken())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpageSize := in.GetPageSize()\n\tif pageSize == 0 {\n\t\tpageSize = 10\n\t}\n\n\toffset := 0\n\ttests := []*pb.Test{}\n\tfor _, entry := range s.tests[start:] {\n\t\toffset++\n\t\tif entry.deleted {\n\t\t\tcontinue\n\t\t}\n\t\ttests = append(tests, TestProto(entry.test))\n\t\tif len(tests) >= int(pageSize) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnextToken := \"\"\n\tif start+offset < len(s.tests) {\n\t\tnextToken = s.token.ForIndex(start + offset)\n\t}\n\n\treturn &pb.ListTestsResponse{Tests: tests, NextPageToken: nextToken}, nil\n}\n\nfunc (s *sessionImpl) DeleteTest(name string) (*empty.Empty, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tfor n, i := range s.keys {\n\t\tif strings.HasSuffix(name, n) && !s.tests[i].deleted {\n\t\t\ts.tests[i] = testEntry{test: s.tests[i].test, deleted: true}\n\n\t\t\ttest := s.tests[i].test\n\t\t\tif _, ok := test.(UnaryObserver); ok {\n\t\t\t\ts.observerRegistry.DeleteUnaryObserver(test.GetName())\n\t\t\t}\n\t\t\tif _, ok := test.(StreamRequestObserver); ok {\n\t\t\t\ts.observerRegistry.DeleteStreamRequestObserver(test.GetName())\n\t\t\t}\n\t\t\tif _, ok := test.(StreamResponseObserver); ok {\n\t\t\t\ts.observerRegistry.DeleteStreamResponseObserver(test.GetName())\n\t\t\t}\n\n\t\t\treturn &empty.Empty{}, nil\n\t\t}\n\t}\n\n\treturn nil, status.Errorf(\n\t\tcodes.NotFound,\n\t\t\"A test with name %s not found.\", name)\n}\n\nfunc (s *sessionImpl) RegisterTests(tests []Test) {\n\tfor _, test := range tests {\n\t\ti := len(s.tests)\n\t\ts.tests = append(s.tests, testEntry{test: test})\n\t\ts.keys[test.GetName()] = i\n\t\tif obs, ok := test.(UnaryObserver); ok {\n\t\t\ts.observerRegistry.RegisterUnaryObserver(obs)\n\t\t}\n\t\tif obs, ok := test.(StreamRequestObserver); ok {\n\t\t\ts.observerRegistry.RegisterStreamRequestObserver(obs)\n\t\t}\n\t\tif obs, ok := test.(StreamResponseObserver); ok {\n\t\t\ts.observerRegistry.RegisterStreamResponseObserver(obs)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "server/session_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestSessionProto(t *testing.T) {\n\ts := NewSession(\"name\", pb.Session_V1_0, ShowcaseObserverRegistry())\n\tif s.GetName() != \"name\" {\n\t\tt.Errorf(\"Session.GetName() = %v, want %v\", s.GetName(), \"name\")\n\n\t}\n\tif s.GetVersion() != pb.Session_V1_0 {\n\t\tt.Errorf(\"Session.GetVersion() = %v, want %v\", s.GetVersion(), pb.Session_V1_0)\n\t}\n\twant := &pb.Session{Name: \"name\", Version: pb.Session_V1_0}\n\tgot := SessionProto(s)\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\"SessionProto() = %v, want %v\", got, want)\n\t}\n}\n\ntype mockTest struct {\n\tname        string\n\texpectation pb.Test_ExpectationLevel\n\tblueprints  []*pb.Test_Blueprint\n\n\tiType       pb.Issue_Type\n\tseverity    pb.Issue_Severity\n\tdescription string\n\n\tTest\n}\n\nfunc (t *mockTest) GetName() string {\n\treturn t.name\n}\n\nfunc (t *mockTest) GetIssue() *pb.Issue {\n\tif t.iType == 0 {\n\t\treturn nil\n\t}\n\treturn &pb.Issue{\n\t\tType:        t.iType,\n\t\tSeverity:    t.severity,\n\t\tDescription: t.description,\n\t}\n}\n\nfunc (t *mockTest) GetExpectationLevel() pb.Test_ExpectationLevel {\n\treturn t.expectation\n}\n\nfunc (t *mockTest) GetDescription() string {\n\treturn t.description\n}\n\nfunc (t *mockTest) GetBlueprints() []*pb.Test_Blueprint {\n\treturn t.blueprints\n}\n\n// Implements UnaryObserver\nfunc (t *mockTest) ObserveUnary(\n\tctx context.Context,\n\treq interface{},\n\tresp interface{},\n\tinfo *grpc.UnaryServerInfo,\n\terr error) {\n}\n\n// Implements StreamRequestObserver\nfunc (t *mockTest) ObserveStreamRequest(\n\tctx context.Context,\n\treq interface{},\n\tinfo *grpc.StreamServerInfo,\n\terr error) {\n}\n\n// Implements StreamResponseObserver\nfunc (t *mockTest) ObserveStreamResponse(\n\tctx context.Context,\n\tresp interface{},\n\tinfo *grpc.StreamServerInfo,\n\terr error) {\n}\n\nfunc Test_sessionImpl_TestLifeCycle(t *testing.T) {\n\tfailed := &mockTest{\n\t\tname:        \"failedTest\",\n\t\tiType:       pb.Issue_INCORRECT_CONFIRMATION,\n\t\tseverity:    pb.Issue_ERROR,\n\t\texpectation: pb.Test_REQUIRED,\n\t\tdescription: \"This test failed.\",\n\t}\n\tpending := &mockTest{\n\t\tname:        \"pendingTest\",\n\t\tiType:       pb.Issue_PENDING,\n\t\tseverity:    pb.Issue_ERROR,\n\t\texpectation: pb.Test_RECOMMENDED,\n\t\tdescription: \"This test failed.\",\n\t}\n\tskipped := &mockTest{\n\t\tname:        \"skippedTest\",\n\t\texpectation: pb.Test_OPTIONAL,\n\t\tiType:       pb.Issue_SKIPPED,\n\t\tseverity:    pb.Issue_ERROR,\n\t\tdescription: \"This test failed.\",\n\t}\n\tpassed := &mockTest{\n\t\tname:        \"passedTest\",\n\t\texpectation: pb.Test_REQUIRED,\n\t\tdescription: \"This test passed.\",\n\t}\n\t// Register tests and ensure they are all listed.\n\tsession := &sessionImpl{\n\t\tobserverRegistry: ShowcaseObserverRegistry(),\n\t\ttoken:            &tokenGenerator{salt: \"\"},\n\t\tkeys:             map[string]int{},\n\t\ttests:            []testEntry{},\n\t}\n\tsession.RegisterTests([]Test{failed, pending, skipped, passed})\n\twantList := &pb.ListTestsResponse{\n\t\tTests: []*pb.Test{\n\t\t\tTestProto(failed),\n\t\t\tTestProto(pending),\n\t\t\tTestProto(skipped),\n\t\t\tTestProto(passed),\n\t\t},\n\t}\n\n\tgot, _ := session.ListTests(&pb.ListTestsRequest{})\n\tif !proto.Equal(got, wantList) {\n\t\tt.Errorf(\"sessionImpl.ListTests() = %v, want %v\", got, wantList)\n\t}\n\n\t// Delete tests\n\tif _, err := session.DeleteTest(\"skippedTest\"); err != nil {\n\t\tt.Errorf(\"sessionImpl.DeleteTest() = %v\", err)\n\t}\n\tif _, err := session.DeleteTest(\"invalidName\"); err == nil {\n\t\tt.Error(\"sessionImpl.DeleteTest() for invalid name wanted err got nil\")\n\t}\n\n\t// Ensure list of test does not include the deleted tests.\n\twantList = &pb.ListTestsResponse{\n\t\tTests: []*pb.Test{\n\t\t\tTestProto(failed),\n\t\t\tTestProto(pending),\n\t\t\tTestProto(passed),\n\t\t},\n\t}\n\tgot, _ = session.ListTests(&pb.ListTestsRequest{})\n\tif !proto.Equal(got, wantList) {\n\t\tt.Errorf(\"sessionImpl.ListTests() = %v, want %v\", got, wantList)\n\t}\n\n\t// Test pagination\n\twantList = &pb.ListTestsResponse{\n\t\tTests: []*pb.Test{\n\t\t\tTestProto(failed),\n\t\t\tTestProto(pending),\n\t\t},\n\t\tNextPageToken: \"Mg==\", // Deterministic since we hard coded the page token salt.\n\t}\n\tgot, _ = session.ListTests(&pb.ListTestsRequest{PageSize: 2})\n\tif !proto.Equal(got, wantList) {\n\t\tt.Errorf(\"sessionImpl.ListTests() = %v, want %v\", got, wantList)\n\t}\n\n\t// Invalid page token\n\tif _, err := session.ListTests(&pb.ListTestsRequest{PageToken: \"invalid\"}); err == nil {\n\t\tt.Error(\"sessionImpl.ListTests() with invalid page token got nil.\")\n\t}\n\n}\n\nfunc Test_sessionImpl_GetReport(t *testing.T) {\n\tfailed := &mockTest{\n\t\tname:        \"failedTest\",\n\t\tiType:       pb.Issue_INCORRECT_CONFIRMATION,\n\t\tseverity:    pb.Issue_ERROR,\n\t\tdescription: \"This test failed.\",\n\t}\n\tpending := &mockTest{\n\t\tname:        \"pendingTest\",\n\t\tiType:       pb.Issue_PENDING,\n\t\tseverity:    pb.Issue_ERROR,\n\t\tdescription: \"This test failed.\",\n\t}\n\tskipped := &mockTest{\n\t\tname:        \"skippedTest\",\n\t\tiType:       pb.Issue_SKIPPED,\n\t\tseverity:    pb.Issue_ERROR,\n\t\tdescription: \"This test failed.\",\n\t}\n\tpassed := &mockTest{name: \"passedTest\"}\n\ttests := []struct {\n\t\tname    string\n\t\tentries []testEntry\n\t\twant    *pb.ReportSessionResponse\n\t}{\n\t\t{\n\t\t\t\"Passes if all tests passed\",\n\t\t\t[]testEntry{\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 1\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 2\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 3\"}, deleted: false},\n\t\t\t},\n\t\t\t&pb.ReportSessionResponse{\n\t\t\t\tResult: pb.ReportSessionResponse_PASSED,\n\t\t\t\tTestRuns: []*pb.TestRun{\n\t\t\t\t\t&pb.TestRun{Test: \"passed 1\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 2\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 3\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"Marks as incomplete if there are pending and skipped tests.\",\n\t\t\t[]testEntry{\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 1\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 2\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 3\"}, deleted: false},\n\t\t\t\ttestEntry{test: pending, deleted: false},\n\t\t\t\ttestEntry{test: skipped, deleted: false},\n\t\t\t},\n\t\t\t&pb.ReportSessionResponse{\n\t\t\t\tResult: pb.ReportSessionResponse_INCOMPLETE,\n\t\t\t\tTestRuns: []*pb.TestRun{\n\t\t\t\t\t&pb.TestRun{Test: \"passed 1\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 2\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 3\"},\n\t\t\t\t\t&pb.TestRun{Test: pending.GetName(), Issue: pending.GetIssue()},\n\t\t\t\t\t&pb.TestRun{Test: skipped.GetName(), Issue: skipped.GetIssue()},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"Fails if one tests failed\",\n\t\t\t[]testEntry{\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 1\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 2\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 3\"}, deleted: false},\n\t\t\t\ttestEntry{test: pending, deleted: false},\n\t\t\t\ttestEntry{test: skipped, deleted: false},\n\t\t\t\ttestEntry{test: failed, deleted: false},\n\t\t\t},\n\t\t\t&pb.ReportSessionResponse{\n\t\t\t\tResult: pb.ReportSessionResponse_FAILED,\n\t\t\t\tTestRuns: []*pb.TestRun{\n\t\t\t\t\t&pb.TestRun{Test: \"passed 1\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 2\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 3\"},\n\t\t\t\t\t&pb.TestRun{Test: pending.GetName(), Issue: pending.GetIssue()},\n\t\t\t\t\t&pb.TestRun{Test: skipped.GetName(), Issue: skipped.GetIssue()},\n\t\t\t\t\t&pb.TestRun{Test: failed.GetName(), Issue: failed.GetIssue()},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"Marks as incomplete if there are pending and skipped tests.\",\n\t\t\t[]testEntry{\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 1\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 2\"}, deleted: false},\n\t\t\t\ttestEntry{test: &mockTest{name: \"passed 3\"}, deleted: false},\n\t\t\t\ttestEntry{test: pending, deleted: false},\n\t\t\t\ttestEntry{test: skipped, deleted: false},\n\t\t\t},\n\t\t\t&pb.ReportSessionResponse{\n\t\t\t\tResult: pb.ReportSessionResponse_INCOMPLETE,\n\t\t\t\tTestRuns: []*pb.TestRun{\n\t\t\t\t\t&pb.TestRun{Test: \"passed 1\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 2\"},\n\t\t\t\t\t&pb.TestRun{Test: \"passed 3\"},\n\t\t\t\t\t&pb.TestRun{Test: pending.GetName(), Issue: pending.GetIssue()},\n\t\t\t\t\t&pb.TestRun{Test: skipped.GetName(), Issue: skipped.GetIssue()},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"Skips Deleted Tests\",\n\t\t\t[]testEntry{\n\t\t\t\ttestEntry{test: passed, deleted: false},\n\t\t\t\ttestEntry{test: failed, deleted: true},\n\t\t\t},\n\t\t\t&pb.ReportSessionResponse{\n\t\t\t\tResult:   pb.ReportSessionResponse_PASSED,\n\t\t\t\tTestRuns: []*pb.TestRun{TestRunProto(passed)},\n\t\t\t},\n\t\t},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ts := &sessionImpl{\n\t\t\t\ttests: tt.entries,\n\t\t\t}\n\t\t\tif got := s.GetReport(); !proto.Equal(got, tt.want) {\n\t\t\t\tt.Errorf(\"sessionImpl.GetReport() = %v, want %v\", got, tt.want)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "server/spec/showcase_tests.go",
    "content": "// Copyright 2019 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//     https://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\npackage spec\n\nimport (\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tv1 \"github.com/googleapis/gapic-showcase/server/spec/v1\"\n)\n\n// ShowcaseTests returns the set of tests for a specific version of a session.\nfunc ShowcaseTests(sessionName string, version pb.Session_Version) []server.Test {\n\tswitch version {\n\tcase pb.Session_V1_0:\n\t\treturn v1_0Tests(sessionName)\n\tcase pb.Session_V1_LATEST:\n\t\treturn v1LatestTests(sessionName)\n\tdefault:\n\t\treturn []server.Test{}\n\t}\n}\n\nfunc v1_0Tests(sessionName string) []server.Test {\n\treturn []server.Test{\n\t\tv1.NewUnaryTest(sessionName),\n\t}\n}\n\nfunc v1LatestTests(sessionName string) []server.Test {\n\treturn []server.Test{\n\t\tv1.NewUnaryTest(sessionName),\n\t}\n}\n"
  },
  {
    "path": "server/spec/v1/unary.go",
    "content": "// Copyright 2019 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//     https://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\npackage v1\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/googleapis/gapic-showcase/server\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\ntype unaryTest struct {\n\tsessionName string\n\n\tmu                    sync.Mutex\n\tresponses             []interface{}\n\tattemptedVerification bool\n\tverified              bool\n}\n\nfunc NewUnaryTest(sessionName string) server.Test {\n\treturn &unaryTest{\n\t\tsessionName: sessionName,\n\t\tresponses:   []interface{}{},\n\t}\n}\n\nfunc (t *unaryTest) GetName() string {\n\treturn fmt.Sprintf(\"%s/gapic.v1p0.unary_unary.ok\", t.sessionName)\n}\n\nfunc (t *unaryTest) GetExpectationLevel() pb.Test_ExpectationLevel {\n\treturn pb.Test_REQUIRED\n}\n\nfunc (t *unaryTest) GetDescription() string {\n\treturn \"The generator generates a unary-unary RPC, is able to call it,\" +\n\t\t\", and is able to handle an OK server response.\"\n}\n\n// TODO: Figure out a good way to represent all unary methods as a bluerprint.\nfunc (t *unaryTest) GetBlueprints() []*pb.Test_Blueprint {\n\treturn []*pb.Test_Blueprint{}\n}\n\nfunc (t *unaryTest) GetIssue() *pb.Issue {\n\tif t.verified {\n\t\treturn nil\n\t}\n\tif t.attemptedVerification {\n\t\treturn &pb.Issue{\n\t\t\tType:        pb.Issue_INCORRECT_CONFIRMATION,\n\t\t\tSeverity:    pb.Issue_ERROR,\n\t\t\tDescription: \"An incorrect answer was supplied to verify this test.\",\n\t\t}\n\t}\n\n\tif len(t.responses) > 0 {\n\t\treturn &pb.Issue{\n\t\t\tType:        pb.Issue_PENDING,\n\t\t\tSeverity:    pb.Issue_ERROR,\n\t\t\tDescription: \"This test has not been verified.\",\n\t\t}\n\t}\n\treturn &pb.Issue{\n\t\tType:        pb.Issue_SKIPPED,\n\t\tSeverity:    pb.Issue_ERROR,\n\t\tDescription: \"This test has not been started. Make a unary request to start this test.\",\n\t}\n}\n\nfunc (t *unaryTest) ObserveUnary(\n\tctx context.Context,\n\treq interface{},\n\tresp interface{},\n\tinfo *grpc.UnaryServerInfo,\n\terr error) {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\n\tif resp != nil {\n\t\tt.responses = append(t.responses, resp)\n\t}\n\n\tif info.FullMethod == \"/google.showcase.v1beta1.Testing/VerifyTest\" {\n\t\t// Only validate for this test.\n\t\tvtReq := req.(*pb.VerifyTestRequest)\n\t\tif vtReq.GetName() != t.GetName() {\n\t\t\treturn\n\t\t}\n\n\t\tt.attemptedVerification = true\n\t\tfor _, r := range t.responses {\n\t\t\tbs, _ := proto.Marshal(r.(proto.Message))\n\n\t\t\tif bytes.Equal(bs, vtReq.GetAnswer()) {\n\t\t\t\tt.verified = true\n\t\t\t}\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "server/spec/v1/unary_test.go",
    "content": "// Copyright 2019 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//     https://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\npackage v1\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc Test_unaryTest_GetName(t *testing.T) {\n\tut := NewUnaryTest(\"sessions/-\")\n\tgot := ut.GetName()\n\twant := \"sessions/-/gapic.v1p0.unary_unary.ok\"\n\tif got != want {\n\t\tt.Errorf(\"GetName: got %s, want %s\", got, want)\n\t}\n}\n\nfunc Test_unaryTest_GetExpectationLevel(t *testing.T) {\n\tut := NewUnaryTest(\"sessions/-\")\n\tgot := ut.GetExpectationLevel()\n\twant := pb.Test_REQUIRED\n\tif got != want {\n\t\tt.Errorf(\"GetExpectationLevel: got %+v, want %+v\", got, want)\n\t}\n}\n\nfunc Test_unaryTest_GetDescription(t *testing.T) {\n\tut := NewUnaryTest(\"sessions/-\")\n\tgot := ut.GetDescription()\n\tif got == \"\" {\n\t\tt.Errorf(\"GetDescription: expected non-empty string\")\n\t}\n}\n\nfunc Test_unaryTest_GetBlueprints(t *testing.T) {\n\tut := NewUnaryTest(\"sessions/-\")\n\tgot := ut.GetBlueprints()\n\tif len(got) != 0 {\n\t\tt.Errorf(\"GetBluprints: expected empty list\")\n\t}\n}\n\nfunc Test_unaryTest_GetIssue_doesntVerifyForOtherSessions(t *testing.T) {\n\tut := &unaryTest{\n\t\tsessionName: \"sessions/-\",\n\t\tresponses:   []interface{}{},\n\t}\n\tother := NewUnaryTest(\"sessions/1\")\n\tresp := &pb.EchoResponse{Content: \"hello world\"}\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\tnil,\n\t\tresp,\n\t\tserverInfo(\"/google.showcase.v1beta1.Echo/Echo\"),\n\t\tnil)\n\tdata, _ := proto.Marshal(resp)\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\t&pb.VerifyTestRequest{\n\t\t\tName:   other.GetName(),\n\t\t\tAnswer: data,\n\t\t},\n\t\t&pb.VerifyTestResponse{},\n\t\tserverInfo(\"/google.showcase.v1beta1.Testing/VerifyTest\"),\n\t\tnil)\n\n\tgot := ut.GetIssue()\n\twant := &pb.Issue{\n\t\tType:        pb.Issue_PENDING,\n\t\tSeverity:    pb.Issue_ERROR,\n\t\tDescription: \"This test has not been verified.\",\n\t}\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\"GetIssue: got %+v, want %+v\", got, want)\n\t}\n}\n\nfunc Test_unaryTest_GetIssue_verified(t *testing.T) {\n\tut := &unaryTest{\n\t\tsessionName: \"sessions/-\",\n\t\tresponses:   []interface{}{},\n\t}\n\tresp := &pb.EchoResponse{Content: \"hello world\"}\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\tnil,\n\t\tresp,\n\t\tserverInfo(\"/google.showcase.v1beta1.Echo/Echo\"),\n\t\tnil)\n\tdata, _ := proto.Marshal(resp)\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\t&pb.VerifyTestRequest{\n\t\t\tName:   ut.GetName(),\n\t\t\tAnswer: data,\n\t\t},\n\t\t&pb.VerifyTestResponse{},\n\t\tserverInfo(\"/google.showcase.v1beta1.Testing/VerifyTest\"),\n\t\tnil)\n\tgot := ut.GetIssue()\n\n\tif got != nil {\n\t\tt.Errorf(\"GetIssue: got %+v, want nil\", got)\n\t}\n}\n\nfunc Test_unaryTest_GetIssue_failedVerification(t *testing.T) {\n\tut := &unaryTest{\n\t\tsessionName: \"sessions/-\",\n\t\tresponses:   []interface{}{},\n\t}\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\tnil,\n\t\t&pb.EchoResponse{Content: \"hello world\"},\n\t\tserverInfo(\"/google.showcase.v1beta1.Echo/Echo\"),\n\t\tnil)\n\tdata, _ := proto.Marshal(&pb.EchoResponse{Content: \"hi world\"})\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\t&pb.VerifyTestRequest{\n\t\t\tName:   ut.GetName(),\n\t\t\tAnswer: data,\n\t\t},\n\t\t&pb.VerifyTestResponse{},\n\t\tserverInfo(\"/google.showcase.v1beta1.Testing/VerifyTest\"),\n\t\tnil)\n\tgot := ut.GetIssue()\n\twant := &pb.Issue{\n\t\tType:        pb.Issue_INCORRECT_CONFIRMATION,\n\t\tSeverity:    pb.Issue_ERROR,\n\t\tDescription: \"An incorrect answer was supplied to verify this test.\",\n\t}\n\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\"GetIssue: got %+v, want %+v\", got, want)\n\t}\n}\n\nfunc Test_unaryTest_GetIssue_needsVerification(t *testing.T) {\n\tut := &unaryTest{\n\t\tsessionName: \"sessions/-\",\n\t\tresponses:   []interface{}{},\n\t}\n\tut.ObserveUnary(\n\t\tcontext.Background(),\n\t\tnil,\n\t\t&pb.EchoResponse{Content: \"hello world\"},\n\t\tserverInfo(\"/google.showcase.v1beta1.Echo/Echo\"),\n\t\tnil)\n\tgot := ut.GetIssue()\n\twant := &pb.Issue{\n\t\tType:        pb.Issue_PENDING,\n\t\tSeverity:    pb.Issue_ERROR,\n\t\tDescription: \"This test has not been verified.\",\n\t}\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\"GetIssue: got %+v, want %+v\", got, want)\n\t}\n}\n\nfunc Test_unaryTest_GetIssue_skipped(t *testing.T) {\n\tut := &unaryTest{\n\t\tsessionName: \"sessions/-\",\n\t\tresponses:   []interface{}{},\n\t}\n\tgot := ut.GetIssue()\n\twant := &pb.Issue{\n\t\tType:        pb.Issue_SKIPPED,\n\t\tSeverity:    pb.Issue_ERROR,\n\t\tDescription: \"This test has not been started. Make a unary request to start this test.\",\n\t}\n\tif !proto.Equal(got, want) {\n\t\tt.Errorf(\"GetIssue: got %+v, want %+v\", got, want)\n\t}\n}\n\nfunc serverInfo(methodName string) *grpc.UnaryServerInfo {\n\treturn &grpc.UnaryServerInfo{FullMethod: methodName}\n}\n"
  },
  {
    "path": "server/test.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n)\n\n// Test represents a test case that is run. This interfaces exposes the\n// properties of the test as well as the observers used to run this test.\n//\n// A Test will also implement at least one of UnaryObserver, StreamRequestObserver,\n// StreamResponseOvserver in order to track requests made to the showcase server.\ntype Test interface {\n\tGetName() string\n\tGetExpectationLevel() pb.Test_ExpectationLevel\n\tGetDescription() string\n\tGetBlueprints() []*pb.Test_Blueprint\n\tGetIssue() *pb.Issue\n}\n\n// TestProto returns a proto representation of the Test.\nfunc TestProto(t Test) *pb.Test {\n\treturn &pb.Test{\n\t\tName:             t.GetName(),\n\t\tExpectationLevel: t.GetExpectationLevel(),\n\t\tDescription:      t.GetDescription(),\n\t\tBlueprints:       t.GetBlueprints(),\n\t}\n}\n\n// TestRunProto returns a proto representation of a test run.\nfunc TestRunProto(t Test) *pb.TestRun {\n\treturn &pb.TestRun{\n\t\tTest:  t.GetName(),\n\t\tIssue: t.GetIssue(),\n\t}\n}\n"
  },
  {
    "path": "server/unique_id.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"sync/atomic\"\n)\n\n// UniqID provides a numerical id that is guaranteed to be unique.\ntype UniqID struct {\n\ti int64\n}\n\n// Next gets the next unique id.\nfunc (u *UniqID) Next() int64 {\n\treturn atomic.AddInt64(&u.i, 1) - 1\n}\n"
  },
  {
    "path": "server/unique_id_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport \"testing\"\n\nfunc TestUniqID_Next(t *testing.T) {\n\tu := &UniqID{2}\n\tgot := u.Next()\n\tif got != 2 {\n\t\tt.Errorf(\"Next: got %d, want %d\", got, 2)\n\t}\n}\n"
  },
  {
    "path": "server/waiter.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"time\"\n\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar waiterSingleton Waiter = &waiterImpl{\n\tnowF: time.Now,\n}\n\n// GetWaiterInstance returns the waiter singleton.\nfunc GetWaiterInstance() Waiter {\n\treturn waiterSingleton\n}\n\n// Waiter handles the echo.Wait method for both the LRO service and the echo service.\ntype Waiter interface {\n\tWait(req *pb.WaitRequest) *lropb.Operation\n}\n\ntype waiterImpl struct {\n\tnowF func() time.Time\n}\n\nfunc (w *waiterImpl) Wait(req *pb.WaitRequest) *lropb.Operation {\n\tendTime := time.Unix(0, 0).UTC()\n\tif ttl := req.GetTtl(); ttl != nil {\n\t\tduration, _ := ptypes.Duration(ttl)\n\t\tendTime = w.nowF().Add(duration)\n\t}\n\tif end := req.GetEndTime(); end != nil {\n\t\tendTime, _ = ptypes.Timestamp(end)\n\t}\n\tendTimeProto, _ := ptypes.TimestampProto(endTime)\n\treq.End = &pb.WaitRequest_EndTime{\n\t\tEndTime: endTimeProto,\n\t}\n\n\tdone := w.nowF().After(endTime)\n\treqBytes, _ := proto.Marshal(req)\n\tname := fmt.Sprintf(\n\t\t\"operations/google.showcase.v1beta1.Echo/Wait/%s\",\n\t\tbase64.StdEncoding.EncodeToString(reqBytes))\n\tanswer := &lropb.Operation{\n\t\tName: name,\n\t\tDone: done,\n\t}\n\n\tif done && (req.GetError() != nil) {\n\t\tanswer.Result = &lropb.Operation_Error{Error: req.GetError()}\n\t}\n\n\tif done && (req.GetSuccess() != nil) {\n\t\tresp, _ := ptypes.MarshalAny(req.GetSuccess())\n\t\tanswer.Result = &lropb.Operation_Response{Response: resp}\n\t}\n\n\tif !done {\n\t\tmeta, _ := ptypes.MarshalAny(&pb.WaitMetadata{EndTime: endTimeProto})\n\t\tanswer.Metadata = meta\n\t}\n\n\treturn answer\n}\n"
  },
  {
    "path": "server/waiter_test.go",
    "content": "// Copyright 2018 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//     https://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\npackage server\n\nimport (\n\t\"encoding/base64\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\tlropb \"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/timestamp\"\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/genproto/googleapis/rpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nfunc TestGetWaiterInstance(t *testing.T) {\n\twaiter := GetWaiterInstance()\n\tif waiter != waiterSingleton {\n\t\tt.Error(\"GetWaiterInstance: Expected to get waiter singleton.\")\n\t}\n}\n\nfunc TestWait_pending(t *testing.T) {\n\tnow := time.Unix(1, 0)\n\tendTime := time.Unix(2, 0)\n\tttl := endTime.Sub(now)\n\tnowF := func() time.Time { return time.Unix(1, 0) }\n\tendTimeProto := timestampProto(endTime)\n\n\ttests := []*pb.WaitRequest{\n\t\t&pb.WaitRequest{\n\t\t\tEnd: &pb.WaitRequest_EndTime{\n\t\t\t\tEndTime: endTimeProto,\n\t\t\t},\n\t\t},\n\t\t&pb.WaitRequest{\n\t\t\tEnd: &pb.WaitRequest_Ttl{\n\t\t\t\tTtl: ptypes.DurationProto(ttl),\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, req := range tests {\n\t\twaiter := &waiterImpl{nowF: nowF}\n\t\top := waiter.Wait(req)\n\n\t\tif op.Done {\n\t\t\tt.Errorf(\"Wait() for %q expectee done=false got done=true\", req)\n\t\t}\n\n\t\tcheckName(t, req, op)\n\n\t\tif op.Metadata == nil {\n\t\t\tt.Errorf(\"Wait() for %q expected metadata, got nil\", req)\n\t\t}\n\n\t\tmeta := &pb.WaitMetadata{}\n\t\tptypes.UnmarshalAny(op.Metadata, meta)\n\t\tif !proto.Equal(endTimeProto, meta.EndTime) {\n\t\t\tt.Errorf(\n\t\t\t\t\"Wait for %q expected metadata with Endtime=%q, got %q\",\n\t\t\t\treq,\n\t\t\t\tendTimeProto,\n\t\t\t\tmeta.EndTime)\n\t\t}\n\t}\n}\n\nfunc TestWait_success(t *testing.T) {\n\tnowF := func() time.Time { return time.Unix(3, 0) }\n\tendTime := timestampProto(time.Unix(2, 0))\n\tsuccess := &pb.WaitResponse{Content: \"Hello World!\"}\n\treq := &pb.WaitRequest{\n\t\tEnd: &pb.WaitRequest_EndTime{\n\t\t\tEndTime: endTime,\n\t\t},\n\t\tResponse: &pb.WaitRequest_Success{Success: success},\n\t}\n\n\twaiter := &waiterImpl{nowF: nowF}\n\top := waiter.Wait(req)\n\n\tcheckName(t, req, op)\n\n\tif !op.Done {\n\t\tt.Errorf(\"Wait() for %q expected done=true got done=false\", req)\n\t}\n\tif op.Metadata != nil {\n\t\tt.Errorf(\"Wait() for %q expected nil metadata, got %q\", req, op.Metadata)\n\t}\n\tif op.GetError() != nil {\n\t\tt.Errorf(\"Wait() expected op.Error=nil, got %q\", op.GetError())\n\t}\n\tif op.GetResponse() == nil {\n\t\tt.Error(\"Wait() expected op.Response!=nil\")\n\t}\n\tresp := &pb.WaitResponse{}\n\tptypes.UnmarshalAny(op.GetResponse(), resp)\n\tif !proto.Equal(resp, success) {\n\t\tt.Errorf(\"Wait() expected op.GetResponse()=%q, got %q\", success, resp)\n\t}\n}\n\nfunc TestWait_error(t *testing.T) {\n\tnowF := func() time.Time { return time.Unix(3, 0) }\n\tendTime := timestampProto(time.Unix(2, 0))\n\texpErr := &status.Status{Code: int32(1), Message: \"Error!\"}\n\treq := &pb.WaitRequest{\n\t\tEnd: &pb.WaitRequest_EndTime{\n\t\t\tEndTime: endTime,\n\t\t},\n\t\tResponse: &pb.WaitRequest_Error{Error: expErr},\n\t}\n\n\twaiter := &waiterImpl{nowF: nowF}\n\top := waiter.Wait(req)\n\n\tcheckName(t, req, op)\n\n\tif !op.Done {\n\t\tt.Errorf(\"Wait() for %q expected done=true got done=false\", req)\n\t}\n\tif op.Metadata != nil {\n\t\tt.Errorf(\"Wait() for %q expected nil metadata, got %q\", req, op.Metadata)\n\t}\n\tif op.GetResponse() != nil {\n\t\tt.Errorf(\"Wait() expected op.Response=nil, got %q\", op.GetResponse())\n\t}\n\tif !proto.Equal(expErr, op.GetError()) {\n\t\tt.Errorf(\"Wait() expected op.Error=%q, got %q\", expErr, op.GetError())\n\t}\n}\n\nfunc timestampProto(t time.Time) *timestamp.Timestamp {\n\tts, _ := ptypes.TimestampProto(t)\n\treturn ts\n}\n\nfunc checkName(t *testing.T, req *pb.WaitRequest, op *lropb.Operation) {\n\tif !strings.HasPrefix(op.Name, \"operations/google.showcase.v1beta1.Echo/Wait/\") {\n\t\tt.Errorf(\n\t\t\t\"Wait() expected op.Name prefex 'operations/google.showcase.v1beta1.Echo/Wait/', got: %s'\",\n\t\t\top.Name)\n\t}\n\tnameProto := &pb.WaitRequest{}\n\tencodedBytes := strings.TrimPrefix(\n\t\top.Name,\n\t\t\"operations/google.showcase.v1beta1.Echo/Wait/\")\n\tbytes, _ := base64.StdEncoding.DecodeString(encodedBytes)\n\tproto.Unmarshal(bytes, nameProto)\n\tif !proto.Equal(nameProto, req) {\n\t\tt.Errorf(\n\t\t\t\"Wait() for %q expected unmarshalled name=%q, got name=%q\",\n\t\t\treq,\n\t\t\treq,\n\t\t\tnameProto)\n\t}\n}\n"
  },
  {
    "path": "util/cmd/compile_protos/main.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"github.com/googleapis/gapic-showcase/util\"\n)\n\n// This script regenerates all of the generated source code for the Showcase\n// API including the generated messages, gRPC services, go gapic clients,\n// and the generated CLI. This script must be ran from the root directory\n// of the gapic-showcase repository.\n//\n// This script should be used whenever any changes are made to any of\n// the protos found in schema.\n//\n// Usage: go run ./util/cmd/compile_protos/main.go\nfunc main() {\n\tutil.CompileProtos(\"v1beta1\")\n}\n"
  },
  {
    "path": "util/cmd/protoc-gen-go_rest_server/README.md",
    "content": "# protoc-gen-go_rest_server\n\nThis directory contains the `protoc` plugin `go_rest_server` used to generate a Go\nHTTP server that can translate REST requests and responses to and from protocol\nbuffer messages used by the Showcase gRPC server.\n"
  },
  {
    "path": "util/cmd/protoc-gen-go_rest_server/main.go",
    "content": "// Copyright 2020 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//     https://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\npackage main\n\nimport (\n\t\"google.golang.org/protobuf/compiler/protogen\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest\"\n)\n\n// TODO(vchudnov-g): Continue filling this in. It's a an initial empty\n// stub at the moment.\nfunc main() {\n\t// https://pkg.go.dev/google.golang.org/protobuf/compiler/protogen#Options\n\topts := &protogen.Options{}\n\topts.Run(genrest.Generate)\n\n}\n"
  },
  {
    "path": "util/cmd/release/main.go",
    "content": "// Copyright 2018 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//     https://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\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\n\t\"github.com/googleapis/gapic-showcase/util\"\n)\n\nvar version string\n\nfunc init() {\n\tflag.StringVar(&version, \"version\", \"\", \"the version tag [required]\")\n}\n\n// This script is run in CI when a new version tag is pushed to main. This script\n// places the compiled proto descriptor set, a tarball of showcase-protos alongside its\n// dependencies, and the compiled executables of the gapic-showcase cli tool inside the\n// directory \"dist\"\n//\n// This script must be run from the root directory of the gapic-showcase repository.\n//\n// Usage: go run ./util/cmd/release -version vX.Y.Z\nfunc main() {\n\tflag.Parse()\n\tif version == \"\" {\n\t\tlog.Fatalln(\"Missing required flag: -version\")\n\t}\n\n\tif err := os.RemoveAll(\"tmp\"); err != nil {\n\t\tlog.Fatalf(\"Failed to remove the directory 'tmp': %v\", err)\n\t}\n\n\ttmpProtoPath := filepath.Join(\"tmp\", \"protos\")\n\tif err := os.MkdirAll(tmpProtoPath, 0755); err != nil {\n\t\tlog.Fatalf(\"Failed to make the directory 'tmp': %v\", err)\n\t}\n\tdefer os.RemoveAll(\"tmp\")\n\n\tif err := os.RemoveAll(\"dist\"); err != nil {\n\t\tlog.Fatalf(\"Failed to remove the directory 'dist': %v\", err)\n\t}\n\tif err := os.MkdirAll(\"dist\", 0755); err != nil {\n\t\tlog.Fatalf(\"Failed to make the directory 'dist': %v\", err)\n\t}\n\n\t// Move schema files alongside their dependencies.\n\tutil.Execute(\"cp\", \"-rf\", filepath.Join(\"schema\", \"google\"), tmpProtoPath)\n\n\tapiPath := filepath.Join(\"schema\", \"googleapis\", \"google\", \"api\")\n\ttmpAPIPath := filepath.Join(tmpProtoPath, \"google\", \"api\")\n\tos.MkdirAll(tmpAPIPath, 0755)\n\tprotoFiles, err := filepath.Glob(filepath.Join(apiPath, \"*.proto\"))\n\tif err != nil {\n\t\tlog.Fatal(\"Failed to find proto files within googleapis/google/api/*\")\n\t}\n\tfor _, protoFile := range protoFiles {\n\t\tutil.Execute(\"cp\", protoFile, tmpAPIPath)\n\t}\n\n\tlongrunningPath := filepath.Join(\"schema\", \"googleapis\", \"google\", \"longrunning\")\n\ttmpLongrunningPath := filepath.Join(tmpProtoPath, \"google\", \"longrunning\")\n\tos.MkdirAll(tmpLongrunningPath, 0755)\n\tutil.Execute(\"cp\", filepath.Join(longrunningPath, \"operations.proto\"), tmpLongrunningPath)\n\n\trpcPath := filepath.Join(\"schema\", \"googleapis\", \"google\", \"rpc\")\n\ttmpRPCPath := filepath.Join(tmpProtoPath, \"google\", \"rpc\")\n\tos.MkdirAll(tmpRPCPath, 0755)\n\tutil.Execute(\"cp\", filepath.Join(rpcPath, \"status.proto\"), tmpRPCPath)\n\tutil.Execute(\"cp\", filepath.Join(rpcPath, \"error_details.proto\"), tmpRPCPath)\n\tutil.Execute(\"cp\", filepath.Join(rpcPath, \"code.proto\"), tmpRPCPath)\n\n\t// Copy gRPC ServiceConfig as the source of retry config.\n\tretrySrc := filepath.Join(\"schema\", \"google\", \"showcase\", \"v1beta1\", \"showcase_grpc_service_config.json\")\n\tutil.Execute(\"cp\", retrySrc, \"dist\")\n\n\t// Copy compliance suite for easy access by generators.\n\tcomplianceSrc := filepath.Join(\"schema\", \"google\", \"showcase\", \"v1beta1\", \"compliance_suite.json\")\n\tutil.Execute(\"cp\", complianceSrc, \"dist\")\n\n\t// Copy the API Service config for easy access by generators.\n\tserviceYamlSrc := filepath.Join(\"schema\", \"google\", \"showcase\", \"v1beta1\", \"showcase_v1beta1.yaml\")\n\tutil.Execute(\"cp\", serviceYamlSrc, \"dist\")\n\n\t// Tar Protos\n\toutput := filepath.Join(\"dist\", fmt.Sprintf(\"gapic-showcase-%s-protos.tar.gz\", version))\n\tutil.Execute(\"tar\", \"-zcf\", output, \"-C\", tmpProtoPath, \"google\")\n\n\t// Check if protoc is installed.\n\tif err := exec.Command(\"protoc\", \"--version\").Run(); err != nil {\n\t\tlog.Fatal(\"Error: 'protoc' is expected to be installed on the path.\")\n\t}\n\n\t// Compile protos\n\tfiles, err := filepath.Glob(filepath.Join(tmpProtoPath, \"google\", \"showcase\", \"v1beta1\", \"*.proto\"))\n\tif err != nil {\n\t\tlog.Fatal(\"Error: failed to find protos in \" + tmpProtoPath)\n\t}\n\tcommand := []string{\n\t\t\"protoc\",\n\t\t\"--experimental_allow_proto3_optional\",\n\t\t\"--proto_path=\" + tmpProtoPath,\n\t\t\"--include_imports\",\n\t\t\"--include_source_info\",\n\t\t\"-o\",\n\t\tfilepath.Join(\"dist\", fmt.Sprintf(\"gapic-showcase-%s.desc\", version)),\n\t}\n\tutil.Execute(append(command, files...)...)\n}\n"
  },
  {
    "path": "util/compile_protos.go",
    "content": "// Copyright 2018 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//     https://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\npackage util\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\n// CompileProtos regenerates all of the generated source code for the Showcase\n// API including the generated messages, gRPC services, go gapic clients,\n// and the generated CLI. This must be run from the root directory\n// of the gapic-showcase repository.\nfunc CompileProtos(version string) {\n\t// Check if protoc is installed.\n\tif err := exec.Command(\"protoc\", \"--version\").Run(); err != nil {\n\t\tlog.Fatal(\"Error: 'protoc' is expected to be installed on the path.\")\n\t}\n\n\t// Setup paths\n\tpwd, err := os.Getwd()\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: unable to get working dir: %+v\", err)\n\t}\n\n\toutDir, err := os.MkdirTemp(os.TempDir(), \"gapic-showcase\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: unable to create a temporary dir: %+v\\n\", err)\n\t}\n\tdefer os.RemoveAll(outDir)\n\n\tprotos := filepath.Join(\"schema\", \"google\", \"showcase\", version, \"*.proto\")\n\tfiles, err := filepath.Glob(protos)\n\tif err != nil {\n\t\tlog.Fatal(\"Error: failed to find protos in \" + protos)\n\t}\n\n\t// Run protoc\n\tcommand := []string{\n\t\t\"protoc\",\n\t\t\"--experimental_allow_proto3_optional\",\n\t\t\"--proto_path=schema/googleapis\",\n\t\t\"--proto_path=schema\",\n\t\t\"--go_cli_out=\" + filepath.Join(\"cmd\", \"gapic-showcase\"),\n\t\t\"--go_cli_opt=root=gapic-showcase\",\n\t\t\"--go_cli_opt=gapic=github.com/googleapis/gapic-showcase/client\",\n\t\t\"--go_cli_opt=fmt=false\",\n\t\t\"--go_gapic_out=\" + outDir,\n\t\t\"--go_gapic_opt=omit-snippets\",\n\t\t\"--go_gapic_opt=go-gapic-package=github.com/googleapis/gapic-showcase/client;client\",\n\t\t\"--go_gapic_opt=grpc-service-config=schema/google/showcase/v1beta1/showcase_grpc_service_config.json\",\n\t\t\"--go_gapic_opt=api-service-config=schema/google/showcase/v1beta1/showcase_v1beta1.yaml\",\n\t\t\"--go_gapic_opt=metadata\",\n\t\t\"--go_gapic_opt=transport=grpc+rest\",\n\t\t\"--go_rest_server_out=\" + filepath.Join(\"server\", \"genrest\"),\n\t\t\"--go_out=plugins=grpc:\" + outDir,\n\t}\n\tExecute(append(command, files...)...)\n\n\t// Copy generated code back into repo.\n\ttempClient := filepath.Join(outDir, \"github.com\", \"googleapis\", \"gapic-showcase\", \"client\")\n\ttempServer := filepath.Join(outDir, \"github.com\", \"googleapis\", \"gapic-showcase\", \"server\")\n\tcommand = []string{\n\t\t\"cp\",\n\t\t\"-r\",\n\t\ttempClient,\n\t\ttempServer,\n\t\tpwd,\n\t}\n\tExecute(command...)\n\n\t// Fix some generated errors.\n\tfixes := []struct {\n\t\tfile string\n\t\tfix  string\n\t}{\n\t\t{\n\t\t\t\"cmd/gapic-showcase/verify-test.go\",\n\t\t\t\"/ByteSliceVar/d\",\n\t\t},\n\t\t{\n\t\t\t\"cmd/gapic-showcase/wait.go\",\n\t\t\t\"s/EndEnd_time/EndEndTime/g\",\n\t\t},\n\t\t{\n\t\t\t\"cmd/gapic-showcase/search-blurbs.go\",\n\t\t\t\"/if err == iterator.Done {/,/}/d\",\n\t\t},\n\t}\n\tcommand = []string{\n\t\t\"sed\",\n\t\t\"-i.bak\",\n\t}\n\tfor _, f := range fixes {\n\t\tExecute(append(command, f.fix, f.file)...)\n\n\t\t// Remove the backup file.\n\t\tExecute(\"rm\", fmt.Sprintf(\"%s.bak\", f.file))\n\t}\n\n\t// TODO: Remove this once the CLI generator supports mapped pagination responses.\n\tExecute(\"rm\", \"-f\", \"cmd/gapic-showcase/paged-expand-legacy.go\")\n\n\t// Format generated output\n\tExecute(\"go\", \"fmt\", \"./...\")\n}\n"
  },
  {
    "path": "util/execute.go",
    "content": "// Copyright 2018 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//     https://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\npackage util\n\nimport (\n\t\"log\"\n\t\"os/exec\"\n)\n\n// Execute runs the given strings as a command.\nfunc Execute(args ...string) {\n\tif output, err := exec.Command(args[0], args[1:]...).CombinedOutput(); err != nil {\n\t\tlog.Fatalf(\"%s\", output)\n\t}\n}\n"
  },
  {
    "path": "util/genrest/README.md",
    "content": "# util/genrest\n\nThis directory contains the core functionality for the `protoc` plugin `go_rest_server`, which implements a REST endpoint for Showcase services.\n"
  },
  {
    "path": "util/genrest/errorhandling/accumulator.go",
    "content": "// Copyright 2020 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//     https://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\npackage errorhandling\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Accumulator allows storing a series of errors and then concatenating their string representations\n// into one big error.\ntype Accumulator struct {\n\terrors []error\n}\n\n// AccumulateError stores an error to be reported later.\nfunc (ea *Accumulator) AccumulateError(err error) {\n\tif err == nil {\n\t\treturn\n\t}\n\tea.errors = append(ea.errors, err)\n}\n\n// Error concatenates the string representations of all stored errors and returns it as a single\n// error.\nfunc (ea *Accumulator) Error() error {\n\tif len(ea.errors) == 0 {\n\t\treturn nil\n\t}\n\terrorStrings := make([]string, len(ea.errors))\n\tfor idx, err := range ea.errors {\n\t\terrorStrings[idx] = err.Error()\n\t}\n\treturn fmt.Errorf(\"%s\", strings.Join(errorStrings, \"\\n\"))\n}\n"
  },
  {
    "path": "util/genrest/genserver.go",
    "content": "// Copyright 2020 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//     https://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\npackage genrest\n\nimport (\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/compiler/protogen\"\n\t\"google.golang.org/protobuf/types/pluginpb\"\n)\n\nfunc Generate(plugin *protogen.Plugin) error {\n\tinfo := plugin.NewGeneratedFile(\"showcase-rest-sample-response.txt\", \"github.com/googleapis/gapic-showcase/server/genrest\")\n\n\t// The typecasting below appears to be idiomatic as per\n\t// https://github.com/protocolbuffers/protobuf-go/blob/master/cmd/protoc-gen-go/internal_gengo/main.go#L31\n\tplugin.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)\n\tinfo.P(\"Generated via \\\"google.golang.org/protobuf/compiler/protogen\\\" via ProtoModel!\")\n\tinfo.P(\"Files:\\n\", strings.Join(plugin.Request.GetFileToGenerate(), \"\\n\"))\n\n\tprotoModel, err := NewProtoModel(plugin)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tinfo.P(\"\\nProto Model:\")\n\tinfo.P(protoModel.String())\n\n\tinfo.P(\"\\n\\n\")\n\tgoModel, err := NewGoModel(protoModel)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo.P(goModel.String())\n\n\tview, err := NewView(goModel)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, source := range view.Files {\n\t\tfile := plugin.NewGeneratedFile(source.Name, protogen.GoImportPath(filepath.Join(\"github.com/googleapis/gapic-showcase/server/genrest\", source.Directory)))\n\t\tfile.P(source.Contents())\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "util/genrest/gomodel/gomodel.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest/errorhandling\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/internal/pbinfo\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n)\n\n////////////////////////////////////////\n// Model\n\n// Model is a data model intended to be capture all the information needed for generating Go source\n// files that provide shims between REST messages on the wire and protocol buffer messages in the\n// back end, for multiple services.\ntype Model struct {\n\terrorhandling.Accumulator\n\tService []*ServiceModel\n}\n\n// Add adds `service` to this Model.\nfunc (gm *Model) Add(service *ServiceModel) {\n\tgm.Service = append(gm.Service, service)\n}\n\n// String returns a string representation of this Model.\nfunc (gm *Model) String() string {\n\tshimStrings := make([]string, len(gm.Service))\n\tfor idx, shim := range gm.Service {\n\t\tshimStrings[idx] = shim.String()\n\t}\n\tsep := \"----------------------------------------\"\n\treturn fmt.Sprintf(\"GoModel\\n%s\\n%s\", sep, strings.Join(shimStrings, \"\\n\"+sep+\"\\n\"))\n}\n\n// CheckConsistency checks this Model for consistency, accumulating\n// any errors found. This means checking that all the HTTP annotations\n// across all services resolve to distinct paths.\nfunc (gm *Model) CheckConsistency() {\n\treBodyField := regexp.MustCompile(resttools.RegexField)\n\tallHandlers := []*RESTHandler{}\n\n\tfor _, service := range gm.Service {\n\t\tallHandlers = append(allHandlers, service.Handlers...)\n\t}\n\n\tfor first, firstHandler := range allHandlers {\n\t\tif len(firstHandler.RequestBodyFieldProtoName) > 0 && firstHandler.RequestBodyFieldProtoName != \"*\" {\n\n\t\t\t// The body field name refers to a top-level field.\n\t\t\tif reBodyField.FindStringIndex(firstHandler.RequestBodyFieldProtoName) == nil {\n\t\t\t\tgm.AccumulateError(fmt.Errorf(\"bad syntax in body field spec %q\", firstHandler.RequestBodyFieldProtoName))\n\t\t\t}\n\t\t}\n\n\t\tif _, nestedVariables := firstHandler.PathTemplate.HasVariables(); nestedVariables {\n\t\t\tgm.AccumulateError(fmt.Errorf(\"pattern %q specifies nested variables, which are not allowed as per https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#path-template-syntax\", firstHandler.URIPattern))\n\t\t}\n\t\tfor _, secondHandler := range allHandlers[first+1:] {\n\t\t\tif firstHandler.HTTPMethod != secondHandler.HTTPMethod {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tfullMatch, ambiguousPattern, err := FindValuesMatching(firstHandler.PathTemplate, secondHandler.PathTemplate)\n\t\t\tif err != nil {\n\t\t\t\tgm.AccumulateError(fmt.Errorf(\"matching patterns %q and %q (constructed %q): %s\", firstHandler, secondHandler, ambiguousPattern, err))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !fullMatch {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tgm.AccumulateError(fmt.Errorf(\"pattern %q matches both\\n   %s and\\n   %s\\n\\n\", ambiguousPattern, firstHandler, secondHandler))\n\t\t}\n\t}\n}\n\n////////////////////////////////////////\n// ServiceModel\n\n// ServiceModel is a data model for generating a REST/proto shim for\n// a single protocol buffer service.\ntype ServiceModel struct {\n\t// the fully qualified protocol buffer type name of this service\n\tProtoPath string\n\n\t// the non-qualified name of this service\n\tShortName string\n\n\t// a map of import paths to import info for each of the service-related Go imports that will\n\t// be needed to implement all of the Handlers\n\tImports map[string]*pbinfo.ImportSpec\n\n\t// a list of all the HTTP handlers that will need to be generated, one for each HTTP\n\t// annotation for each service RPC\n\tHandlers []*RESTHandler\n}\n\n// FullName pretty-prints the short name and proto path.\nfunc (service *ServiceModel) FullName() string {\n\treturn fmt.Sprintf(\"%q (%s)\", service.ShortName, service.ProtoPath)\n}\n\n// String returns a string representation of this ServiceModel.\nfunc (service *ServiceModel) String() string {\n\timportStrings := make([]string, 0, len(service.Imports))\n\tfor path, spec := range service.Imports {\n\t\timportStrings = append(importStrings, fmt.Sprintf(\"%s: %q %q\", spec.Name, spec.Path, path))\n\t}\n\tsort.Strings(importStrings)\n\n\thandlerStrings := make([]string, len(service.Handlers))\n\tfor idx, handler := range service.Handlers {\n\t\thandlerStrings[idx] = handler.String()\n\t}\n\tsort.Strings(handlerStrings)\n\n\treturn fmt.Sprintf(\"Shim %s\\n  Imports:\\n    %s\\n  Handlers (%d):\\n    %s\",\n\t\tservice.FullName(),\n\t\tstrings.Join(importStrings, \"\\n    \"),\n\t\tlen(handlerStrings),\n\t\tstrings.Join(handlerStrings, \"\\n    \"))\n}\n\n// AddHandler adds handler to this ServiceModel.\nfunc (service *ServiceModel) AddHandler(handler *RESTHandler) {\n\tif service.Handlers == nil {\n\t\tservice.Handlers = []*RESTHandler{}\n\t}\n\tservice.Handlers = append(service.Handlers, handler)\n}\n\n// AddImports adds each element of imports to the imports in this ServiceModel.\nfunc (service *ServiceModel) AddImports(imports ...*pbinfo.ImportSpec) {\n\tif service.Imports == nil {\n\t\tservice.Imports = make(map[string]*pbinfo.ImportSpec, len(imports))\n\t}\n\tfor _, importSpec := range imports {\n\t\tservice.Imports[importSpec.Path] = importSpec\n\t}\n}\n\n////////////////////////////////////////\n// RESTHandler\n\n// RESTHandler contains the information needed to generate a single HTTP handler.\ntype RESTHandler struct {\n\t//// Transcoding information\n\n\tHTTPMethod      string\n\tURIPattern      string       // as it appears in the HTTP annotation\n\tPathTemplate    PathTemplate // parsed version of URIPattern\n\tStreamingServer bool         // whether this method uses server-side streaming\n\tStreamingClient bool         // whether this method uses client-side streaming\n\n\t//// Go types\n\n\tGoMethod                  string\n\tRequestType               string\n\tRequestTypePackage        string\n\tRequestTypeImport         string\n\tRequestVariable           string\n\tRequestBodyFieldSpec      BodyFieldSpec\n\tRequestBodyFieldProtoName string\n\tRequestBodyFieldName      string\n\tRequestBodyFieldType      string\n\tRequestBodyFieldVariable  string\n\tRequestBodyFieldPackage   string\n\tResponseType              string\n\tResponseTypePackage       string\n\tResponseVariable          string\n}\n\n// String returns a string representation of this RESTHandler.\nfunc (rh *RESTHandler) String() string {\n\treturn fmt.Sprintf(\"%8s %50s func %s(%s %s.%s) (%s %s.%s) {}\\n%s\\n\", rh.HTTPMethod, rh.URIPattern, rh.GoMethod, rh.RequestVariable, rh.RequestTypePackage, rh.RequestType, rh.ResponseVariable, rh.ResponseTypePackage, rh.ResponseType, rh.PathTemplate)\n}\n\n// BodyFieldSpec encodes what request field was annotated as the REST request body.\ntype BodyFieldSpec int\n\nconst (\n\tBodyFieldNone   BodyFieldSpec = iota // no RPC field specified in the REST body\n\tBodyFieldSingle                      // a single top-level RPC request field was specified in the REST body\n\tBodyFieldAll                         // the whole RPC request message is encoded in the REST body\n)\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplate.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n////////////////////////////////////////\n// PathTemplate\n\n// PathTemplate contains a sequence of parsed Segment to represent an HTTP binding.\ntype PathTemplate []*Segment\n\n// NewPathTemplate parses `pattern` to return the corresponding PathTemplate.\nfunc NewPathTemplate(pattern string) (PathTemplate, error) {\n\treturn ParseTemplate(pattern)\n}\n\n// Flatten returns a flattened PathTemplate, which contains no recursively nested\n// PathTemplate. Effectively, this removes any Segment with `Kind==Variable`.\nfunc (pt PathTemplate) Flatten() PathTemplate {\n\tflat := PathTemplate{}\n\tfor _, seg := range pt {\n\t\tflat = append(flat, seg.Flatten()...)\n\t}\n\treturn flat\n}\n\n// HasVariables returns two booleans depending on whether `pt` has top-level and nested\n// (lower-level) variables.\nfunc (pt PathTemplate) HasVariables() (topVar, nestedVar bool) {\n\tfor _, segment := range pt {\n\t\tif segment.Kind == Variable {\n\t\t\tsegTopVar, segNestedVar := segment.Subsegments.HasVariables()\n\t\t\tnestedVar = nestedVar || segTopVar || segNestedVar\n\t\t\ttopVar = true\n\t\t}\n\t}\n\treturn topVar, nestedVar\n}\n\n// ListVariables returns a list of all the variables (proto field names) found in `pt`,\nfunc (pt PathTemplate) ListVariables() []string {\n\tvarNames := []string{}\n\tfor _, segment := range pt {\n\t\tif segment.Kind == Variable {\n\t\t\tvarNames = append(varNames, segment.Value)\n\t\t\tvarNames = append(varNames, segment.Subsegments.ListVariables()...)\n\t\t}\n\t}\n\treturn varNames\n}\n\n// asGoLiteral returns a Go-syntax representation of this PathTemplate. This is useful for\n// constructing and debugging tests.\nfunc (pt PathTemplate) asGoLiteral() string {\n\tparts := make([]string, len(pt))\n\tfor idx, segment := range pt {\n\t\tparts[idx] = \"&\" + segment.asGoLiteral()\n\t}\n\treturn fmt.Sprintf(\"PathTemplate{ %s }\", strings.Join(parts, \", \"))\n}\n\n////////////////////////////////////////\n// Segment\n\n// Segment is a single structural element in an HTTP binding\ntype Segment struct {\n\tKind SegmentKind\n\n\t// the semantics of Value depend on Kind:\n\t// Kind==Variable: field path\n\t// Kind==Literal: literal value\n\t// Kind==SingleValue: \"*\"\n\t// Kind== MultipleValue: \"**\"\n\tValue string\n\n\tSubsegments PathTemplate\n}\n\n// String returns a string representation of this Segment.\nfunc (seg *Segment) String() string {\n\tswitch seg.Kind {\n\tcase Literal:\n\t\treturn fmt.Sprintf(\"%q\", seg.Value)\n\tcase SingleValue, MultipleValue:\n\t\treturn seg.Value\n\tcase Variable:\n\t\tsubsegments := \"!!ERROR: no subsegments\"\n\t\tif len(seg.Subsegments) > 0 {\n\t\t\tsubsegments = fmt.Sprintf(\"%s\", seg.Subsegments)\n\t\t}\n\t\treturn fmt.Sprintf(\"{%s = %s}\", seg.Value, subsegments)\n\t}\n\n\t// Out of range: print as much info as possible\n\treturn fmt.Sprintf(\"{%s(%d) %q %s}\", seg.Kind, seg.Kind, seg.Value, seg.Subsegments)\n}\n\n// Flatten returns a flattened PathTemplate containing either this Segment or its flattened\n// sub-segments.  Effectively, this removes any Segment with `Kind==Variable`.\nfunc (seg *Segment) Flatten() PathTemplate {\n\tswitch seg.Kind {\n\tcase Variable:\n\t\treturn seg.Subsegments.Flatten()\n\tdefault:\n\t\treturn PathTemplate{seg}\n\t}\n}\n\n// asGoLiteral returns a Go-syntax representation of this Segment. This is useful for\n// constructing and debugging tests.\nfunc (seg *Segment) asGoLiteral() string {\n\tsubsegments := \"nil\"\n\tif seg.Subsegments != nil {\n\t\tsubsegments = seg.Subsegments.asGoLiteral()\n\t}\n\n\treturn fmt.Sprintf(\"Segment{ %s, %q, %s }\", seg.Kind.asGoLiteral(), seg.Value, subsegments)\n}\n\n////////////////////////////////////////\n// SegmentKind\n\n// SegmentKind describes a type of Segment.\ntype SegmentKind int\n\nconst (\n\tKindUndefined SegmentKind = iota\n\tLiteral\n\tVariable\n\tSingleValue\n\tMultipleValue\n\tKindEnd\n)\n\n// Valid returns true iff this SegmentKind value is valid.\nfunc (sk SegmentKind) Valid() bool {\n\treturn sk > KindUndefined && sk < KindEnd\n}\n\n// String returns a string representation of this SegmentKind.\nfunc (sk SegmentKind) String() string {\n\tvar names = []string{\"(UNDEFINED)\", \"LITERAL\", \"VARIABLE\", \"SINGLEVAL\", \"MULTIVAL\", \"(END)\"}\n\tif !sk.Valid() {\n\t\treturn \"INVALID\"\n\t}\n\treturn names[sk]\n}\n\n// asGoLiteral returns a Go-syntax representation of this SegmentKind. This is useful for\n// constructing and debugging tests.\nfunc (sk SegmentKind) asGoLiteral() string {\n\tvar names = []string{\"KindUndefined\", \"Literal\", \"Variable\", \"SingleValue\", \"MultipleValue\", \"KindEnd\"}\n\treturn names[sk]\n}\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplate_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"testing\"\n)\n\nfunc TestHasVariables(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tstringTemplate   string\n\t\texpectVars       bool\n\t\texpectNestedVars bool\n\t}{\n\t\t{\n\t\t\tstringTemplate:   \"/aa/cc/ee/*/gg/ii/jj/*/kk/**:ll\",\n\t\t\texpectVars:       false,\n\t\t\texpectNestedVars: false,\n\t\t},\n\t\t{\n\t\t\tstringTemplate:   \"/aa/{bb}/cc/{dd=ee/*/gg}/{hh=ii/jj/*/kk/**}:ll\",\n\t\t\texpectVars:       true,\n\t\t\texpectNestedVars: false,\n\t\t},\n\t\t{\n\t\t\tstringTemplate:   \"/aa/{bb}/cc/{dd=ee/*/gg/{hh=ii/jj/*/kk}/**}:ll\",\n\t\t\texpectVars:       true,\n\t\t\texpectNestedVars: true,\n\t\t},\n\t} {\n\t\tparsed, err := ParseTemplate(testCase.stringTemplate)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"testCase = %d: ParseTemplate failed: %s \\n   Test case input: %v\", idx, err, testCase)\n\t\t}\n\n\t\thasVars, hasNestedVars := parsed.HasVariables()\n\t\tif got, want := hasVars, testCase.expectVars; got != want {\n\t\t\tt.Errorf(\"testCase = %d: HasVars() failed checking variables: got %v, want %v\", idx, got, want)\n\t\t}\n\t\tif got, want := hasNestedVars, testCase.expectNestedVars; got != want {\n\t\t\tt.Errorf(\"testCase = %d: HasVars() failed checking nested variables: got %v, want %v\", idx, got, want)\n\t\t}\n\t}\n}\n\nfunc TestListVariables(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tstringTemplate string\n\t\texpectVars     []string\n\t}{\n\t\t{\n\t\t\tstringTemplate: \"/aa/cc/ee/*/gg/ii/jj/*/kk/**:ll\",\n\t\t\texpectVars:     nil,\n\t\t},\n\t\t{\n\t\t\tstringTemplate: \"/aa/{bb}/cc/{dd=ee/*/gg}/{hh=ii/jj/*/kk/**}:ll\",\n\t\t\texpectVars:     []string{\"bb\", \"dd\", \"hh\"},\n\t\t},\n\t\t{\n\t\t\tstringTemplate: \"/aa/{bb}/cc/{dd=ee/*/gg/{hh=ii/jj/*/kk}/**}:ll\",\n\t\t\texpectVars:     []string{\"bb\", \"dd\", \"hh\"},\n\t\t},\n\t} {\n\t\tparsed, err := ParseTemplate(testCase.stringTemplate)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"testCase = %d: ParseTemplate failed: %s \\n   Test case input: %v\", idx, err, testCase)\n\t\t}\n\n\t\tvarList := parsed.ListVariables()\n\t\tif got, want := len(varList), len(testCase.expectVars); got != want {\n\t\t\tt.Errorf(\"testCase = %d: ListVars() unexpected number of variables returned: got %v, want %v: returned elements: %v\",\n\t\t\t\tidx, got, want, varList)\n\t\t\tcontinue\n\t\t}\n\t\tfor varIdx, got := range varList {\n\t\t\tif want := testCase.expectVars[varIdx]; got != want {\n\t\t\t\tt.Errorf(\"testCase = %d: ListVars() variable %d unexpected: got %v, want %v\", idx, varIdx, got, want)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplatematch.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// FindValuesMatching returns the the longest string prefix that matches the templates `first` and\n// `second`, and a bool indicating whether this prefix if a full match for both expressions.\nfunc FindValuesMatching(first, second PathTemplate) (fullMatch bool, longestMatch string, err error) {\n\tone := &traverser{template: first.Flatten()}\n\ttwo := &traverser{template: second.Flatten()}\n\n\tvalues := make([]string, max(one.Len(), two.Len()))\n\tdefer func() {\n\t\tlongestMatch = strings.Join(values, \"\")\n\t}()\n\n\tfor !(one.Done() || two.Done()) {\n\t\tmatches, matching := segmentsMatch(one, two)\n\t\tif !matches {\n\t\t\treturn false, \"\", nil\n\t\t}\n\t\tvalues = append(values, matching)\n\t}\n\n\t// A Segment of kind MultipleValue can match many other segments, so it doesn't auto-advance\n\t// in all scenarios.\n\tone.ConsumeIfKind(MultipleValue)\n\ttwo.ConsumeIfKind(MultipleValue)\n\n\tif one.ConsumedAll() && two.ConsumedAll() {\n\t\treturn true, \"\", nil\n\t}\n\n\tif !(one.ConsumedAll() || two.ConsumedAll()) {\n\t\treturn false, \"\", fmt.Errorf(\"did not traverse either full pattern one: %v    two: %v\", *one, *two)\n\t}\n\n\treturn false, \"\", nil\n}\n\n// segmentsMatch is the main work function for FindValuesMatching. It returns true iff one and two\n// can be matched, as well as the matching string between `one` and `two`, which can be a literal, a\n// wildcard \"*\", or be empty (for some matches in progress). This typically advanced the indices of\n// `one` and/or `two`.\nfunc segmentsMatch(one, two *traverser) (bool, string) {\n\tseg1 := one.Segment()\n\tseg2 := two.Segment()\n\n\tif seg1.Kind != Literal && seg2.Kind == Literal {\n\t\treturn segmentsMatch(two, one)\n\t}\n\t// If at least one of the arguments is a Literal, the first one is.\n\tif seg1.Kind == Literal {\n\t\tswitch seg2.Kind {\n\t\tcase Literal:\n\t\t\tif seg1.Value != seg2.Value {\n\t\t\t\treturn false, \"\"\n\t\t\t}\n\t\t\tone.Inc()\n\t\t\ttwo.Inc()\n\t\t\treturn true, seg1.Value\n\t\tcase SingleValue:\n\t\t\tone.Inc()\n\t\t\ttwo.Inc()\n\t\t\treturn true, seg1.Value\n\t\tcase MultipleValue:\n\t\t\t// special case for the verb, which is the only thing that can come after a\n\t\t\t// multiple value. Advance past the multiple value and reprocess.\n\t\t\tif seg1.Value == \":\" {\n\t\t\t\ttwo.Inc()\n\t\t\t\treturn true, \"\"\n\t\t\t}\n\n\t\t\tone.Inc()\n\t\t\t// no increment for two\n\t\t\treturn true, seg1.Value\n\t\tdefault:\n\t\t\tone.SetDone()\n\t\t\ttwo.SetDone()\n\t\t\treturn false, \"[ERROR]\"\n\t\t}\n\t}\n\t// If we reach here, neither argument was a Literal\n\n\tif seg1.Kind != SingleValue && seg2.Kind == SingleValue {\n\t\treturn segmentsMatch(two, one)\n\t}\n\t// If at least one of the arguments is a SingleValue, the first one is.\n\tif seg1.Kind == SingleValue {\n\t\tswitch seg2.Kind {\n\t\tcase SingleValue:\n\t\t\tone.Inc()\n\t\t\ttwo.Inc()\n\t\t\treturn true, \"*\"\n\t\tcase MultipleValue:\n\t\t\tone.Inc()\n\t\t\t// no increment for two\n\t\t\treturn true, \"*\"\n\t\tdefault:\n\t\t\tone.SetDone()\n\t\t\ttwo.SetDone()\n\t\t\treturn false, \"[ERROR]\"\n\n\t\t}\n\t}\n\t// If we reach here, neither argument was a Literal or SingleValue\n\n\tif seg1.Kind == MultipleValue {\n\t\tif seg2.Kind != MultipleValue {\n\t\t\tone.SetDone()\n\t\t\ttwo.SetDone()\n\t\t\treturn false, fmt.Sprintf(\"[ERROR: unknown SegmentKind %d]\", seg2.Kind)\n\t\t}\n\t\t// The following should mark both as done, since there shouldn't be any subsequent segments for either\n\t\tone.Inc()\n\t\ttwo.Inc()\n\t\treturn true, \"**\"\n\t}\n\n\t// We should never reach here (note that flattened PathTemplates contain no segments with Kind==Variable)\n\tone.SetDone()\n\ttwo.SetDone()\n\treturn false, fmt.Sprintf(\"[ERROR: unknown SegmentKind %d]\", seg1.Kind)\n}\n\nfunc max(x, y int) int {\n\tif x > y {\n\t\treturn x\n\t}\n\treturn y\n}\n\n////////////////////////////////////////\n// traverser\n\n// traverser is a helper struct for FindValuesMatching. It keeps track of which segment of a\n// PathTemplate we're current processing, and whether the traversal has been determined to be\n// finished.\ntype traverser struct {\n\t// template being traversed\n\ttemplate PathTemplate\n\n\t// index into the segment of template being examined\n\tidx int\n\n\t// whether we're done traversing this template\n\tdone bool\n}\n\n// Segment returns the current Segment in the traversal.\nfunc (tr *traverser) Segment() *Segment {\n\treturn tr.template[tr.idx]\n}\n\n// Len returns the length of the template.\nfunc (tr *traverser) Len() int {\n\treturn len(tr.template)\n}\n\n// Inc advances to the next Segment in the template.\nfunc (tr *traverser) Inc() {\n\ttr.idx++\n\tif tr.ConsumedAll() {\n\t\ttr.SetDone()\n\t}\n}\n\n// ConsumeIfKind calls Inc() iff the current Segment's `Kind` equals `kind`.\nfunc (tr *traverser) ConsumeIfKind(kind SegmentKind) {\n\tif !tr.Done() && tr.template[tr.idx].Kind == kind {\n\t\ttr.Inc()\n\t}\n}\n\n// ConsumedAll returns true iff we have traversed all the segments of the template.\nfunc (tr *traverser) ConsumedAll() bool {\n\treturn tr.idx >= len(tr.template)\n}\n\n// Done returns true iff this traversal has been marked finished.\nfunc (tr *traverser) Done() bool {\n\treturn tr.done\n}\n\n// SetDone returns marks this traversal finished.\nfunc (tr *traverser) SetDone() {\n\ttr.done = true\n}\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplatematch_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"testing\"\n)\n\nfunc TestFindValuesMatching(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tpattern1, pattern2, longestMatch string\n\t\tfullMatch                        bool\n\t}{\n\t\t// Literal, Literal\n\n\t\t{\"/zz/yy\", \"/zz/yy\", \"/zz/yy\", true},\n\t\t{\"/zz\", \"/zz/yy\", \"/zz\", false},\n\n\t\t{\"/zz/yy:xx\", \"/zz/yy:xx\", \"/zz/yy:xx\", true},\n\t\t{\"/zz:xx\", \"/zz/yy:xx\", \"/zz\", false},\n\n\t\t{\"/zz/yy:xx\", \"/zz/yy\", \"/zz/yy\", false},\n\t\t{\"/zz\", \"/zz/yy:xx\", \"/zz\", false},\n\n\t\t// Literal, SingleValue\n\n\t\t{\"/zz/yy/{ww}/vv\", \"/zz/yy/xx/vv\", \"/zz/yy/xx/vv\", true},\n\t\t{\"/zz/yy/xx/vv\", \"/zz/yy/{ww}/vv\", \"/zz/yy/xx/vv\", true},\n\n\t\t{\"/zz/yy/{ww}/vv:uu\", \"/zz/yy/xx/vv:uu\", \"/zz/yy/xx/vv:uu\", true},\n\t\t{\"/zz/yy/{ww}:uu\", \"/zz/yy/xx:uu\", \"/zz/yy/xx:uu\", true},\n\n\t\t{\"/zz/yy/{xx=ww/*}/vv:uu\", \"/zz/yy/ww/tt/vv:uu\", \"/zz/yy/ww/tt/vv:uu\", true},\n\t\t{\"/zz/yy/{xx=ww/*}:uu\", \"/zz/yy/ww/tt:uu\", \"/zz/yy/ww/tt:uu\", true},\n\n\t\t// Literal, MultipleValue\n\t\t{\"/zz/yy/xx/ww/vv\", \"/zz/{pp=yy/xx/**}\", \"/zz/yy/xx/ww/vv\", true},\n\t\t{\"/zz/{pp=yy/xx/**}\", \"/zz/yy/xx/ww/vv\", \"/zz/yy/xx/ww/vv\", true},\n\n\t\t{\"/zz/{pp=yy/xx/**}:rr\", \"/zz/yy/xx/ww/vv:rr\", \"/zz/yy/xx/ww/vv:rr\", true},\n\t\t{\"/zz/{pp=yy/xx/**}:rr\", \"/zz/yy/xx/ww/vv\", \"/zz/yy/xx/ww/vv\", false},\n\t\t{\"/zz/{pp=yy/xx/**}\", \"/zz/yy/xx/ww/vv:rr\", \"/zz/yy/xx/ww/vv\", false},\n\t\t{\"/zz/{pp=yy/xx/**}:rr\", \"/zz/yy/xx/ww/vv:ss\", \"/zz/yy/xx/ww/vv:\", false},\n\n\t\t// SingleValue, SingleValue\n\n\t\t{\"/zz/yy/{xx=ww/*}/vv\", \"/zz/yy/{tt=ww/*}/vv\", \"/zz/yy/ww/*/vv\", true},\n\t\t{\"/zz/yy/{xx=ww/*}:uu\", \"/zz/yy/{tt=ww/*}:uu\", \"/zz/yy/ww/*:uu\", true},\n\n\t\t{\"/zz/yy/{xx=ww/*}/vv/{ss=rr/*/pp}\", \"/zz/yy/ww/{xx}/vv/{oo=rr/*/pp}\", \"/zz/yy/ww/*/vv/rr/*/pp\", true},\n\n\t\t// SingleValue, MultipleValue\n\n\t\t{\"/zz/yy/{xx=ww/**}\", \"/zz/yy/ww/{vv}/uu\", \"/zz/yy/ww/*/uu\", true},\n\t\t{\"/zz/yy/{xx=ww/**}:tt\", \"/zz/yy/ww/{vv}/uu:tt\", \"/zz/yy/ww/*/uu:tt\", true},\n\t\t{\"/zz/yy/{xx=ww/**}\", \"/zz/yy/{vv=ww/*}/uu\", \"/zz/yy/ww/*/uu\", true},\n\t\t{\"/zz/yy/{xx=ww/**}:tt\", \"/zz/yy/{vv=ww/*}/uu:tt\", \"/zz/yy/ww/*/uu:tt\", true},\n\t\t{\"/zz/yy/{xx=ww/**}:tt\", \"/zz/yy/ww/{vv}/uu\", \"/zz/yy/ww/*/uu\", false},\n\t\t{\"/zz/yy/{xx=ww/**}\", \"/zz/yy/ww/{vv}/uu:tt\", \"/zz/yy/ww/*/uu\", false},\n\n\t\t// MultipleValue, MultipleValue\n\t\t{\"/zz/yy/{xx=ww/**}\", \"/zz/yy/{vv=ww/**}\", \"/zz/yy/ww/**\", true},\n\t\t{\"/zz/yy/{xx=ww/**}:ss\", \"/zz/yy/{vv=ww/**}:ss\", \"/zz/yy/ww/**:ss\", true},\n\t\t{\"/zz/yy/{xx=ww/**}\", \"/zz/yy/{vv=ww/**}:ss\", \"/zz/yy/ww/**\", false},\n\t\t{\"/zz/yy/{xx=ww/**}:ss\", \"/zz/yy/{vv=ww/**}\", \"/zz/yy/ww/**\", false},\n\n\t\t// Mix\n\t} {\n\t\ttemplate1, err := NewPathTemplate(testCase.pattern1)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"testCase %2d: unexpected error constructing template1: %s:\\n   Test case input: %v\", idx, err, testCase)\n\t\t}\n\n\t\ttemplate2, err := NewPathTemplate(testCase.pattern2)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"testCase %2d: unexpected error constructing template2: %s:\\n   Test case input: %v\", idx, err, testCase)\n\t\t}\n\n\t\tfullMatch, longestMatch, err := FindValuesMatching(template1, template2)\n\t\tif got, want := longestMatch, testCase.longestMatch; got != want {\n\t\t\tt.Errorf(\"testCase %2d: longestMatch failed: got %q   want %q:\\n   Test case input: %v\\n   err = %v\", idx, got, want, testCase, err)\n\t\t}\n\t\tif got, want := fullMatch, testCase.fullMatch; got != want {\n\t\t\tt.Errorf(\"testCase %2d: fullMatch failed: got %v   want %v:\\n   Test case input: %v\\n   err = %v\", idx, got, want, testCase, err)\n\t\t}\n\t\t_ = err\n\n\t}\n}\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplateparser.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n)\n\n// ParseTemplate parses a path template string according to\n// https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#path-template-syntax\n//\n// Grammar:\n//\n//\tTemplate = \"/\" Segments [ Verb ] ;\n//\tSegments = Segment { \"/\" Segment } ;\n//\tSegment  = \"*\" | \"**\" | LITERAL | Variable ;\n//\tVariable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n//\tFieldPath = IDENT { \".\" IDENT } ;\n//\tVerb     = \":\" LITERAL ;\n//\n// with \"**\" matching the last part of the path template string except for the Verb.\nfunc ParseTemplate(template string) (parsed PathTemplate, err error) {\n\treturn NewParser(template).parse()\n}\n\n////////////////////////////////////////\n// Parser\n\n// Parser contains the context for parsing a path template string.\ntype Parser struct {\n\tsource *Source\n\n\t// whether we've encountered the last \"**\" segment\n\thaveLastSegment bool\n\n\t// regexes\n\tregex map[string]*regexp.Regexp\n}\n\n// NewParser returns a Parser ready to process template.\nfunc NewParser(template string) *Parser {\n\treturn &Parser{\n\t\tsource: &Source{\n\t\t\tstr: template,\n\t\t},\n\t\tregex: make(map[string]*regexp.Regexp),\n\t}\n}\n\n// parse returns the parsed PathTemplate.\nfunc (parser *Parser) parse() (pt PathTemplate, err error) {\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tindent := strings.Repeat(\" \", parser.source.idx)\n\t\t\terr = fmt.Errorf(\"parsing template, position %d: %s   haveLastSegment: %v\\n  %q\\n   %s^\\n   -> %s\", parser.source.idx, err, parser.haveLastSegment, parser.source.str, indent, pt)\n\t\t}\n\t}()\n\n\tif !parser.source.ConsumeIf('/') {\n\t\treturn nil, fmt.Errorf(\"template does not start with slash\")\n\t}\n\n\tpt, err = parser.parseSegments()\n\tpt = append(PathTemplate{slashSegment}, pt...)\n\tif err != nil {\n\t\treturn pt, err\n\t}\n\n\tif parser.source.ConsumeIf(':') {\n\t\tverb, err := parser.parseLiteral()\n\t\tif err != nil {\n\t\t\treturn pt, fmt.Errorf(\"could not parse verb\")\n\t\t}\n\n\t\tpt = append(pt, &Segment{Kind: Literal, Value: \":\"}, verb)\n\t}\n\n\tif parser.source.InRange() {\n\t\treturn pt, fmt.Errorf(\"unexpected character\")\n\t}\n\n\treturn pt, nil\n\n}\n\n// parseSegments parses a sequence of slash-delimited segments.\nfunc (parser *Parser) parseSegments() (PathTemplate, error) {\n\tpt := PathTemplate{}\n\tproceed := true\n\n\tfor proceed {\n\t\tif parser.haveLastSegment {\n\t\t\treturn pt, fmt.Errorf(\"already encountered last segment\")\n\t\t}\n\t\tsegment, err := parser.parseOneSegment()\n\t\tpt = append(pt, segment)\n\t\tif err != nil {\n\t\t\treturn pt, err\n\t\t}\n\n\t\tif proceed = parser.source.ConsumeIf('/'); proceed {\n\t\t\tpt = append(pt, slashSegment)\n\t\t}\n\t}\n\treturn pt, nil\n}\n\n// segmentParser is a function type that parses a specific type of segment. It returns both nil\n// error and nil Segment if the parser does not apply to the next stream of characters in the\n// source. It returns a non-nil Segment if the characters from the point at which called matched the\n// segment type.\ntype segmentParser func() (*Segment, error)\n\n// parseOneSegment parses exactly one segment of the recognized types.\nfunc (parser *Parser) parseOneSegment() (*Segment, error) {\n\torderedParsers := []segmentParser{parser.parseVariable, parser.parseLiteral, parser.parseMultipleValue, parser.parseSingleValue}\n\tfor _, parse := range orderedParsers {\n\t\tseg, err := parse()\n\t\tif err != nil || seg != nil {\n\t\t\treturn seg, err\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"could not parse path segment\")\n}\n\n// parseSingleValue parses a segment with `Kind==SingleValue` (i.e. a single-segment placeholder), returning nil if not possible.\nfunc (parser *Parser) parseSingleValue() (*Segment, error) {\n\tre := parser.GetRegexp(`^\\*`)\n\treturn parser.parseToSegment(re, SingleValue), nil\n}\n\n// parseMultipleValue parses a segment with `Kind==MultipleValue` (i.e. a multiple-segment placeholder), returning nil if not possible.\nfunc (parser *Parser) parseMultipleValue() (*Segment, error) {\n\tre := parser.GetRegexp(`^\\*\\*`)\n\tseg := parser.parseToSegment(re, MultipleValue)\n\tif seg != nil {\n\t\tparser.haveLastSegment = true\n\t}\n\treturn seg, nil\n}\n\n// parseLiteral parses a segment with `Kind==Literal`, returning nil if not possible.\nfunc (parser *Parser) parseLiteral() (*Segment, error) {\n\tre := parser.GetRegexp(resttools.RegexLiteral)\n\treturn parser.parseToSegment(re, Literal), nil\n}\n\n// parseToSegment is a helper function that creates a Segment of the specified kind if the next\n// characters in the parse stream match the expression re.\nfunc (parser *Parser) parseToSegment(re *regexp.Regexp, kind SegmentKind) *Segment {\n\tmatch := parser.source.ConsumeRegex(re)\n\tif len(match) == 0 {\n\t\treturn nil\n\t}\n\treturn &Segment{Kind: kind, Value: match}\n}\n\n// parseFieldPath parses a field path, which is the \"field\" in a \"{field=segments}\" declaration.\nfunc (parser *Parser) parseFieldPath() string {\n\tre := parser.GetRegexp(resttools.RegexField)\n\treturn parser.source.ConsumeRegex(re)\n}\n\n// parseVariable parses a variable spec, which is a sequence of field names, segments, and/or\n// placeholders, all enclosed by matching braces \"{}\".\nfunc (parser *Parser) parseVariable() (*Segment, error) {\n\tif !parser.source.ConsumeIf('{') {\n\t\treturn nil, nil\n\t}\n\n\tfieldPath := parser.parseFieldPath()\n\tif len(fieldPath) == 0 {\n\t\treturn nil, fmt.Errorf(\"no field path specified\")\n\t}\n\n\tsegment := &Segment{\n\t\tKind:  Variable,\n\t\tValue: fieldPath,\n\t}\n\n\tif parser.source.ConsumeIf('=') {\n\t\tvar err error\n\t\tsegment.Subsegments, err = parser.parseSegments()\n\t\tif err != nil {\n\t\t\treturn segment, err\n\t\t}\n\t\tif len(segment.Subsegments) == 0 {\n\t\t\treturn segment, fmt.Errorf(\"no path segments specified for field path %q\", fieldPath)\n\t\t}\n\t} else {\n\t\tsegment.Subsegments = PathTemplate{&Segment{Kind: SingleValue}}\n\t}\n\n\tif !parser.source.ConsumeIf('}') {\n\t\treturn segment, fmt.Errorf(\"expected end-of-variable '}', got %q\", parser.source.Str())\n\t}\n\n\treturn segment, nil\n}\n\n// GetRegexp returns the memoized compiled regex corresponding to expr. This allows defining regexes\n// where they're used while still compiling them only once.\nfunc (parser *Parser) GetRegexp(expr string) *regexp.Regexp {\n\tcompiled := parser.regex[expr]\n\tif compiled == nil {\n\t\tcompiled = regexp.MustCompile(expr)\n\t\tparser.regex[expr] = compiled\n\t}\n\treturn compiled\n}\n\nvar slashSegment = &Segment{Kind: Literal, Value: \"/\"}\n\n////////////////////////////////////////\n// Source\n\n// Source contains the context for the source string being parsed. Note that Source and its methods\n// are NOT rune-safe and operate on each individual character, not each rune.\ntype Source struct {\n\tstr string\n\tidx int\n}\n\n// Consume advances source by num characters.\nfunc (src *Source) Consume(num int) {\n\tsrc.idx += num\n}\n\n// Str returns the unparsed part of the original source string.\nfunc (src *Source) Str() string {\n\tif !src.InRange() {\n\t\treturn \"\"\n\t}\n\treturn src.str[src.idx:]\n}\n\n// InRange returns true iff there are more characters that can be read from the source string.\nfunc (src *Source) InRange() bool {\n\treturn len(src.str) > src.idx\n}\n\n// IsNextByte returns true iff the next character to be read is `query`.\nfunc (src *Source) IsNextByte(query byte) bool {\n\treturn src.InRange() && src.str[src.idx] == query\n}\n\n// ConsumeIf advances the source and returns true iff the next character matches `query`.\nfunc (src *Source) ConsumeIf(query byte) bool {\n\tmatches := src.IsNextByte(query)\n\tif matches {\n\t\tsrc.Consume(1)\n\t}\n\treturn matches\n}\n\n// ConsumeMatch consumes and returns characters matching re, and returns them.\nfunc (src *Source) ConsumeRegex(re *regexp.Regexp) string {\n\tmatch := re.FindString(src.Str())\n\tsrc.Consume(len(match))\n\treturn match\n}\n"
  },
  {
    "path": "util/genrest/gomodel/pathtemplateparser_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage gomodel\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestParseTemplate(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tstringTemplate       string\n\t\texpectSuccess        bool\n\t\texpectParsedTemplate PathTemplate\n\t}{\n\t\t// general segment parsing errors\n\t\t{\"/aa/\", false, nil},\n\t\t{\"//bb\", false, nil},\n\t\t{\"/@aa/bb\", false, nil},\n\t\t{\"/a@/\", false, nil},\n\t\t{\"/aa/:bb\", false, nil},\n\t\t{\"/aa/:bb:cc\", false, nil},\n\t\t{\"/aa/:bb/cc/dd:ee\", false, nil},\n\n\t\t// parse() errors\n\t\t{\"aa/bb\", false, nil},\n\t\t{\"/aa/bb:@dd\", false, nil},\n\t\t{\"/aa/bb:cc@\", false, nil},\n\t\t{\"/aa/bb:d/d\", false, nil},\n\n\t\t// parseVariable() errors\n\t\t{\"/aa/{}\", false, nil},\n\t\t{\"/aa/{bb=}\", false, nil},\n\t\t{\"/aa/{bb=/cc}\", false, nil},\n\t\t{\"/aa/{bb=cc/}\", false, nil},\n\t\t{\"/aa/{bb=cc/@}\", false, nil},\n\t\t{\"/aa/{@bb=cc}\", false, nil},\n\n\t\t// successful cases\n\t\t{\n\t\t\tstringTemplate: \"/aa/{bb}/cc/{dd=ee/*/gg/{hh=ii/jj/*/kk}/**}:ll\",\n\t\t\texpectSuccess:  true,\n\t\t\texpectParsedTemplate: PathTemplate{\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Literal, \"aa\", nil},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Variable, \"bb\", PathTemplate{\n\t\t\t\t\t&Segment{SingleValue, \"\", nil},\n\t\t\t\t}},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Literal, \"cc\", nil},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Variable, \"dd\", PathTemplate{\n\t\t\t\t\t&Segment{Literal, \"ee\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{SingleValue, \"*\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{Literal, \"gg\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{Variable, \"hh\", PathTemplate{\n\t\t\t\t\t\t&Segment{Literal, \"ii\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"jj\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{SingleValue, \"*\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"kk\", nil}},\n\t\t\t\t\t},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{MultipleValue, \"**\", nil}}},\n\t\t\t\t&Segment{Literal, \":\", nil},\n\t\t\t\t&Segment{Literal, \"ll\", nil}},\n\t\t},\n\t\t{\n\t\t\tstringTemplate: \"/aa/{bb}/cc/{dd=ee/*/gg/{hh=ii/jj/*/kk}/**}\",\n\t\t\texpectSuccess:  true,\n\t\t\texpectParsedTemplate: PathTemplate{\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Literal, \"aa\", nil},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Variable, \"bb\", PathTemplate{\n\t\t\t\t\t&Segment{SingleValue, \"\", nil}},\n\t\t\t\t},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Literal, \"cc\", nil},\n\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t&Segment{Variable, \"dd\", PathTemplate{\n\t\t\t\t\t&Segment{Literal, \"ee\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{SingleValue, \"*\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{Literal, \"gg\", nil},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{Variable, \"hh\", PathTemplate{\n\t\t\t\t\t\t&Segment{Literal, \"ii\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"jj\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{SingleValue, \"*\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t\t&Segment{Literal, \"kk\", nil}},\n\t\t\t\t\t},\n\t\t\t\t\t&Segment{Literal, \"/\", nil},\n\t\t\t\t\t&Segment{MultipleValue, \"**\", nil},\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t} {\n\t\tparsed, err := ParseTemplate(testCase.stringTemplate)\n\t\tif got, want := err == nil, testCase.expectSuccess; got != want {\n\t\t\tt.Errorf(\"testCase = %d: ParseTemplate failed: want success: %v;   got error: %s   \\n   Test case input: %v\", idx, want, err, testCase)\n\t\t}\n\t\tif !testCase.expectSuccess {\n\t\t\tcontinue\n\n\t\t}\n\t\tif got, want := parsed, testCase.expectParsedTemplate; !reflect.DeepEqual(got, want) {\n\t\t\tt.Errorf(\"parsed template incorrect:\\n    got: %s\\n   want: %s\", got.asGoLiteral(), want.asGoLiteral())\n\t\t}\n\t\t_ = parsed\n\t}\n}\n"
  },
  {
    "path": "util/genrest/gomodelcreator.go",
    "content": "// Copyright 2020 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//     https://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\npackage genrest\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/golang/protobuf/protoc-gen-go/descriptor\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/gomodel\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/internal/pbinfo\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/protomodel\"\n\t\"github.com/iancoleman/strcase\"\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n// NewGoModel creates a new goModel.Model from the given protomodel.Model. It essentially extracts\n// and organizes the data needed to later generate Go source files.\nfunc NewGoModel(protoModel *protomodel.Model) (*gomodel.Model, error) {\n\tgoModel := &gomodel.Model{\n\t\tService: make([]*gomodel.ServiceModel, 0, len(protoModel.Services)),\n\t}\n\n\tprotoInfo := protoModel.ProtoInfo\n\n\tfor _, service := range protoModel.Services {\n\t\tserviceModel := &gomodel.ServiceModel{ProtoPath: service.TypeName, ShortName: service.Name}\n\t\tgoModel.Add(serviceModel)\n\t\tfor _, binding := range service.RESTBindings {\n\t\t\tprotoMethodType := binding.ProtoMethod\n\t\t\tprotoMethodDesc, ok := protoInfo.Type[protoMethodType].(*descriptorpb.MethodDescriptorProto)\n\t\t\tif !ok {\n\t\t\t\tgoModel.AccumulateError(fmt.Errorf(\"could not get descriptor for %q: %#x\", protoMethodType, protoInfo.Type[protoMethodType]))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tinProtoType := protoInfo.Type[*protoMethodDesc.InputType]\n\t\t\tinGoType, inImports, err := protoInfo.NameSpec(inProtoType)\n\t\t\tgoModel.AccumulateError(err)\n\n\t\t\tvar (\n\t\t\t\trequestBodyFieldType string\n\t\t\t\trequestBodyFieldName string\n\t\t\t\tbodyFieldImports     pbinfo.ImportSpec\n\t\t\t\tbodyFieldSpec        gomodel.BodyFieldSpec\n\t\t\t)\n\n\t\t\tif binding.BodyField == \"*\" {\n\t\t\t\tbodyFieldSpec = gomodel.BodyFieldAll\n\t\t\t} else if len(binding.BodyField) > 0 {\n\t\t\t\tbodyFieldSpec = gomodel.BodyFieldSingle\n\t\t\t\tvar bodyFieldDesc *descriptorpb.FieldDescriptorProto\n\t\t\t\tinProtoTypeDescriptor, ok := inProtoType.(*descriptor.DescriptorProto)\n\t\t\t\tif !ok {\n\t\t\t\t\tgoModel.AccumulateError(fmt.Errorf(\"could not type assert inProtoType %v to *descriptor.DescriptorProto\", inProtoType))\n\t\t\t\t}\n\n\t\t\t\t// Intentional: the following indirectly enforces that the field\n\t\t\t\t// specified is top-level (is not a dotted path), as periods are not\n\t\t\t\t// allowed in field names.\n\t\t\t\tfor _, fd := range inProtoTypeDescriptor.GetField() {\n\t\t\t\t\tif fd.GetName() == binding.BodyField {\n\t\t\t\t\t\tbodyFieldDesc = fd\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif bodyFieldDesc == nil {\n\t\t\t\t\tgoModel.AccumulateError(fmt.Errorf(\"could not find body field %q in %q\", binding.BodyField, inProtoType.GetName()))\n\t\t\t\t}\n\t\t\t\tbodyFieldTypeDesc, ok := protoInfo.Type[bodyFieldDesc.GetTypeName()]\n\t\t\t\tif !ok {\n\t\t\t\t\tgoModel.AccumulateError(fmt.Errorf(\"could not read protoInfo[%q]\", inProtoType))\n\t\t\t\t}\n\t\t\t\trequestBodyFieldType, bodyFieldImports, err = protoInfo.NameSpec(bodyFieldTypeDesc)\n\t\t\t\t// TODO: test for HTTP body encoding a single field whose names is different than its type\n\t\t\t\t// TODO: Test for HTTP body encoding a single field that is a scalar, not a message\n\t\t\t\trequestBodyFieldName = strcase.ToCamel(bodyFieldDesc.GetName())\n\t\t\t\tgoModel.AccumulateError(err)\n\t\t\t}\n\n\t\t\toutProtoType := protoInfo.Type[*protoMethodDesc.OutputType]\n\t\t\toutGoType, outImports, err := protoInfo.NameSpec(outProtoType)\n\t\t\tgoModel.AccumulateError(err)\n\n\t\t\tpathTemplate, err := gomodel.NewPathTemplate(binding.RESTPattern.Pattern)\n\t\t\tgoModel.AccumulateError(err)\n\n\t\t\t// TODO: Check that each field path in the handler path template refers to\n\t\t\t// an actual field in the request. We can use the functionality in\n\t\t\t// resttools.PopulateOneField() (after some refactoring) to do this,\n\t\t\t// starting from FieldDescriptor.ProtoReflect(). This will allow us to error\n\t\t\t// at build time rather than at server run time.\n\n\t\t\trestHandler := &gomodel.RESTHandler{\n\t\t\t\tHTTPMethod: binding.RESTPattern.HTTPMethod,\n\t\t\t\tURIPattern: binding.RESTPattern.Pattern,\n\n\t\t\t\tPathTemplate:    pathTemplate,\n\t\t\t\tStreamingServer: protoMethodDesc.GetServerStreaming(),\n\t\t\t\tStreamingClient: protoMethodDesc.GetClientStreaming(),\n\n\t\t\t\tGoMethod:                  protoMethodDesc.GetName(),\n\t\t\t\tRequestType:               inGoType,\n\t\t\t\tRequestTypePackage:        inImports.Name,\n\t\t\t\tRequestTypeImport:         inImports.Path,\n\t\t\t\tRequestVariable:           \"request\",\n\t\t\t\tRequestBodyFieldSpec:      bodyFieldSpec,\n\t\t\t\tRequestBodyFieldProtoName: binding.BodyField,\n\t\t\t\tRequestBodyFieldName:      requestBodyFieldName,\n\t\t\t\tRequestBodyFieldType:      requestBodyFieldType,\n\t\t\t\tRequestBodyFieldVariable:  \"bodyField\",\n\t\t\t\tRequestBodyFieldPackage:   bodyFieldImports.Name,\n\n\t\t\t\tResponseType:        outGoType,\n\t\t\t\tResponseTypePackage: outImports.Name,\n\t\t\t\tResponseVariable:    \"response\",\n\t\t\t}\n\n\t\t\tserviceModel.AddImports(&inImports, &outImports)\n\t\t\tserviceModel.AddHandler(restHandler)\n\t\t}\n\t}\n\n\tgoModel.CheckConsistency()\n\treturn goModel, goModel.Error()\n}\n"
  },
  {
    "path": "util/genrest/goview/goview.go",
    "content": "// Copyright 2020 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//     https://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\npackage goview\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// View contains a list of files to be output.\ntype View struct {\n\tFiles []*SourceFile\n}\n\n// New returns a new, empty View.\nfunc New(capacity int) *View {\n\treturn &View{Files: make([]*SourceFile, 0, capacity)}\n}\n\n// Append appends file to this View.\nfunc (view *View) Append(file *SourceFile) *SourceFile {\n\tview.Files = append(view.Files, file)\n\treturn file\n}\n\n// SourceFile contains a single file to be output, including both its content and location.\ntype SourceFile struct {\n\tDirectory string\n\tName      string // without any directory components\n\tsource    *Source\n}\n\n// NewFile creates an empty SourceFile with the specified Directory and Name.\nfunc NewFile(directory, name string) *SourceFile {\n\treturn &SourceFile{\n\t\tDirectory: directory,\n\t\tName:      name,\n\t\tsource:    NewSource(),\n\t}\n}\n\n// Contents returns the stringified contents this SourceFile.\nfunc (sf *SourceFile) Contents() string {\n\treturn sf.source.Contents()\n\n}\n\n// Append appends the lines in Source to the lines in SourceFile.\nfunc (sf *SourceFile) Append(source *Source) {\n\tsf.source.lines = append(sf.source.lines, source.lines...)\n}\n\n// P appends a printf-formatted line to SourcerFile.\nfunc (sf *SourceFile) P(format string, args ...interface{}) {\n\tsf.source.P(format, args...)\n}\n\n// Source stores a list of lines, typically a continuous section of source code that forms a part of\n// (or the entirety of) a whole source file.\ntype Source struct {\n\tlines []string // a list of lines\n}\n\n// NewSource returns a new Source\nfunc NewSource() *Source {\n\treturn &Source{lines: []string{}}\n}\n\n// Contents returns the stringified contents this SourceFile.\nfunc (source *Source) Contents() string {\n\treturn strings.Join(source.lines, \"\\n\") + \"\\n\"\n}\n\n// P writes a new line of content to this SourceFile. The arguments are treated exactly as in\n// fmt.Printf. Note that there is an implicit in the SourceFile contents \"\\n\" after each call to\n// P().\nfunc (source *Source) P(format string, args ...interface{}) {\n\tsource.lines = append(source.lines, fmt.Sprintf(format, args...))\n}\n"
  },
  {
    "path": "util/genrest/goviewcreator.go",
    "content": "// Copyright 2020 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//     https://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\npackage genrest\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest/gomodel\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/goview\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\"\n)\n\n// NewView creates a a new goview.View (a series of files to be output) from a gomodel.Model. The\n// current approach is to generate one file per service, with that file containing all the service's\n// RPCs. An additional file `genrest.go` is also created to register all these handlers with a\n// gorilla/mux dispatcher.\nfunc NewView(model *gomodel.Model) (*goview.View, error) {\n\t// TODO: Assert that all services live in the same proto package, which is currently the case and we currently assume.\n\tnamer := NewNamer()\n\n\tnumServices := len(model.Service)\n\tview := goview.New(numServices)\n\tregistered := []*registeredHandler{}\n\n\tfor idxService, service := range model.Service {\n\t\tfile := view.Append(goview.NewFile(\"\", strings.ToLower(service.ShortName)+\".go\"))\n\t\tfile.P(\"%s\", license)\n\t\tfile.P(\"// DO NOT EDIT. This is an auto-generated file containing the REST handlers\")\n\t\tfile.P(\"// for service #%d: %s.\\n\", idxService, service.FullName())\n\t\tfile.P(\"\")\n\t\tfile.P(\"package genrest\")\n\t\tfile.P(\"\")\n\n\t\tfileImports := map[string]string{\n\t\t\t\"context\":  \"\",\n\t\t\t\"net/http\": \"\",\n\t\t\t\"github.com/googleapis/gapic-showcase/util/genrest/resttools\": \"\",\n\t\t\t\"github.com/gorilla/mux\": \"gmux\",\n\t\t}\n\n\t\t// TODO: Properly deal with import strings. They may need to be taken out of the gomodel\n\n\t\t// Accumulate source code for each method corresponding to an RPC, as well as the imports the code requires.\n\t\tmethodSources := []*goview.Source{}\n\n\t\t// Accumulate helper methods required by RPC methods, taking care to not duplicate them.\n\t\thelperSources := sourceMap{}\n\n\t\tfor _, handler := range service.Handlers {\n\t\t\tsource := goview.NewSource()\n\t\t\tmethodSources = append(methodSources, source)\n\n\t\t\texcludedQueryParams := []string{}\n\t\t\thandlerName := namer.Get(\"Handle\" + handler.GoMethod)\n\t\t\tpathMatch, allURLVariables, err := matchingPath(handler.PathTemplate)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"processing %q: %s\", handler.PathTemplate, err)\n\t\t\t}\n\t\t\tregistered = append(registered, &registeredHandler{pathMatch, handlerName, handler.HTTPMethod})\n\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"// %s translates REST requests/responses on the wire to internal proto messages for %s\", handlerName, handler.GoMethod)\n\t\t\tsource.P(\"//    Generated for HTTP binding pattern: %s %q\", handler.HTTPMethod, handler.URIPattern)\n\t\t\tsource.P(\"func (backend *RESTBackend) %s(w http.ResponseWriter, r *http.Request) {\", handlerName)\n\t\t\tif handler.StreamingClient {\n\t\t\t\tsource.P(`  backend.Error(w, http.StatusNotImplemented, \"client-streaming methods not implemented yet (request matched '%s': %%q)\", r.URL)`, handler.URIPattern)\n\t\t\t\tsource.P(\"}\")\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tsource.P(`  urlPathParams := gmux.Vars(r)`)\n\t\t\tsource.P(\"  numUrlPathParams := len(urlPathParams)\")\n\t\t\tsource.P(\"\")\n\t\t\t// TODO: Consider factoring out code shared among handlers into a single\n\t\t\t// place, so that handlers only provide the relevant values (e.g. expected\n\t\t\t// number of path variables, etc.)\n\t\t\tsource.P(`  backend.StdLog.Printf(\"Received %%s request matching '%s': %%q\", r.Method, r.URL)`, handler.URIPattern)\n\t\t\tsource.P(`  backend.StdLog.Printf(\"  urlPathParams (expect %d, have %%d): %%q\", numUrlPathParams, urlPathParams)`, len(allURLVariables))\n\t\t\tsource.P(`  backend.StdLog.Printf(\"  urlRequestHeaders:\\n%%s\", resttools.PrettyPrintHeaders(r, \"    \"))`)\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"  resttools.IncludeRequestHeadersInResponse(w, r)\")\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"  if numUrlPathParams!=%d {\", len(allURLVariables))\n\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"found unexpected number of URL variables: expected %d, have %%d: %%#v\", numUrlPathParams, urlPathParams)`, len(allURLVariables))\n\t\t\tsource.P(\"    return\")\n\t\t\tsource.P(\"  }\")\n\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"  systemParameters, queryParams, err := resttools.GetSystemParameters(r)\")\n\t\t\tsource.P(\"  if err != nil {\")\n\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error in query string: %%s\", err)`)\n\t\t\tsource.P(\"    return\")\n\t\t\tsource.P(\"  }\")\n\t\t\t// TODO: Fail with an error if numeric enums are not set, as GAPICs should\n\t\t\t// always request numeric enums. Make this change once we know that it won't\n\t\t\t// break existing usages of Showcase for generators not yet implementing the\n\t\t\t// feature.\n\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"  %s := &%s.%s{}\", handler.RequestVariable, handler.RequestTypePackage, handler.RequestType)\n\t\t\tfileImports[handler.RequestTypeImport] = handler.RequestTypePackage\n\t\t\tswitch handler.RequestBodyFieldSpec {\n\t\t\tcase gomodel.BodyFieldAll:\n\t\t\t\tfileImports[\"bytes\"] = \"\"\n\t\t\t\tfileImports[\"io\"] = \"\"\n\n\t\t\t\tsource.P(\"  // Intentional: Field values in the URL path override those set in the body.\")\n\t\t\t\tsource.P(\"  var jsonReader bytes.Buffer\")\n\t\t\t\tsource.P(\"  bodyReader := io.TeeReader(r.Body, &jsonReader)\")\n\t\t\t\tsource.P(\"  rBytes, err := io.ReadAll(bodyReader)\")\n\t\t\t\tsource.P(\"  if err != nil {\")\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading body content: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  if err := resttools.FromJSON().Unmarshal(rBytes, %s); err != nil {\", handler.RequestVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading body params '*': %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  if err := resttools.CheckRequestFormat(&jsonReader, r, %s.ProtoReflect()); err != nil {\", handler.RequestVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"REST request failed format check: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  if len(queryParams) > 0 {\")\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"encountered unexpected query params: %%v\", queryParams)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\n\t\t\tcase gomodel.BodyFieldSingle:\n\t\t\t\tfileImports[\"bytes\"] = \"\"\n\t\t\t\tfileImports[\"io\"] = \"\"\n\n\t\t\t\t// TODO: Ensure this works when the specified field is a scalar. We\n\t\t\t\t// may need to use PopulateFields from the generated code in that\n\t\t\t\t// case.\n\t\t\t\tsource.P(\"  // Intentional: Field values in the URL path override those set in the body.\")\n\t\t\t\tsource.P(\"  var %s %s.%s\", handler.RequestBodyFieldVariable, handler.RequestBodyFieldPackage, handler.RequestBodyFieldType)\n\t\t\t\tsource.P(\"  var jsonReader bytes.Buffer\")\n\t\t\t\tsource.P(\"  bodyReader := io.TeeReader(r.Body, &jsonReader)\")\n\t\t\t\tsource.P(\"  rBytes, err := io.ReadAll(bodyReader)\")\n\t\t\t\tsource.P(\"  if err != nil {\")\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading body content: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  if err := resttools.FromJSON().Unmarshal(rBytes, &%s); err != nil {\", handler.RequestBodyFieldVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading body into request field '%s': %%s\", err)`, handler.RequestBodyFieldProtoName)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  if err := resttools.CheckRequestFormat(&jsonReader, r, %s.ProtoReflect()); err != nil {\", handler.RequestVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"REST request failed format check: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"  %s.%s = &%s\", handler.RequestVariable, handler.RequestBodyFieldName, handler.RequestBodyFieldVariable)\n\t\t\t\tsource.P(\"\")\n\t\t\t\texcludedQueryParams = append(excludedQueryParams, handler.RequestBodyFieldProtoName)\n\n\t\t\tdefault:\n\t\t\t\tsource.P(\"  if err := resttools.CheckRequestFormat(nil, r, %s.ProtoReflect()); err != nil {\", handler.RequestVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"REST request failed format check: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t}\n\n\t\t\tsource.P(\"  if err := resttools.PopulateSingularFields(%s, urlPathParams); err != nil {\", handler.RequestVariable)\n\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading URL path params: %%s\", err)`)\n\t\t\tsource.P(\"    return\")\n\t\t\tsource.P(\"  }\")\n\t\t\tsource.P(\"\")\n\t\t\texcludedQueryParams = append(excludedQueryParams, handler.PathTemplate.ListVariables()...)\n\n\t\t\tif handler.RequestBodyFieldSpec != gomodel.BodyFieldAll {\n\t\t\t\tsource.P(\"  // TODO: Decide whether query-param value or URL-path value takes precedence when a field appears in both\")\n\t\t\t\tif len(excludedQueryParams) > 0 {\n\t\t\t\t\tsource.P(\"  excludedQueryParams := %#v\", excludedQueryParams)\n\t\t\t\t\tsource.P(\"  if duplicates := resttools.KeysMatchPath(queryParams, excludedQueryParams); len(duplicates) > 0 {\")\n\t\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"(QueryParamsInvalidFieldError) found keys that should not appear in query params: %%v\", duplicates)`)\n\t\t\t\t\tsource.P(\"    return\")\n\t\t\t\t\tsource.P(\"  }\")\n\t\t\t\t}\n\t\t\t\tsource.P(\"  if err := resttools.PopulateFields(%s, queryParams); err != nil {\", handler.RequestVariable)\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusBadRequest, \"error reading query params: %%s\", err)`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t}\n\t\t\tsource.P(\"\")\n\t\t\tsource.P(\"  marshaler := resttools.ToJSON()\")\n\t\t\tsource.P(\"  marshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt\")\n\t\t\tsource.P(\"  requestJSON, _ := marshaler.Marshal(%s)\", handler.RequestVariable)\n\t\t\tsource.P(`  backend.StdLog.Printf(\"  request: %%s\", requestJSON)`)\n\t\t\tsource.P(\"\")\n\n\t\t\tif handler.StreamingServer {\n\t\t\t\tstreamerType := constructServerStreamer(service, handler, fileImports, helperSources)\n\n\t\t\t\tsource.P(`  serverStreamer, err := resttools.NewServerStreamer(w, resttools.ServerStreamingChunkSize)`)\n\t\t\t\tsource.P(`  if err != nil {`)\n\t\t\t\tsource.P(`    backend.Error(w,http.StatusInternalServerError, \"server error: could not construct server streamer: %%s\", err.Error())`)\n\t\t\t\tsource.P(`    return`)\n\t\t\t\tsource.P(`  }`)\n\t\t\t\tsource.P(`  defer serverStreamer.End()`)\n\n\t\t\t\tsource.P(` streamer := &%s{serverStreamer}`, streamerType)\n\n\t\t\t\tsource.P(\" if err := backend.%sServer.%s(%s, streamer); err != nil {\", service.ShortName, handler.GoMethod, handler.RequestVariable)\n\t\t\t\tsource.P(\"   backend.ReportGRPCError(w, err)\")\n\t\t\t\tsource.P(\" }\")\n\n\t\t\t} else { // regular unary call\n\t\t\t\t// TODO: In the future, we may want to redirect all REST-endpoint requests to the gRPC endpoint so that the gRPC-registered observers get invoked.\n\t\t\t\tsource.P(\"  ctx := context.WithValue(r.Context(), resttools.BindingURIKey, \\\"%s\\\")\", handler.URIPattern)\n\t\t\t\tsource.P(\"  %s, err := backend.%sServer.%s(ctx, %s)\", handler.ResponseVariable, service.ShortName, handler.GoMethod, handler.RequestVariable)\n\t\t\t\tsource.P(\"  if err != nil {\")\n\t\t\t\tsource.P(\"    backend.ReportGRPCError(w, err)\")\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  json, err := marshaler.Marshal(%s)\", handler.ResponseVariable)\n\t\t\t\tsource.P(\"  if err != nil {\")\n\t\t\t\tsource.P(`    backend.Error(w, http.StatusInternalServerError, \"error json-encoding response: %%s\", err.Error())`)\n\t\t\t\tsource.P(\"    return\")\n\t\t\t\tsource.P(\"  }\")\n\t\t\t\tsource.P(\"\")\n\t\t\t\tsource.P(\"  w.Write(json)\")\n\t\t\t}\n\t\t\tsource.P(\"}\\n\")\n\t\t}\n\n\t\t// Use the accumulated method source code and import data to write out the actual file.\n\n\t\tfile.P(\"import (\")\n\t\tfor path, name := range fileImports {\n\t\t\tfile.P(\"  %s %q\", name, path)\n\t\t}\n\t\tfile.P(\")\")\n\t\tfile.P(\"\")\n\t\tfor _, method := range methodSources {\n\t\t\tfile.Append(method)\n\t\t}\n\n\t\tfor _, k := range helperSources.sortedKeys() {\n\t\t\tfile.Append(helperSources[k])\n\t\t}\n\t}\n\n\tfile := view.Append(goview.NewFile(\"\", \"genrest.go\"))\n\tfile.P(\"%s\", license)\n\tfile.P(\"// DO NOT EDIT. This is an auto-generated file registering the REST handlers.\")\n\tfile.P(\"// for the various Showcase services.\")\n\tfile.P(\"\")\n\tfile.P(\"package genrest\")\n\tfile.P(\"\")\n\tfile.P(\"import (\")\n\tfile.P(`  \"fmt\"`)\n\tfile.P(`   \"net/http\"`)\n\tfile.P(\"\")\n\tfile.P(`   \"github.com/googleapis/gapic-showcase/server/services\"`)\n\tfile.P(`   \"github.com/googleapis/gapic-showcase/util/genrest/resttools\"`)\n\tfile.P(\"\")\n\tfile.P(`   gmux \"github.com/gorilla/mux\"`)\n\tfile.P(`   \"google.golang.org/grpc/status\"`)\n\tfile.P(\")\")\n\tfile.P(\"\")\n\tfile.P(\"\")\n\tfile.P(\"type RESTBackend services.Backend\")\n\tfile.P(\"\")\n\tfile.P(\"\")\n\tfile.P(`func RegisterHandlers(router *gmux.Router, backend *services.Backend) {`)\n\tfile.P(\" rest := (*RESTBackend)(backend)\")\n\n\t// TODO: Support path-encoded '\\n' in strings (%0A), which currently don't work. Probably the way to do this is to add\n\t//   file.P(\" router.UseEncodedPath()\")\n\t// here, and to explicitly path decode in resttools.PopulateSingularFields. We should also\n\t// add '\\n' to the \"ExtremeValues\" ComplianceGroup in compliance_suite.json.\n\n\tfor _, handler := range registered {\n\t\tfile.P(`  router.HandleFunc(%q, rest.%s).Methods(%q)`, handler.pattern, handler.function, handler.verb)\n\t\t// Java's PATCH requests are sent as POST requests with a `X-HTTP-Method-Override` header\n\t\tif handler.verb == \"PATCH\" {\n\t\t\t// HeadersRegexp is used to match for both POST Http Verb and the Header value\n\t\t\tfile.P(`  router.HandleFunc(%q, rest.%s).HeadersRegexp(\"X-HTTP-Method-Override\", \"^PATCH$\").Methods(\"POST\")`, handler.pattern, handler.function)\n\t\t}\n\t}\n\tfile.P(`  router.PathPrefix(\"/\").HandlerFunc(rest.catchAllHandler)`)\n\tfile.P(`}`)\n\tfile.P(\"\")\n\n\tfile.P(\"func (backend *RESTBackend) catchAllHandler(w http.ResponseWriter, r *http.Request) {\")\n\tfile.P(`  backend.Error(w, http.StatusBadRequest, \"unrecognized request: %%s %%q\", r.Method, r.URL)`)\n\tfile.P(\"}\")\n\tfile.P(\"\")\n\n\tfile.P(\"func (backend *RESTBackend) Error(w http.ResponseWriter, httpStatus int, format string, args ...interface{}) {\")\n\tfile.P(\"  message := fmt.Sprintf(format, args...)\")\n\tfile.P(\"  backend.ErrLog.Print(message)\")\n\tfile.P(\"  resttools.ErrorResponse(w, httpStatus, resttools.NoCodeGRPC, message)\")\n\tfile.P(\"}\")\n\n\tfile.P(\"func (backend *RESTBackend) ReportGRPCError(w http.ResponseWriter, err error) {\")\n\tfile.P(\"  st, ok := status.FromError(err)\")\n\tfile.P(\"  if !ok {\")\n\tfile.P(`    backend.Error(w, http.StatusInternalServerError, \"server error: %%s\", err.Error())`)\n\t// TODO(https://github.com/googleapis/gapic-showcase/issues/1575): Report internal errors as standard gRPC errors\n\tfile.P(\"    return\")\n\tfile.P(\"  }\")\n\tfile.P(\"\")\n\tfile.P(\"  backend.ErrLog.Print(st.Message())\")\n\tfile.P(\"  resttools.ErrorResponse(w, resttools.NoCodeHTTP, st.Code(), st.Message(), st.Details()...)\")\n\tfile.P(\"}\")\n\n\treturn view, nil\n}\n\nfunc constructServerStreamer(service *gomodel.ServiceModel, handler *gomodel.RESTHandler, fileImports map[string]string, helperSources sourceMap) (streamerType string) {\n\tstreamerType = fmt.Sprintf(\"%s_%sServer\", service.ShortName, handler.GoMethod)\n\tstreamerInterface := fmt.Sprintf(\"%s.%s_%sServer\", handler.RequestTypePackage, service.ShortName, handler.GoMethod)\n\tstreamerElement := fmt.Sprintf(\"*%s.%s\", handler.ResponseTypePackage, handler.ResponseType)\n\n\thelper := goview.NewSource()\n\thelperSources[streamerType] = helper\n\n\thelper.P(`// %s implements %s to provide server-side streaming over REST, returning all the`, streamerType, streamerInterface)\n\thelper.P(`// individual responses as part of a long JSON list.`)\n\thelper.P(`type %s struct{`, streamerType)\n\thelper.P(`   *resttools.ServerStreamer`)\n\thelper.P(`}`)\n\thelper.P(``)\n\thelper.P(` // Send accumulates a response to be fetched later as part of response list returned over REST.`)\n\thelper.P(`func (streamer *%s) Send(response %s) error {`, streamerType, streamerElement)\n\thelper.P(`  return streamer.ServerStreamer.Send(response)`)\n\thelper.P(`}`)\n\n\treturn streamerType\n}\n\n// registeredHandler pairs a URL path pattern with the name of the associated handler\ntype registeredHandler struct {\n\tpattern  string // URL pattern\n\tfunction string // handler function\n\tverb     string // HTTP verb\n}\n\n// matchingPath returns the URL path for a gorilla/mux HTTP handler corresponding to the given\n// `template`, as well as a list of all the template variables (identified by their proto field\n// path, which are also their key values in the variable map that will be returned by gorilla/mux.Vars()).\nfunc matchingPath(template gomodel.PathTemplate) (string, []string, error) {\n\treturn extractPath(template, false)\n}\n\n// extractPath is a one-level recursive helper function that does the actual work of\n// matchingPath(). `insideVariable` denotes whether we're processing segments already inside a\n// top-level handler path variable, since nested variables are not allowed. The list of variable\n// keys (which will be provided by gorilla/mux, and which also match their proto field path in the\n// request object) is returned together with the actual gorilla/mux matching path.\nfunc extractPath(template gomodel.PathTemplate, insideVariable bool) (string, []string, error) {\n\tvar allVariables []string\n\tparts := make([]string, len(template))\n\tfor idx, seg := range template {\n\t\tvar part string\n\t\tswitch seg.Kind {\n\t\tcase gomodel.Literal:\n\t\t\tpart = seg.Value\n\t\tcase gomodel.SingleValue:\n\t\t\tpart = resttools.RegexURLPathSingleSegmentValue\n\t\tcase gomodel.MultipleValue:\n\t\t\tpart = resttools.RegexURLPathMultipleSegmentValue\n\t\tcase gomodel.Variable:\n\t\t\tif insideVariable {\n\t\t\t\treturn \"\", nil, fmt.Errorf(\"nested variables are disallowed: https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#path-template-syntax\")\n\t\t\t}\n\t\t\tsubParts, _, err := extractPath(seg.Subsegments, true)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nil, err\n\n\t\t\t}\n\n\t\t\t// Here we convert the proto-cased (snake-cased) field path to be JSON-cased\n\t\t\t// (lower-camel-cased) so that we can keep the resttools.Populate*Field*()\n\t\t\t// functions simple, only dealing with JSON-cased field names,\n\t\t\tpart = fmt.Sprintf(\"{%s:%s}\", resttools.ToDottedLowerCamel(seg.Value), subParts)\n\t\t\tallVariables = append(allVariables, seg.Value)\n\t\t}\n\t\tparts[idx] = part\n\n\t}\n\treturn strings.Join(parts, \"\"), allVariables, nil\n}\n\n////////////////////////////////////////\n// Namer\n\n// Namer keeps track of a series of symbol names being used in order to disambiguate new names.\ntype Namer struct {\n\tregistered map[string]int\n}\n\n// NewNamer returns a new Namer.\nfunc NewNamer() *Namer {\n\treturn &Namer{registered: make(map[string]int)}\n}\n\n// Get registers and returns a non-previously registered name that is as close to newName as\n// possible. Disambiguation, if needed, is accomplished by adding a numeric suffix.\nfunc (namer *Namer) Get(newName string) string {\n\tfor {\n\t\tnumSeen := namer.registered[newName]\n\t\tnamer.registered[newName] = numSeen + 1\n\t\tif numSeen == 0 {\n\t\t\treturn newName\n\t\t}\n\n\t\tnewName = fmt.Sprintf(\"%s_%d\", newName, numSeen)\n\t\t// run through the loop again to ensure the new name hasn't been previously registered either.\n\t}\n}\n\n// sourceMap implements a method to return the keys in sorted order.\ntype sourceMap map[string]*goview.Source\n\n// sortedKeys returns a slice containing all the keys in sm, sorted.\nfunc (sm sourceMap) sortedKeys() []string {\n\tkeys := []string{}\n\tfor k := range sm {\n\t\tkeys = append(keys, k)\n\t}\n\tsort.Strings(keys)\n\treturn keys\n}\n\nvar license string\n\nfunc init() {\n\tlicense = fmt.Sprintf(`// Copyright %d 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//     https://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`, time.Now().Year())\n}\n"
  },
  {
    "path": "util/genrest/goviewcreator_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage genrest\n\nimport (\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/gomodel\"\n)\n\nfunc TestMatchingPath(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\ttemplate    string\n\t\texpectError bool\n\t\texpectMatch string\n\t\texpectVars  []string\n\t}{\n\t\t{\n\t\t\ttemplate:    \"/aa/{bb}/cc/{dd=ee/*/gg/{hh=ii/jj/*/kk}/**}:ll\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\ttemplate:    \"/aa/{bb}/cc/{dd=ee/*/gg}/{hh=ii/jj/*/kk/**}\",\n\t\t\texpectMatch: \"/aa/{bb:[^:]+}/cc/{dd:ee/[^:]+/gg}/{hh:ii/jj/[^:]+/kk/[^:]+}\",\n\t\t\texpectVars:  []string{\"bb\", \"dd\", \"hh\"},\n\t\t},\n\t} {\n\t\tpathTemplate, err := gomodel.ParseTemplate(testCase.template)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"testCase %2d: unexpected error constructing template: %s:\\n   Test case input: %v\", idx, err, testCase)\n\t\t\tcontinue\n\t\t}\n\n\t\tpath, allVars, err := matchingPath(pathTemplate)\n\n\t\tif got, want := (err != nil), testCase.expectError; got != want {\n\t\t\tt.Errorf(\"testCase %2d: matchingPath error:\\n    got: %q\\n   want: %v\", idx, err, want)\n\t\t}\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tif got, want := path, testCase.expectMatch; got != want {\n\t\t\tt.Errorf(\"testCase %2d: matchingPath path:\\n    got: %q\\n   want: %q\", idx, got, want)\n\t\t}\n\t\tif got, want := allVars, testCase.expectVars; !reflect.DeepEqual(got, want) {\n\t\t\tt.Errorf(\"testCase %2d: matchingPath path:\\n    got: %#v\\n   want: %#v\", idx, got, want)\n\t\t}\n\n\t}\n}\n\nfunc TestNamer(t *testing.T) {\n\tnamer := NewNamer()\n\tfor idx, testCase := range []struct {\n\t\trequested string\n\t\texpected  string\n\t}{\n\t\t// Order matters, since we're testing disambiguation with previously seen items.\n\t\t{\"rainbow\", \"rainbow\"},\n\t\t{\"rainbow\", \"rainbow_1\"},\n\t\t{\"rainbow\", \"rainbow_2\"},\n\t\t{\"rainbow_1\", \"rainbow_1_1\"},\n\t\t{\"rainbow_1\", \"rainbow_1_2\"},\n\t\t{\"rainbow_1\", \"rainbow_1_3\"},\n\t\t{\"rainbow_2\", \"rainbow_2_1\"},\n\t\t{\"sun_1\", \"sun_1\"},\n\t\t{\"sun_1\", \"sun_1_1\"},\n\t} {\n\t\tif got, want := namer.Get(testCase.requested), testCase.expected; got != want {\n\t\t\tt.Errorf(\"testCase %2d: got %q, want %q\", idx, got, want)\n\t\t}\n\t}\n}\n\nfunc TestConstructStreamingServer(t *testing.T) {\n\tfileImports := map[string]string{}\n\thelperSources := sourceMap{}\n\n\tconstructServerStreamer(&gomodel.ServiceModel{ShortName: \"Catalog\"},\n\t\t&gomodel.RESTHandler{\n\t\t\tRequestTypePackage:  \"catalogpb\",\n\t\t\tResponseTypePackage: \"responsepb\",\n\t\t\tGoMethod:            \"StreamAuthors\",\n\t\t\tResponseType:        \"AuthorEntry\",\n\t\t},\n\t\tfileImports, helperSources)\n\tif got, want := len(helperSources), 1; got != want {\n\t\tt.Errorf(\"unexpected length of helperSources: got %d, want %d\", got, want)\n\t}\n\n\tconstructServerStreamer(&gomodel.ServiceModel{ShortName: \"Catalog\"},\n\t\t&gomodel.RESTHandler{\n\t\t\tRequestTypePackage:  \"catalogpb\",\n\t\t\tResponseTypePackage: \"responsepb\",\n\t\t\tGoMethod:            \"StreamTitles\",\n\t\t\tResponseType:        \"TitleEntry\",\n\t\t},\n\t\tfileImports, helperSources)\n\tif got, want := len(helperSources), 2; got != want {\n\t\tt.Errorf(\"unexpected length of helperSources: got %d, want %d\", got, want)\n\t}\n\n\tconstructServerStreamer(&gomodel.ServiceModel{ShortName: \"Media\"},\n\t\t&gomodel.RESTHandler{\n\t\t\tRequestTypePackage:  \"mediapb\",\n\t\t\tResponseTypePackage: \"responsepb\",\n\t\t\tGoMethod:            \"StreamAudio\",\n\t\t\tResponseType:        \"AudioEntry\",\n\t\t},\n\t\tfileImports, helperSources)\n\tif got, want := len(helperSources), 3; got != want {\n\t\tt.Errorf(\"unexpected length of helperSources: got %d, want %d\", got, want)\n\t}\n\n\tconstructServerStreamer(&gomodel.ServiceModel{ShortName: \"Media\"},\n\t\t&gomodel.RESTHandler{\n\t\t\tRequestTypePackage:  \"mediapb\",\n\t\t\tResponseTypePackage: \"responsepb\",\n\t\t\tGoMethod:            \"StreamVideo\",\n\t\t\tResponseType:        \"VideoEntry\",\n\t\t},\n\t\tfileImports, helperSources)\n\tif got, want := len(helperSources), 4; got != want {\n\t\tt.Errorf(\"unexpected length of helperSources: got %d, want %d\", got, want)\n\t}\n\n\tactualSources := \"\"\n\tfor _, key := range helperSources.sortedKeys() {\n\t\tactualSources += helperSources[key].Contents() + \"\\n\"\n\t}\n\n\texpectedSources, err := os.ReadFile(\"testdata/TestConstructServerStreamer.go.baseline\")\n\tif err != nil {\n\t\tt.Fatalf(\"could not load file: %s\", err)\n\t}\n\n\tif got, want := actualSources, string(expectedSources); got != want {\n\t\tt.Errorf(\"unexpected helper sources:\\n = got: ===\\n%s\\n= want: ===\\n%s\\n= diff ===\\n%s\", got, want, cmp.Diff(got, want))\n\t}\n}\n"
  },
  {
    "path": "util/genrest/internal/pbinfo/pbinfo.go",
    "content": "// Copyright 2020 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//     https://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\n// Package pbinfo provides convenience types for looking up protobuf elements.\npackage pbinfo\n\n// This file was copied and adapted from gapic-generator-go:internal/pbinfo/pbinfo.go\n//\n// TODO: Consider making that file non-internal, back-porting the few modifications here, and then\n// depending on that, to prevent code duplication.\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode\"\n\n\t\"github.com/golang/protobuf/protoc-gen-go/descriptor\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// ProtoType represents a type in protobuf descriptors.\n// It is an interface implemented by DescriptorProto and EnumDescriptorProto.\ntype ProtoType interface {\n\tproto.Message\n\tGetName() string\n}\n\n// Info provides lookup tables for various protobuf properties.\n// For example, we can look up a type by name without iterating the entire\n// descriptor.\ntype Info struct {\n\t// Maps services and messages to the file containing them,\n\t// so we can figure out the import.\n\tParentFile map[proto.Message]*descriptor.FileDescriptorProto\n\n\t// NOTE(pongad): ParentElement and sub-types are only used in samples.\n\t// They are added in the shared package because they share a lot of similarities\n\t// with things that are already here. Maybe revisit this in the future?\n\n\t// Maps a protobuf element to the enclosing scope.\n\t// If enum E is defined in message M which is in file F,\n\t// ParentElement[E]=M, ParentElement[M]=nil, and ParentFile[M]=F\n\tParentElement map[ProtoType]ProtoType\n\n\t// Maps type names to their messages.\n\tType map[string]ProtoType\n\n\t// Maps service names to their descriptors.\n\tServ map[string]*descriptor.ServiceDescriptorProto\n}\n\n// Of creates Info from given protobuf files.\nfunc Of(files []*descriptor.FileDescriptorProto) Info {\n\tinfo := Info{\n\t\tParentFile:    map[proto.Message]*descriptor.FileDescriptorProto{},\n\t\tParentElement: map[ProtoType]ProtoType{},\n\t\tType:          map[string]ProtoType{},\n\t\tServ:          map[string]*descriptor.ServiceDescriptorProto{},\n\t}\n\n\tfor _, f := range files {\n\t\t// ParentFile\n\t\tfor _, m := range f.MessageType {\n\t\t\tinfo.ParentFile[m] = f\n\t\t}\n\t\tfor _, e := range f.EnumType {\n\t\t\tinfo.ParentFile[e] = f\n\t\t}\n\t\tfor _, s := range f.Service {\n\t\t\tinfo.ParentFile[s] = f\n\t\t\tfor _, m := range s.Method {\n\t\t\t\tinfo.ParentFile[m] = f\n\t\t\t\tinfo.ParentElement[m] = s\n\t\t\t}\n\t\t}\n\n\t\t// Type\n\t\tfor _, m := range f.MessageType {\n\t\t\t// In descriptors, putting the dot in front means the name is fully-qualified.\n\t\t\taddMessage(info.Type, info.ParentElement, \".\"+f.GetPackage(), m, nil)\n\t\t}\n\t\tfor _, e := range f.EnumType {\n\t\t\tinfo.Type[\".\"+f.GetPackage()+\".\"+e.GetName()] = e\n\t\t}\n\n\t\t// Serv\n\t\tfor _, s := range f.Service {\n\t\t\tfullyQualifiedName := fmt.Sprintf(\".%s.%s\", f.GetPackage(), s.GetName())\n\t\t\tinfo.Serv[fullyQualifiedName] = s\n\t\t\t// The following was not in the original file in gapic-generator-go.\n\t\t\tfor _, m := range s.Method {\n\t\t\t\tinfo.Type[fmt.Sprintf(\"%s.%s\", fullyQualifiedName, m.GetName())] = m\n\t\t\t}\n\t\t}\n\t}\n\n\treturn info\n}\n\nfunc addMessage(typMap map[string]ProtoType, parentMap map[ProtoType]ProtoType, prefix string, msg, parentMsg *descriptor.DescriptorProto) {\n\tfullName := prefix + \".\" + msg.GetName()\n\ttypMap[fullName] = msg\n\tif parentMsg != nil {\n\t\tparentMap[msg] = parentMsg\n\t}\n\n\tfor _, subMsg := range msg.NestedType {\n\t\taddMessage(typMap, parentMap, fullName, subMsg, msg)\n\t}\n\n\tfor _, subEnum := range msg.EnumType {\n\t\ttypMap[fullName+\".\"+subEnum.GetName()] = subEnum\n\t\tparentMap[subEnum] = msg\n\t}\n\n\tfor _, field := range msg.GetField() {\n\t\tparentMap[field] = msg\n\t}\n}\n\ntype ImportSpec struct {\n\tName, Path string\n}\n\n// NameSpec reports the name and ImportSpec of e.\n//\n// The reported name is the same with how protoc-gen-go refers to e.\n// E.g. if type B is nested under A, then the name of type B is \"A_B\".\nfunc (in *Info) NameSpec(e ProtoType) (string, ImportSpec, error) {\n\ttopLvl := e\n\tvar nameParts []string\n\tfor e2 := e; e2 != nil; e2 = in.ParentElement[e2] {\n\t\ttopLvl = e2\n\t\tnameParts = append(nameParts, e2.GetName())\n\t}\n\tfor i, l := 0, len(nameParts); i < l/2; i++ {\n\t\tnameParts[i], nameParts[l-i-1] = nameParts[l-i-1], nameParts[i]\n\t}\n\tname := strings.Join(nameParts, \"_\")\n\n\tvar eTxt interface{} = e\n\tif et, ok := eTxt.(interface{ GetName() string }); ok {\n\t\teTxt = et.GetName()\n\t}\n\n\tfdesc := in.ParentFile[topLvl]\n\tif fdesc == nil {\n\t\treturn \"\", ImportSpec{}, fmt.Errorf(\"can't determine import path for %v; can't find parent file\", eTxt)\n\t}\n\n\tpkg := fdesc.GetOptions().GetGoPackage()\n\tif pkg == \"\" {\n\t\treturn \"\", ImportSpec{}, fmt.Errorf(\"can't determine import path for %v, file %q missing `option go_package`\", eTxt, fdesc.GetName())\n\t}\n\n\tif p := strings.IndexByte(pkg, ';'); p >= 0 {\n\t\treturn name, ImportSpec{Path: pkg[:p], Name: pkg[p+1:] + \"pb\"}, nil\n\t}\n\n\tfor {\n\t\tp := strings.LastIndexByte(pkg, '/')\n\t\tif p < 0 {\n\t\t\treturn name, ImportSpec{Path: pkg, Name: pkg + \"pb\"}, nil\n\t\t}\n\t\telem := pkg[p+1:]\n\t\tif len(elem) >= 2 && elem[0] == 'v' && elem[1] >= '0' && elem[1] <= '9' {\n\t\t\t// It's a version number; skip so we get a more meaningful name\n\t\t\tpkg = pkg[:p]\n\t\t\tcontinue\n\t\t}\n\t\treturn name, ImportSpec{Path: pkg, Name: elem + \"pb\"}, nil\n\t}\n}\n\n// ImportSpec reports the ImportSpec for package containing protobuf element e.\n// Deprecated: Use NameSpec instead.\nfunc (in *Info) ImportSpec(e ProtoType) (ImportSpec, error) {\n\t_, imp, err := in.NameSpec(e)\n\treturn imp, err\n}\n\n// ReduceServName removes redundant components from the service name.\n// For example, FooServiceV2 -> Foo.\n// The returned name is used as part of longer names, like FooClient.\n// If the package name and the service name is the same,\n// ReduceServName returns empty string, so we get foo.Client instead of foo.FooClient.\nfunc ReduceServName(svc, pkg string) string {\n\t// remove trailing version\n\tif p := strings.LastIndexByte(svc, 'V'); p >= 0 {\n\t\tisVer := true\n\t\tfor _, r := range svc[p+1:] {\n\t\t\tif !unicode.IsDigit(r) {\n\t\t\t\tisVer = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif isVer {\n\t\t\tsvc = svc[:p]\n\t\t}\n\t}\n\n\tsvc = strings.TrimSuffix(svc, \"Service\")\n\tif strings.EqualFold(svc, pkg) {\n\t\tsvc = \"\"\n\t}\n\n\t// This is a special case for IAM and should not be\n\t// extended to support any new API name containing\n\t// an acronym.\n\t//\n\t// In order to avoid a breaking change for IAM\n\t// clients, we must keep consistent identifier casing.\n\tif strings.Contains(svc, \"IAM\") {\n\t\tsvc = strings.ReplaceAll(svc, \"IAM\", \"Iam\")\n\t}\n\n\treturn svc\n}\n\n//////////\n// The following was not in the original file in gapic-generator-go.\n\n// fullyQualifiedType constructs a fully-qualified type name suitable for use with pbinfo.Info.\nfunc FullyQualifiedType(segments ...string) string {\n\t// In descriptors, putting the dot in front means the name is fully-qualified.\n\tconst dot = \".\"\n\ttypeName := strings.Join(segments, dot)\n\tif !strings.HasPrefix(typeName, dot) {\n\t\ttypeName = dot + typeName\n\t}\n\treturn typeName\n}\n"
  },
  {
    "path": "util/genrest/protomodel/protomodel.go",
    "content": "// Copyright 2020 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//     https://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\npackage protomodel\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/googleapis/gapic-showcase/util/genrest/errorhandling\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/internal/pbinfo\"\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n////////////////////////////////////////\n// ProtoModel\n\n// Model is a data model encapsulating the relevant information for a REST-proto transcoding for\n// various services defined via annotated protocol buffers.\ntype Model struct {\n\terrorhandling.Accumulator\n\tProtoInfo pbinfo.Info\n\tServices  []*Service\n}\n\n// String returns a string representation of this Model.\nfunc (model *Model) String() string {\n\tservices := make([]string, len(model.Services))\n\tfor idx, svc := range model.Services {\n\t\tif svc == nil {\n\t\t\tcontinue\n\t\t}\n\t\tservices[idx] = svc.String()\n\t}\n\treturn strings.Join(services, \"\\n\\n\")\n}\n\n// AddService adds `service` to this Service.\nfunc (model *Model) AddService(service *Service) *Service {\n\tmodel.Services = append(model.Services, service)\n\treturn service\n}\n\n////////////////////////////////////////\n// Service\n\n// Service is a data model encapsulating the information relevant to REST-proto transcoding about a\n// proto-defined service.\ntype Service struct {\n\tDescriptor   *descriptorpb.ServiceDescriptorProto // maybe not needed\n\tName         string\n\tTypeName     string\n\tRESTBindings []*RESTBinding\n}\n\n// String returns a string representation of this Service.\nfunc (service *Service) String() string {\n\thandlers := make([]string, len(service.RESTBindings))\n\tfor idx, h := range service.RESTBindings {\n\t\thandlers[idx] = h.String()\n\t}\n\tindent := \"  \"\n\treturn fmt.Sprintf(\"%s (%s):\\n%s%s\", service.Name, service.TypeName, indent, strings.Join(handlers, \"\\n\"+indent))\n}\n\n// AddBinding adds a RESTBinding to this Service.\nfunc (service *Service) AddBinding(binding *RESTBinding) {\n\tservice.RESTBindings = append(service.RESTBindings, binding)\n}\n\n////////////////////////////////////////\n// RESTBinding\n\n// RESTBinding encapsulates the information contained in a protocol buffer HTTP annotation.\ntype RESTBinding struct {\n\t// Index of the binding for this method. Since methods could contain multiple bindings, we\n\t// will need a way to identify each binding uniquely.\n\tIndex int\n\n\t// The name of the method for which this is a binding.\n\tProtoMethod string\n\n\t// The URL pattern of the binding.\n\tRESTPattern *RESTRequestPattern\n\n\t// The fields in the request body: either none (empty string), a single field (top-level\n\t// request field, non-dotted), or all not captured in the URL (\"*\").\n\tBodyField string\n}\n\n// String returns a string representation of this RESTBinding.\nfunc (binding *RESTBinding) String() string {\n\treturn fmt.Sprintf(\"%s[%d] : %s\", binding.ProtoMethod, binding.Index, binding.RESTPattern)\n}\n\n////////////////////////////////////////\n// RESTRequestPattern\n\n// RESTRequestPattern encapsulates the information in an individual REST binding within an HTTP annotation.\ntype RESTRequestPattern struct {\n\tHTTPMethod string // HTTP verb\n\tPattern    string // the URL pattern\n}\n\n// String returns a string representation of this RESTRequestPattern.\nfunc (binding *RESTRequestPattern) String() string {\n\treturn fmt.Sprintf(\"%s: %q\", binding.HTTPMethod, binding.Pattern)\n}\n"
  },
  {
    "path": "util/genrest/protomodelcreator.go",
    "content": "// Copyright 2020 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//     https://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\npackage genrest\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"cloud.google.com/go/iam/apiv1/iampb\"\n\t\"cloud.google.com/go/longrunning/autogen/longrunningpb\"\n\t\"github.com/ghodss/yaml\"\n\t\"github.com/golang/protobuf/protoc-gen-go/descriptor\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/internal/pbinfo\"\n\t\"github.com/googleapis/gapic-showcase/util/genrest/protomodel\"\n\t\"google.golang.org/genproto/googleapis/api/annotations\"\n\t\"google.golang.org/genproto/googleapis/api/serviceconfig\"\n\t\"google.golang.org/genproto/googleapis/cloud/location\"\n\t\"google.golang.org/protobuf/compiler/protogen\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protodesc\"\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n////////////////////////////////////////\n// ProtoModel\n\n// NewProtoModel uses the information in `plugin` to create a new protomodel.Model.\nfunc NewProtoModel(plugin *protogen.Plugin) (*protomodel.Model, error) {\n\tprotoFiles := append(plugin.Request.GetProtoFile(), getMixinFiles()...)\n\tprotoModel := &protomodel.Model{\n\t\tProtoInfo: pbinfo.Of(protoFiles),\n\t\tServices:  make([]*protomodel.Service, 0, len(protoFiles)),\n\t}\n\n\tgenerateFile := map[string]bool{}\n\tfor _, fileName := range plugin.Request.GetFileToGenerate() {\n\t\tgenerateFile[fileName] = true\n\t}\n\n\tfor _, protoFile := range protoFiles {\n\t\tif !generateFile[*protoFile.Name] {\n\t\t\tcontinue\n\t\t}\n\t\tprotoPackage := *protoFile.Package\n\t\tfor _, svc := range protoFile.GetService() {\n\t\t\tserviceModel := protoModel.AddService(NewService(protoPackage, svc))\n\t\t\tfor _, method := range svc.GetMethod() {\n\t\t\t\taddBindingsForMethod(protoModel, serviceModel, method)\n\t\t\t}\n\t\t}\n\t}\n\n\tserviceConfig, err := GetServiceConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmixins := collectMixins(serviceConfig)\n\tfor _, mixinFile := range mixins {\n\t\tprotoPackage := *mixinFile.file.Package\n\t\tfor _, mixinService := range mixinFile.services {\n\t\t\tsvc := mixinService.service\n\t\t\tserviceModel := protoModel.AddService(NewService(protoPackage, svc))\n\t\t\tfor _, method := range mixinService.methods {\n\t\t\t\taddBindingsForMethod(protoModel, serviceModel, method)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn protoModel, protoModel.Error()\n}\n\nfunc addBindingsForMethod(protoModel *protomodel.Model, serviceModel *protomodel.Service, method *descriptor.MethodDescriptorProto) {\n\toptions := method.GetOptions()\n\tif options == nil {\n\t\treturn\n\t}\n\n\teHTTP /*, err*/ := proto.GetExtension(method.GetOptions(), annotations.E_Http)\n\thttp := eHTTP.(*annotations.HttpRule)\n\trules := []*annotations.HttpRule{http}\n\trules = append(rules, http.GetAdditionalBindings()...)\n\tfor idxRule, oneRule := range rules {\n\t\tprotoModel.AccumulateError(NewServiceBinding(serviceModel, method, oneRule, idxRule))\n\t}\n}\n\n////////////////////////////////////////\n// Service\n\n// NewService creates a protomodel.Service from the given descriptor.\nfunc NewService(protoPackage string, descriptor *descriptorpb.ServiceDescriptorProto) *protomodel.Service {\n\t// might need *descriptor.ProtoReflect().Type() to instantiate Go type and then reflect to get the name?\n\tservice := &protomodel.Service{\n\t\tDescriptor:   descriptor,\n\t\tName:         *descriptor.Name,\n\t\tTypeName:     pbinfo.FullyQualifiedType(protoPackage, descriptor.GetName()),\n\t\tRESTBindings: make([]*protomodel.RESTBinding, 0),\n\t}\n\treturn service\n}\n\n// NewServiceBinding adds `rule` (as the `index`th binding for `method`) to the specified `service`.\nfunc NewServiceBinding(service *protomodel.Service, method *descriptor.MethodDescriptorProto, rule *annotations.HttpRule, index int) error {\n\tbinding, err := NewRESTBinding(pbinfo.FullyQualifiedType(service.TypeName, method.GetName()), rule, index)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"service %q: %s\", service.Name, err)\n\t}\n\tservice.AddBinding(binding)\n\treturn nil\n}\n\n////////////////////////////////////////\n// RESTBinding\n\n// NewRESTBinding creates a new protomodel.RESTBinding using the given methodName, rule, and index.\nfunc NewRESTBinding(methodName string, rule *annotations.HttpRule, index int) (*protomodel.RESTBinding, error) {\n\trestPattern, err := NewRESTRequestPattern(rule)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"method %q, binding %d: %s\", methodName, index, err)\n\t}\n\tbinding := &protomodel.RESTBinding{\n\t\tIndex:       index,\n\t\tProtoMethod: methodName,\n\t\tRESTPattern: restPattern,\n\t\tBodyField:   rule.GetBody(),\n\t}\n\treturn binding, nil\n}\n\n////////////////////////////////////////\n// RESTRequestPattern\n\n// NewRESTRequestPattern creates a new protomodel.RESTRequestPattern by analyzing the rule provided.\nfunc NewRESTRequestPattern(rule *annotations.HttpRule) (*protomodel.RESTRequestPattern, error) {\n\tbinding := &protomodel.RESTRequestPattern{}\n\tpattern := rule.GetPattern()\n\tswitch pattern.(type) {\n\tcase *annotations.HttpRule_Get:\n\t\tbinding.HTTPMethod = \"GET\"\n\t\tbinding.Pattern = rule.GetGet()\n\tcase *annotations.HttpRule_Post:\n\t\tbinding.HTTPMethod = \"POST\"\n\t\tbinding.Pattern = rule.GetPost()\n\tcase *annotations.HttpRule_Patch:\n\t\tbinding.HTTPMethod = \"PATCH\"\n\t\tbinding.Pattern = rule.GetPatch()\n\tcase *annotations.HttpRule_Put:\n\t\tbinding.HTTPMethod = \"PUT\"\n\t\tbinding.Pattern = rule.GetPut()\n\tcase *annotations.HttpRule_Delete:\n\t\tbinding.HTTPMethod = \"DELETE\"\n\t\tbinding.Pattern = rule.GetDelete()\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unhandled pattern: %#x\", pattern)\n\t}\n\treturn binding, nil\n}\n\n////////////////////////////////////////\n// Mixins\n\n// Note: much of the code below is a modified copy of the mixin code in gapic-generator-go.\n\n// GetServiceConfig reads and returns the Showcase service config file.\nfunc GetServiceConfig() (*serviceconfig.Service, error) {\n\t// TODO: Consider getting this from the plugin options. On the\n\t// other hand, there's only one copy of this file, so maybe\n\t// hard-coding this location isn't terrible.\n\tserviceConfigPath := \"schema/google/showcase/v1beta1/showcase_v1beta1.yaml\"\n\n\ty, err := os.ReadFile(serviceConfigPath)\n\tif err != nil {\n\t\tcwd, _ := os.Getwd()\n\t\treturn nil, fmt.Errorf(\"error reading service config %q (cwd==%q): %v\", serviceConfigPath, cwd, err)\n\t}\n\n\tj, err := yaml.YAMLToJSON(y)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error converting YAML to JSON: %v\", err)\n\t}\n\n\tserviceConfig := &serviceconfig.Service{}\n\tif err := (protojson.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(j, serviceConfig); err != nil {\n\t\treturn nil, fmt.Errorf(\"error unmarshaling service config: %v\", err)\n\t}\n\n\t// An API Service Config will always have a `name` so if it is not populated,\n\t// it's an invalid config.\n\tif serviceConfig.GetName() == \"\" {\n\t\treturn nil, fmt.Errorf(\"invalid API service config file %q\", serviceConfigPath)\n\t}\n\treturn serviceConfig, nil\n}\n\n// Mixins is the collection of files containing methods to be mixed in.\ntype Mixins []*MixinFile\n\n// MixinFile describes a single file containins methods to be mixed in.\ntype MixinFile struct {\n\tfile     *descriptor.FileDescriptorProto\n\tservices []*MixinService\n}\n\n// MixinService describes a single service containing methods to be filled in\ntype MixinService struct {\n\tservice *descriptor.ServiceDescriptorProto\n\tmethods []*descriptor.MethodDescriptorProto\n}\n\n// indexedRules keys HTTP rules by their selectors\ntype indexedRules map[string]*annotations.HttpRule\n\n// collectMixins collects the configured mixin APIs from the service config and\n// returns the appropriately configured mixin `MethodDescriptorProto`s to generate for each.\nfunc collectMixins(serviceConfig *serviceconfig.Service) Mixins {\n\tmixinRules := indexedRules{}\n\tfor _, rule := range serviceConfig.GetHttp().GetRules() {\n\t\tmixinRules[rule.GetSelector()] = rule\n\t}\n\tmixins := Mixins{}\n\tfor _, api := range serviceConfig.GetApis() {\n\t\tmixins = append(mixins, getMixinsForAPI(mixinRules, api.GetName())...)\n\t}\n\treturn mixins\n}\n\n// getMixinsForAPI returns the appropriately configured mixin `MethodDescriptorProto`s\n// corresponding to the `mixinRules` that refer to `api`. The method descriptors are taken from the\n// package-global `mixinDescriptors`.\nfunc getMixinsForAPI(mixinRules indexedRules, api string) Mixins {\n\tfiles := Mixins{}\n\tfor _, file := range mixinDescriptors[api] {\n\t\tfileToAdd := &MixinFile{\n\t\t\tfile: file,\n\t\t}\n\t\tfiles = append(files, fileToAdd)\n\t\tfor _, service := range file.GetService() {\n\t\t\tserviceToAdd := &MixinService{\n\t\t\t\tservice: service,\n\t\t\t}\n\t\t\tfileToAdd.services = append(fileToAdd.services, serviceToAdd)\n\t\t\tfor _, method := range service.GetMethod() {\n\t\t\t\tfqn := fmt.Sprintf(\"%s.%s.%s\", file.GetPackage(), service.GetName(), method.GetName())\n\n\t\t\t\tif rule := mixinRules[fqn]; rule != nil {\n\t\t\t\t\tproto.SetExtension(method.Options, annotations.E_Http, rule)\n\t\t\t\t\tserviceToAdd.methods = append(serviceToAdd.methods, method)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn files\n}\n\nfunc getMixinFiles() (files []*descriptor.FileDescriptorProto) {\n\tfor _, descriptors := range mixinDescriptors {\n\t\tfiles = append(files, descriptors...)\n\t}\n\treturn\n}\n\n// mixinDescriptors maps fully qualified proto service names of mixins implemented by Showcase to a\n// list of FileDescriptors containing the definitions needed for that service.\nvar mixinDescriptors map[string][]*descriptor.FileDescriptorProto\n\nfunc init() {\n\tmixinDescriptors = map[string][]*descriptor.FileDescriptorProto{\n\t\t\"google.longrunning.Operations\": {\n\t\t\tprotodesc.ToFileDescriptorProto(longrunningpb.File_google_longrunning_operations_proto),\n\t\t},\n\t\t\"google.cloud.location.Locations\": {\n\t\t\tprotodesc.ToFileDescriptorProto(location.File_google_cloud_location_locations_proto),\n\t\t},\n\t\t\"google.iam.v1.IAMPolicy\": {\n\t\t\tprotodesc.ToFileDescriptorProto(iampb.File_google_iam_v1_iam_policy_proto),\n\t\t\tprotodesc.ToFileDescriptorProto(iampb.File_google_iam_v1_policy_proto),\n\t\t\tprotodesc.ToFileDescriptorProto(iampb.File_google_iam_v1_options_proto),\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/checkrequestformat.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n\n\t\"github.com/iancoleman/strcase\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// CheckRequestFormat verifies that the incoming request has the correct format in its body (via jsonReader) and in its HTTP headers.\nfunc CheckRequestFormat(jsonReader io.Reader, request *http.Request, message protoreflect.Message) error {\n\theader := request.Header\n\n\tif err := CheckAPIClientHeader(header); err != nil {\n\t\treturn err\n\t}\n\n\tif jsonReader == nil {\n\t\treturn nil\n\t}\n\n\tif err := CheckContentType(header); err != nil {\n\t\treturn err\n\t}\n\n\tjsonBytes, err := io.ReadAll(jsonReader)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif (request.Method == http.MethodGet || request.Method == http.MethodDelete) && request.Body != nil {\n\t\treturn fmt.Errorf(\"(UnexpectedRequestBodyError) non-zero body for HTTP %q\", request.Method)\n\t}\n\n\tvar payload jsonPayload\n\tjson.Unmarshal(jsonBytes, &payload)\n\n\tif err := CheckFieldNames(payload); err != nil {\n\t\treturn err\n\t}\n\n\tenumFields := GetEnumFields(message)\n\treturn CheckJSONEnumFields(payload, enumFields)\n}\n\n// CheckFieldNames checks that the field names in the JSON request body are properly formatted\n// (lower-camel-cased).\nfunc CheckFieldNames(payload jsonPayload) error {\n\tfor fieldName, value := range payload {\n\t\trune, _ := utf8.DecodeRuneInString(fieldName)\n\t\tif strings.ContainsAny(fieldName, \"_- \") || !unicode.IsLower(rune) {\n\t\t\treturn fmt.Errorf(\"%s field name is not lower-camel-cased; probably want be %q (BodyFieldNameIncorrectlyCasedError)\", fieldName, strcase.ToLowerCamel(fieldName))\n\t\t}\n\t\tif nested, ok := value.(map[string]interface{}); ok {\n\t\t\tif err := CheckFieldNames(nested); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%s.%s\", fieldName, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// CheckJSONEnumFields verifies that each of the fields listed in fieldsToCheck, presumably all\n// referring to enum fields, are encoded correctly in the parsed JSON payload, meaning that the\n// field is absent or its value is a string. Each element of fieldsToCheck is a qualified proto\n// field name represented as a sequence of simple protoreflect.Name.\nfunc CheckJSONEnumFields(payload jsonPayload, fieldsToCheck [][]protoreflect.Name) error {\n\tbadFields := []string{}\n\tfor _, fieldPath := range fieldsToCheck {\n\t\tif field, ok := CheckEnum(payload, fieldPath); !ok {\n\t\t\tbadFields = append(badFields, field)\n\t\t}\n\t}\n\tif len(badFields) > 0 {\n\t\treturn fmt.Errorf(\"(EnumEncodingError) badly transcoded enum values in fields: %v\", badFields)\n\t}\n\treturn nil\n}\n\n// CheckEnum verifies whether the field whose qualified name is captured in the elements of\n// fieldPath has a string value, if it exists, in the JSON representation captured by payload. This\n// returns the qualified field name (as present as it is in payload) as a single string, and a\n// boolean that is true only if either fieldPath is not present or if its value is a string. This\n// means that if fieldPath is a path to an enum field, the boolean will be false if the enum is\n// encoded in the payload using a non-string representation.\nfunc CheckEnum(payload jsonPayload, fieldPath []protoreflect.Name) (fieldName string, ok bool) {\n\tnameParts := []string{}\n\tlast := len(fieldPath) - 1\n\tvar value string\n\tvar found, isString bool\n\tfor idx, pathSegment := range fieldPath {\n\t\tsegment := strcase.ToLowerCamel(string(pathSegment))\n\t\tnameParts = append(nameParts, segment)\n\n\t\t// TODO: For repeated fields, will need to recurse. Consider denoting repeated fields by appending a \"*\" to the pathSegment\n\n\t\tif idx < last {\n\t\t\tpayload, found = payload[segment].(jsonPayload)\n\t\t\tif !found {\n\t\t\t\t// Some elements of the field path are not populated\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif _, found = payload[segment]; found {\n\t\t\t// We found the field specified by fieldPath.\n\t\t\tvalue, isString = payload[segment].(string)\n\t\t}\n\t}\n\tfieldName = strings.Join(nameParts, \".\")\n\n\tif !found {\n\t\t// We did not find the field denoted by fieldPath, so there is no error.\n\t\treturn fieldName, true\n\t}\n\n\tif !isString {\n\t\t// We found the enum field denoted by fieldPath, but its value is not a string. This\n\t\t// is an error: we require all enum values to be REST-encoded via their string\n\t\t// representations for REST transport.\n\t\treturn fieldName, false\n\t}\n\n\tif _, err := strconv.Atoi(value); err == nil {\n\t\t// We found the enum field denoted by fieldPath, and its JSON value is of string\n\t\t// type, but the value of the string merely represents a number. This is an error: a\n\t\t// string representation of an enum value should not be parseable as an int, as it\n\t\t// must contain letters, typically forming words.\n\t\treturn fieldName, false\n\t}\n\n\treturn fieldName, true\n}\n\n// GetEnumFields returns a list of any arbitrarily nested fields in message that are enums. Each\n// member of the returned list is a qualified field name, itself represented as a list of\n// simple protoreflect.Name.\nfunc GetEnumFields(message protoreflect.Message) [][]protoreflect.Name {\n\tmessageName := message.Descriptor().FullName()\n\tif fields, ok := protoEnumFields[messageName]; ok {\n\t\treturn fields\n\t}\n\n\tfields := ComputeEnumFields(message)\n\tprotoEnumFields[messageName] = fields\n\treturn fields\n}\n\n// ComputeEnumFields determines which fields in message or its submessages are enums, and returns a\n// list of those qualified field names (each one of those being a list of simple\n// protoreflect.Name).\nfunc ComputeEnumFields(message protoreflect.Message) [][]protoreflect.Name {\n\treturn computeEnumFields(message.Descriptor(), []protoreflect.Name{})\n}\n\n// computeEnumFields determines which fields in message or its submessages are enums, and returns a\n// list of those qualified field names (each one of those being a list of simple\n// protoreflect.Name). currentPath must be the fully qualified name for message.\nfunc computeEnumFields(message protoreflect.MessageDescriptor, currentPath []protoreflect.Name) [][]protoreflect.Name {\n\tresults := [][]protoreflect.Name{}\n\tallFields := message.Fields()\n\tfor idx := 0; idx < allFields.Len(); idx++ {\n\t\tfield := allFields.Get(idx)\n\t\tswitch field.Kind() {\n\t\tcase protoreflect.EnumKind:\n\t\t\tresults = append(results, append(currentPath, field.Name()))\n\t\tcase protoreflect.MessageKind:\n\t\t\tresults = append(results, computeEnumFields(field.Message(), append(currentPath, field.Name()))...)\n\t\tdefault:\n\t\t\tcontinue\n\n\t\t}\n\t}\n\treturn results\n}\n\n// jsonPayload is used for unmarshaling arbitrary JSON.\ntype jsonPayload map[string]interface{}\n\n// protoEnumFields is a list of fields paths (themselves represented as a list of nested field\n// names) which represent enum fields. This is used to memoize calls to GetEnumFields.\nvar protoEnumFields map[protoreflect.FullName][][]protoreflect.Name\n\nfunc init() {\n\tprotoEnumFields = map[protoreflect.FullName][][]protoreflect.Name{}\n}\n"
  },
  {
    "path": "util/genrest/resttools/checkrequestformat_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage resttools\n\nimport (\n\t\"net/http\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc TestComputeEnumFields(t *testing.T) {\n\tcomplianceData := &genprotopb.ComplianceData{}\n\twant := [][]protoreflect.Name{\n\t\t{\"f_kingdom\"},\n\t\t{\"f_child\", \"f_continent\"},\n\t\t{\"f_child\", \"p_continent\"},\n\t\t{\"p_kingdom\"},\n\t\t{\"p_child\", \"f_continent\"},\n\t\t{\"p_child\", \"p_continent\"},\n\t}\n\n\tgot := ComputeEnumFields(complianceData.ProtoReflect())\n\tif !reflect.DeepEqual(got, want) {\n\t\tt.Errorf(\"enum fields: got %v, want %v\", got, want)\n\t}\n}\n\nfunc TestCheckRequestFormat(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tlabel     string\n\t\tjson      string\n\t\theader    http.Header // nil means standard headers\n\t\tmethod    string      // empty means POST\n\t\twantError string\n\t}{\n\t\t{\n\t\t\tlabel: \"normal case\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"fKingdom\": \"FUNGI\"}`,\n\t\t},\n\t\t{\n\t\t\tlabel:  \"normal case using PUT\",\n\t\t\tjson:   `{\"fString\": \"hi\", \"fKingdom\": \"FUNGI\"}`,\n\t\t\tmethod: \"PUT\",\n\t\t},\n\t\t{\n\t\t\tlabel:  \"normal case using PATCH\",\n\t\t\tjson:   `{\"fString\": \"hi\", \"fKingdom\": \"FUNGI\"}`,\n\t\t\tmethod: \"PATCH\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"normal case, optional field\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"pKingdom\": \"FUNGI\"}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"normal case, nested message, optional field\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"fChild\": {\"pContinent\": \"AFRICA\"}}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"normal case, nested optional message\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"pChild\": {\"fContinent\": \"AFRICA\"}}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"normal case, no enum\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"normal case, correct headers\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t\theader: http.Header{\n\t\t\t\theaderNameContentType: []string{headerValueContentTypeJSON},\n\t\t\t\theaderNameAPIClient:   []string{\"foo/1 rest/foo gapic/2 blah\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tlabel:     \"GET with a body\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"fKingdom\": \"FUNGI\"}`,\n\t\t\tmethod:    \"GET\",\n\t\t\twantError: \"(UnexpectedRequestBodyError)\",\n\t\t},\n\t\t{\n\t\t\tlabel:     \"DELETE with a body\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"fKingdom\": \"FUNGI\"}`,\n\t\t\tmethod:    \"DELETE\",\n\t\t\twantError: \"(UnexpectedRequestBodyError)\",\n\t\t},\n\t\t{\n\t\t\tlabel:     \"no api client header\",\n\t\t\tjson:      `{\"fString\": \"hi\"}`,\n\t\t\theader:    http.Header{headerNameContentType: []string{headerValueContentTypeJSON}},\n\t\t\twantError: \"(HeaderAPIClientError)\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"no header rest token\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t\theader: http.Header{\n\t\t\t\theaderNameContentType: []string{headerValueContentTypeJSON},\n\t\t\t\theaderNameAPIClient:   []string{\"foo/1 gapic/2 blah\"},\n\t\t\t},\n\t\t\twantError: \"(HeaderTransportRESTError)\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"no header gapic token\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t\theader: http.Header{\n\t\t\t\theaderNameContentType: []string{headerValueContentTypeJSON},\n\t\t\t\theaderNameAPIClient:   []string{\"foo/1 rest/foo blah\"},\n\t\t\t},\n\t\t\twantError: \"(HeaderClientGAPICError)\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"no content-type header\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t\theader: http.Header{\n\t\t\t\theaderNameAPIClient: []string{\"foo/1 rest/foo gapic/2 blah\"},\n\t\t\t},\n\t\t\twantError: \"(HeaderContentTypeError)\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"bad content-type header\",\n\t\t\tjson:  `{\"fString\": \"hi\"}`,\n\t\t\theader: http.Header{\n\t\t\t\theaderNameContentType: []string{\"something \" + headerValueContentTypeJSON},\n\t\t\t\theaderNameAPIClient:   []string{\"foo/1 rest/foo gapic/2 blah\"},\n\t\t\t},\n\t\t\twantError: \"(HeaderContentTypeError)\",\n\t\t},\n\n\t\t{\n\t\t\tlabel: \"random string does not fail\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"fKingdom\": \"MONACO\"}`,\n\t\t},\n\t\t{\n\t\t\tlabel:     \"numeric enum\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"fKingdom\": 56}`,\n\t\t\twantError: \"(EnumEncodingError)\",\n\t\t},\n\t\t{\n\t\t\tlabel:     \"numeric optional enum\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"pKingdom\": 57}`,\n\t\t\twantError: \"(EnumEncodingError)\",\n\t\t},\n\t\t{\n\t\t\tlabel:     \"stringy numeric enum\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"fKingdom\": \"56\"}`,\n\t\t\twantError: \"(EnumEncodingError)\",\n\t\t},\n\t\t{\n\t\t\tlabel:     \"stringy optional numeric enum\",\n\t\t\tjson:      `{\"fString\": \"hi\", \"fKingdom\": \"57\"}`,\n\t\t\twantError: \"(EnumEncodingError)\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"stringy number+letter enum\",\n\t\t\tjson:  `{\"fString\": \"hi\", \"fKingdom\": \"56Abacus\"}`,\n\t\t},\n\t} {\n\t\tcomplianceData := &genprotopb.ComplianceData{}\n\t\tmethod := testCase.method\n\t\tif len(method) == 0 {\n\t\t\tmethod = \"POST\"\n\t\t}\n\t\trequest, err := http.NewRequest(method, \"showcase.foo.com\", strings.NewReader(testCase.json))\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"test case %d[%q] could not create request: %s\", idx, testCase.label, err)\n\n\t\t}\n\t\trequest.Header = testCase.header\n\t\tif request.Header == nil {\n\t\t\tPopulateRequestHeaders(request)\n\t\t}\n\t\terr = CheckRequestFormat(request.Body, request, complianceData.ProtoReflect())\n\t\tif (err != nil) != (testCase.wantError != \"\") {\n\t\t\tt.Errorf(\"test case %d[%q] CheckRequestFormat(): expected error==%v, got: %v\", idx, testCase.label, testCase.wantError, err)\n\t\t\tcontinue\n\t\t}\n\t\tif err == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif got, want := err.Error(), testCase.wantError; !strings.Contains(got, want) {\n\t\t\tt.Errorf(\"test case %d[%q] CheckRequestFormat(): incorrect error: want: %q, got %q\", idx, testCase.label, want, got)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/constants.go",
    "content": "// Copyright 2020 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//     https://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\npackage resttools\n\nimport \"fmt\"\n\nconst (\n\t// CharsField contains the characters allowed in a field name (URL path or body)\n\tCharsField = `-_.0-9a-zA-Z`\n\n\t// CharsLiteral contains the the characters allowed in a URL path literal segment.\n\tCharsLiteral = `-_.~0-9a-zA-Z%`\n\n\t// RegexURLPathSingleSegmentValue contains the regex expression for matching a single URL\n\t// path segment (i.e. `/` is not allowed). Since gorilla/mux hands uses the decoded paths to\n\t// match, we can just accept any characters.\n\tRegexURLPathSingleSegmentValue = \"[^:]+\"\n\n\t// RegexURLPathSingleSegmentValue contains the regex expression for matching multiple URL\n\t// path segments (i.e. `/` is allowed). Since gorilla/mux hands uses the decoded paths to\n\t// match, we can just accept any characters.\n\tRegexURLPathMultipleSegmentValue = \"[^:]+\"\n)\n\nvar (\n\t// CharsFieldPath contains the characters allowed in a dotted field path.\n\tCharsFieldPath string\n\n\t// RegexField contains the regex expression for matching a single (not nested) field name.\n\tRegexField string\n\n\t// RegexField contains the regex expression for matching a dotted field path.\n\tRegexFieldPath string\n\n\t// RegexLiteral contains the regex expression for matching a URL path literal segment.\n\tRegexLiteral string\n)\n\nfunc init() {\n\tRegexField = fmt.Sprintf(`[%s]+`, CharsField)\n\n\tCharsFieldPath = CharsField + `.`\n\tRegexFieldPath = fmt.Sprintf(`^[%s]+`, CharsFieldPath)\n\n\tRegexLiteral = fmt.Sprintf(`^[%s]+`, CharsLiteral)\n}\n\n// A key-type for storing binding URI value in the Context\ntype BindingURIKeyType string\n\nconst BindingURIKey BindingURIKeyType = BindingURIKeyType(\"BindingURIKey\")\n"
  },
  {
    "path": "util/genrest/resttools/error_response.go",
    "content": "// Copyright 2022 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//     https://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\npackage resttools\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\tpb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\tcode \"google.golang.org/genproto/googleapis/rpc/code\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n)\n\n// gRPCToHTTP is the status code mapping derived from the internal source go/http-canonical-mapping.\nvar gRPCToHTTP map[codes.Code]int = map[codes.Code]int{\n\tcodes.OK:                 http.StatusOK,\n\tcodes.Canceled:           499, // There isn't a Go constant ClientClosedConnection\n\tcodes.Unknown:            http.StatusInternalServerError,\n\tcodes.InvalidArgument:    http.StatusBadRequest,\n\tcodes.DeadlineExceeded:   http.StatusGatewayTimeout,\n\tcodes.NotFound:           http.StatusNotFound,\n\tcodes.AlreadyExists:      http.StatusConflict,\n\tcodes.PermissionDenied:   http.StatusForbidden,\n\tcodes.Unauthenticated:    http.StatusUnauthorized,\n\tcodes.ResourceExhausted:  http.StatusTooManyRequests,\n\tcodes.FailedPrecondition: http.StatusBadRequest,\n\tcodes.Aborted:            http.StatusConflict,\n\tcodes.OutOfRange:         http.StatusBadRequest,\n\tcodes.Unimplemented:      http.StatusNotImplemented,\n\tcodes.Internal:           http.StatusInternalServerError,\n\tcodes.Unavailable:        http.StatusServiceUnavailable,\n\tcodes.DataLoss:           http.StatusInternalServerError,\n}\n\n// httpToGRPC is the status code mapping derived from the internal source go/http-canonical-mapping.\n// This is not merely the inverse of gRPCToHTTP (which, at any rate, is not injective). The\n// canonical mapping also specifies codes for some HTTP status ranges, so it is imperative to use\n// HTTPToGRPC().\nvar httpToGRPC = map[int]codes.Code{\n\thttp.StatusBadRequest:                   codes.InvalidArgument,\n\thttp.StatusUnauthorized:                 codes.Unauthenticated,\n\thttp.StatusForbidden:                    codes.PermissionDenied,\n\thttp.StatusNotFound:                     codes.NotFound,\n\thttp.StatusConflict:                     codes.Aborted,\n\thttp.StatusRequestedRangeNotSatisfiable: codes.OutOfRange,\n\thttp.StatusTooManyRequests:              codes.ResourceExhausted,\n\t499:                                     codes.Canceled, // There isn't a Go constant ClientClosedConnection\n\thttp.StatusNotImplemented:               codes.Unimplemented,\n\thttp.StatusServiceUnavailable:           codes.Unavailable,\n\thttp.StatusGatewayTimeout:               codes.DeadlineExceeded,\n}\n\n// GRPCToHTTP maps the given gRPC Code to the canonical HTTP Status code as\n// defined by the internal source go/http-canonical-mapping.\nfunc GRPCToHTTP(c codes.Code) int {\n\thttpStatus, ok := gRPCToHTTP[c]\n\tif !ok {\n\t\thttpStatus = http.StatusInternalServerError\n\t}\n\n\treturn httpStatus\n}\n\n// HTTPToGRPC maps the given HTTP status code to the canonical gRPC\n// Code as defined by the internal source go/http-canonical-mapping.\nfunc HTTPToGRPC(httpStatus int) codes.Code {\n\tvar gRPCCode codes.Code\n\tswitch {\n\tcase httpStatus >= 200 && httpStatus < 300:\n\t\tgRPCCode = codes.OK\n\tcase httpStatus >= 300 && httpStatus < 400:\n\t\tgRPCCode = codes.Unknown\n\tcase httpStatus >= 400 && httpStatus < 500:\n\t\tgRPCCode = codes.FailedPrecondition\n\tcase httpStatus >= 500 && httpStatus < 600:\n\t\tgRPCCode = codes.Internal\n\tdefault:\n\t\tgRPCCode = codes.Unknown\n\t}\n\n\tif codeOverride, ok := httpToGRPC[httpStatus]; ok {\n\t\tgRPCCode = codeOverride\n\t}\n\treturn gRPCCode\n}\n\n// Constants to make it obvious when we're not supplying either a gRPC or HTTP status code to\n// ErrorResponse(). The code we're not supplying will be obtained from the one we do supply.\nconst (\n\t// NoCodeGRPC is an explicit indication when calling ErrorResponse() that we don't know the\n\t// gRPC status code and it must be derived from the HTTP response code.\n\tNoCodeGRPC codes.Code = 9999\n\n\t// NoCodeHTTP is an explicit indication when calling ErrorResponse() that we don't know the\n\t// HTTP response code and it must be derived from the gRPC status code.\n\tNoCodeHTTP int = -1\n)\n\n// ErrorResponse is a helper that formats the given response information, including the HTTP or gRPC\n// status code, a message, and any error detail types, into a RestError proto message and writes the\n// response as JSON.\nfunc ErrorResponse(w http.ResponseWriter, httpResponseCode int, grpcStatus codes.Code, message string, details ...interface{}) {\n\tif httpResponseCode == NoCodeHTTP && grpcStatus == NoCodeGRPC {\n\t\tWriteShowcaseRESTImplementationError(w, \"neither HTTP code or gRPC status are provided for ErrorResponse. Exactly one must be provided.\")\n\t\treturn\n\t}\n\tif httpResponseCode != NoCodeHTTP && grpcStatus != NoCodeGRPC {\n\t\tWriteShowcaseRESTImplementationError(w, \"both HTTP code and gRPC status are provided for ErrorResponse. Exactly one must be provided.\")\n\t\treturn\n\t}\n\n\tif httpResponseCode == NoCodeHTTP {\n\t\thttpResponseCode = GRPCToHTTP(grpcStatus)\n\t} else {\n\t\tgrpcStatus = HTTPToGRPC(httpResponseCode)\n\t}\n\n\tjsonError := &pb.RestError{\n\t\tError: &pb.RestError_Status{\n\t\t\tCode:    int32(httpResponseCode),\n\t\t\tMessage: message,\n\t\t\tStatus:  code.Code(grpcStatus),\n\t\t},\n\t}\n\n\tfor _, oneDetail := range details {\n\t\tdetailAsAny, err := anypb.New(oneDetail.(proto.Message))\n\t\tif err != nil {\n\t\t\tWriteShowcaseRESTImplementationError(w, fmt.Sprintf(\"could not interpret error detail as a protobuf Any: %+v\", oneDetail))\n\t\t\treturn\n\t\t}\n\t\tjsonError.Error.Details = append(jsonError.Error.Details, detailAsAny)\n\t}\n\n\tw.WriteHeader(httpResponseCode)\n\tdata, _ := protojson.Marshal(jsonError)\n\tw.Write(data)\n}\n\nfunc WriteShowcaseRESTImplementationError(w http.ResponseWriter, message string) {\n\tErrorResponse(w, 500, NoCodeGRPC, fmt.Sprintf(\"Showcase consistency error: %s\", message))\n}\n"
  },
  {
    "path": "util/genrest/resttools/error_response_test.go",
    "content": "// Copyright 2022 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//     https://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\npackage resttools\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"google.golang.org/genproto/googleapis/rpc/errdetails\"\n\t\"google.golang.org/grpc/codes\"\n)\n\nfunc TestErrorResponse(t *testing.T) {\n\n\tfor _, tst := range []struct {\n\t\tdetails         []interface{}\n\t\tmessage, name   string\n\t\tinputHTTPStatus int\n\t\tinputGRPCCode   codes.Code\n\t\twantHTTPStatus  int\n\t\twantResponse    string\n\t}{\n\t\t// HTTP → gRPC codes\n\t\t{\n\t\t\tname:            \"internal_server\",\n\t\t\tmessage:         \"Had an issue\",\n\t\t\tinputGRPCCode:   NoCodeGRPC,\n\t\t\tinputHTTPStatus: http.StatusInternalServerError,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails:         []interface{}{&errdetails.ErrorInfo{Reason: \"foo\"}},\n\t\t\twantResponse:    `{\"error\":{\"code\":500, \"message\":\"Had an issue\", \"status\":\"INTERNAL\", \"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\", \"reason\":\"foo\"}]}}`,\n\t\t},\n\t\t{\n\t\t\tname:            \"bad_request\",\n\t\t\tmessage:         \"The request was bad\",\n\t\t\tinputGRPCCode:   NoCodeGRPC,\n\t\t\tinputHTTPStatus: http.StatusBadRequest,\n\t\t\twantHTTPStatus:  http.StatusBadRequest,\n\t\t\twantResponse:    `{\"error\":{\"code\":400, \"message\":\"The request was bad\", \"status\":\"INVALID_ARGUMENT\"}}`,\n\t\t},\n\t\t{\n\t\t\tname:            \"multiple_issues\",\n\t\t\tmessage:         \"Had multiple issues\",\n\t\t\tinputGRPCCode:   NoCodeGRPC,\n\t\t\tinputHTTPStatus: http.StatusInternalServerError,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails: []interface{}{\n\t\t\t\t&errdetails.ErrorInfo{Reason: \"foo\"},\n\t\t\t\t&errdetails.BadRequest{\n\t\t\t\t\tFieldViolations: []*errdetails.BadRequest_FieldViolation{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tField:       \"an offending field\",\n\t\t\t\t\t\t\tDescription: \"a description\",\n\t\t\t\t\t\t\tReason:      \"a reason\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\twantResponse: `{\"error\":{\"code\":500, \"message\":\"Had multiple issues\", \"status\":\"INTERNAL\", \"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\", \"reason\":\"foo\"}, {\"@type\":\"type.googleapis.com/google.rpc.BadRequest\", \"fieldViolations\":[{\"field\":\"an offending field\", \"description\":\"a description\", \"reason\":\"a reason\"}]}]}}`,\n\t\t},\n\n\t\t// gRPC → HTTP codes\n\t\t{\n\t\t\tname:            \"internal_server\",\n\t\t\tmessage:         \"Had an issue\",\n\t\t\tinputGRPCCode:   codes.Internal,\n\t\t\tinputHTTPStatus: NoCodeHTTP,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails:         []interface{}{&errdetails.ErrorInfo{Reason: \"foo\"}},\n\t\t\twantResponse:    `{\"error\":{\"code\":500, \"message\":\"Had an issue\", \"status\":\"INTERNAL\", \"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\", \"reason\":\"foo\"}]}}`,\n\t\t},\n\t\t{\n\t\t\tname:            \"bad_request\",\n\t\t\tmessage:         \"The request was bad\",\n\t\t\tinputGRPCCode:   codes.InvalidArgument,\n\t\t\tinputHTTPStatus: NoCodeHTTP,\n\t\t\twantHTTPStatus:  http.StatusBadRequest,\n\t\t\twantResponse:    `{\"error\":{\"code\":400, \"message\":\"The request was bad\", \"status\":\"INVALID_ARGUMENT\"}}`,\n\t\t},\n\t\t{\n\t\t\tname:            \"multiple_issues\",\n\t\t\tmessage:         \"Had multiple issues\",\n\t\t\tinputGRPCCode:   codes.Internal,\n\t\t\tinputHTTPStatus: NoCodeHTTP,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails: []interface{}{\n\t\t\t\t&errdetails.ErrorInfo{Reason: \"foo\"},\n\t\t\t\t&errdetails.BadRequest{\n\t\t\t\t\tFieldViolations: []*errdetails.BadRequest_FieldViolation{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tField:       \"an offending field\",\n\t\t\t\t\t\t\tDescription: \"a description\",\n\t\t\t\t\t\t\tReason:      \"a reason\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\twantResponse: `{\"error\":{\"code\":500, \"message\":\"Had multiple issues\", \"status\":\"INTERNAL\", \"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\", \"reason\":\"foo\"}, {\"@type\":\"type.googleapis.com/google.rpc.BadRequest\", \"fieldViolations\":[{\"field\":\"an offending field\", \"description\":\"a description\", \"reason\":\"a reason\"}]}]}}`,\n\t\t},\n\n\t\t// error inputs\n\t\t{\n\t\t\tname:            \"test when neither gRPC nor HTTP code is specified\",\n\t\t\tmessage:         \"Had an issue\",\n\t\t\tinputGRPCCode:   NoCodeGRPC,\n\t\t\tinputHTTPStatus: NoCodeHTTP,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails:         []interface{}{&errdetails.ErrorInfo{Reason: \"foo\"}},\n\t\t\twantResponse:    `{\"error\":{\"code\":500, \"message\":\"Showcase consistency error: neither HTTP code or gRPC status are provided for ErrorResponse. Exactly one must be provided.\", \"status\":\"INTERNAL\"}}`,\n\t\t},\n\t\t{\n\t\t\tname:            \"test when both gRPC and HTTP codes are specified\",\n\t\t\tmessage:         \"Had an issue\",\n\t\t\tinputGRPCCode:   codes.Internal,\n\t\t\tinputHTTPStatus: http.StatusBadRequest,\n\t\t\twantHTTPStatus:  http.StatusInternalServerError,\n\t\t\tdetails:         []interface{}{&errdetails.ErrorInfo{Reason: \"foo\"}},\n\t\t\twantResponse:    `{\"error\":{\"code\":500, \"message\":\"Showcase consistency error: both HTTP code and gRPC status are provided for ErrorResponse. Exactly one must be provided.\", \"status\":\"INTERNAL\"}}`,\n\t\t},\n\t} {\n\t\tgot := httptest.NewRecorder()\n\t\tErrorResponse(got, tst.inputHTTPStatus, tst.inputGRPCCode, tst.message, tst.details...)\n\t\tif got.Code != tst.wantHTTPStatus {\n\t\t\tt.Errorf(\"%s: Expected code %d, but got %d\", tst.name, tst.wantHTTPStatus, got.Code)\n\t\t}\n\t\tgotResponse, err := io.ReadAll(got.Result().Body)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"%s: Error reading response body: %+v\", tst.name, err)\n\t\t}\n\t\tvar gotJSON interface{}\n\t\terr = json.Unmarshal([]byte(gotResponse), &gotJSON)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"%s: Error parsing actual response body as JSON: %+v\", tst.name, err)\n\t\t}\n\n\t\tvar wantJSON interface{}\n\t\terr = json.Unmarshal([]byte(tst.wantResponse), &wantJSON)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"%s: Error parsing expected response body as JSON: %+v\", tst.name, err)\n\t\t}\n\n\t\tif diff := cmp.Diff(gotJSON, wantJSON); diff != \"\" {\n\t\t\tt.Errorf(\"%s: error body: got(-),want(+):%s\\n\\n---------- Raw JSON: got\\n%s\\n---------- Raw JSON: want\\n%s\",\n\t\t\t\ttst.name, diff, gotResponse, tst.wantResponse)\n\t\t}\n\t}\n}\n\nfunc TestGRPCToHTTP(t *testing.T) {\n\tfor _, tst := range []struct {\n\t\tcode codes.Code\n\t\twant int\n\t}{\n\t\t{\n\t\t\tcodes.Aborted,\n\t\t\thttp.StatusConflict,\n\t\t},\n\t\t{\n\t\t\t100,\n\t\t\thttp.StatusInternalServerError,\n\t\t},\n\t} {\n\t\tif got := GRPCToHTTP(tst.code); got != tst.want {\n\t\t\tt.Errorf(\"converting %s: got %d, but expected %d\", tst.code, got, tst.want)\n\t\t}\n\t}\n}\n\nfunc TestHTTPToGRPC(t *testing.T) {\n\t// This test focuses on the ranges of HTTP codes that map to a single gRPC status, as per go/http-canonical-mapping.\n\tfor _, tst := range []struct {\n\t\tcode int\n\t\twant codes.Code\n\t}{\n\t\t{200, codes.OK},\n\t\t{299, codes.OK},\n\t\t{350, codes.Unknown},\n\t\t{403, codes.PermissionDenied},\n\t\t{499, codes.Canceled},\n\t\t{498, codes.FailedPrecondition},\n\t\t{503, codes.Unavailable},\n\t\t{599, codes.Internal},\n\t\t{149, codes.Unknown},\n\t} {\n\t\tif got := HTTPToGRPC(tst.code); got != tst.want {\n\t\t\tt.Errorf(\"converting %d: got %d, but expected %d\", tst.code, got, tst.want)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/headers.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nconst (\n\theaderNameContentType      = \"Content-Type\"\n\theaderValueContentTypeJSON = \"application/json\"\n\n\theaderNameAPIClient            = \"X-Goog-Api-Client\"\n\theaderValueTransportRESTPrefix = \"rest/\"\n\theaderValueClientGAPICPrefix   = \"gapic/\"\n)\n\n// PopulateRequestHeaders inspects request and adds the correct headers. This\n// is useful for tests where we're not trying to send incorrect\n// headers.\nfunc PopulateRequestHeaders(request *http.Request) {\n\theader := http.Header{}\n\theader.Set(headerNameAPIClient, fmt.Sprintf(\"%s0.0.0 %s0.0.0\", headerValueTransportRESTPrefix, headerValueClientGAPICPrefix))\n\n\tif request.Body != nil {\n\t\theader.Set(headerNameContentType, headerValueContentTypeJSON)\n\t}\n\n\trequest.Header = header\n}\n\n// CheckContentType checks header to ensure the expected JSON content type is specified.\nfunc CheckContentType(header http.Header) error {\n\tif content, ok := header[headerNameContentType]; !ok || len(content) != 1 || !strings.HasPrefix(strings.ToLower(strings.TrimSpace(content[0])), headerValueContentTypeJSON) {\n\t\treturn fmt.Errorf(\"(HeaderContentTypeError) did not find expected HTTP header %q: %q\", headerNameContentType, headerValueContentTypeJSON)\n\t}\n\treturn nil\n}\n\n// CheckAPIClientHeader verifies that the \"x-goog-api-client\" header contains the expected tokens\n// (\"rest/...\" and \"gapic/...\").\nfunc CheckAPIClientHeader(header http.Header) error {\n\tcontent, ok := header[headerNameAPIClient]\n\tif !ok || len(content) != 1 {\n\t\treturn fmt.Errorf(\"(HeaderAPIClientError) did not find expected HTTP header %q: %q\\n                found: %q\",\n\t\t\theaderNameAPIClient, headerValueTransportRESTPrefix, header)\n\t}\n\n\tvar haveREST, haveGAPIC bool\n\tfor _, token := range strings.Split(content[0], \" \") {\n\t\ttrimmed := strings.TrimSpace(token)\n\t\tif !haveREST && strings.HasPrefix(trimmed, headerValueTransportRESTPrefix) {\n\t\t\thaveREST = true\n\t\t} else if !haveGAPIC && strings.HasPrefix(trimmed, headerValueClientGAPICPrefix) {\n\t\t\thaveGAPIC = true\n\t\t} else {\n\t\t\t// nothing changed\n\t\t\tcontinue\n\t\t}\n\t\tif haveREST && haveGAPIC {\n\t\t\treturn nil\n\t\t}\n\t}\n\tif !haveREST {\n\t\treturn fmt.Errorf(\"(HeaderTransportRESTError) did not find expected HTTP header token %q: %q\", headerNameAPIClient, headerValueTransportRESTPrefix)\n\t}\n\tif !haveGAPIC {\n\t\treturn fmt.Errorf(\"(HeaderClientGAPICError) did not find expected HTTP header token %q: %q\", headerNameAPIClient, headerValueClientGAPICPrefix)\n\t}\n\treturn fmt.Errorf(\"internal inconsistency\")\n}\n\n// PrettyPrintHeaders prints all the HTTP headers in `request` in\n// lines preceded by `indentation`. Each line has one header key and a\n// quoted list of all values for that key.\nfunc PrettyPrintHeaders(request *http.Request, indentation string) string {\n\tlines := []string{}\n\tfor key, values := range request.Header {\n\t\tnewLine := fmt.Sprintf(\"%s%s:\", indentation, key)\n\t\tfor _, oneValue := range values {\n\t\t\tnewLine += fmt.Sprintf(\" %q\", oneValue)\n\t\t}\n\t\tlines = append(lines, newLine)\n\t}\n\treturn strings.Join(lines, \"\\n\")\n}\n\n// IncludeRequestHeadersInResponse includes all headers in the request `r` and includes them in the response `w`,\n// prefixing each of these header keys with a constant to reflect they came from the request.\nfunc IncludeRequestHeadersInResponse(w http.ResponseWriter, r *http.Request) {\n\tconst prefix = \"x-showcase-request-\"\n\n\tresponseHeaders := w.Header()\n\tfor requestKey, valueList := range r.Header {\n\t\tfor _, value := range valueList {\n\t\t\tresponseHeaders.Add(prefix+requestKey, value)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/json.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/iancoleman/strcase\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\n// ToJSON returns a copy of the current global JSON marshaling options in\n// JSONMarshaler. Modifications to this copy do not change the values of these options returned in\n// subsequent calls to this function. This is the function Showcase REST endpoints should use to\n// handle JSON marshaling.\nfunc ToJSON() *protojson.MarshalOptions {\n\tcopy := *JSONMarshaler.current\n\treturn &copy\n}\n\n// FromJSON returns a copy of the current global JSON unmarshaling options. Modifications to this copy\n// do not change the values of these options returned in subsequent calls to this function. This is\n// the function Showcase REST endpoints should use to handle JSON unmarshaling.\nfunc FromJSON() *protojson.UnmarshalOptions {\n\treturn &protojson.UnmarshalOptions{}\n}\n\n// JSONMarshaler captures the JSON marshaling options. It is intended only for tests of Showcase\n// functionality (not for normal Showcase use or tests of generators against Showcase).\nvar JSONMarshaler JSONMarshalOptions\n\n// JSONMarshalOptions contains the current JSON marshaling options used by REST endpoints, and\n// allows for temporarily replacing these global options and then restoring them. This functionality\n// is useful for some tests.\ntype JSONMarshalOptions struct {\n\tcurrent, saved *protojson.MarshalOptions\n\tmu             sync.Mutex\n}\n\n// Replace replaces the current JSON marshaling options with those provided by opt. Call Restore()\n// to restore the production options. Only one replacement can be active at a time; subsequent calls\n// hang waiting for the first call's mutex to be released.\n//\n// As a special case, if opt==nil, the replacement is with the production options themselves; this\n// is useful for tests that need to lock the production options to protect from other tests which\n// may need to change them.\nfunc (jm *JSONMarshalOptions) Replace(opt *protojson.MarshalOptions) {\n\tjm.mu.Lock()\n\tif opt == nil {\n\t\topt = jm.current\n\t}\n\tjm.saved = jm.current\n\tjm.current = opt\n}\n\n// Restore restores the production JSON marshaling options. There must be an active Replace() called\n// previously.\nfunc (jm *JSONMarshalOptions) Restore() {\n\tjm.current = jm.saved\n\tjm.saved = nil\n\tjm.mu.Unlock()\n}\n\n// ToDottedLowerCamel converts each segment of a dot-delimited fieldPath to be individually lower-camel-cased; the dots are preserved.\nfunc ToDottedLowerCamel(fieldPath string) string {\n\tparts := strings.Split(fieldPath, \".\")\n\tfor idx, segment := range parts {\n\t\tparts[idx] = strcase.ToLowerCamel(segment)\n\t}\n\treturn strings.Join(parts, \".\")\n}\n\nfunc init() {\n\tJSONMarshaler.current = &protojson.MarshalOptions{\n\t\tMultiline:       true,\n\t\tAllowPartial:    false,\n\t\tUseEnumNumbers:  false,\n\t\tEmitUnpopulated: true,\n\t\tUseProtoNames:   false, // we want lower-camel-cased field names\n\t}\n\n}\n"
  },
  {
    "path": "util/genrest/resttools/keysmatching.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport \"strings\"\n\n// KeysMatchPath returns the keys in `examine` that match any of the elements in `lookFor`,\n// interpreting the latter as dotted-field paths. This means a match occurs when (a) the two are\n// identical, or (b) when any element of `lookFor` is a prefix of the `examine` key and is followed\n// by a period. For example:\n// KeysMatchPath(map[string][]string{\"loc\": nil, \"loc.lat\": nil, \"location\":nil},\n//\n//\t         []string{\"loc\"})\n//\t== []string{\"loc\",\"loc.lat\"}\nfunc KeysMatchPath(examine map[string][]string, lookFor []string) []string {\n\tmatchingKeys := []string{}\n\tfor key, _ := range examine {\n\t\tfor _, target := range lookFor {\n\t\t\tif matchesSelfOrParent(key, target) {\n\t\t\t\tmatchingKeys = append(matchingKeys, key)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn matchingKeys\n}\n\n// matchesSelfOrParent returns whether any element of `lookFor` is or contains a full or partial\n// path (in the dotted-field sense) to `examine`. In other words, this returns true when (a) the two\n// are identical, or (b) when `examine` starts with `lookFor` and is followed by a period.\nfunc matchesSelfOrParent(examine, lookFor string) bool {\n\tif !strings.HasPrefix(examine, lookFor) {\n\t\treturn false\n\t}\n\treturn len(examine) == len(lookFor) || examine[len(lookFor)] == '.'\n}\n"
  },
  {
    "path": "util/genrest/resttools/keysmatching_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"testing\"\n)\n\nfunc TestKeysMatchPath(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\texamine     map[string][]string\n\t\tlookFor     []string\n\t\twantMatches map[string]bool\n\t}{\n\t\t{\n\t\t\texamine: map[string][]string{\n\t\t\t\t\"loc\":           nil,\n\t\t\t\t\"location\":      nil,\n\t\t\t\t\"loc.lat\":       nil,\n\t\t\t\t\"extra.loc.lat\": nil,\n\t\t\t\t\"location.lat\":  nil,\n\t\t\t},\n\t\t\tlookFor:     []string{\"loc\"},\n\t\t\twantMatches: map[string]bool{\"loc\": true, \"loc.lat\": true},\n\t\t},\n\t\t{\n\t\t\texamine: map[string][]string{\n\t\t\t\t\"loc\":           nil,\n\t\t\t\t\"location\":      nil,\n\t\t\t\t\"loc.lat\":       nil,\n\t\t\t\t\"extra.loc.lat\": nil,\n\t\t\t\t\"location.lat\":  nil,\n\t\t\t},\n\t\t\tlookFor:     []string{\"location\", \"loc\"},\n\t\t\twantMatches: map[string]bool{\"loc\": true, \"location\": true, \"loc.lat\": true, \"location.lat\": true},\n\t\t},\n\t} {\n\t\tmatches := KeysMatchPath(testCase.examine, testCase.lookFor)\n\t\tif got, want := len(matches), len(testCase.wantMatches); got != want {\n\t\t\tt.Errorf(\"testCase = %d: unexpected number of variables returned: got %v, want %v: returned elements: %v\",\n\t\t\t\tidx, got, want, matches)\n\t\t\tcontinue\n\t\t}\n\t\tfor matchIdx, got := range matches {\n\t\t\tif !testCase.wantMatches[got] {\n\t\t\t\tt.Errorf(\"testCase = %d: got unexpected match #%d %q; expected matches: %v\", idx, matchIdx, got, matches)\n\t\t\t}\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/populatefield.go",
    "content": "// Copyright 2020 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//     https://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\npackage resttools\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// wellKnownTypes has a key for every well-known type message which JSON-encodes to an atomic symbol\n// (like a number or a string) as opposed to a structured object. The value for each key is true iff\n// the JSON encoding for the type is a string. We need both these data for well-known types so that\n// we can properly decode them in URL paths and query strings.\nvar wellKnownTypes = map[string]bool{\n\t// == The following are the only three common types used in this API ==\n\t\"google.protobuf.FieldMask\": true,\n\t\"google.protobuf.Timestamp\": true,\n\t\"google.protobuf.Duration\":  true,\n\t// == End utilized types ==\n\t// TODO: When the following start being used in the Showcase API, add tests for each of\n\t// these. These types are defined in\n\t// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/wrappers.proto\n\t\"google.protobuf.DoubleValue\": false,\n\t\"google.protobuf.FloatValue\":  false,\n\t\"google.protobuf.Int64Value\":  true,\n\t\"google.protobuf.UInt64Value\": true,\n\t\"google.protobuf.Int32Value\":  false,\n\t\"google.protobuf.UInt32Value\": false,\n\t\"google.protobuf.BoolValue\":   false,\n\t\"google.protobuf.StringValue\": true,\n\t\"google.protobuf.BytesValue\":  true,\n\t// TODO: Determine if the following are even viable as query params.\n\t\"google.protobuf.Value\":     false,\n\t\"google.protobuf.ListValue\": false,\n}\n\n// PopulateSingularFields sets the fields within protoMessage to the values provided in\n// fieldValues. The fields and values are provided as a map of field paths to the string\n// representation of their values. The field paths can refer to fields nested arbitrarily deep\n// within protoMessage; each path element must be lower-camel-cased. This returns an error if any\n// field path is not valid or if any value can't be parsed into the correct data type for the field.\nfunc PopulateSingularFields(protoMessage proto.Message, fieldValues map[string]string) error {\n\tfor name, value := range fieldValues {\n\t\tif err := PopulateOneField(protoMessage, name, []string{value}); err != nil {\n\t\t\t// TODO: accumulate errors so we report them all at once\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// PopulateFields sets the fields within protoMessage to the values provided in fieldValues. The\n// fields and values are provided as a map of field paths to lists of string representations of\n// their values. The field paths can refer to fields nested arbitrarily deep within protoMessage;\n// each path element must be lower-camel-cased. `fieldValues` contains the list of values applicable\n// to the field: a single value of singular fields, or ordered values for a repeated field. This\n// returns an error if any field path is not valid or if any value can't be parsed into the correct\n// data type for the field.\nfunc PopulateFields(protoMessage proto.Message, fieldValues map[string][]string) error {\n\tfor name, value := range fieldValues {\n\t\tif err := PopulateOneField(protoMessage, name, value); err != nil {\n\t\t\t// TODO: accumulate errors so we report them all at once\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// PopulateOneField finds in protoMessage the field identified by fieldPath (which could refer to an\n// arbitrarily nested field using dotted notation; each path element must be lower-camel-cased) and\n// sets it to `value`. It returns an error if the fieldPath does not properly reference a field, or\n// if `fieldValues` could not be parsed into a list of the data type expected for the\n// field. `fieldValues` is a slice to allow passing a series of repeated field entries.\nfunc PopulateOneField(protoMessage proto.Message, fieldPath string, fieldValues []string) error {\n\tmessage := protoMessage.ProtoReflect()\n\n\t// TODO: Support repeated fields.\n\tif len(fieldValues) > 1 {\n\t\treturn fmt.Errorf(\"repeated field values are not supported yet (culprit: %q: %v)\", fieldPath, fieldValues)\n\t}\n\tvalue := fieldValues[0]\n\n\tlevels := strings.Split(fieldPath, \".\")\n\tlastLevel := len(levels) - 1\n\tfor idx, fieldName := range levels {\n\t\tmessageDescriptor := message.Descriptor()\n\t\tmessageFullName := messageDescriptor.FullName()\n\n\t\tif messageDescriptor.Syntax() != protoreflect.Proto3 {\n\t\t\treturn fmt.Errorf(\"cannot process %q as it does not use proto3 syntax\", messageFullName)\n\t\t}\n\n\t\tif len(fieldName) == 0 {\n\t\t\treturn fmt.Errorf(\"segment %d of path field %q is empty\", idx, fieldPath)\n\t\t}\n\n\t\t// find field\n\t\tsubFields := messageDescriptor.Fields()\n\t\tfieldDescriptor, err := findProtoFieldByJSONName(fieldName, subFields)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif fieldDescriptor == nil {\n\t\t\treturn fmt.Errorf(\"could not find %dth field (%q) in field path %q in message %q\",\n\t\t\t\tidx, fieldName, fieldPath, messageFullName)\n\t\t}\n\n\t\tif idx != lastLevel {\n\t\t\t// non-terminal field: go to the next level\n\n\t\t\tif kind := fieldDescriptor.Kind(); kind != protoreflect.MessageKind {\n\t\t\t\treturn fmt.Errorf(\"%dth field (%q) in field path %q in message %q is not itself a message but a %q\",\n\t\t\t\t\tidx, fieldName, fieldPath, messageFullName, kind)\n\t\t\t}\n\t\t\tmessage = message.Mutable(fieldDescriptor).Message()\n\t\t\tcontinue\n\t\t}\n\n\t\t// terminal field\n\t\tvar (\n\t\t\tprotoValue protoreflect.Value\n\t\t\tparseError error\n\t\t)\n\t\tkind := fieldDescriptor.Kind()\n\t\tswitch kind {\n\t\tcase protoreflect.MessageKind:\n\t\t\t// The only `MessageKind`s we accept in URL paths and query params are\n\t\t\t// well-known types where the message as a whole encodes into a format\n\t\t\t// similar to a regular terminal field. Normal messages conveyed via URL\n\t\t\t// paths or query params must be non-repeated and are represented by listing\n\t\t\t// their terminal primitive fields, which will trigger the other cases\n\t\t\t// below instead of this one.\n\t\t\tif pval, err := parseWellKnownType(message, fieldDescriptor, value); err != nil {\n\t\t\t\tparseError = err\n\t\t\t} else if pval != nil {\n\t\t\t\tprotoValue = *pval\n\t\t\t} else {\n\t\t\t\tparseError = fmt.Errorf(\"terminal field %q of field path %q in message %q is a message type\",\n\t\t\t\t\tfieldName, fieldPath, messageFullName)\n\t\t\t}\n\n\t\t// reference for proto scalar types:\n\t\t// https://developers.google.com/protocol-buffers/docs/proto3#scalar\n\n\t\t// TODO: see https://pkg.go.dev/google.golang.org/protobuf@v1.25.0/reflect/protoreflect#Kind\n\n\t\tcase protoreflect.StringKind:\n\t\t\tprotoValue = protoreflect.ValueOfString(value)\n\t\tcase protoreflect.BytesKind:\n\t\t\tprotoValue = protoreflect.ValueOfBytes([]byte(value))\n\n\t\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\t\tparsedValue, err := strconv.ParseInt(value, 10, 32)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfInt32(int32(parsedValue))\n\t\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\t\tparsedValue, err := strconv.ParseUint(value, 10, 32)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfUint32(uint32(parsedValue))\n\n\t\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\t\tparsedValue, err := strconv.ParseInt(value, 10, 64)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfInt64(parsedValue)\n\t\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\t\tparsedValue, err := strconv.ParseUint(value, 10, 64)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfUint64(parsedValue)\n\n\t\tcase protoreflect.FloatKind:\n\t\t\tparsedValue, err := strconv.ParseFloat(value, 32)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfFloat32(float32(parsedValue))\n\t\tcase protoreflect.DoubleKind:\n\t\t\tparsedValue, err := strconv.ParseFloat(value, 64)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfFloat64(parsedValue)\n\n\t\tcase protoreflect.BoolKind:\n\t\t\tparsedValue, err := parseBool(value)\n\t\t\tparseError, protoValue = err, protoreflect.ValueOfBool(parsedValue)\n\n\t\tcase protoreflect.EnumKind:\n\t\t\tvar parsedValue protoreflect.EnumNumber\n\t\t\tif numericValue, err := strconv.ParseFloat(value, 32); err == nil {\n\t\t\t\tparsedValue = protoreflect.EnumNumber(numericValue)\n\t\t\t} else {\n\t\t\t\tenum := fieldDescriptor.Enum().Values().ByName(protoreflect.Name(value))\n\t\t\t\tif enum == nil {\n\t\t\t\t\treturn fmt.Errorf(\"(UnknownEnumStringError) unknown enum symbol %q for field path %q\", value, fieldPath)\n\t\t\t\t}\n\t\t\t\tparsedValue = enum.Number()\n\t\t\t}\n\t\t\tparseError, protoValue = nil, protoreflect.ValueOfEnum(parsedValue)\n\n\t\tdefault:\n\t\t\t// TODO: Handle lists\n\t\t\t// TODO: Handle oneofs\n\t\t\treturn fmt.Errorf(\"terminal field %q of field path %q is of type %q, which is not handled yet\", fieldName, fieldPath, kind)\n\t\t}\n\t\tif parseError != nil {\n\t\t\treturn fmt.Errorf(\"terminal field %q of field path %q is of type %q with value string %q, which could not be parsed: %s\",\n\t\t\t\tfieldName, fieldPath, kind, value, parseError)\n\t\t}\n\t\tmessage.Set(fieldDescriptor, protoValue)\n\t}\n\n\treturn nil\n}\n\n// parseBool parses a proper JSON representation of a bool value (either of the strings \"true\" or\n// \"false\") into a bool data type. Other values cause an error. These are stricter parsing semantics\n// than those of strconv.ParseBool and adhere to the JSON standard.\nfunc parseBool(asString string) (bool, error) {\n\tswitch asString {\n\tcase \"true\":\n\t\treturn true, nil\n\tcase \"false\":\n\t\treturn false, nil\n\tdefault:\n\t\treturn false, fmt.Errorf(\"could not parse %q as a bool\", asString)\n\t}\n}\n\n// findFieldByProtoName queries `fields` for the unique field whose lower-camel-cased name is given\n// by `fieldName` and returns the corresponding FieldDescriptor or nil if none can be found. This\n// returns an error if more than one entry in `fields` has the same lower-camel-cased field\n// representations (as would occur, for example, for fields with proto names `foo5_bar` and\n// `foo_5_bar`).\nfunc findProtoFieldByJSONName(fieldName string, fields protoreflect.FieldDescriptors) (result protoreflect.FieldDescriptor, err error) {\n\tif ToDottedLowerCamel(fieldName) != fieldName {\n\t\treturn nil, fmt.Errorf(\"(QueryParameterNameIncorrectlyCasedError)field name %q is not lower-camel-cased\", fieldName)\n\t}\n\tnumFields := fields.Len()\n\tfor idx := 0; idx < numFields; idx++ {\n\t\tcandidate := fields.Get(idx)\n\t\tif candidate.JSONName() == fieldName {\n\t\t\tif result != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"internal error: more than one field name has JSON lower-camel-case representation %q\", fieldName)\n\t\t\t}\n\t\t\tresult = candidate\n\t\t}\n\t}\n\treturn result, nil\n}\n\nfunc parseWellKnownType(message protoreflect.Message, fieldDescriptor protoreflect.FieldDescriptor, value string) (*protoreflect.Value, error) {\n\tmessageFieldTypes, ok := message.Type().(protoreflect.MessageFieldTypes)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"expected message to implement protoreflect.MessageFieldTypes but it did not\")\n\t}\n\tfieldMsg := messageFieldTypes.Message(fieldDescriptor.Index())\n\tfullName := string(fieldMsg.Descriptor().FullName())\n\tstringEncoded, isWellKnown := wellKnownTypes[fullName]\n\tif !isWellKnown {\n\t\treturn nil, nil\n\t}\n\n\tquoted := value[0] == '\"' && value[len(value)-1] == '\"'\n\tif stringEncoded && !quoted {\n\t\tvalue = fmt.Sprintf(\"%q\", value)\n\t}\n\n\tmsgValue := fieldMsg.New()\n\terr := protojson.Unmarshal([]byte(value), msgValue.Interface())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to unmarshal field %q in message %q: %w\",\n\t\t\tstring(fieldDescriptor.Name()), string(message.Descriptor().FullName()), err)\n\t}\n\n\tv := protoreflect.ValueOfMessage(msgValue)\n\treturn &v, nil\n}\n"
  },
  {
    "path": "util/genrest/resttools/populatefield_test.go",
    "content": "// Copyright 2020 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//     https://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\npackage resttools\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\tgenprotopb \"github.com/googleapis/gapic-showcase/server/genproto\"\n\t\"google.golang.org/protobuf/encoding/prototext\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/types/known/durationpb\"\n\t\"google.golang.org/protobuf/types/known/fieldmaskpb\"\n\t\"google.golang.org/protobuf/types/known/timestamppb\"\n)\n\nfunc TestParseWellKnownType(t *testing.T) {\n\t// TODO: Test the other well-known types as the Showcase API\n\t// starts incorporating them.\n\tfor _, tst := range []struct {\n\t\tname  string\n\t\tmsg   protoreflect.Message\n\t\tfield protoreflect.Name\n\t\tvalue string\n\t\twant  proto.Message\n\t}{\n\t\t{\n\t\t\t\"google.protobuf.FieldMask\",\n\t\t\t(&genprotopb.UpdateUserRequest{}).ProtoReflect(),\n\t\t\t\"update_mask\",\n\t\t\t\"foo,bar,baz\",\n\t\t\t&fieldmaskpb.FieldMask{Paths: []string{\"foo\", \"bar\", \"baz\"}},\n\t\t},\n\n\t\t{\n\t\t\t\"google.protobuf.Timestamp\",\n\t\t\t(&genprotopb.User{}).ProtoReflect(),\n\t\t\t\"create_time\",\n\t\t\t\"2023-03-21T12:01:02.000000003Z\",\n\t\t\ttimestamppb.New(time.Date(2023, 03, 21, 12, 1, 2, 3, time.UTC)),\n\t\t},\n\n\t\t{\n\t\t\t\"google.protobuf.Duration\",\n\t\t\t(&genprotopb.Sequence_Response{}).ProtoReflect(),\n\t\t\t\"delay\",\n\t\t\t\"5s\",\n\t\t\tdurationpb.New(5 * time.Second),\n\t\t},\n\n\t\t{\n\t\t\t\"google.protobuf.FieldMask\",\n\t\t\t(&genprotopb.UpdateUserRequest{}).ProtoReflect(),\n\t\t\t\"update_mask\",\n\t\t\t\"\\\"foo,bar,baz\\\"\",\n\t\t\t&fieldmaskpb.FieldMask{Paths: []string{\"foo\", \"bar\", \"baz\"}},\n\t\t},\n\t} {\n\t\tfd := tst.msg.Descriptor().Fields().ByName(tst.field)\n\n\t\tgotp, err := parseWellKnownType(tst.msg, fd, tst.value)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"parsing %q led to error %s\", tst.value, err)\n\t\t\tcontinue\n\t\t}\n\t\tif gotp == nil {\n\t\t\tt.Errorf(\"expected non-nil value from parsing: %s\", tst.value)\n\t\t\tcontinue\n\t\t}\n\t\tgot := gotp.Message().Interface()\n\t\tif diff := cmp.Diff(got, tst.want, cmp.Comparer(proto.Equal)); diff != \"\" {\n\t\t\tt.Errorf(\"%s: got(-),want(+):\\n%s\", \"FieldMask\", diff)\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\nfunc TestPopulateOneFieldError(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tfield string\n\t\tvalue string\n\t}{\n\t\t// field path errors\n\n\t\t{\".fString\", \"hi\"},\n\t\t{\"fChild..fString\", \"hi\"},\n\t\t{\"fChild.\", \"hi\"},\n\t\t{\"fChild.x\", \"hi\"},\n\t\t{\"fChild.x.fString\", \"hi\"},\n\t\t{\"fChild.fString.fChild\", \"hi\"},\n\t\t{\"fChild.fChild\", \"hi\"},\n\n\t\t// parsing errors\n\n\t\t{\"fInt32\", \"hello\"},\n\t\t{\"fSint32\", \"hello\"},\n\t\t{\"fSfixed32\", \"hello\"},\n\t\t{\"fInt32\", \"2147483648\"},    // max int32 + 1\n\t\t{\"fSint32\", \"2147483648\"},   // max int32 + 1\n\t\t{\"fSfixed32\", \"2147483648\"}, // max int32 + 1\n\t\t{\"fInt32\", \"1.1\"},\n\t\t{\"fSint32\", \"1.1\"},\n\t\t{\"fSfixed32\", \"1.1\"},\n\n\t\t{\"fUint32\", \"hello\"},\n\t\t{\"fFixed32\", \"hello\"},\n\t\t{\"fUint32\", \"4294967296\"},  // max uint32 + 1\n\t\t{\"fFixed32\", \"4294967296\"}, // max uint32 + 1\n\t\t{\"fUint32\", \"1.1\"},\n\t\t{\"fFixed32\", \"1.1\"},\n\t\t{\"fUint32\", \"-1\"},\n\t\t{\"fFixed32\", \"-1\"},\n\n\t\t{\"fInt64\", \"hello\"},\n\t\t{\"fSint64\", \"hello\"},\n\t\t{\"fSfixed64\", \"hello\"},\n\t\t{\"fInt64\", \"9223372036854775808\"},    // max int64 + 1\n\t\t{\"fSint64\", \"9223372036854775808\"},   // max int64 + 1\n\t\t{\"fSfixed64\", \"9223372036854775808\"}, // max int64 + 1\n\t\t{\"fInt64\", \"1.1\"},\n\t\t{\"fSint64\", \"1.1\"},\n\t\t{\"fSfixed64\", \"1.1\"},\n\n\t\t{\"fUint64\", \"hello\"},\n\t\t{\"fFixed64\", \"hello\"},\n\t\t{\"fUint64\", \"18446744073709551616\"},  // max uint64 + 1\n\t\t{\"fFixed64\", \"18446744073709551616\"}, // max uint64 + 1\n\t\t{\"fUint64\", \"1.1\"},\n\t\t{\"fFixed64\", \"1.1\"},\n\t\t{\"fUint64\", \"-1\"},\n\t\t{\"fFixed64\", \"-1\"},\n\n\t\t{\"fFloat\", \"hello\"},\n\t\t{\"fDouble\", \"hello\"},\n\t\t{\"fFloat\", \"1e+39\"},   // exponent too large\n\t\t{\"fDouble\", \"1e+309\"}, // exponent too large\n\n\t\t{\"fBool\", \"hello\"},\n\t\t{\"fBool\", \"13\"},\n\n\t\t// wrong casing\n\t\t{\"f_string\", \"alphabet\"},\n\t\t{\"f_int32\", \"1\"},\n\t\t{\"f_sint32\", \"2\"},\n\t\t{\"f_sfixed32\", \"3\"},\n\t\t{\"f_uint32\", \"4\"},\n\t\t{\"f_fixed32\", \"5\"},\n\t\t{\"f_int64\", \"6\"},\n\t\t{\"f_sint64\", \"7\"},\n\t\t{\"f_sfixed64\", \"8\"},\n\t\t{\"f_uint64\", \"9\"},\n\t\t{\"f_fixed64\", \"10\"},\n\t\t{\"f_float\", \"11\"},\n\t\t{\"f_double\", \"12\"},\n\t\t{\"f_bool\", \"true\"},\n\t\t{\"f_bytes\", \"greetings\"},\n\t} {\n\t\tcomplianceData := &genprotopb.ComplianceData{}\n\t\terr := PopulateOneField(complianceData, testCase.field, []string{testCase.value})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"test case %d: did not get expected error for %q: %q\", idx, testCase.field, testCase.value)\n\t\t}\n\t}\n}\n\nfunc TestPopulateSingularFields(t *testing.T) {\n\n\tfor idx, testCase := range []struct {\n\t\tlabel           string\n\t\tfields          map[string]string\n\t\texpectError     bool\n\t\texpectProtoText string\n\t}{\n\t\t{\n\t\t\tlabel: \"scalar datatypes\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"fString\": \"alphabet\",\n\n\t\t\t\t\"fInt32\":    \"2147483647\", // max int32\n\t\t\t\t\"fSint32\":   \"2147483647\", // max int32\n\t\t\t\t\"fSfixed32\": \"2147483647\", // max int32\n\n\t\t\t\t\"fUint32\":  \"4294967295\", // max uint32\n\t\t\t\t\"fFixed32\": \"4294967295\", // max uint32\n\n\t\t\t\t\"fInt64\":    \"9223372036854775807\", // max int64\n\t\t\t\t\"fSint64\":   \"9223372036854775807\", // max int64\n\t\t\t\t\"fSfixed64\": \"9223372036854775807\", // max int64\n\n\t\t\t\t\"fUint64\":  \"18446744073709551615\", // max uint64\n\t\t\t\t\"fFixed64\": \"18446744073709551615\", // max uint64\n\n\t\t\t\t\"fFloat\":  \"3.40282346638528859811704183484516925440e+38\",   // max float32 (https://golang.org/pkg/math/#pkg-constants)\n\t\t\t\t\"fDouble\": \"1.797693134862315708145274237317043567981e+308\", // max float64\n\n\t\t\t\t\"fBool\": \"true\",\n\n\t\t\t\t\"fBytes\": \"greetings\",\n\t\t\t},\n\t\t\texpectProtoText: `f_string:\"alphabet\" f_int32:2147483647 f_sint32:2147483647 f_sfixed32:2147483647 f_uint32:4294967295 f_fixed32:4294967295 f_int64:9223372036854775807 f_sint64:9223372036854775807 f_sfixed64:9223372036854775807 f_uint64:18446744073709551615 f_fixed64:18446744073709551615 f_double:1.7976931348623157e+308 f_float:3.4028235e+38 f_bool:true f_bytes:\"greetings\"`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"nested messages\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"fString\":               \"alphabet\",\n\t\t\t\t\"fChild.fChild.fString\": \"lexicon\",\n\t\t\t\t\"fInt32\":                \"5\",\n\t\t\t\t\"fChild.fChild.fDouble\": \"53.47\",\n\t\t\t\t\"fChild.fChild.fBool\":   \"true\",\n\t\t\t\t\"fChild.fBool\":          \"true\",\n\t\t\t},\n\t\t\texpectProtoText: `f_child:{f_child:{f_string:\"lexicon\" f_bool:true f_double:53.47} f_bool:true} f_string:\"alphabet\" f_int32:5`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"presence/zero values\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"fString\": \"\",\n\n\t\t\t\t\"fInt32\":    \"0\",\n\t\t\t\t\"fSint32\":   \"0\",\n\t\t\t\t\"fSfixed32\": \"0\",\n\n\t\t\t\t\"fUint32\":  \"0\",\n\t\t\t\t\"fFixed32\": \"0\",\n\n\t\t\t\t\"fInt64\":    \"0\",\n\t\t\t\t\"fSint64\":   \"0\",\n\t\t\t\t\"fSfixed64\": \"0\",\n\n\t\t\t\t\"fUint64\":  \"0\",\n\t\t\t\t\"fFixed64\": \"0\",\n\n\t\t\t\t\"fFloat\":  \"0\",\n\t\t\t\t\"fDouble\": \"0\",\n\n\t\t\t\t\"fBool\": \"false\",\n\n\t\t\t\t\"fBytes\": \"\",\n\n\t\t\t\t\"pString\": \"\",\n\t\t\t\t\"pInt32\":  \"0\",\n\t\t\t\t\"pDouble\": \"0\",\n\t\t\t\t\"pBool\":   \"false\",\n\t\t\t},\n\t\t\texpectProtoText: `p_string:\"\"  p_int32:0  p_double:0  p_bool:false`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"presence/zero values in nested messages\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"fChild.fString\": \"\",\n\t\t\t\t\"fChild.fFloat\":  \"0\",\n\t\t\t\t\"fChild.fDouble\": \"0\",\n\t\t\t\t\"fChild.fBool\":   \"false\",\n\n\t\t\t\t\"fChild.pString\": \"\",\n\t\t\t\t\"fChild.pFloat\":  \"0\",\n\t\t\t\t\"fChild.pDouble\": \"0\",\n\t\t\t\t\"fChild.pBool\":   \"false\",\n\n\t\t\t\t\"pChild.fString\": \"\",\n\t\t\t\t\"pChild.fFloat\":  \"0\",\n\t\t\t\t\"pChild.fDouble\": \"0\",\n\t\t\t\t\"pChild.fBool\":   \"false\",\n\n\t\t\t\t\"pChild.pString\": \"\",\n\t\t\t\t\"pChild.pFloat\":  \"0\",\n\t\t\t\t\"pChild.pDouble\": \"0\",\n\t\t\t\t\"pChild.pBool\":   \"false\",\n\n\t\t\t\t\"fChild.fChild.fString\": \"\",\n\t\t\t\t\"fChild.fChild.fDouble\": \"0\",\n\t\t\t\t\"fChild.fChild.fBool\":   \"false\",\n\n\t\t\t\t\"fChild.pChild.fString\": \"\",\n\t\t\t\t\"fChild.pChild.fDouble\": \"0\",\n\t\t\t\t\"fChild.pChild.fBool\":   \"false\",\n\n\t\t\t\t\"pChild.fChild.fString\": \"\",\n\t\t\t\t\"pChild.fChild.fDouble\": \"0\",\n\t\t\t\t\"pChild.fChild.fBool\":   \"false\",\n\n\t\t\t\t\"pChild.pChild.fString\": \"\",\n\t\t\t\t\"pChild.pChild.fDouble\": \"0\",\n\t\t\t\t\"pChild.pChild.fBool\":   \"false\",\n\t\t\t},\n\t\t\texpectProtoText: `f_child:{f_child:{}  p_string:\"\"  p_float:0  p_double:0  p_bool:false  p_child:{}}  p_child:{f_child:{}  p_string:\"\"  p_float:0  p_double:0  p_bool:false  p_child:{}}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"default value only in nested message\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"fChild.fString\": \"\",\n\t\t\t},\n\t\t\texpectProtoText: `f_child:{}`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"default value only in optional nested message\",\n\t\t\tfields: map[string]string{\n\t\t\t\t\"pChild.fString\": \"\",\n\t\t\t},\n\t\t\texpectProtoText: `p_child:{}`,\n\t\t},\n\t} {\n\t\tcomplianceData := &genprotopb.ComplianceData{}\n\t\terr := PopulateSingularFields(complianceData, testCase.fields)\n\t\tif got, want := (err != nil), testCase.expectError; got != want {\n\t\t\tt.Errorf(\"test case %d[%q] error: got %v, want %v\", idx, testCase.label, err, want)\n\t\t\tcontinue\n\t\t}\n\t\tif testCase.expectError {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar expectProto genprotopb.ComplianceData\n\t\terr = prototext.Unmarshal([]byte(testCase.expectProtoText), &expectProto)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"test case %d[%q] unexpected error unmarshaling expected proto: %s\", idx, testCase.label, err)\n\t\t\tcontinue\n\t\t}\n\n\t\tif got, want := complianceData, &expectProto; !reflect.DeepEqual(got, want) {\n\t\t\tgotText, err := prototext.Marshal(got)\n\t\t\tif err != nil {\n\t\t\t\tgotText = []byte(\"<error marshalling in test>\")\n\t\t\t}\n\t\t\tt.Errorf(\"test case %d[%q] proto:\\n    got: %s\\n   want: %s\", idx, testCase.label, gotText, testCase.expectProtoText)\n\t\t}\n\n\t}\n}\n\nfunc TestPopulateFields(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tlabel           string\n\t\tfields          map[string][]string\n\t\texpectError     bool\n\t\texpectProtoText string\n\t}{\n\t\t{\n\t\t\tlabel: \"non-repeated fields\",\n\t\t\tfields: map[string][]string{\n\t\t\t\t\"fString\": []string{\"alphabet\"},\n\t\t\t},\n\t\t\texpectProtoText: `f_string:\"alphabet\"`,\n\t\t},\n\t\t{\n\t\t\tlabel: \"repeated fields\",\n\t\t\tfields: map[string][]string{\n\t\t\t\t\"fString\": []string{\"alphabet\", \"lexicon\"},\n\t\t\t},\n\t\t\t// TODO: Make Populate*Field*() work with repeated fields.\n\t\t\texpectError: true,\n\t\t},\n\t} {\n\t\tcomplianceData := &genprotopb.ComplianceData{}\n\t\terr := PopulateFields(complianceData, testCase.fields)\n\t\tif got, want := (err != nil), testCase.expectError; got != want {\n\t\t\tt.Errorf(\"test case %d[%q] error: got %v, want %v\", idx, testCase.label, err, want)\n\t\t\tcontinue\n\t\t}\n\t\tif testCase.expectError {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar expectProto genprotopb.ComplianceData\n\t\terr = prototext.Unmarshal([]byte(testCase.expectProtoText), &expectProto)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"test case %d[%q] unexpected error unmarshaling expected proto: %s\", idx, testCase.label, err)\n\t\t\tcontinue\n\t\t}\n\n\t\tif got, want := complianceData, &expectProto; !reflect.DeepEqual(got, want) {\n\t\t\tgotText, err := prototext.Marshal(got)\n\t\t\tif err != nil {\n\t\t\t\tgotText = []byte(\"<error marshalling in test>\")\n\t\t\t}\n\t\t\tt.Errorf(\"test case %d[%q] proto:\\n    got: %s\\n   want: %s\", idx, testCase.label, gotText, testCase.expectProtoText)\n\t\t}\n\n\t}\n}\n\nfunc TestParseBool(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tasString    string\n\t\texpectValue bool\n\t\texpectError bool\n\t}{\n\t\t{\"true\", true, false},\n\t\t{\"false\", false, false},\n\t\t{\"True\", false, true},\n\t\t{\"False\", false, true},\n\t\t{\"0\", false, true},\n\t\t{\"1\", false, true},\n\t} {\n\t\tval, err := parseBool(testCase.asString)\n\t\tif got, want := (err != nil), testCase.expectError; got != want {\n\t\t\tt.Errorf(\"test case %d[%q] error: got %v, want %v\", idx, testCase.asString, err, want)\n\t\t\tcontinue\n\t\t}\n\t\tif got, want := val, testCase.expectValue; got != want {\n\t\t\tt.Errorf(\"test case %d[%q] got: %v,   want: %v\", idx, testCase.asString, got, want)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/genrest/resttools/server_streamer.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nconst ServerStreamingChunkSize = 30\n\n// ServerStreamer implements REST server streaming functionality that can be called by streaming\n// RPCs to stream their responses over HTTP/JSON. The messages are encoded such that once the stream\n// is finished, the total payload represents a properly formed JSON array of objects. In order to\n// ensure this, users must call the End() method to terminate the stream properly, typically by\n// using `defer`.\ntype ServerStreamer struct {\n\tbuffer    bytes.Buffer // buffers the output to be chunked\n\tchunkSize int\n\n\toutput    io.Writer    // receives the actual output, flushed after each chunk\n\tflusher   http.Flusher // flushes the output to create the chunks\n\tmarshaler *protojson.MarshalOptions\n\tstarted   bool\n\tgrpc.ServerStream\n}\n\n// NewServerStreamer returns a ServerStreamer instance initialized to write to responseWriter. Users\n// must call the End() method to terminate the stream properly, typically by using `defer`. Note\n// that responseWriter must also be an http.Flusher. If chunkSize is positive, messages written to\n// this ServerStreamer are chunked-encoded into chunks of size chunkSize (except for the final\n// chunk, which could be smaller). If chunkSize is zero, each message is written into a single\n// chunk.\nfunc NewServerStreamer(responseWriter io.Writer, chunkSize int) (*ServerStreamer, error) {\n\tif responseWriter == nil {\n\t\treturn nil, fmt.Errorf(\"error: responseWriter provided is nil\")\n\t}\n\n\tflusher, ok := responseWriter.(http.Flusher)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"error: responseWriter provided does not implement http.Flusher\")\n\t}\n\n\tif chunkSize < 0 {\n\t\treturn nil, fmt.Errorf(\"error: chunkSize must be non-negative\")\n\t}\n\n\tstreamer := &ServerStreamer{\n\t\tchunkSize: chunkSize,\n\t\toutput:    responseWriter,\n\t\tflusher:   flusher,\n\t\tmarshaler: ToJSON(),\n\t}\n\n\treturn streamer, nil\n}\n\n// Send sends a `message` over the REST stream using chunked-encoding according to the constructor\n// chunkSize parameter.\nfunc (streamer *ServerStreamer) Send(message proto.Message) error {\n\tjson, err := streamer.marshaler.Marshal(message)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error json-encoding message: %s\", err.Error())\n\t}\n\n\treturn streamer.sendJSONArrayMessage(json)\n}\n\n// End terminates the REST stream by sending the trailing bytes (the closing bracket for the array).\nfunc (streamer *ServerStreamer) End() error {\n\tif !streamer.started {\n\t\treturn nil\n\t}\n\n\treturn streamer.sendAsChunks([]byte(\"]\"), true)\n}\n\n// Context is needed to satisfy grpc.ServerStream.\nfunc (streamer *ServerStreamer) Context() context.Context {\n\treturn context.Background()\n}\n\n// sendJSONArrayMessage buffers `message` and then flushes as appropriate so that the chunks written\n// to streamer.output are of size streamer.chunkSize. Each `message` is assumed to be a JSON object\n// delimited by curly braces, inasmuch as `message`s are separated by commas, the first `message` is\n// preceded by an opening square bracket, and End() will send the final closing square\n// bracket. Empty `messages` do not get written.\nfunc (streamer *ServerStreamer) sendJSONArrayMessage(message []byte) error {\n\tif len(message) == 0 {\n\t\treturn nil\n\t}\n\n\tvar prefix []byte\n\tswitch streamer.started {\n\tcase false:\n\t\tprefix = []byte(\"[\")\n\t\tstreamer.started = true\n\tcase true:\n\t\tprefix = []byte(\",\")\n\t}\n\n\treturn streamer.sendAsChunks(append(prefix, message...), false)\n}\n\n// sendAsChunks writes `content` to streamer.output and flushes streamer.output so that each flushed\n// chunk is of size streamer.chunkSize. If streamer.chunkSize is 0, all of `content` (and any\n// previous contents of streamer.buffer) is flushed as a single chunk. If forceFlush is true, this\n// function ensures all bytes in `content` are flushed, even if that results in a trailing chunk of\n// size less than streamer.chunkSize.\nfunc (streamer *ServerStreamer) sendAsChunks(content []byte, forceFlush bool) error {\n\t// we're writing in two places below, so we define a local function for conciseness.\n\twriteOneChunk := func(data []byte) error {\n\t\tif _, err := streamer.output.Write(data); err != nil {\n\t\t\treturn fmt.Errorf(\"error writing streamed http chunk: %s\\n  chunk: %q\", err.Error(), string(data))\n\t\t}\n\n\t\t// Flush() causes the chunk to be sent immediately, and chunked transfer encoding to\n\t\t// be set in the HTTP headers before the first chunk.\n\t\t// cf. https://stackoverflow.com/a/30603654\n\t\tstreamer.flusher.Flush()\n\t\treturn nil\n\t}\n\n\tif _, err := streamer.buffer.Write(content); err != nil {\n\t\treturn err\n\t}\n\n\tif streamer.chunkSize > 0 {\n\t\tfor streamer.buffer.Len() >= streamer.chunkSize {\n\t\t\tif err := writeOneChunk(streamer.buffer.Next(streamer.chunkSize)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif streamer.buffer.Len() == 0 {\n\t\t\t// reuse memory when possible\n\t\t\tstreamer.buffer.Reset()\n\t\t}\n\n\t}\n\n\tif streamer.chunkSize <= 0 || forceFlush {\n\t\tif err := writeOneChunk(streamer.buffer.Bytes()); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tstreamer.buffer.Reset()\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "util/genrest/resttools/server_streamer_test.go",
    "content": "// Copyright 2021 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//     https://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\npackage resttools\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"testing\"\n)\n\ntype wireBuffer struct {\n\tbytes.Buffer\n\tchunks []string\n}\n\nfunc (wb *wireBuffer) Flush() {\n\twb.chunks = append(wb.chunks, wb.String())\n\twb.Reset()\n}\n\nfunc TestServerStreamer(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tname                     string\n\t\tmessages                 []string\n\t\texpectedPerMessageChunks []string\n\t\tchunkSize                int\n\t\texpectedFixedSizeChunks  []string\n\t}{\n\t\t{\n\t\t\tname:     \"Single chunk\",\n\t\t\tmessages: []string{\"greetings\"},\n\t\t\texpectedPerMessageChunks: []string{\n\t\t\t\t\"[greetings\",\n\t\t\t\t\"]\",\n\t\t\t},\n\t\t\tchunkSize: 4,\n\t\t\texpectedFixedSizeChunks: []string{\n\t\t\t\t\"[gre\",\n\t\t\t\t\"etin\",\n\t\t\t\t\"gs]\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Two chunks\",\n\t\t\tmessages: []string{\"greetings\", \"  earthling\"},\n\t\t\texpectedPerMessageChunks: []string{\n\t\t\t\t\"[greetings\",\n\t\t\t\t\",  earthling\",\n\t\t\t\t\"]\",\n\t\t\t},\n\t\t\tchunkSize: 5,\n\t\t\texpectedFixedSizeChunks: []string{\n\t\t\t\t\"[gree\",\n\t\t\t\t\"tings\",\n\t\t\t\t\",  ea\",\n\t\t\t\t\"rthli\",\n\t\t\t\t\"ng]\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Many chunks\",\n\t\t\tmessages: []string{\"greetings\", \"  people\", \"of \", \"Earth\"},\n\t\t\texpectedPerMessageChunks: []string{\n\t\t\t\t\"[greetings\",\n\t\t\t\t\",  people\",\n\t\t\t\t\",of \",\n\t\t\t\t\",Earth\",\n\t\t\t\t\"]\",\n\t\t\t},\n\t\t\tchunkSize: 4,\n\t\t\texpectedFixedSizeChunks: []string{\n\t\t\t\t\"[gre\",\n\t\t\t\t\"etin\",\n\t\t\t\t\"gs, \",\n\t\t\t\t\" peo\",\n\t\t\t\t\"ple,\",\n\t\t\t\t\"of ,\",\n\t\t\t\t\"Eart\",\n\t\t\t\t\"h]\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:                     \"No chunks\",\n\t\t\tmessages:                 []string{},\n\t\t\texpectedPerMessageChunks: nil,\n\t\t\tchunkSize:                3,\n\t\t\texpectedFixedSizeChunks:  nil,\n\t\t},\n\t\t{\n\t\t\tname:                     \"Single empty chunk\",\n\t\t\tmessages:                 []string{\"\"},\n\t\t\texpectedPerMessageChunks: nil,\n\t\t\tchunkSize:                3,\n\t\t\texpectedFixedSizeChunks:  nil,\n\t\t},\n\t\t{\n\t\t\tname:     \"Intermediate empty chunk\",\n\t\t\tmessages: []string{\"greetings\", \"\", \"earthlings\"},\n\t\t\texpectedPerMessageChunks: []string{\n\t\t\t\t\"[greetings\",\n\t\t\t\t\",earthlings\",\n\t\t\t\t\"]\",\n\t\t\t},\n\t\t\tchunkSize: 4,\n\t\t\texpectedFixedSizeChunks: []string{\n\t\t\t\t\"[gre\",\n\t\t\t\t\"etin\",\n\t\t\t\t\"gs,e\",\n\t\t\t\t\"arth\",\n\t\t\t\t\"ling\",\n\t\t\t\t\"s]\",\n\t\t\t},\n\t\t},\n\t} {\n\t\tlabel := fmt.Sprintf(\"[%d:%s:per-message chunks]\", idx, testCase.name)\n\t\tstreamWithChunkSize(t, label, 0, testCase.messages, testCase.expectedPerMessageChunks)\n\t\tlabel = fmt.Sprintf(\"[%d:%s: chunk size %d]\", idx, testCase.name, testCase.chunkSize)\n\t\tstreamWithChunkSize(t, label, testCase.chunkSize, testCase.messages, testCase.expectedFixedSizeChunks)\n\n\t}\n}\n\nfunc streamWithChunkSize(t *testing.T, label string, chunkSize int, messages, expectedChunks []string) {\n\twire := &wireBuffer{}\n\tstreamer, err := NewServerStreamer(wire, chunkSize)\n\n\tif err != nil {\n\t\tt.Fatalf(\"%s: could not construct ServerStreamer: %s\", label, err)\n\t}\n\n\tfor msgIdx, msg := range messages {\n\t\tif err := streamer.sendJSONArrayMessage([]byte(msg)); err != nil {\n\t\t\tt.Errorf(\"%s: error sending message #%d (%q): %s\", label, msgIdx, msg, err)\n\t\t\tbreak\n\t\t}\n\t}\n\tif err := streamer.End(); err != nil {\n\t\tt.Errorf(\"%s: error ending stream: %s\", label, err)\n\t}\n\n\tif got, want := wire.chunks, expectedChunks; !reflect.DeepEqual(got, want) {\n\t\tt.Errorf(\"%s: did not received expected chunks\\n== got ===\\n%#v\\n== want ==\\n%#v\\n\",\n\t\t\tlabel, got, want)\n\t}\n\n}\n"
  },
  {
    "path": "util/genrest/resttools/systemparam.go",
    "content": "// Copyright 2022 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//     https://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\npackage resttools\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n)\n\n// SystemParameters encapsulates the system parameters recognized by Showcase. These are a subset of\n// Google's accepted system parameters described in\n// https://cloud.google.com/apis/docs/system-parameters.\ntype SystemParameters struct {\n\tEnumEncodingAsInt bool\n\tAPIVersion        string\n}\n\n// GetSystemParameters returns the SystemParameters encoded in request, and the query parameters in\n// the request's query string that are not themselves system parameters.\nfunc GetSystemParameters(request *http.Request) (systemParams *SystemParameters, queryParams map[string][]string, err error) {\n\treturn processQueryString(request.URL.RawQuery)\n}\n\n// processQueryString returns the SystemParameters encoded in queryString, and the query parameters in\n// queryString that are not themselves system parameters.\n//\n// Since we want GAPICs to be strict in what they emit, and Showcase helps guarantee that, this\n// function is strict in what it accepts:\n// - no more than one instance of the $alt system parameter\n// - $alt may be appear as \"$alt\" or \"alt\", always lower case\n// - the only possible values for $alt are \"json\" or \"json;enum-encoding=int\"; again, lower case\n// - the semicolon in \"json;enum-encoding=int\" must be URL escaped as \"%3B\" or \"%3b\"\n// - the equal sign in \"json;enum-encoding=int\" may or may not be URL-escaped\nfunc processQueryString(queryString string) (systemParams *SystemParameters, queryParams map[string][]string, err error) {\n\n\t// We parse the raw query string manually rather than relying on request.URL.Query() so that\n\t// we can error out in the case of malformed strings (e.g. unencoded ampersands), rather\n\t// than having them ignored with potentially incorrect results.\n\tqueryPairs, err := url.ParseQuery(queryString)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// TODO: Try removing this workaround when we update the Go version in the Showcase CI to\n\t// 1.17+. As of this writing, CI uses 1.16.3, and the tests fail\n\t// (https://github.com/googleapis/gapic-showcase/runs/6798834903?check_suite_focus=true#step:6:60)\n\t// without this explicit check. The tests pass without this workaround on local machines or in the Go\n\t// Playground (https://go.dev/play/p/ewyv5qj55an) using Go >=1.17\n\tif strings.Contains(queryString, \";\") {\n\t\treturn nil, nil, fmt.Errorf(\"found unescaped semicolon in query string %q\", queryString)\n\t}\n\n\tqueryParams = map[string][]string(queryPairs)\n\tsystemParams = &SystemParameters{}\n\tsawAltParam := false\n\tfor param, values := range queryPairs {\n\t\tswitch param {\n\t\tcase \"alt\", \"$alt\":\n\t\t\tfor _, val := range values {\n\t\t\t\tif sawAltParam {\n\t\t\t\t\treturn systemParams, queryParams, fmt.Errorf(\"multiple instances of $alt system parameter\")\n\t\t\t\t}\n\n\t\t\t\tswitch val {\n\t\t\t\tcase \"json\":\n\t\t\t\t\t// no op\n\t\t\t\tcase \"json;enum-encoding=int\": // already URL-decoded\n\t\t\t\t\tsystemParams.EnumEncodingAsInt = true\n\t\t\t\tdefault:\n\t\t\t\t\treturn systemParams, queryParams, fmt.Errorf(\"unhandled value %q for system parameter %q\", val, param)\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete(queryParams, param)\n\t\t\tsawAltParam = true\n\t\tcase \"apiVersion\", \"$apiVersion\":\n\t\t\tfor _, val := range values {\n\t\t\t\tif systemParams.APIVersion != \"\" {\n\t\t\t\t\treturn systemParams, queryParams, fmt.Errorf(\"multiple instances of $apiVersion system parameter\")\n\t\t\t\t}\n\t\t\t\tsystemParams.APIVersion = val\n\t\t\t}\n\t\t\tdelete(queryParams, param)\n\t\t}\n\t}\n\treturn systemParams, queryParams, nil\n}\n"
  },
  {
    "path": "util/genrest/resttools/systemparam_test.go",
    "content": "// Copyright 2022 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//     https://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\npackage resttools\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n)\n\nfunc TestProcessQueryString(t *testing.T) {\n\tfor idx, testCase := range []struct {\n\t\tqueryString string\n\t\twantSystem  *SystemParameters\n\t\twantParams  map[string][]string\n\t\twantError   bool\n\t}{\n\t\t{queryString: \"\"},\n\t\t{\n\t\t\tqueryString: \"foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo%3Dbar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo=bar\": {\"\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo%3Dbar=xyz\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo=bar\": {\"xyz\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24foo%3Dbar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$foo=bar\": {\"\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24foo%3Dbar=xyz\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$foo=bar\": {\"xyz\"},\n\t\t\t},\n\t\t},\n\n\t\t// system param incorrect\n\t\t{\n\t\t\tqueryString: \"%24alt%3Djson\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$alt=json\": {\"\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$ALT=JSON\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$ALT\": {\"JSON\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24ALT=JSON\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"$ALT\": {\"JSON\"},\n\t\t\t},\n\t\t},\n\n\t\t// system param by itself\n\t\t{queryString: \"alt=json\"},\n\t\t{queryString: \"$alt=json\"},\n\t\t{queryString: \"%24alt=json\"},\n\t\t{\n\t\t\tqueryString: \"alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"alt=json%3Benum-encoding%3Dint\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json%3Benum-encoding%3Dint\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24alt=json%3Benum-encoding%3Dint\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t},\n\n\t\t// system param+query params in front\n\t\t{\n\t\t\tqueryString: \"foo=bar&alt=json\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo=bar&$alt=json\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo=bar&%24alt=json\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo=bar&alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo=bar&$alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo=bar&%24alt=json%3Benum-encoding=int\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\n\t\t// system param+query params in rear\n\t\t{\n\t\t\tqueryString: \"alt=json&foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json&foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24alt=json&foo=bar\",\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"alt=json%3Benum-encoding=int&foo=bar\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json%3Benum-encoding=int&foo=bar\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"%24alt=json%3Benum-encoding=int&foo=bar\",\n\t\t\twantSystem:  &SystemParameters{EnumEncodingAsInt: true},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": {\"bar\"},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$apiVersion=v7_20260210\",\n\t\t\twantSystem:  &SystemParameters{APIVersion: \"v7_20260210\"},\n\t\t\twantParams:  map[string][]string{},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"alt=json%3Benum-encoding=int&apiVersion=v7_20260210\",\n\t\t\twantSystem: &SystemParameters{\n\t\t\t\tAPIVersion:        \"v7_20260210\",\n\t\t\t\tEnumEncodingAsInt: true,\n\t\t\t},\n\t\t\twantParams: map[string][]string{},\n\t\t},\n\t\t{\n\t\t\tqueryString: \"alt=json%3Benum-encoding=int&apiVersion=v7_20260210&foo=bar\",\n\t\t\twantSystem: &SystemParameters{\n\t\t\t\tAPIVersion:        \"v7_20260210\",\n\t\t\t\tEnumEncodingAsInt: true,\n\t\t\t},\n\t\t\twantParams: map[string][]string{\n\t\t\t\t\"foo\": []string{\"bar\"},\n\t\t\t},\n\t\t},\n\n\t\t// system param errors\n\t\t{\n\t\t\tqueryString: \"$alt=foo\",\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt\",\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=JSON\",\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json%3Benum-encoding=string\",\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json;enum-encoding=int\", // unencoded semicolon\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$alt=json%3Benum-encoding=INT\",\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"foo&$alt=json&bar&alt=json\", // repeated\n\t\t\twantError:   true,\n\t\t},\n\t\t{\n\t\t\tqueryString: \"$apiVersion=v8&apiVersion=v9\", // repeated\n\t\t\twantError:   true,\n\t\t},\n\t} {\n\t\tt.Run(fmt.Sprintf(\"[%2d %q]\", idx, testCase.queryString), func(t *testing.T) {\n\t\t\tsystemParams, queryParams, err := processQueryString(testCase.queryString)\n\n\t\t\tif got, want := (err != nil), testCase.wantError; got != want {\n\t\t\t\tt.Errorf(\"error condition not met: want error: %v, got error:%v\", testCase.wantError, err)\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\twantParams := testCase.wantParams\n\t\t\tif wantParams == nil {\n\t\t\t\twantParams = map[string][]string{}\n\t\t\t}\n\t\t\tif diff := cmp.Diff(queryParams, wantParams); diff != \"\" {\n\t\t\t\tt.Errorf(\"query params mismatch (+want, -got):\\n%s\", diff)\n\t\t\t}\n\t\t\twantSystem := testCase.wantSystem\n\t\t\tif wantSystem == nil {\n\t\t\t\twantSystem = &SystemParameters{}\n\t\t\t}\n\t\t\tif diff := cmp.Diff(systemParams, wantSystem); diff != \"\" {\n\t\t\t\tt.Errorf(\"system params mismatch (+want, -got):\\n%s\", diff)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "util/genrest/testdata/TestConstructServerStreamer.go.baseline",
    "content": "// Catalog_StreamAuthorsServer implements catalogpb.Catalog_StreamAuthorsServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Catalog_StreamAuthorsServer struct{\n   *resttools.ServerStreamer\n}\n\n // Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Catalog_StreamAuthorsServer) Send(response *responsepb.AuthorEntry) error {\n  return streamer.ServerStreamer.Send(response)\n}\n\n// Catalog_StreamTitlesServer implements catalogpb.Catalog_StreamTitlesServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Catalog_StreamTitlesServer struct{\n   *resttools.ServerStreamer\n}\n\n // Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Catalog_StreamTitlesServer) Send(response *responsepb.TitleEntry) error {\n  return streamer.ServerStreamer.Send(response)\n}\n\n// Media_StreamAudioServer implements mediapb.Media_StreamAudioServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Media_StreamAudioServer struct{\n   *resttools.ServerStreamer\n}\n\n // Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Media_StreamAudioServer) Send(response *responsepb.AudioEntry) error {\n  return streamer.ServerStreamer.Send(response)\n}\n\n// Media_StreamVideoServer implements mediapb.Media_StreamVideoServer to provide server-side streaming over REST, returning all the\n// individual responses as part of a long JSON list.\ntype Media_StreamVideoServer struct{\n   *resttools.ServerStreamer\n}\n\n // Send accumulates a response to be fetched later as part of response list returned over REST.\nfunc (streamer *Media_StreamVideoServer) Send(response *responsepb.VideoEntry) error {\n  return streamer.ServerStreamer.Send(response)\n}\n\n"
  },
  {
    "path": "version.go",
    "content": "// Copyright 2022 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//     https://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\npackage version\n\nimport (\n\t_ \"embed\"\n)\n\n// Version contains the current version of this project, as declared in the\n// version.txt file, for its tools to reference.\n//\n//go:embed version.txt\nvar Version string\n"
  },
  {
    "path": "version.txt",
    "content": "0.39.0\n"
  }
]