diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index c8cfc2578..a432bb227 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -22,8 +22,8 @@ jobs: codechange: "${{ steps.code-filter.outputs.codechange }}" protochange: "${{ steps.proto-filter.outputs.protochange }}" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36" # v3.0.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36" # v3.0.2 id: "code-filter" with: filters: | @@ -36,7 +36,7 @@ jobs: - "pkg/**" - "e2e/**" - "internal/**" - - uses: "dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36" # v3.0.2 + - uses: "dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36" # v3.0.2 id: "proto-filter" with: filters: | @@ -52,13 +52,13 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 with: username: "${{ env.DOCKERHUB_PUBLIC_USER }}" password: "${{ env.DOCKERHUB_PUBLIC_ACCESS_TOKEN }}" - - uses: "authzed/actions/go-build@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + - uses: "authzed/actions/go-build@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main - name: "Image tests" run: "go run mage.go test:image" @@ -69,12 +69,12 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Unit tests with coverage" run: "go run mage.go test:unitCover" - name: "Coverage" - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -87,8 +87,8 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Steelthread tests" run: "go run mage.go test:steelthread" @@ -99,16 +99,16 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 with: username: "${{ env.DOCKERHUB_PUBLIC_USER }}" password: "${{ env.DOCKERHUB_PUBLIC_ACCESS_TOKEN }}" - name: "Integration tests with coverage" run: "go run mage.go test:integrationCover" - name: "Coverage" - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -123,13 +123,13 @@ jobs: matrix: datastore: ["mysql", "spanner"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -142,7 +142,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -157,13 +157,13 @@ jobs: matrix: datastore: ["mysql", "spanner"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -176,7 +176,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -192,13 +192,13 @@ jobs: datastore: ["postgres", "pgbouncer"] pgversion: ["13.8", "14", "15", "16", "17"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -211,7 +211,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -227,13 +227,13 @@ jobs: datastore: ["postgres"] pgversion: ["13.8", "14", "15", "16", "17"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -246,7 +246,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -262,13 +262,13 @@ jobs: datastore: ["crdb"] crdbversion: ["24.3.6", "25.1.0", "25.2.0"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -281,7 +281,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -297,13 +297,13 @@ jobs: datastore: ["crdb"] crdbversion: ["24.3.6", "25.1.0", "25.2.0"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main if: | needs.paths-filter.outputs.codechange == 'true' - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 if: | needs.paths-filter.outputs.codechange == 'true' with: @@ -316,7 +316,7 @@ jobs: - name: "Coverage" if: | needs.paths-filter.outputs.codechange == 'true' - uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 + uses: "codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00" # v5.5.0 with: files: "./coverage.txt" token: "${{ secrets.CODECOV_TOKEN }}" @@ -329,8 +329,8 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main with: go-version-file: "e2e/go.mod" cache-dependency-path: "e2e/go.sum" @@ -348,7 +348,7 @@ jobs: working-directory: "e2e/newenemy" run: | go test -v -timeout 11m ./... - - uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02" # v4.6.2 + - uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02" # v4.6.2 if: "always()" # this upload step is really flaky, don't fail the job if it fails continue-on-error: true @@ -362,8 +362,8 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main with: go-version-file: "tools/analyzers/go.mod" cache-dependency-path: "tools/analyzers/go.sum" @@ -376,8 +376,8 @@ jobs: if: | needs.paths-filter.outputs.codechange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "WASM tests" run: "go run mage.go test:wasm" @@ -388,16 +388,16 @@ jobs: if: | needs.paths-filter.outputs.protochange == 'true' steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Generate Protos" run: "go run mage.go gen:proto" - - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main + - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main with: path: "" fixup-command: "go run mage.go gen:proto" - - uses: "bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99" # v1.5.0 - - uses: "bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba" # v1.1.4 TODO(miparnisari) deprecated, use buf-action + - uses: "bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99" # v1.5.0 + - uses: "bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba" # v1.1.4 TODO(miparnisari) deprecated, use buf-action if: "github.event_name == 'pull_request'" env: BUF_INPUT_HTTPS_USERNAME: "${{ github.actor }}" diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index bd8deb800..f9d3bc61e 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -14,7 +14,7 @@ on: # yamllint disable-line rule:truthy - "checks_requested" permissions: actions: "write" - contents: "read" # CLA signatures are stored in https://github.com/authzed/cla + contents: "read" # CLA signatures are stored in https://github.com/authzed/cla pull-requests: "write" statuses: "write" jobs: @@ -22,7 +22,7 @@ jobs: name: "Check Signature" runs-on: "depot-ubuntu-24.04-small" steps: - - uses: "authzed/actions/cla-check@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + - uses: "authzed/actions/cla-check@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main with: github_token: "${{ secrets.GITHUB_TOKEN }}" cla_assistant_token: "${{ secrets.CLA_ASSISTANT_ACCESS_TOKEN }}" diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 6e4dce060..936d16288 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -13,7 +13,7 @@ jobs: permissions: pull-requests: "write" steps: - - uses: "actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9" # v5.0.0 + - uses: "actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9" # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 88805f259..dbc4f456c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -17,10 +17,10 @@ jobs: name: "License Check" runs-on: "depot-ubuntu-24.04-small" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Check Licenses" - uses: "authzed/actions/go-license-check@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + uses: "authzed/actions/go-license-check@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main with: ignore: "buf.build" # Has no license information @@ -28,11 +28,11 @@ jobs: name: "Lint Go" runs-on: "depot-ubuntu-24.04-4" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Lint Go" run: "go run mage.go lint:go" - - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main + - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main with: path: "" fixup-command: "go run mage.go lint:go" @@ -41,11 +41,11 @@ jobs: name: "Lint YAML & Markdown" runs-on: "depot-ubuntu-24.04-small" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Lint Everything Else" run: "go run mage.go lint:extra" - - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main + - uses: "chainguard-dev/actions/nodiff@3caedd3784c809ba873cbb8c6a12e2bc6bf6ab09" # main with: path: "" fixup-command: "go run mage.go lint:extra" @@ -56,12 +56,12 @@ jobs: if: "github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'edited')" steps: - name: "Checkout repository" - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: fetch-depth: 0 - name: "Set up Python" - uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # v5.6.0 + uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # v5.6.0 with: python-version: "3.11" diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index cf3a5fe56..cf16deb66 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -11,25 +11,25 @@ jobs: runs-on: "depot-ubuntu-24.04-4" permissions: contents: "write" - packages: "write" # publish to GHCR + packages: "write" # publish to GHCR steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: fetch-depth: 0 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Install snapcraft" run: | sudo snap install snapcraft --channel=8.x/stable --classic mkdir -p $HOME/.cache/snapcraft/download mkdir -p $HOME/.cache/snapcraft/stage-packages - - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main with: quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" github_token: "${{ secrets.GITHUB_TOKEN }}" dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" - - uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" # v3.6.0 - - uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 - - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 + - uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" # v3.6.0 + - uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 + - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 with: distribution: "goreleaser-pro" version: "2.11.1" diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index ce7358be4..afcf60b37 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -11,22 +11,22 @@ jobs: runs-on: "windows-latest" permissions: contents: "write" - packages: "write" # publish to GHCR + packages: "write" # publish to GHCR steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: fetch-depth: 0 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "nowsprinting/check-version-format-action@c7180d5aa53d69af70c364c047482fc71e133f55" # v4.0.6 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "nowsprinting/check-version-format-action@c7180d5aa53d69af70c364c047482fc71e133f55" # v4.0.6 id: "version" with: prefix: "v" - - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main with: quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" github_token: "${{ secrets.GITHUB_TOKEN }}" dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" - - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 + - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 with: distribution: "goreleaser-pro" # NOTE: keep in sync with goreleaser version in other job. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3ab89c395..6f0919db5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,13 +12,13 @@ jobs: runs-on: "depot-ubuntu-24.04-4" permissions: contents: "write" - packages: "write" # publish to GHCR + packages: "write" # publish to GHCR steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: fetch-depth: 0 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "nowsprinting/check-version-format-action@c7180d5aa53d69af70c364c047482fc71e133f55" # v4.0.6 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "nowsprinting/check-version-format-action@c7180d5aa53d69af70c364c047482fc71e133f55" # v4.0.6 id: "version" with: prefix: "v" @@ -31,14 +31,14 @@ jobs: sudo snap install snapcraft --channel=8.x/stable --classic mkdir -p $HOME/.cache/snapcraft/download mkdir -p $HOME/.cache/snapcraft/stage-packages - - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main + - uses: "authzed/actions/docker-login@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main with: quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" github_token: "${{ secrets.GITHUB_TOKEN }}" dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" - - uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" # v3.6.0 - - uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 - - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 + - uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" # v3.6.0 + - uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 + - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 with: distribution: "goreleaser-pro" # NOTE: keep in sync with goreleaser version in other job. @@ -53,7 +53,7 @@ jobs: SNAPCRAFT_STORE_CREDENTIALS: "${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}" - name: "Notify Slack of goreleaser status" if: "always()" - uses: "slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a" # v2.1.1 + uses: "slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a" # v2.1.1 with: webhook: "${{ secrets.SLACK_WEBHOOK_URL }}" webhook-type: "incoming-webhook" diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index a329d7b7a..942f920ad 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -35,15 +35,15 @@ jobs: language: ["go"] steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "authzed/actions/codeql@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main" + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/codeql@11667c9b2e8b3649ad2af4d788e57d18f8e8eaf1" # main" trivy: name: "Analyze Code and Docker Image with Trivvy" runs-on: "depot-ubuntu-24.04" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 # to fetch all history for all branches and tags. Refer here to learn which commit $GITHUB_SHA @@ -52,8 +52,8 @@ jobs: # this is used so goreleaser generates the right version out of the tags, which we need so that # trivy does not flag an old SpiceDB version fetch-depth: 0 - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1" # v3.5.0 with: username: "${{ env.DOCKERHUB_PUBLIC_USER }}" password: "${{ env.DOCKERHUB_PUBLIC_ACCESS_TOKEN }}" @@ -62,7 +62,7 @@ jobs: sudo snap install snapcraft --channel=8.x/stable --classic mkdir -p $HOME/.cache/snapcraft/download mkdir -p $HOME/.cache/snapcraft/stage-packages - - uses: "aquasecurity/trivy-action@f9424c10c36e288d5fa79bd3dfd1aeb2d6eae808" # master + - uses: "aquasecurity/trivy-action@f9424c10c36e288d5fa79bd3dfd1aeb2d6eae808" # master with: scan-type: "fs" ignore-unfixed: true @@ -72,7 +72,7 @@ jobs: env: TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db" TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db" - - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 + - uses: "goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a" # v6.4.0 id: "goreleaser" with: distribution: "goreleaser-pro" diff --git a/.github/workflows/wasm.yaml b/.github/workflows/wasm.yaml index 3cf179cbb..959981e90 100644 --- a/.github/workflows/wasm.yaml +++ b/.github/workflows/wasm.yaml @@ -12,13 +12,13 @@ jobs: permissions: contents: "write" steps: - - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 + - uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2 with: ref: "${{ env.GITHUB_SHA }}" - - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main + - uses: "authzed/actions/setup-go@f00cad69713a135d0b55c16bae64171367f319d5" # main - name: "Build WASM" run: "go run mage.go build:wasm" - - uses: "shogo82148/actions-upload-release-asset@e6cd4579c50a5d0eb50ca05d0d597daafca8cebb" # v1.9.0 + - uses: "shogo82148/actions-upload-release-asset@e6cd4579c50a5d0eb50ca05d0d597daafca8cebb" # v1.9.0 with: upload_url: "${{ github.event.release.upload_url }}" asset_path: "dist/*" diff --git a/.golangci.yaml b/.golangci.yaml index 7f6144f1c..ba620c8f3 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -10,10 +10,10 @@ linters: - "errcheck" - "errname" - "errorlint" -# - "gocritic" TODO: fix issues + # - "gocritic" TODO: fix issues - "goprintffuncname" - "gosec" -# - "govet" TODO: fix issues + # - "govet" TODO: fix issues - "importas" - "ineffassign" - "makezero" @@ -25,7 +25,7 @@ linters: - "spancheck" - "staticcheck" - "tagalign" -# - "testifylint" TODO: fix issues + # - "testifylint" TODO: fix issues - "tparallel" - "unconvert" - "usetesting" diff --git a/buf.gen.yaml b/buf.gen.yaml old mode 100755 new mode 100644 index 4051a631f..d762cd113 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,29 +1,26 @@ -#!/usr/bin/env -S buf generate -o pkg/proto proto/internal --template --- -version: 'v1' +version: "v2" managed: enabled: true - go_package_prefix: - default: 'github.com/authzed/spicedb/pkg/proto' - except: - - 'buf.build/envoyproxy/protoc-gen-validate' - - 'buf.build/authzed/api' - - 'buf.build/googleapis/googleapis' + disable: + - file_option: "go_package" + module: "buf.build/authzed/api" + - file_option: "go_package" + module: "buf.build/googleapis/googleapis" + - file_option: "go_package" + module: "buf.build/bufbuild/protovalidate" + override: + - file_option: "go_package_prefix" + value: "github.com/authzed/spicedb/pkg/proto" plugins: - - name: 'go' - path: ["go", "run", "google.golang.org/protobuf/cmd/protoc-gen-go"] - out: '.' - opt: 'paths=source_relative' - - name: 'go-grpc' - out: '.' - path: ["go", "run", "google.golang.org/grpc/cmd/protoc-gen-go-grpc"] - opt: 'paths=source_relative' - - name: 'go-vtproto' - path: ["go", "run", "github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto"] - out: '.' - # To generate pooling methods, you must add an additional `pool=fully/qualified.ProtoMessageType` - opt: 'paths=source_relative,features=marshal+unmarshal+size+clone+pool+equal' - - name: 'validate' - path: ["go", "run", "github.com/envoyproxy/protoc-gen-validate"] - out: '.' - opt: 'paths=source_relative,lang=go' + - remote: "buf.build/protocolbuffers/go:v1.36.10" + out: "pkg/proto" + opt: "paths=source_relative" + - remote: "buf.build/grpc/go:v1.5.1" + out: "pkg/proto" + opt: "paths=source_relative" + # NOTE: we use the local vs remote here because we use a more recent version of vtproto than is available + # in the buf registry. + - local: ["go", "run", "github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto"] + out: 'pkg/proto' + opt: "paths=source_relative,features=marshal+unmarshal+size+clone+pool+equal" diff --git a/buf.lock b/buf.lock new file mode 100644 index 000000000..f3a098c5b --- /dev/null +++ b/buf.lock @@ -0,0 +1,18 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/authzed/api + commit: 53f3e981ed3346bab8c050c597f74602 + digest: b5:fb42f996d63c02edd4d890058000bae6a6fc5a07b984bd8f8544a203a295506254170a89dfad32f973190753f7f8f0b9b45edab9c13e5f5485e293933f26f014 + - name: buf.build/bufbuild/protovalidate + commit: 52f32327d4b045a79293a6ad4e7e1236 + digest: b5:cbabc98d4b7b7b0447c9b15f68eeb8a7a44ef8516cb386ac5f66e7fd4062cd6723ed3f452ad8c384b851f79e33d26e7f8a94e2b807282b3def1cd966c7eace97 + - name: buf.build/envoyproxy/protoc-gen-validate + commit: 45685e052c7e406b9fbd441fc7a568a5 + digest: b5:63939effe0c64a94cd3151770b73007e43c9aeff31dcb24737fb11750dcaaca99338df3c1e5513828a685c743712e59ce283e046c27725e96928d200492bb6ec + - name: buf.build/googleapis/googleapis + commit: 711e289f6a384c4caeebaff7c6931ade + digest: b5:968b318852fd6a5275af38047f71727d2406fb4a401912069359cd5551ee22fe4397d0e397d5e4a952eb4c96c467b82bd3c0a564fb9a48d7dfe668e4c0047c61 + - name: buf.build/grpc-ecosystem/grpc-gateway + commit: bc28b723cd774c32b6fbc77621518765 + digest: b5:a613f827fa6ff35a4f5e87e80e35ac6b35e5792cc9c5a658351072777d88c6d4df785a0c14889090db11667cf5463d122c7193b3719c7861d3e5747c22ce1381 diff --git a/buf.work.yaml b/buf.work.yaml deleted file mode 100644 index db99cdb63..000000000 --- a/buf.work.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -version: "v1" -directories: - - "proto/internal" diff --git a/proto/internal/buf.yaml b/buf.yaml similarity index 56% rename from proto/internal/buf.yaml rename to buf.yaml index 507a133b9..d6698714d 100644 --- a/proto/internal/buf.yaml +++ b/buf.yaml @@ -1,8 +1,10 @@ --- -version: "v1" +version: "v2" +modules: + - path: "proto/internal" deps: - - "buf.build/envoyproxy/protoc-gen-validate:bb405eae115246f0b5ccf8997136e3d8" - "buf.build/authzed/api:53f3e981ed3346bab8c050c597f74602" + - "buf.build/bufbuild/protovalidate:v1.0.0" - "buf.build/googleapis/googleapis:4d230ddc6b6d28ad7d2503926a97c6f7fa15483d" lint: except: @@ -10,10 +12,13 @@ lint: - "ENUM_ZERO_VALUE_SUFFIX" ignore_only: FIELD_LOWER_SNAKE_CASE: - - "core/v1/core.proto" # TODO: Remove after v0 api removed + - "proto/internal/core/v1/core.proto" + disallow_comment_ignores: true breaking: use: - "WIRE" + except: + - "FIELD_SAME_DEFAULT" ignore_only: FIELD_WIRE_COMPATIBLE_TYPE: - - "dispatch/v1/dispatch.proto" # TODO: Remove after core v1 is merged + - "proto/internal/dispatch/v1/dispatch.proto" diff --git a/cmd/spicedb/serve_integration_test.go b/cmd/spicedb/serve_integration_test.go index f8e9840e6..63db6b822 100644 --- a/cmd/spicedb/serve_integration_test.go +++ b/cmd/spicedb/serve_integration_test.go @@ -10,8 +10,6 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" - "github.com/authzed/grpcutil" "github.com/google/uuid" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" @@ -22,6 +20,9 @@ import ( healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/status" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/grpcutil" + testdatastore "github.com/authzed/spicedb/internal/testserver/datastore" "github.com/authzed/spicedb/pkg/datastore" ) diff --git a/cmd/spicedb/servetesting_integration_test.go b/cmd/spicedb/servetesting_integration_test.go index 6a36a0cd2..eed501e62 100644 --- a/cmd/spicedb/servetesting_integration_test.go +++ b/cmd/spicedb/servetesting_integration_test.go @@ -13,8 +13,6 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" - "github.com/authzed/grpcutil" "github.com/google/uuid" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" @@ -25,6 +23,9 @@ import ( healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/status" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/grpcutil" + "github.com/authzed/spicedb/pkg/tuple" ) diff --git a/cmd/spicedb/servetesting_race_test.go b/cmd/spicedb/servetesting_race_test.go index ce9303c04..3550aedd9 100644 --- a/cmd/spicedb/servetesting_race_test.go +++ b/cmd/spicedb/servetesting_race_test.go @@ -12,7 +12,6 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/google/uuid" "github.com/ory/dockertest/v3" "github.com/stretchr/testify/assert" @@ -20,6 +19,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" healthpb "google.golang.org/grpc/health/grpc_health_v1" + + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" ) // Based on a test originally written by https://github.com/wscalf diff --git a/codecov.yaml b/codecov.yaml index 0c1511570..8e9caf25a 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,3 +1,4 @@ +--- ignore: - "**/zz_*.go" - "**/*.pb.go" diff --git a/e2e/client.go b/e2e/client.go index 11add2ef9..829503588 100644 --- a/e2e/client.go +++ b/e2e/client.go @@ -1,8 +1,9 @@ package e2e import ( - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "google.golang.org/grpc" + + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" ) // Client holds versioned clients to spicedb that all share the same connection diff --git a/e2e/go.mod b/e2e/go.mod index 0ba786981..56178839e 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -21,8 +21,10 @@ require ( ) require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 // indirect + buf.build/go/protovalidate v1.0.0 // indirect + cel.dev/expr v0.24.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/authzed/cel-go v0.20.2 // indirect github.com/aws/aws-sdk-go-v2 v1.36.4 // indirect github.com/aws/aws-sdk-go-v2/config v1.29.16 // indirect @@ -51,6 +53,7 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zerologr v1.2.3 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect @@ -63,7 +66,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rs/zerolog v1.34.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/stoewer/go-strcase v1.3.0 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 589cecc6b..df5fd319e 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1,5 +1,7 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1 h1:sjY1k5uszbIZfv11HO2keV4SLhNA47SabPO886v7Rvo= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1/go.mod h1:8EQ5GzyGJQ5tEIwMSxCl8RKJYsjCpAwkdcENoioXT6g= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 h1:DQLS/rRxLHuugVzjJU5AvOwD57pdFl9he/0O7e5P294= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1/go.mod h1:aY3zbkNan5F+cGm9lITDP6oxJIwu0dn9KjJuJjWaHkg= +buf.build/go/protovalidate v1.0.0 h1:IAG1etULddAy93fiBsFVhpj7es5zL53AfB/79CVGtyY= +buf.build/go/protovalidate v1.0.0/go.mod h1:KQmEUrcQuC99hAw+juzOEAmILScQiKBP1Oc36vvCLW8= cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cel.dev/expr v0.16.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= @@ -1369,8 +1371,8 @@ github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW5 github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= @@ -1607,6 +1609,8 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -1854,8 +1858,9 @@ github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcD github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= -github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/e2e/newenemy/newenemy_test.go b/e2e/newenemy/newenemy_test.go index e2352367d..24ae51de6 100644 --- a/e2e/newenemy/newenemy_test.go +++ b/e2e/newenemy/newenemy_test.go @@ -15,20 +15,20 @@ import ( "text/template" "time" - "github.com/authzed/authzed-go/pkg/requestmeta" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" "github.com/stretchr/testify/require" "google.golang.org/grpc/metadata" - "github.com/authzed/spicedb/internal/datastore/revisions" - "github.com/authzed/spicedb/pkg/zedtoken" + "github.com/authzed/authzed-go/pkg/requestmeta" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/authzed/spicedb/e2e" "github.com/authzed/spicedb/e2e/cockroach" "github.com/authzed/spicedb/e2e/generator" "github.com/authzed/spicedb/e2e/spice" + "github.com/authzed/spicedb/internal/datastore/revisions" + "github.com/authzed/spicedb/pkg/zedtoken" ) type NamespaceNames struct { @@ -277,7 +277,7 @@ func attemptFnsForProbeFns(vulnerableMax int, vulnerableProbe, protectedProbe pr return } } - return + return vulnerableFn, protectedFn } // attemptFn runs a check and returns how many iterations it took to fail @@ -322,7 +322,7 @@ func iterationsForHighConfidence(samples []int) (iterations int) { if *maxIterations != 0 && *maxIterations < iterations { iterations = *maxIterations } - return + return iterations } var goodNs *NamespaceNames @@ -534,7 +534,7 @@ func generateSchemaData(n int, batchSize int) (data []SchemaData) { } data = append(data, schema) } - return + return data } func generateTuples(names NamespaceNames, n int, objIDGenerator *generator.UniqueGenerator) (allowlists []*v1.RelationshipUpdate, blocklists []*v1.RelationshipUpdate, allowusers []*v1.RelationshipUpdate, blockusers []*v1.RelationshipUpdate) { @@ -611,7 +611,7 @@ func generateTuples(names NamespaceNames, n int, objIDGenerator *generator.Uniqu Relationship: tupleBlockuser, }) } - return + return allowlists, blocklists, allowusers, blockusers } // getLeaderNode returns the node with the lease leader for the range containing the tuple diff --git a/e2e/spice/spicedb.go b/e2e/spice/spicedb.go index 7c407a6af..b1d7af787 100644 --- a/e2e/spice/spicedb.go +++ b/e2e/spice/spicedb.go @@ -8,10 +8,11 @@ import ( "strconv" "time" - "github.com/authzed/grpcutil" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "github.com/authzed/grpcutil" + "github.com/authzed/spicedb/e2e" "github.com/authzed/spicedb/e2e/cockroach" "github.com/authzed/spicedb/internal/grpchelpers" diff --git a/go.mod b/go.mod index 5f559fe7b..85854bc6c 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,9 @@ replace github.com/influxdata/tdigest => github.com/hdrodz/tdigest v0.0.0-202304 replace github.com/ecordell/optgen => github.com/ecordell/optgen v0.0.10-0.20230609182709-018141bf9698 require ( + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.36.6-20250320161912-af2aab87b1b3.1 + buf.build/go/protovalidate v1.0.0 cloud.google.com/go/spanner v1.85.0 contrib.go.opencensus.io/exporter/prometheus v0.4.2 github.com/IBM/pgxpoolprometheus v1.1.2 @@ -49,7 +51,6 @@ require ( github.com/dustin/go-humanize v1.0.1 github.com/ecordell/optgen v0.1.0 github.com/emirpasic/gods v1.18.1 - github.com/envoyproxy/protoc-gen-validate v1.2.1 github.com/ettle/strcase v0.2.0 github.com/exaring/otelpgx v0.9.3 github.com/fatih/color v1.18.0 @@ -140,7 +141,6 @@ tool ( require ( 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect 4d63.com/gochecknoglobals v0.2.2 // indirect - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1 // indirect buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.36.6-20240617172848-e1dbca2775a7.1 // indirect cel.dev/expr v0.24.0 // indirect cloud.google.com/go v0.122.0 // indirect @@ -177,7 +177,7 @@ require ( github.com/alfatraining/structtag v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/alingse/nilnesserr v0.2.0 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect github.com/ashanbrown/makezero/v2 v2.0.1 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.69 // indirect @@ -227,6 +227,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/firefart/nonamedreturns v1.0.6 // indirect @@ -266,6 +267,7 @@ require ( github.com/golangci/revgrep v0.8.0 // indirect github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/gnostic-models v0.6.9 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -381,7 +383,7 @@ require ( github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect - github.com/stoewer/go-strcase v1.3.0 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tdakkota/asciicheck v0.4.1 // indirect diff --git a/go.sum b/go.sum index 87f7b1287..933643920 100644 --- a/go.sum +++ b/go.sum @@ -2,12 +2,14 @@ 4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1 h1:sjY1k5uszbIZfv11HO2keV4SLhNA47SabPO886v7Rvo= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.8-20250717185734-6c6e0d3c608e.1/go.mod h1:8EQ5GzyGJQ5tEIwMSxCl8RKJYsjCpAwkdcENoioXT6g= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 h1:DQLS/rRxLHuugVzjJU5AvOwD57pdFl9he/0O7e5P294= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1/go.mod h1:aY3zbkNan5F+cGm9lITDP6oxJIwu0dn9KjJuJjWaHkg= buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.36.6-20240617172848-e1dbca2775a7.1 h1:DHj/fDjM+Ij3KR1IpFs6WdNcCtD4+Th3tEWyx3Xgs14= buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.36.6-20240617172848-e1dbca2775a7.1/go.mod h1:iCb72C37pWGhjKDeq9IbcMqVJAnXXHs5tEjiePfouhk= buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.36.6-20250320161912-af2aab87b1b3.1 h1:EuFqAB/kfs/jh9aUGcvBjcxtU89wnXwsuQfcwGX1rhE= buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.36.6-20250320161912-af2aab87b1b3.1/go.mod h1:ea/VK8bRnfyOuhQRzIk5hGigCqbZdzI8SHNLC3IyABU= +buf.build/go/protovalidate v1.0.0 h1:IAG1etULddAy93fiBsFVhpj7es5zL53AfB/79CVGtyY= +buf.build/go/protovalidate v1.0.0/go.mod h1:KQmEUrcQuC99hAw+juzOEAmILScQiKBP1Oc36vvCLW8= cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cel.dev/expr v0.16.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= @@ -1438,8 +1440,8 @@ github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymV github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= @@ -1843,6 +1845,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= @@ -2405,8 +2409,9 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4= github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+E80QIyPnBVQbYZyv20Jfk= -github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/internal/datastore/common/schema.go b/internal/datastore/common/schema.go index 6e44d0ba3..3d8e84153 100644 --- a/internal/datastore/common/schema.go +++ b/internal/datastore/common/schema.go @@ -79,7 +79,7 @@ func (si SchemaInformation) expectedIndexesForShape(shape queryshape.Shape) opti } func (si SchemaInformation) debugValidate() { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { si.mustValidate() return true }, "SchemaInformation failed to validate") diff --git a/internal/datastore/common/sql.go b/internal/datastore/common/sql.go index 12fbbab4e..f91b33699 100644 --- a/internal/datastore/common/sql.go +++ b/internal/datastore/common/sql.go @@ -191,7 +191,7 @@ func (sqf SchemaQueryFilterer) WithIndexingHint(indexingHint IndexingHint) Schem } func (sqf SchemaQueryFilterer) UnderlyingQueryBuilder() sq.SelectBuilder { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return sqf.isCustomQuery }, "UnderlyingQueryBuilder should only be called on custom queries") return sqf.queryBuilderWithMaybeExpirationFilter(false) @@ -302,7 +302,7 @@ func (sqf SchemaQueryFilterer) MustAfter(cursor options.Cursor, order options.So } func (sqf SchemaQueryFilterer) After(cursor options.Cursor, order options.SortOrder) (SchemaQueryFilterer, error) { - spiceerrors.DebugAssertNotNil(cursor, "cursor cannot be nil") + spiceerrors.DebugAssertNotNilf(cursor, "cursor cannot be nil") // NOTE: The ordering of these columns can affect query performance, be aware when changing. columnsAndValues, err := columnsAndValuesForSort(order, sqf.schema, cursor) @@ -424,7 +424,7 @@ func (sqf SchemaQueryFilterer) MustFilterWithResourceIDPrefix(prefix string) Sch // FilterToResourceIDs returns a new SchemaQueryFilterer that is limited to resources with any of the // specified IDs. func (sqf SchemaQueryFilterer) FilterToResourceIDs(resourceIds []string) (SchemaQueryFilterer, error) { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return len(resourceIds) <= int(sqf.filterMaximumIDCount) }, "cannot have more than %d resource IDs in a single filter", sqf.filterMaximumIDCount) @@ -511,7 +511,7 @@ func (sqf SchemaQueryFilterer) FilterWithRelationshipsFilter(filter datastore.Re switch filter.OptionalCaveatNameFilter.Option { case datastore.CaveatFilterOptionHasMatchingCaveat: - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return filter.OptionalCaveatNameFilter.CaveatName != "" }, "caveat name must be set when using HasMatchingCaveat") csqf = csqf.FilterWithCaveatName(filter.OptionalCaveatNameFilter.CaveatName) @@ -529,7 +529,7 @@ func (sqf SchemaQueryFilterer) FilterWithRelationshipsFilter(filter datastore.Re switch filter.OptionalExpirationOption { case datastore.ExpirationFilterOptionHasExpiration: csqf.queryBuilder = csqf.queryBuilder.Where(sq.NotEq{csqf.schema.ColExpiration: nil}) - spiceerrors.DebugAssert(func() bool { return !sqf.schema.ExpirationDisabled }, "expiration filter requested but schema does not support expiration") + spiceerrors.DebugAssertf(func() bool { return !sqf.schema.ExpirationDisabled }, "expiration filter requested but schema does not support expiration") case datastore.ExpirationFilterOptionNoExpiration: csqf.queryBuilder = csqf.queryBuilder.Where(sq.Eq{csqf.schema.ColExpiration: nil}) } @@ -570,7 +570,7 @@ func (sqf SchemaQueryFilterer) FilterWithSubjectsSelectors(selectors ...datastor } if len(selector.OptionalSubjectIds) > 0 { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return len(selector.OptionalSubjectIds) <= int(sqf.filterMaximumIDCount) }, "cannot have more than %d subject IDs in a single filter", sqf.filterMaximumIDCount) diff --git a/internal/datastore/crdb/crdb_test.go b/internal/datastore/crdb/crdb_test.go index 5db3f7147..3fad113b2 100644 --- a/internal/datastore/crdb/crdb_test.go +++ b/internal/datastore/crdb/crdb_test.go @@ -473,7 +473,7 @@ func newCRDBWithUser(t *testing.T, pool *dockertest.Pool) (adminConn *pgx.Conn, unprivileged: fmt.Sprintf("postgresql://unprivileged:testpass2@localhost:%[1]s/testspicedb?sslmode=require&sslrootcert=%[2]s/ca.crt", port, certDir), } - return + return adminConn, connStrings } func RelationshipIntegrityInfoTest(t *testing.T, tester test.DatastoreTester) { diff --git a/internal/datastore/crdb/reader.go b/internal/datastore/crdb/reader.go index 17f8f80cb..6793ce586 100644 --- a/internal/datastore/crdb/reader.go +++ b/internal/datastore/crdb/reader.go @@ -77,7 +77,7 @@ func (cr *crdbReader) fromSuffix() string { } func (cr *crdbReader) assertHasExpectedAsOfSystemTime(sql string) { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { if cr.atSpecificRevision == "" { return !strings.Contains(sql, "AS OF SYSTEM TIME") } else { diff --git a/internal/datastore/mysql/gc.go b/internal/datastore/mysql/gc.go index e847f27a8..3b92ebec0 100644 --- a/internal/datastore/mysql/gc.go +++ b/internal/datastore/mysql/gc.go @@ -118,7 +118,7 @@ func (mcc *mysqlGarbageCollector) DeleteBeforeTx( // Delete any relationship rows with deleted_transaction <= the transaction ID. removed.Relationships, err = mcc.batchDelete(ctx, mcc.mds.driver.RelationTuple(), sq.LtOrEq{colDeletedTxn: txID}) if err != nil { - return + return removed, err } // Delete all transaction rows with ID < the transaction ID. @@ -127,12 +127,12 @@ func (mcc *mysqlGarbageCollector) DeleteBeforeTx( // one transaction present. removed.Transactions, err = mcc.batchDelete(ctx, mcc.mds.driver.RelationTupleTransaction(), sq.Lt{colID: txID}) if err != nil { - return + return removed, err } // Delete any namespace rows with deleted_transaction <= the transaction ID. removed.Namespaces, err = mcc.batchDelete(ctx, mcc.mds.driver.Namespace(), sq.LtOrEq{colDeletedTxn: txID}) - return + return removed, err } func (mcc *mysqlGarbageCollector) DeleteExpiredRels(ctx context.Context) (int64, error) { diff --git a/internal/datastore/mysql/watch.go b/internal/datastore/mysql/watch.go index 66ac7f079..8e40321ec 100644 --- a/internal/datastore/mysql/watch.go +++ b/internal/datastore/mysql/watch.go @@ -131,11 +131,11 @@ func (mds *Datastore) loadChanges( ) (changes []datastore.RevisionChanges, newRevision uint64, err error) { newRevision, err = mds.loadRevision(ctx) if err != nil { - return + return changes, newRevision, err } if newRevision == afterRevision { - return + return changes, newRevision, err } stagedChanges := common.NewChanges(revisions.TransactionIDKeyFunc, options.Content, options.MaximumBufferedChangesByteSize) @@ -148,7 +148,7 @@ func (mds *Datastore) loadChanges( }, }).ToSql() if err != nil { - return + return changes, newRevision, err } rows, err := mds.db.QueryContext(ctx, sql, args...) @@ -160,7 +160,7 @@ func (mds *Datastore) loadChanges( } else if common.IsResettableError(err) { err = datastore.NewWatchTemporaryErr(err) } - return + return changes, newRevision, err } defer common.LogOnError(ctx, rows.Close) @@ -183,7 +183,7 @@ func (mds *Datastore) loadChanges( } rows.Close() if rows.Err() != nil { - return + return changes, newRevision, err } // Load the changes relationships for the revision range. @@ -198,7 +198,7 @@ func (mds *Datastore) loadChanges( }, }).ToSql() if err != nil { - return + return changes, newRevision, err } rows, err = mds.db.QueryContext(ctx, sql, args...) @@ -206,7 +206,7 @@ func (mds *Datastore) loadChanges( if errors.Is(err, context.Canceled) { err = datastore.NewWatchCanceledErr() } - return + return changes, newRevision, err } defer common.LogOnError(ctx, rows.Close) @@ -236,7 +236,7 @@ func (mds *Datastore) loadChanges( &deletedTxn, ) if err != nil { - return + return changes, newRevision, err } relationship := tuple.Relationship{ @@ -257,25 +257,25 @@ func (mds *Datastore) loadChanges( relationship.OptionalCaveat, err = common.ContextualizedCaveatFrom(caveatName, caveatContext) if err != nil { - return + return changes, newRevision, err } if createdTxn > afterRevision && createdTxn <= newRevision { if err = stagedChanges.AddRelationshipChange(ctx, revisions.NewForTransactionID(createdTxn), relationship, tuple.UpdateOperationTouch); err != nil { - return + return changes, newRevision, err } } if deletedTxn > afterRevision && deletedTxn <= newRevision { if err = stagedChanges.AddRelationshipChange(ctx, revisions.NewForTransactionID(deletedTxn), relationship, tuple.UpdateOperationDelete); err != nil { - return + return changes, newRevision, err } } } if err = rows.Err(); err != nil { - return + return changes, newRevision, err } changes, err = stagedChanges.AsRevisionChanges(revisions.TransactionIDKeyLessThanFunc) - return + return changes, newRevision, err } diff --git a/internal/datastore/postgres/postgres_test.go b/internal/datastore/postgres/postgres_test.go index 637a441b1..abdfe833a 100644 --- a/internal/datastore/postgres/postgres_test.go +++ b/internal/datastore/postgres/postgres_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/authzed/spicedb/internal/datastore/postgres/common" - "github.com/authzed/spicedb/internal/datastore/postgres/version" - testdatastore "github.com/authzed/spicedb/internal/testserver/datastore" - "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" "github.com/stretchr/testify/require" + + "github.com/authzed/spicedb/internal/datastore/postgres/common" + "github.com/authzed/spicedb/internal/datastore/postgres/version" + testdatastore "github.com/authzed/spicedb/internal/testserver/datastore" ) func postgresTestVersion() string { diff --git a/internal/datastore/postgres/revisions.go b/internal/datastore/postgres/revisions.go index e2eca8786..82875c58a 100644 --- a/internal/datastore/postgres/revisions.go +++ b/internal/datastore/postgres/revisions.go @@ -181,11 +181,11 @@ func ParseRevisionString(revisionStr string) (rev datastore.Revision, err error) decimalRev, decimalErr := parseRevisionDecimal(revisionStr) if decimalErr != nil { // If decimal ALSO had an error than it was likely just a mangled original input - return + return rev, err } return decimalRev, nil } - return + return rev, err } func parseRevisionProto(revisionStr string) (datastore.Revision, error) { @@ -306,14 +306,14 @@ func createNewTransaction(ctx context.Context, tx pgx.Tx, metadata map[string]an sql, args, err := createTxn.Values(metadata).Suffix("RETURNING " + schema.ColXID + ", " + schema.ColSnapshot).ToSql() if err != nil { - return + return newXID, newSnapshot, err } cterr := tx.QueryRow(ctx, sql, args...).Scan(&newXID, &newSnapshot) if cterr != nil { err = fmt.Errorf("error when trying to create a new transaction: %w", cterr) } - return + return newXID, newSnapshot, err } type postgresRevision struct { diff --git a/internal/datastore/postgres/strictreader.go b/internal/datastore/postgres/strictreader.go index cc0fad9b7..5d9fc401f 100644 --- a/internal/datastore/postgres/strictreader.go +++ b/internal/datastore/postgres/strictreader.go @@ -48,7 +48,7 @@ func (srqf strictReaderQueryFuncs) rewriteError(err error) error { } func (srqf strictReaderQueryFuncs) addAssertToSelectSQL(sql string) string { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return strings.HasPrefix(sql, "SELECT ") }, "strictReaderQueryFuncs can only wrap SELECT queries") diff --git a/internal/datastore/proxy/hedging.go b/internal/datastore/proxy/hedging.go index 57e6f7595..f8bca66dd 100644 --- a/internal/datastore/proxy/hedging.go +++ b/internal/datastore/proxy/hedging.go @@ -188,7 +188,7 @@ func (hp hedgingProxy) OptimizedRevision(ctx context.Context) (rev datastore.Rev hp.revisionHedger(ctx, subreq) - return + return rev, err } func (hp hedgingProxy) HeadRevision(ctx context.Context) (rev datastore.Revision, err error) { @@ -204,7 +204,7 @@ func (hp hedgingProxy) HeadRevision(ctx context.Context) (rev datastore.Revision hp.headRevisionHedger(ctx, subreq) - return + return rev, err } func (hp hedgingProxy) SnapshotReader(rev datastore.Revision) datastore.Reader { @@ -235,7 +235,7 @@ func (hp hedgingReader) ReadNamespaceByName( hp.p.readNamespaceHedger(ctx, subreq) - return + return ns, createdAt, err } func (hp hedgingReader) QueryRelationships( @@ -284,5 +284,5 @@ func (hp hedgingReader) executeQuery( hp.p.queryTuplesHedger(ctx, subreq) - return + return delegateIterator, err } diff --git a/internal/datastore/proxy/schemacaching/watchingcache.go b/internal/datastore/proxy/schemacaching/watchingcache.go index cd615df6c..a4bab5b6b 100644 --- a/internal/datastore/proxy/schemacaching/watchingcache.go +++ b/internal/datastore/proxy/schemacaching/watchingcache.go @@ -243,8 +243,8 @@ func (p *watchingCachingProxy) startSync(ctx context.Context) error { Content: datastore.WatchSchema | datastore.WatchCheckpoints, CheckpointInterval: p.watchHeartbeat, }) - spiceerrors.DebugAssertNotNil(ssc, "ssc is nil") - spiceerrors.DebugAssertNotNil(serrc, "serrc is nil") + spiceerrors.DebugAssertNotNilf(ssc, "ssc is nil") + spiceerrors.DebugAssertNotNilf(serrc, "serrc is nil") log.Debug().Msg("schema watch started") diff --git a/internal/datastore/spanner/readwrite.go b/internal/datastore/spanner/readwrite.go index 9fa929b05..a83383369 100644 --- a/internal/datastore/spanner/readwrite.go +++ b/internal/datastore/spanner/readwrite.go @@ -142,10 +142,10 @@ func spannerMutation( default: log.Ctx(ctx).Error().Msg("unknown operation type") err = fmt.Errorf("unknown mutation operation: %v", operation) - return + return txnMut, countChange, err } - return + return txnMut, countChange, err } func (rwt spannerReadWriteTXN) DeleteRelationships(ctx context.Context, filter *v1.RelationshipFilter, opts ...options.DeleteOptionsOption) (uint64, bool, error) { diff --git a/internal/graph/check.go b/internal/graph/check.go index d32667274..f802a2084 100644 --- a/internal/graph/check.go +++ b/internal/graph/check.go @@ -175,7 +175,7 @@ func (cc *ConcurrentChecker) Check(ctx context.Context, req ValidatedCheckReques } func (cc *ConcurrentChecker) checkInternal(ctx context.Context, req ValidatedCheckRequest, relation *core.Relation) CheckResult { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return relation.GetUsersetRewrite() != nil || relation.GetTypeInformation() != nil }, "found relation without type information") @@ -539,7 +539,7 @@ func mapFoundResources(result CheckResult, resourceType tuple.RelationReference, for foundResourceID, result := range result.Resp.ResultsByResourceId { resourceIDAndCaveats := checksToDispatch.mappingsForSubject(resourceType.ObjectType, foundResourceID, resourceType.Relation) - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return len(resourceIDAndCaveats) > 0 }, "found resource ID without associated caveats") diff --git a/internal/graph/checkdispatchset.go b/internal/graph/checkdispatchset.go index ed3f3cb89..65666fd91 100644 --- a/internal/graph/checkdispatchset.go +++ b/internal/graph/checkdispatchset.go @@ -139,6 +139,6 @@ func (s *checkDispatchSet) dispatchChunks(dispatchChunkSize uint16) []checkDispa // that the subject has a relationship with. func (s *checkDispatchSet) mappingsForSubject(subjectType string, subjectObjectID string, subjectRelation string) []resourceIDAndCaveat { results, ok := s.bySubject.Get(tuple.ONR(subjectType, subjectObjectID, subjectRelation)) - spiceerrors.DebugAssert(func() bool { return ok }, "no caveats found for subject %s:%s:%s", subjectType, subjectObjectID, subjectRelation) + spiceerrors.DebugAssertf(func() bool { return ok }, "no caveats found for subject %s:%s:%s", subjectType, subjectObjectID, subjectRelation) return results } diff --git a/internal/graph/computed/computecheck.go b/internal/graph/computed/computecheck.go index b32259cd0..be493dc74 100644 --- a/internal/graph/computed/computecheck.go +++ b/internal/graph/computed/computecheck.go @@ -65,7 +65,7 @@ func ComputeCheck( return nil, meta, err } - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return (len(di) == 0 && meta.DebugInfo == nil) || (len(di) == 1 && meta.DebugInfo != nil) }, "mismatch in debug information returned from computeCheck") diff --git a/internal/graph/lookupresources2.go b/internal/graph/lookupresources2.go index ebb6242ce..053279c9f 100644 --- a/internal/graph/lookupresources2.go +++ b/internal/graph/lookupresources2.go @@ -147,7 +147,7 @@ func (crr *CursoredLookupResources2) afterSameType( return withParallelizedStreamingIterableInCursor(ctx, ci, entrypoints, parentStream, crr.concurrencyLimit, func(ctx context.Context, ci cursorInformation, entrypoint schema.ReachabilityEntrypoint, stream dispatch.LookupResources2Stream) error { ds, err := entrypoint.DebugString() - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return err == nil }, "Error in entrypoint.DebugString()") ctx, span := tracer.Start(ctx, "entrypoint: "+ds, trace.WithAttributes()) diff --git a/internal/graph/lookupresources3.go b/internal/graph/lookupresources3.go index d4f26b4ab..001196419 100644 --- a/internal/graph/lookupresources3.go +++ b/internal/graph/lookupresources3.go @@ -724,7 +724,7 @@ func (crr *CursoredLookupResources3) relationshipsIter( // chunk of relationships over which the process is iterating. If non-empty, then we first yield that chunk // before continuing to query for more relationships. if crc, ok := currentIndex.lookupRelationshipsChunk(crr.relationshipsChunkCache); ok { - spiceerrors.DebugAssert(crc.isPopulated, "expected relationships chunk to be populated") + spiceerrors.DebugAssertf(crc.isPopulated, "expected relationships chunk to be populated") // Yield the current chunk of relationships. if !yield(cter.Chunk[*relationshipsChunk, datastoreIndex]{ @@ -1211,7 +1211,7 @@ func (rm *relationshipsChunk) copyRelationshipsFrom(src *relationshipsChunk, res } func (rm *relationshipsChunk) mustAsIndex() datastoreIndex { - spiceerrors.DebugAssert(rm.isPopulated, "cannot create index from empty relationships chunk") + spiceerrors.DebugAssertf(rm.isPopulated, "cannot create index from empty relationships chunk") return datastoreIndex{ dbCursor: rm.dbCursor, chunkID: rm.uniqueID, @@ -1393,7 +1393,7 @@ func datastoreIndexFromString(cursorStr string) (datastoreIndex, error) { // mustDatastoreIndexToString converts a datastoreIndex into a string representation. func mustDatastoreIndexToString(index datastoreIndex) (string, error) { - spiceerrors.DebugAssert(func() bool { return index.chunkID != "" }, "chunk ID must be set") + spiceerrors.DebugAssertf(func() bool { return index.chunkID != "" }, "chunk ID must be set") if index.dbCursor == nil { return dsIndexPrefix + index.chunkID, nil diff --git a/internal/graph/resourcesubjectsmap2.go b/internal/graph/resourcesubjectsmap2.go index 4e41955b6..7d7dee260 100644 --- a/internal/graph/resourcesubjectsmap2.go +++ b/internal/graph/resourcesubjectsmap2.go @@ -70,11 +70,11 @@ func subjectIDsToResourcesMap2(resourceType *core.RelationReference, subjectIDs // addRelationship adds the relationship to the resource subject map, recording a mapping from // the resource of the relationship to the subject, as well as whether the relationship was caveated. func (rsm resourcesSubjectMap2) addRelationship(rel tuple.Relationship, missingContextParameters []string) error { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return rel.Resource.ObjectType == rsm.resourceType.Namespace && rel.Resource.Relation == rsm.resourceType.Relation }, "invalid relationship for addRelationship. expected: %v, found: %v", rsm.resourceType, rel.Resource) - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return len(missingContextParameters) == 0 || rel.OptionalCaveat != nil }, "missing context parameters must be empty if there is no caveat") diff --git a/internal/middleware/perfinsights/perfinsights.go b/internal/middleware/perfinsights/perfinsights.go index 03dbce27e..89740978a 100644 --- a/internal/middleware/perfinsights/perfinsights.go +++ b/internal/middleware/perfinsights/perfinsights.go @@ -138,7 +138,7 @@ func buildLabels(methodName string, shape APIShapeLabels) []string { labels[index+1] = strconv.Itoa(intValue) default: - spiceerrors.DebugAssert(func() bool { return false }, "unsupported type %T", t) + spiceerrors.DebugAssertf(func() bool { return false }, "unsupported type %T", t) log.Warn().Str("method", methodName). Str("key", label). Str("type", fmt.Sprintf("%T", t)). @@ -179,7 +179,7 @@ func (r *serverReporter) PostCall(err error, duration time.Duration) { } shapeClosure := ctxKey.Value(r.ctx) - spiceerrors.DebugAssertNotNil(shapeClosure, "ShapeBuilder should not be nil") + spiceerrors.DebugAssertNotNilf(shapeClosure, "ShapeBuilder should not be nil") // If not testing and nil, simply skip. if shapeClosure == nil { diff --git a/internal/middleware/pertoken/pertoken.go b/internal/middleware/pertoken/pertoken.go index d9db1526a..8c1aff60a 100644 --- a/internal/middleware/pertoken/pertoken.go +++ b/internal/middleware/pertoken/pertoken.go @@ -47,7 +47,7 @@ type squashable interface { } func (m *MiddlewareForTesting) getOrCreateDatastore(ctx context.Context) (datastore.Datastore, error) { - spiceerrors.DebugAssertNotNil(m.caveatTypeSet, "caveatTypeSet must be set") + spiceerrors.DebugAssertNotNilf(m.caveatTypeSet, "caveatTypeSet must be set") tokenStr, _ := grpcauth.AuthFromMD(ctx, "bearer") tokenDatastore, ok := m.datastoreByToken.Load(tokenStr) diff --git a/internal/services/integrationtesting/dispatch_test.go b/internal/services/integrationtesting/dispatch_test.go index 4a4322dd4..e0cf72b7f 100644 --- a/internal/services/integrationtesting/dispatch_test.go +++ b/internal/services/integrationtesting/dispatch_test.go @@ -9,9 +9,10 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/stretchr/testify/require" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/spicedb/internal/datastore/spanner" "github.com/authzed/spicedb/internal/testserver" testdatastore "github.com/authzed/spicedb/internal/testserver/datastore" diff --git a/internal/services/integrationtesting/healthcheck_test.go b/internal/services/integrationtesting/healthcheck_test.go index bb69a36ad..c71b96d0a 100644 --- a/internal/services/integrationtesting/healthcheck_test.go +++ b/internal/services/integrationtesting/healthcheck_test.go @@ -8,11 +8,12 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/stretchr/testify/require" "google.golang.org/grpc" healthpb "google.golang.org/grpc/health/grpc_health_v1" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/spicedb/internal/datastore/memdb" tf "github.com/authzed/spicedb/internal/testfixtures" "github.com/authzed/spicedb/internal/testserver" diff --git a/internal/services/integrationtesting/perf_test.go b/internal/services/integrationtesting/perf_test.go index e9e7377ab..b13696683 100644 --- a/internal/services/integrationtesting/perf_test.go +++ b/internal/services/integrationtesting/perf_test.go @@ -10,9 +10,10 @@ import ( "testing" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/stretchr/testify/require" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/spicedb/internal/datastore/spanner" tf "github.com/authzed/spicedb/internal/testfixtures" "github.com/authzed/spicedb/internal/testserver" diff --git a/internal/services/shared/schema.go b/internal/services/shared/schema.go index 4354c3ebf..0e1501189 100644 --- a/internal/services/shared/schema.go +++ b/internal/services/shared/schema.go @@ -370,7 +370,7 @@ func sanityCheckNamespaceChanges( } // Also check for right sides of tuples. - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return delta.RelationName != tuple.Ellipsis && delta.RelationName != "" }, "relation name should not be empty or ellipsis when checking for reverse relationships") diff --git a/internal/services/steelthreadtesting/operations.go b/internal/services/steelthreadtesting/operations.go index 20e374f78..e5de17900 100644 --- a/internal/services/steelthreadtesting/operations.go +++ b/internal/services/steelthreadtesting/operations.go @@ -13,10 +13,11 @@ import ( "strings" "time" - v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "google.golang.org/protobuf/types/known/structpb" "gopkg.in/yaml.v3" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" + "github.com/authzed/spicedb/pkg/genutil/mapz" "github.com/authzed/spicedb/pkg/tuple" ) diff --git a/internal/services/steelthreadtesting/testdata/real-schema-and-data-with-many-relations.yaml b/internal/services/steelthreadtesting/testdata/real-schema-and-data-with-many-relations.yaml index 1ba5ae2f8..f7563b1e6 100644 --- a/internal/services/steelthreadtesting/testdata/real-schema-and-data-with-many-relations.yaml +++ b/internal/services/steelthreadtesting/testdata/real-schema-and-data-with-many-relations.yaml @@ -1,3 +1,4 @@ +--- schema: |+ use expiration diff --git a/internal/services/v1/bulkcheck.go b/internal/services/v1/bulkcheck.go index 887c3ffeb..0d103d007 100644 --- a/internal/services/v1/bulkcheck.go +++ b/internal/services/v1/bulkcheck.go @@ -87,7 +87,7 @@ func (bc *bulkChecker) checkBulkPermissions(ctx context.Context, req *v1.CheckBu bulkResponseMutex := sync.Mutex{} - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return bc.maxConcurrency > 0 }, "max concurrency must be greater than 0 in bulk check") diff --git a/internal/services/v1/debug.go b/internal/services/v1/debug.go index 01f8015d1..c4f2154b8 100644 --- a/internal/services/v1/debug.go +++ b/internal/services/v1/debug.go @@ -123,7 +123,7 @@ func convertCheckTrace(ctx context.Context, caveatContext map[string]any, ct *di if permissionship == v1.CheckDebugTrace_PERMISSIONSHIP_CONDITIONAL_PERMISSION && len(partialResults) == 1 && len(partialResults[0].MissingExprFields) == 0 { partialCheckResult := partialResults[0] - spiceerrors.DebugAssertNotNil(partialCheckResult.Expression, "got nil caveat expression") + spiceerrors.DebugAssertNotNilf(partialCheckResult.Expression, "got nil caveat expression") computedResult, err := cexpr.RunSingleCaveatExpression(ctx, caveatTypeSet, partialCheckResult.Expression, caveatContext, reader, cexpr.RunCaveatExpressionWithDebugInformation) if err != nil { diff --git a/internal/telemetry/reporter.go b/internal/telemetry/reporter.go index 4f6f38818..0df394556 100644 --- a/internal/telemetry/reporter.go +++ b/internal/telemetry/reporter.go @@ -103,7 +103,7 @@ func discoverTimeseries(registry *prometheus.Registry) (allTS []*prompb.TimeSeri }) } - return + return allTS, err } func discoverAndWriteMetrics( diff --git a/internal/testfixtures/validating.go b/internal/testfixtures/validating.go index 7d6372cc8..d3241ae44 100644 --- a/internal/testfixtures/validating.go +++ b/internal/testfixtures/validating.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "buf.build/go/protovalidate" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/authzed/spicedb/pkg/datastore" @@ -61,7 +63,7 @@ func (vsr validatingSnapshotReader) ListAllNamespaces( } for _, ns := range read { - err := ns.Definition.Validate() + err := protovalidate.Validate(ns.Definition) if err != nil { return nil, err } @@ -80,7 +82,7 @@ func (vsr validatingSnapshotReader) LookupNamespacesWithNames( } for _, ns := range read { - err := ns.Definition.Validate() + err := protovalidate.Validate(ns.Definition) if err != nil { return nil, err } @@ -118,7 +120,7 @@ func (vsr validatingSnapshotReader) ReadNamespaceByName( return read, createdAt, err } - err = read.Validate() + err = protovalidate.Validate(read) return read, createdAt, err } @@ -149,7 +151,7 @@ func (vsr validatingSnapshotReader) ReadCaveatByName(ctx context.Context, name s return read, createdAt, err } - err = read.Validate() + err = protovalidate.Validate(read) return read, createdAt, err } @@ -160,7 +162,7 @@ func (vsr validatingSnapshotReader) LookupCaveatsWithNames(ctx context.Context, } for _, caveat := range read { - err := caveat.Definition.Validate() + err := protovalidate.Validate(caveat.Definition) if err != nil { return nil, err } @@ -176,7 +178,7 @@ func (vsr validatingSnapshotReader) ListAllCaveats(ctx context.Context) ([]datas } for _, caveat := range read { - err := caveat.Definition.Validate() + err := protovalidate.Validate(caveat.Definition) if err != nil { return nil, err } @@ -191,7 +193,7 @@ type validatingReadWriteTransaction struct { } func (vrwt validatingReadWriteTransaction) RegisterCounter(ctx context.Context, name string, filter *core.RelationshipFilter) error { - if err := filter.Validate(); err != nil { + if err := protovalidate.Validate(filter); err != nil { return err } @@ -208,7 +210,7 @@ func (vrwt validatingReadWriteTransaction) StoreCounterValue(ctx context.Context func (vrwt validatingReadWriteTransaction) WriteNamespaces(ctx context.Context, newConfigs ...*core.NamespaceDefinition) error { for _, newConfig := range newConfigs { - if err := newConfig.Validate(); err != nil { + if err := protovalidate.Validate(newConfig); err != nil { return err } } @@ -236,7 +238,7 @@ func (vrwt validatingReadWriteTransaction) WriteRelationships(ctx context.Contex } func (vrwt validatingReadWriteTransaction) DeleteRelationships(ctx context.Context, filter *v1.RelationshipFilter, options ...options.DeleteOptionsOption) (uint64, bool, error) { - if err := filter.Validate(); err != nil { + if err := protovalidate.Validate(filter); err != nil { return 0, false, err } diff --git a/magefiles/gen.go b/magefiles/gen.go index 38ba660ea..eae9cb6b8 100644 --- a/magefiles/gen.go +++ b/magefiles/gen.go @@ -28,7 +28,7 @@ func (Gen) Go() error { func (Gen) Proto() error { fmt.Println("generating buf") return RunSh("go", Tool())("run", "github.com/bufbuild/buf/cmd/buf", - "generate", "-o", "../pkg/proto", "../proto/internal", "--template", "../buf.gen.yaml") + "generate", "-o", "..", "../proto/internal", "--template", "../buf.gen.yaml") } func (Gen) Completions() error { diff --git a/magefiles/go.mod b/magefiles/go.mod index f0a64e41f..e92953e08 100644 --- a/magefiles/go.mod +++ b/magefiles/go.mod @@ -8,7 +8,7 @@ require ( github.com/ecordell/optgen v0.0.9 github.com/envoyproxy/protoc-gen-validate v1.0.4 github.com/magefile/mage v1.15.0 - github.com/planetscale/vtprotobuf v0.6.1-0.20240409071808-615f978279ca + github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587 golang.org/x/tools v0.22.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/protobuf v1.34.2 diff --git a/magefiles/go.sum b/magefiles/go.sum index d2672cf30..706745574 100644 --- a/magefiles/go.sum +++ b/magefiles/go.sum @@ -291,8 +291,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/planetscale/vtprotobuf v0.6.1-0.20240409071808-615f978279ca h1:ujRGEVWJEoaxQ+8+HMl8YEpGaDAgohgZxJ5S+d2TTFQ= -github.com/planetscale/vtprotobuf v0.6.1-0.20240409071808-615f978279ca/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587 h1:xzZOeCMQLA/W198ZkdVdt4EKFKJtS26B773zNU377ZY= +github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= diff --git a/pkg/composableschemadsl/compiler/compiler_test.go b/pkg/composableschemadsl/compiler/compiler_test.go index a39394291..20cdc645d 100644 --- a/pkg/composableschemadsl/compiler/compiler_test.go +++ b/pkg/composableschemadsl/compiler/compiler_test.go @@ -769,7 +769,7 @@ func TestCompile(t *testing.T) { "invalid definition name", nilPrefix, `definition someTenant/fo {}`, - "parse error in `invalid definition name`, line 1, column 1: error in object definition someTenant/fo: invalid NamespaceDefinition.Name: value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + "parse error in `invalid definition name`, line 1, column 1: error in object definition someTenant/fo: validation error:\n - name: value does not match regex pattern `^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$` [string.pattern]", []SchemaDefinition{}, }, { @@ -778,7 +778,7 @@ func TestCompile(t *testing.T) { `definition some_tenant/foos { relation ab: some_tenant/foos }`, - "parse error in `invalid relation name`, line 2, column 5: error in relation ab: invalid Relation.Name: value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + "parse error in `invalid relation name`, line 2, column 5: error in relation ab: validation error:\n - name: value does not match regex pattern `^[a-z][a-z0-9_]{1,62}[a-z0-9]$` [string.pattern]", []SchemaDefinition{}, }, { diff --git a/pkg/composableschemadsl/compiler/translator.go b/pkg/composableschemadsl/compiler/translator.go index 7dbff155f..eec888ab5 100644 --- a/pkg/composableschemadsl/compiler/translator.go +++ b/pkg/composableschemadsl/compiler/translator.go @@ -8,6 +8,7 @@ import ( "slices" "strings" + "buf.build/go/protovalidate" "github.com/ccoveille/go-safecast" "github.com/jzelinskie/stringz" "github.com/rs/zerolog/log" @@ -264,7 +265,7 @@ func translateObjectDefinition(tctx *translationContext, defNode *dslNode) (*cor ns.SourcePosition = getSourcePosition(defNode, tctx.mapper) if !tctx.skipValidate { - if err = ns.Validate(); err != nil { + if err = protovalidate.Validate(ns); err != nil { return nil, defNode.Errorf("error in object definition %s: %w", nspath, err) } } @@ -277,7 +278,7 @@ func translateObjectDefinition(tctx *translationContext, defNode *dslNode) (*cor ns.SourcePosition = getSourcePosition(defNode, tctx.mapper) if !tctx.skipValidate { - if err := ns.Validate(); err != nil { + if err := protovalidate.Validate(ns); err != nil { return nil, defNode.Errorf("error in object definition %s: %w", nspath, err) } } @@ -412,7 +413,7 @@ func translateRelation(tctx *translationContext, relationNode *dslNode) (*core.R } if !tctx.skipValidate { - if err := relation.Validate(); err != nil { + if err := protovalidate.Validate(relation); err != nil { return nil, relationNode.Errorf("error in relation %s: %w", relationName, err) } } @@ -442,7 +443,7 @@ func translatePermission(tctx *translationContext, permissionNode *dslNode) (*co } if !tctx.skipValidate { - if err := permission.Validate(); err != nil { + if err := protovalidate.Validate(permission); err != nil { return nil, permissionNode.Errorf("error in permission %s: %w", permissionName, err) } } @@ -676,7 +677,7 @@ func translateSpecificTypeReference(tctx *translationContext, typeRefNode *dslNo } if !tctx.skipValidate { - if err := ref.Validate(); err != nil { + if err := protovalidate.Validate(ref); err != nil { return nil, typeRefNode.Errorf("invalid type relation: %w", err) } } @@ -729,7 +730,7 @@ func translateSpecificTypeReference(tctx *translationContext, typeRefNode *dslNo } if !tctx.skipValidate { - if err := ref.Validate(); err != nil { + if err := protovalidate.Validate(ref); err != nil { return nil, typeRefNode.Errorf("invalid type relation: %w", err) } } diff --git a/pkg/composableschemadsl/lexer/flaggablelexer_test.go b/pkg/composableschemadsl/lexer/flaggablelexer_test.go index 15a56e846..6fc173b9e 100644 --- a/pkg/composableschemadsl/lexer/flaggablelexer_test.go +++ b/pkg/composableschemadsl/lexer/flaggablelexer_test.go @@ -70,5 +70,5 @@ func performFlaggedLex(t *lexerTest) (tokens []Lexeme) { break } } - return + return tokens } diff --git a/pkg/composableschemadsl/lexer/lex_test.go b/pkg/composableschemadsl/lexer/lex_test.go index a173827d4..b4f4cff93 100644 --- a/pkg/composableschemadsl/lexer/lex_test.go +++ b/pkg/composableschemadsl/lexer/lex_test.go @@ -301,7 +301,7 @@ func performLex(t *lexerTest) (tokens []Lexeme) { break } } - return + return tokens } func equal(found, expected []Lexeme) bool { diff --git a/pkg/composableschemadsl/parser/nodestack.go b/pkg/composableschemadsl/parser/nodestack.go index 0d49e09b4..aa7adeeeb 100644 --- a/pkg/composableschemadsl/parser/nodestack.go +++ b/pkg/composableschemadsl/parser/nodestack.go @@ -29,7 +29,7 @@ func (s *nodeStack) pop() (value AstNode) { if s.size > 0 { value, s.top = s.top.value, s.top.next s.size-- - return + return value } return nil } diff --git a/pkg/datastore/options/options.go b/pkg/datastore/options/options.go index c6bab7119..53d0cf241 100644 --- a/pkg/datastore/options/options.go +++ b/pkg/datastore/options/options.go @@ -33,7 +33,7 @@ const ( type Cursor *tuple.Relationship func ToCursor(r tuple.Relationship) Cursor { - spiceerrors.DebugAssert(r.ValidateNotEmpty, "cannot create cursor from empty relationship") + spiceerrors.DebugAssertf(r.ValidateNotEmpty, "cannot create cursor from empty relationship") return Cursor(&r) } diff --git a/pkg/datastore/test/revisions.go b/pkg/datastore/test/revisions.go index 5a16630fc..d4f25f7a6 100644 --- a/pkg/datastore/test/revisions.go +++ b/pkg/datastore/test/revisions.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "buf.build/go/protovalidate" "github.com/stretchr/testify/require" "github.com/authzed/spicedb/internal/datastore/common" @@ -84,12 +85,12 @@ func RevisionSerializationTest(t *testing.T, tester DatastoreTester) { }) require.NoError(err) - meta := dispatch.ResolverMeta{ + meta := &dispatch.ResolverMeta{ AtRevision: revToTest.String(), DepthRemaining: 50, TraversalBloom: dispatch.MustNewTraversalBloomFilter(50), } - require.NoError(meta.Validate()) + require.NoError(protovalidate.Validate(meta)) } // GCProcessRunTest tests whether the custom GC process runs for the datastore. diff --git a/pkg/development/devcontext.go b/pkg/development/devcontext.go index 5b5da14ed..8df3a636a 100644 --- a/pkg/development/devcontext.go +++ b/pkg/development/devcontext.go @@ -6,6 +6,7 @@ import ( "net" "time" + "buf.build/go/protovalidate" "github.com/ccoveille/go-safecast" humanize "github.com/dustin/go-humanize" "google.golang.org/genproto/googleapis/rpc/errdetails" @@ -94,7 +95,7 @@ func newDevContextWithDatastore(ctx context.Context, requestContext *devinterfac // Load the test relationships into the datastore. relationships := make([]tuple.Relationship, 0, len(requestContext.Relationships)) for _, rel := range requestContext.Relationships { - if err := rel.Validate(); err != nil { + if err := protovalidate.Validate(rel); err != nil { inputErrors = append(inputErrors, &devinterface.DeveloperError{ Message: err.Error(), Source: devinterface.DeveloperError_RELATIONSHIP, @@ -136,7 +137,7 @@ func newDevContextWithDatastore(ctx context.Context, requestContext *devinterfac // Sanity check: Make sure the request context for the developer is fully valid. We do this after // the loading to ensure that any user-created errors are reported as developer errors, // rather than internal errors. - verr := requestContext.Validate() + verr := protovalidate.Validate(requestContext) if verr != nil { return nil, nil, verr } diff --git a/pkg/development/wasm/operations_test.go b/pkg/development/wasm/operations_test.go index a3dd92cf2..8f1a330d2 100644 --- a/pkg/development/wasm/operations_test.go +++ b/pkg/development/wasm/operations_test.go @@ -130,7 +130,7 @@ func TestCheckOperation(t *testing.T) { tuple.MustParse("somenamespace:someobj#anotherrel@user:foo"), nil, &devinterface.DeveloperError{ - Message: "error in object definition fo: invalid NamespaceDefinition.Name: value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + Message: "error in object definition fo: validation error:\n - name: value does not match regex pattern `^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$` [string.pattern]", Kind: devinterface.DeveloperError_SCHEMA_ISSUE, Source: devinterface.DeveloperError_SCHEMA, Line: 1, diff --git a/pkg/development/wasm/request.go b/pkg/development/wasm/request.go index 734c96d9d..9e2dff7d0 100644 --- a/pkg/development/wasm/request.go +++ b/pkg/development/wasm/request.go @@ -8,10 +8,9 @@ import ( "fmt" "syscall/js" - "github.com/authzed/spicedb/pkg/development" - "google.golang.org/protobuf/encoding/protojson" + "github.com/authzed/spicedb/pkg/development" devinterface "github.com/authzed/spicedb/pkg/proto/developer/v1" ) diff --git a/pkg/namespace/metadata_test.go b/pkg/namespace/metadata_test.go index f66dccc70..a5b0b0f40 100644 --- a/pkg/namespace/metadata_test.go +++ b/pkg/namespace/metadata_test.go @@ -3,6 +3,7 @@ package namespace import ( "testing" + "buf.build/go/protovalidate" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/anypb" @@ -45,7 +46,7 @@ func TestMetadata(t *testing.T) { }, } - verr := ns.Validate() + verr := protovalidate.Validate(ns) require.NoError(verr) require.Equal([]string{"Hi there"}, GetComments(ns.Metadata)) diff --git a/pkg/proto/core/v1/core.pb.go b/pkg/proto/core/v1/core.pb.go index 56ce0f7b9..597f07501 100644 --- a/pkg/proto/core/v1/core.pb.go +++ b/pkg/proto/core/v1/core.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: core/v1/core.proto package corev1 import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" @@ -15,6 +15,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -387,10 +388,7 @@ func (CaveatOperation_Operation) EnumDescriptor() ([]byte, []int) { } type RelationTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * resource_and_relation is the resource for the tuple ResourceAndRelation *ObjectAndRelation `protobuf:"bytes,1,opt,name=resource_and_relation,json=resourceAndRelation,proto3" json:"resource_and_relation,omitempty"` // * subject is the subject for the tuple @@ -401,15 +399,15 @@ type RelationTuple struct { Integrity *RelationshipIntegrity `protobuf:"bytes,4,opt,name=integrity,proto3" json:"integrity,omitempty"` // * optional_expiration_time is the (optional) time at which the tuple expires OptionalExpirationTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=optional_expiration_time,json=optionalExpirationTime,proto3" json:"optional_expiration_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationTuple) Reset() { *x = RelationTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationTuple) String() string { @@ -420,7 +418,7 @@ func (*RelationTuple) ProtoMessage() {} func (x *RelationTuple) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,25 +469,22 @@ func (x *RelationTuple) GetOptionalExpirationTime() *timestamppb.Timestamp { } type RelationshipIntegrity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * key_id is the key ID used to hash the tuple KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // * hash is the hash of the tuple Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // * hashed_at is the timestamp when the tuple was hashed - HashedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=hashed_at,json=hashedAt,proto3" json:"hashed_at,omitempty"` + HashedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=hashed_at,json=hashedAt,proto3" json:"hashed_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationshipIntegrity) Reset() { *x = RelationshipIntegrity{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationshipIntegrity) String() string { @@ -500,7 +495,7 @@ func (*RelationshipIntegrity) ProtoMessage() {} func (x *RelationshipIntegrity) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,23 +535,20 @@ func (x *RelationshipIntegrity) GetHashedAt() *timestamppb.Timestamp { // ContextualizedCaveat represents a reference to a caveat used to by caveated tuples. // The context are key-value pairs that will be injected at evaluation time. type ContextualizedCaveat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * caveat_name is the name used in the schema for a stored caveat * CaveatName string `protobuf:"bytes,1,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"` // * context are arguments used as input during caveat evaluation with a predefined value * - Context *structpb.Struct `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` + Context *structpb.Struct `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ContextualizedCaveat) Reset() { *x = ContextualizedCaveat{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualizedCaveat) String() string { @@ -567,7 +559,7 @@ func (*ContextualizedCaveat) ProtoMessage() {} func (x *ContextualizedCaveat) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,29 +589,26 @@ func (x *ContextualizedCaveat) GetContext() *structpb.Struct { } type CaveatDefinition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * name represents the globally-unique identifier of the caveat * Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // * serialized_expression is the byte representation of a caveat's logic SerializedExpression []byte `protobuf:"bytes,2,opt,name=serialized_expression,json=serializedExpression,proto3" json:"serialized_expression,omitempty"` // * parameters_and_types is a map from parameter name to its type - ParameterTypes map[string]*CaveatTypeReference `protobuf:"bytes,3,rep,name=parameter_types,json=parameterTypes,proto3" json:"parameter_types,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ParameterTypes map[string]*CaveatTypeReference `protobuf:"bytes,3,rep,name=parameter_types,json=parameterTypes,proto3" json:"parameter_types,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // * metadata contains compiler metadata from schemas compiled into caveats Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // * source_position contains the position of the caveat in the source schema, if any SourcePosition *SourcePosition `protobuf:"bytes,5,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CaveatDefinition) Reset() { *x = CaveatDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaveatDefinition) String() string { @@ -630,7 +619,7 @@ func (*CaveatDefinition) ProtoMessage() {} func (x *CaveatDefinition) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,21 +670,18 @@ func (x *CaveatDefinition) GetSourcePosition() *SourcePosition { } type CaveatTypeReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` + ChildTypes []*CaveatTypeReference `protobuf:"bytes,2,rep,name=child_types,json=childTypes,proto3" json:"child_types,omitempty"` unknownFields protoimpl.UnknownFields - - TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - ChildTypes []*CaveatTypeReference `protobuf:"bytes,2,rep,name=child_types,json=childTypes,proto3" json:"child_types,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CaveatTypeReference) Reset() { *x = CaveatTypeReference{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaveatTypeReference) String() string { @@ -706,7 +692,7 @@ func (*CaveatTypeReference) ProtoMessage() {} func (x *CaveatTypeReference) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,25 +722,22 @@ func (x *CaveatTypeReference) GetChildTypes() []*CaveatTypeReference { } type ObjectAndRelation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * namespace is the full namespace path for the referenced object Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // * object_id is the unique ID for the object within the namespace ObjectId string `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` // * relation is the name of the referenced relation or permission under the namespace - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ObjectAndRelation) Reset() { *x = ObjectAndRelation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectAndRelation) String() string { @@ -765,7 +748,7 @@ func (*ObjectAndRelation) ProtoMessage() {} func (x *ObjectAndRelation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,23 +785,20 @@ func (x *ObjectAndRelation) GetRelation() string { } type RelationReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * namespace is the full namespace path Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // * relation is the name of the referenced relation or permission under the namespace - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationReference) Reset() { *x = RelationReference{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationReference) String() string { @@ -829,7 +809,7 @@ func (*RelationReference) ProtoMessage() {} func (x *RelationReference) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,20 +839,17 @@ func (x *RelationReference) GetRelation() string { } type Zookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Zookie) Reset() { *x = Zookie{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zookie) String() string { @@ -883,7 +860,7 @@ func (*Zookie) ProtoMessage() {} func (x *Zookie) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -906,21 +883,18 @@ func (x *Zookie) GetToken() string { } type RelationTupleUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Operation RelationTupleUpdate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=core.v1.RelationTupleUpdate_Operation" json:"operation,omitempty"` + Tuple *RelationTuple `protobuf:"bytes,2,opt,name=tuple,proto3" json:"tuple,omitempty"` unknownFields protoimpl.UnknownFields - - Operation RelationTupleUpdate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=core.v1.RelationTupleUpdate_Operation" json:"operation,omitempty"` - Tuple *RelationTuple `protobuf:"bytes,2,opt,name=tuple,proto3" json:"tuple,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RelationTupleUpdate) Reset() { *x = RelationTupleUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationTupleUpdate) String() string { @@ -931,7 +905,7 @@ func (*RelationTupleUpdate) ProtoMessage() {} func (x *RelationTupleUpdate) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,26 +935,23 @@ func (x *RelationTupleUpdate) GetTuple() *RelationTuple { } type RelationTupleTreeNode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to NodeType: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to NodeType: // // *RelationTupleTreeNode_IntermediateNode // *RelationTupleTreeNode_LeafNode NodeType isRelationTupleTreeNode_NodeType `protobuf_oneof:"node_type"` Expanded *ObjectAndRelation `protobuf:"bytes,3,opt,name=expanded,proto3" json:"expanded,omitempty"` CaveatExpression *CaveatExpression `protobuf:"bytes,4,opt,name=caveat_expression,json=caveatExpression,proto3" json:"caveat_expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationTupleTreeNode) Reset() { *x = RelationTupleTreeNode{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationTupleTreeNode) String() string { @@ -991,7 +962,7 @@ func (*RelationTupleTreeNode) ProtoMessage() {} func (x *RelationTupleTreeNode) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,23 +977,27 @@ func (*RelationTupleTreeNode) Descriptor() ([]byte, []int) { return file_core_v1_core_proto_rawDescGZIP(), []int{9} } -func (m *RelationTupleTreeNode) GetNodeType() isRelationTupleTreeNode_NodeType { - if m != nil { - return m.NodeType +func (x *RelationTupleTreeNode) GetNodeType() isRelationTupleTreeNode_NodeType { + if x != nil { + return x.NodeType } return nil } func (x *RelationTupleTreeNode) GetIntermediateNode() *SetOperationUserset { - if x, ok := x.GetNodeType().(*RelationTupleTreeNode_IntermediateNode); ok { - return x.IntermediateNode + if x != nil { + if x, ok := x.NodeType.(*RelationTupleTreeNode_IntermediateNode); ok { + return x.IntermediateNode + } } return nil } func (x *RelationTupleTreeNode) GetLeafNode() *DirectSubjects { - if x, ok := x.GetNodeType().(*RelationTupleTreeNode_LeafNode); ok { - return x.LeafNode + if x != nil { + if x, ok := x.NodeType.(*RelationTupleTreeNode_LeafNode); ok { + return x.LeafNode + } } return nil } @@ -1058,21 +1033,18 @@ func (*RelationTupleTreeNode_IntermediateNode) isRelationTupleTreeNode_NodeType( func (*RelationTupleTreeNode_LeafNode) isRelationTupleTreeNode_NodeType() {} type SetOperationUserset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Operation SetOperationUserset_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=core.v1.SetOperationUserset_Operation" json:"operation,omitempty"` + ChildNodes []*RelationTupleTreeNode `protobuf:"bytes,2,rep,name=child_nodes,json=childNodes,proto3" json:"child_nodes,omitempty"` unknownFields protoimpl.UnknownFields - - Operation SetOperationUserset_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=core.v1.SetOperationUserset_Operation" json:"operation,omitempty"` - ChildNodes []*RelationTupleTreeNode `protobuf:"bytes,2,rep,name=child_nodes,json=childNodes,proto3" json:"child_nodes,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetOperationUserset) Reset() { *x = SetOperationUserset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOperationUserset) String() string { @@ -1083,7 +1055,7 @@ func (*SetOperationUserset) ProtoMessage() {} func (x *SetOperationUserset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,21 +1085,18 @@ func (x *SetOperationUserset) GetChildNodes() []*RelationTupleTreeNode { } type DirectSubject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subject *ObjectAndRelation `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - CaveatExpression *CaveatExpression `protobuf:"bytes,2,opt,name=caveat_expression,json=caveatExpression,proto3" json:"caveat_expression,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Subject *ObjectAndRelation `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + CaveatExpression *CaveatExpression `protobuf:"bytes,2,opt,name=caveat_expression,json=caveatExpression,proto3" json:"caveat_expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DirectSubject) Reset() { *x = DirectSubject{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectSubject) String() string { @@ -1138,7 +1107,7 @@ func (*DirectSubject) ProtoMessage() {} func (x *DirectSubject) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1168,20 +1137,17 @@ func (x *DirectSubject) GetCaveatExpression() *CaveatExpression { } type DirectSubjects struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Subjects []*DirectSubject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` unknownFields protoimpl.UnknownFields - - Subjects []*DirectSubject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DirectSubjects) Reset() { *x = DirectSubjects{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectSubjects) String() string { @@ -1192,7 +1158,7 @@ func (*DirectSubjects) ProtoMessage() {} func (x *DirectSubjects) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,20 +1184,17 @@ func (x *DirectSubjects) GetSubjects() []*DirectSubject { // Metadata is compiler metadata added to namespace definitions, such as doc comments and // relation kinds. type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MetadataMessage []*anypb.Any `protobuf:"bytes,1,rep,name=metadata_message,json=metadataMessage,proto3" json:"metadata_message,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + MetadataMessage []*anypb.Any `protobuf:"bytes,1,rep,name=metadata_message,json=metadataMessage,proto3" json:"metadata_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -1242,7 +1205,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1267,10 +1230,7 @@ func (x *Metadata) GetMetadataMessage() []*anypb.Any { // * // NamespaceDefinition represents a single definition of an object type type NamespaceDefinition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * name is the unique for the namespace, including prefixes (which are optional) Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // * relation contains the relations and permissions defined in the namespace @@ -1279,15 +1239,15 @@ type NamespaceDefinition struct { Metadata *Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // * source_position contains the position of the namespace in the source schema, if any SourcePosition *SourcePosition `protobuf:"bytes,4,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NamespaceDefinition) Reset() { *x = NamespaceDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NamespaceDefinition) String() string { @@ -1298,7 +1258,7 @@ func (*NamespaceDefinition) ProtoMessage() {} func (x *NamespaceDefinition) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,10 +1304,7 @@ func (x *NamespaceDefinition) GetSourcePosition() *SourcePosition { // * // Relation represents the definition of a relation or permission under a namespace. type Relation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * name is the full name for the relation or permission Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // * userset_rewrite, if specified, is the rewrite for computing the value of the permission. @@ -1362,15 +1319,15 @@ type Relation struct { SourcePosition *SourcePosition `protobuf:"bytes,5,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` AliasingRelation string `protobuf:"bytes,6,opt,name=aliasing_relation,json=aliasingRelation,proto3" json:"aliasing_relation,omitempty"` CanonicalCacheKey string `protobuf:"bytes,7,opt,name=canonical_cache_key,json=canonicalCacheKey,proto3" json:"canonical_cache_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Relation) Reset() { *x = Relation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Relation) String() string { @@ -1381,7 +1338,7 @@ func (*Relation) ProtoMessage() {} func (x *Relation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1478,27 +1435,24 @@ func (x *Relation) GetCanonicalCacheKey() string { // 2. resource#owner (computed_userset) // 3. organization#admin (tupleset_to_userset) type ReachabilityGraph struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * // entrypoints_by_subject_type provides all entrypoints by subject *type*, representing wildcards. // The keys of the map are the full path(s) for the namespace(s) referenced by reachable wildcards - EntrypointsBySubjectType map[string]*ReachabilityEntrypoints `protobuf:"bytes,1,rep,name=entrypoints_by_subject_type,json=entrypointsBySubjectType,proto3" json:"entrypoints_by_subject_type,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + EntrypointsBySubjectType map[string]*ReachabilityEntrypoints `protobuf:"bytes,1,rep,name=entrypoints_by_subject_type,json=entrypointsBySubjectType,proto3" json:"entrypoints_by_subject_type,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // * // entrypoints_by_subject_relation provides all entrypoints by subject type+relation. // The keys of the map are of the form `namespace_path#relation_name` - EntrypointsBySubjectRelation map[string]*ReachabilityEntrypoints `protobuf:"bytes,2,rep,name=entrypoints_by_subject_relation,json=entrypointsBySubjectRelation,proto3" json:"entrypoints_by_subject_relation,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + EntrypointsBySubjectRelation map[string]*ReachabilityEntrypoints `protobuf:"bytes,2,rep,name=entrypoints_by_subject_relation,json=entrypointsBySubjectRelation,proto3" json:"entrypoints_by_subject_relation,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReachabilityGraph) Reset() { *x = ReachabilityGraph{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReachabilityGraph) String() string { @@ -1509,7 +1463,7 @@ func (*ReachabilityGraph) ProtoMessage() {} func (x *ReachabilityGraph) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1542,10 +1496,7 @@ func (x *ReachabilityGraph) GetEntrypointsBySubjectRelation() map[string]*Reacha // ReachabilityEntrypoints represents all the entrypoints for a specific subject type or subject // relation into the reachability graph for a particular target relation. type ReachabilityEntrypoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * // entrypoints are the entrypoints found. Entrypoints []*ReachabilityEntrypoint `protobuf:"bytes,1,rep,name=entrypoints,proto3" json:"entrypoints,omitempty"` @@ -1557,15 +1508,15 @@ type ReachabilityEntrypoints struct { // subject_relation, if specified, is the type and relation of subjects to which the // entrypoint(s) apply. SubjectRelation *RelationReference `protobuf:"bytes,3,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReachabilityEntrypoints) Reset() { *x = ReachabilityEntrypoints{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReachabilityEntrypoints) String() string { @@ -1576,7 +1527,7 @@ func (*ReachabilityEntrypoints) ProtoMessage() {} func (x *ReachabilityEntrypoints) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,10 +1567,7 @@ func (x *ReachabilityEntrypoints) GetSubjectRelation() *RelationReference { // ReachabilityEntrypoint represents a single entrypoint for a specific subject type or subject // relation into the reachability graph for a particular target relation. type ReachabilityEntrypoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * // kind is the kind of the entrypoint. Kind ReachabilityEntrypoint_ReachabilityEntrypointKind `protobuf:"varint,1,opt,name=kind,proto3,enum=core.v1.ReachabilityEntrypoint_ReachabilityEntrypointKind" json:"kind,omitempty"` @@ -1638,15 +1586,15 @@ type ReachabilityEntrypoint struct { // computed_userset_relation is the name of the computed userset relation on the ComputedUserset // this entrypoint represents, if applicable. ComputedUsersetRelation string `protobuf:"bytes,6,opt,name=computed_userset_relation,json=computedUsersetRelation,proto3" json:"computed_userset_relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReachabilityEntrypoint) Reset() { *x = ReachabilityEntrypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReachabilityEntrypoint) String() string { @@ -1657,7 +1605,7 @@ func (*ReachabilityEntrypoint) ProtoMessage() {} func (x *ReachabilityEntrypoint) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1710,23 +1658,20 @@ func (x *ReachabilityEntrypoint) GetComputedUsersetRelation() string { // * // TypeInformation defines the allowed types for a relation. type TypeInformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * // allowed_direct_relations are those relation types allowed to be placed into a relation, // e.g. the types of subjects allowed when a relationship is written to the relation AllowedDirectRelations []*AllowedRelation `protobuf:"bytes,1,rep,name=allowed_direct_relations,json=allowedDirectRelations,proto3" json:"allowed_direct_relations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TypeInformation) Reset() { *x = TypeInformation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeInformation) String() string { @@ -1737,7 +1682,7 @@ func (*TypeInformation) ProtoMessage() {} func (x *TypeInformation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1762,16 +1707,13 @@ func (x *TypeInformation) GetAllowedDirectRelations() []*AllowedRelation { // * // AllowedRelation is an allowed type of a relation when used as a subject. type AllowedRelation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * namespace is the full namespace path of the allowed object type Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // * // relation_or_wildcard indicates the relation for the objects, or a wildcard. // - // Types that are assignable to RelationOrWildcard: + // Types that are valid to be assigned to RelationOrWildcard: // // *AllowedRelation_Relation // *AllowedRelation_PublicWildcard_ @@ -1784,15 +1726,15 @@ type AllowedRelation struct { // * // required_expiration defines the required expiration on this relation. RequiredExpiration *ExpirationTrait `protobuf:"bytes,7,opt,name=required_expiration,json=requiredExpiration,proto3" json:"required_expiration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AllowedRelation) Reset() { *x = AllowedRelation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowedRelation) String() string { @@ -1803,7 +1745,7 @@ func (*AllowedRelation) ProtoMessage() {} func (x *AllowedRelation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1825,23 +1767,27 @@ func (x *AllowedRelation) GetNamespace() string { return "" } -func (m *AllowedRelation) GetRelationOrWildcard() isAllowedRelation_RelationOrWildcard { - if m != nil { - return m.RelationOrWildcard +func (x *AllowedRelation) GetRelationOrWildcard() isAllowedRelation_RelationOrWildcard { + if x != nil { + return x.RelationOrWildcard } return nil } func (x *AllowedRelation) GetRelation() string { - if x, ok := x.GetRelationOrWildcard().(*AllowedRelation_Relation); ok { - return x.Relation + if x != nil { + if x, ok := x.RelationOrWildcard.(*AllowedRelation_Relation); ok { + return x.Relation + } } return "" } func (x *AllowedRelation) GetPublicWildcard() *AllowedRelation_PublicWildcard { - if x, ok := x.GetRelationOrWildcard().(*AllowedRelation_PublicWildcard_); ok { - return x.PublicWildcard + if x != nil { + if x, ok := x.RelationOrWildcard.(*AllowedRelation_PublicWildcard_); ok { + return x.PublicWildcard + } } return nil } @@ -1886,18 +1832,16 @@ func (*AllowedRelation_PublicWildcard_) isAllowedRelation_RelationOrWildcard() { // * // ExpirationTrait is an expiration trait of a relation. type ExpirationTrait struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExpirationTrait) Reset() { *x = ExpirationTrait{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpirationTrait) String() string { @@ -1908,7 +1852,7 @@ func (*ExpirationTrait) ProtoMessage() {} func (x *ExpirationTrait) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,22 +1870,19 @@ func (*ExpirationTrait) Descriptor() ([]byte, []int) { // * // AllowedCaveat is an allowed caveat of a relation. type AllowedCaveat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // * // caveat_name is the name of the allowed caveat. - CaveatName string `protobuf:"bytes,1,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"` + CaveatName string `protobuf:"bytes,1,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AllowedCaveat) Reset() { *x = AllowedCaveat{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowedCaveat) String() string { @@ -1952,7 +1893,7 @@ func (*AllowedCaveat) ProtoMessage() {} func (x *AllowedCaveat) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1975,26 +1916,23 @@ func (x *AllowedCaveat) GetCaveatName() string { } type UsersetRewrite struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to RewriteOperation: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to RewriteOperation: // // *UsersetRewrite_Union // *UsersetRewrite_Intersection // *UsersetRewrite_Exclusion RewriteOperation isUsersetRewrite_RewriteOperation `protobuf_oneof:"rewrite_operation"` SourcePosition *SourcePosition `protobuf:"bytes,4,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UsersetRewrite) Reset() { *x = UsersetRewrite{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsersetRewrite) String() string { @@ -2005,7 +1943,7 @@ func (*UsersetRewrite) ProtoMessage() {} func (x *UsersetRewrite) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,30 +1958,36 @@ func (*UsersetRewrite) Descriptor() ([]byte, []int) { return file_core_v1_core_proto_rawDescGZIP(), []int{23} } -func (m *UsersetRewrite) GetRewriteOperation() isUsersetRewrite_RewriteOperation { - if m != nil { - return m.RewriteOperation +func (x *UsersetRewrite) GetRewriteOperation() isUsersetRewrite_RewriteOperation { + if x != nil { + return x.RewriteOperation } return nil } func (x *UsersetRewrite) GetUnion() *SetOperation { - if x, ok := x.GetRewriteOperation().(*UsersetRewrite_Union); ok { - return x.Union + if x != nil { + if x, ok := x.RewriteOperation.(*UsersetRewrite_Union); ok { + return x.Union + } } return nil } func (x *UsersetRewrite) GetIntersection() *SetOperation { - if x, ok := x.GetRewriteOperation().(*UsersetRewrite_Intersection); ok { - return x.Intersection + if x != nil { + if x, ok := x.RewriteOperation.(*UsersetRewrite_Intersection); ok { + return x.Intersection + } } return nil } func (x *UsersetRewrite) GetExclusion() *SetOperation { - if x, ok := x.GetRewriteOperation().(*UsersetRewrite_Exclusion); ok { - return x.Exclusion + if x != nil { + if x, ok := x.RewriteOperation.(*UsersetRewrite_Exclusion); ok { + return x.Exclusion + } } return nil } @@ -2078,20 +2022,17 @@ func (*UsersetRewrite_Intersection) isUsersetRewrite_RewriteOperation() {} func (*UsersetRewrite_Exclusion) isUsersetRewrite_RewriteOperation() {} type SetOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Child []*SetOperation_Child `protobuf:"bytes,1,rep,name=child,proto3" json:"child,omitempty"` unknownFields protoimpl.UnknownFields - - Child []*SetOperation_Child `protobuf:"bytes,1,rep,name=child,proto3" json:"child,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetOperation) Reset() { *x = SetOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOperation) String() string { @@ -2102,7 +2043,7 @@ func (*SetOperation) ProtoMessage() {} func (x *SetOperation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2125,22 +2066,19 @@ func (x *SetOperation) GetChild() []*SetOperation_Child { } type TupleToUserset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Tupleset *TupleToUserset_Tupleset `protobuf:"bytes,1,opt,name=tupleset,proto3" json:"tupleset,omitempty"` ComputedUserset *ComputedUserset `protobuf:"bytes,2,opt,name=computed_userset,json=computedUserset,proto3" json:"computed_userset,omitempty"` SourcePosition *SourcePosition `protobuf:"bytes,3,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TupleToUserset) Reset() { *x = TupleToUserset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TupleToUserset) String() string { @@ -2151,7 +2089,7 @@ func (*TupleToUserset) ProtoMessage() {} func (x *TupleToUserset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2188,23 +2126,20 @@ func (x *TupleToUserset) GetSourcePosition() *SourcePosition { } type FunctionedTupleToUserset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Function FunctionedTupleToUserset_Function `protobuf:"varint,1,opt,name=function,proto3,enum=core.v1.FunctionedTupleToUserset_Function" json:"function,omitempty"` Tupleset *FunctionedTupleToUserset_Tupleset `protobuf:"bytes,2,opt,name=tupleset,proto3" json:"tupleset,omitempty"` ComputedUserset *ComputedUserset `protobuf:"bytes,3,opt,name=computed_userset,json=computedUserset,proto3" json:"computed_userset,omitempty"` SourcePosition *SourcePosition `protobuf:"bytes,4,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FunctionedTupleToUserset) Reset() { *x = FunctionedTupleToUserset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionedTupleToUserset) String() string { @@ -2215,7 +2150,7 @@ func (*FunctionedTupleToUserset) ProtoMessage() {} func (x *FunctionedTupleToUserset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2259,22 +2194,19 @@ func (x *FunctionedTupleToUserset) GetSourcePosition() *SourcePosition { } type ComputedUserset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Object ComputedUserset_Object `protobuf:"varint,1,opt,name=object,proto3,enum=core.v1.ComputedUserset_Object" json:"object,omitempty"` Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` SourcePosition *SourcePosition `protobuf:"bytes,3,opt,name=source_position,json=sourcePosition,proto3" json:"source_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComputedUserset) Reset() { *x = ComputedUserset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputedUserset) String() string { @@ -2285,7 +2217,7 @@ func (*ComputedUserset) ProtoMessage() {} func (x *ComputedUserset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2322,21 +2254,18 @@ func (x *ComputedUserset) GetSourcePosition() *SourcePosition { } type SourcePosition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ZeroIndexedLineNumber uint64 `protobuf:"varint,1,opt,name=zero_indexed_line_number,json=zeroIndexedLineNumber,proto3" json:"zero_indexed_line_number,omitempty"` - ZeroIndexedColumnPosition uint64 `protobuf:"varint,2,opt,name=zero_indexed_column_position,json=zeroIndexedColumnPosition,proto3" json:"zero_indexed_column_position,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ZeroIndexedLineNumber uint64 `protobuf:"varint,1,opt,name=zero_indexed_line_number,json=zeroIndexedLineNumber,proto3" json:"zero_indexed_line_number,omitempty"` + ZeroIndexedColumnPosition uint64 `protobuf:"varint,2,opt,name=zero_indexed_column_position,json=zeroIndexedColumnPosition,proto3" json:"zero_indexed_column_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SourcePosition) Reset() { *x = SourcePosition{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourcePosition) String() string { @@ -2347,7 +2276,7 @@ func (*SourcePosition) ProtoMessage() {} func (x *SourcePosition) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2377,24 +2306,21 @@ func (x *SourcePosition) GetZeroIndexedColumnPosition() uint64 { } type CaveatExpression struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to OperationOrCaveat: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to OperationOrCaveat: // // *CaveatExpression_Operation // *CaveatExpression_Caveat OperationOrCaveat isCaveatExpression_OperationOrCaveat `protobuf_oneof:"operation_or_caveat"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CaveatExpression) Reset() { *x = CaveatExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaveatExpression) String() string { @@ -2405,7 +2331,7 @@ func (*CaveatExpression) ProtoMessage() {} func (x *CaveatExpression) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2420,23 +2346,27 @@ func (*CaveatExpression) Descriptor() ([]byte, []int) { return file_core_v1_core_proto_rawDescGZIP(), []int{29} } -func (m *CaveatExpression) GetOperationOrCaveat() isCaveatExpression_OperationOrCaveat { - if m != nil { - return m.OperationOrCaveat +func (x *CaveatExpression) GetOperationOrCaveat() isCaveatExpression_OperationOrCaveat { + if x != nil { + return x.OperationOrCaveat } return nil } func (x *CaveatExpression) GetOperation() *CaveatOperation { - if x, ok := x.GetOperationOrCaveat().(*CaveatExpression_Operation); ok { - return x.Operation + if x != nil { + if x, ok := x.OperationOrCaveat.(*CaveatExpression_Operation); ok { + return x.Operation + } } return nil } func (x *CaveatExpression) GetCaveat() *ContextualizedCaveat { - if x, ok := x.GetOperationOrCaveat().(*CaveatExpression_Caveat); ok { - return x.Caveat + if x != nil { + if x, ok := x.OperationOrCaveat.(*CaveatExpression_Caveat); ok { + return x.Caveat + } } return nil } @@ -2458,21 +2388,18 @@ func (*CaveatExpression_Operation) isCaveatExpression_OperationOrCaveat() {} func (*CaveatExpression_Caveat) isCaveatExpression_OperationOrCaveat() {} type CaveatOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Op CaveatOperation_Operation `protobuf:"varint,1,opt,name=op,proto3,enum=core.v1.CaveatOperation_Operation" json:"op,omitempty"` + Children []*CaveatExpression `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` unknownFields protoimpl.UnknownFields - - Op CaveatOperation_Operation `protobuf:"varint,1,opt,name=op,proto3,enum=core.v1.CaveatOperation_Operation" json:"op,omitempty"` - Children []*CaveatExpression `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CaveatOperation) Reset() { *x = CaveatOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaveatOperation) String() string { @@ -2483,7 +2410,7 @@ func (*CaveatOperation) ProtoMessage() {} func (x *CaveatOperation) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2513,10 +2440,7 @@ func (x *CaveatOperation) GetChildren() []*CaveatExpression { } type RelationshipFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // resource_type is the *optional* resource type of the relationship. // NOTE: It is not prefixed with "optional_" for legacy compatibility. ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` @@ -2530,15 +2454,15 @@ type RelationshipFilter struct { OptionalRelation string `protobuf:"bytes,3,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"` // optional_subject_filter is the optional filter for the subjects of the relationships. OptionalSubjectFilter *SubjectFilter `protobuf:"bytes,4,opt,name=optional_subject_filter,json=optionalSubjectFilter,proto3" json:"optional_subject_filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationshipFilter) Reset() { *x = RelationshipFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationshipFilter) String() string { @@ -2549,7 +2473,7 @@ func (*RelationshipFilter) ProtoMessage() {} func (x *RelationshipFilter) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2604,22 +2528,19 @@ func (x *RelationshipFilter) GetOptionalSubjectFilter() *SubjectFilter { // subject_type is required and all other fields are optional, and will not // impose any additional requirements if left unspecified. type SubjectFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` SubjectType string `protobuf:"bytes,1,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"` OptionalSubjectId string `protobuf:"bytes,2,opt,name=optional_subject_id,json=optionalSubjectId,proto3" json:"optional_subject_id,omitempty"` OptionalRelation *SubjectFilter_RelationFilter `protobuf:"bytes,3,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectFilter) Reset() { *x = SubjectFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectFilter) String() string { @@ -2630,7 +2551,7 @@ func (*SubjectFilter) ProtoMessage() {} func (x *SubjectFilter) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2667,18 +2588,16 @@ func (x *SubjectFilter) GetOptionalRelation() *SubjectFilter_RelationFilter { } type AllowedRelation_PublicWildcard struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AllowedRelation_PublicWildcard) Reset() { *x = AllowedRelation_PublicWildcard{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowedRelation_PublicWildcard) String() string { @@ -2689,7 +2608,7 @@ func (*AllowedRelation_PublicWildcard) ProtoMessage() {} func (x *AllowedRelation_PublicWildcard) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2705,11 +2624,8 @@ func (*AllowedRelation_PublicWildcard) Descriptor() ([]byte, []int) { } type SetOperation_Child struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ChildType: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ChildType: // // *SetOperation_Child_XThis // *SetOperation_Child_ComputedUserset @@ -2725,15 +2641,15 @@ type SetOperation_Child struct { // operation. For example, the operation path of an operation which is the third child of the // fourth top-level operation, will be `3,2`. OperationPath []uint32 `protobuf:"varint,7,rep,packed,name=operation_path,json=operationPath,proto3" json:"operation_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetOperation_Child) Reset() { *x = SetOperation_Child{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOperation_Child) String() string { @@ -2744,7 +2660,7 @@ func (*SetOperation_Child) ProtoMessage() {} func (x *SetOperation_Child) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,51 +2675,63 @@ func (*SetOperation_Child) Descriptor() ([]byte, []int) { return file_core_v1_core_proto_rawDescGZIP(), []int{24, 0} } -func (m *SetOperation_Child) GetChildType() isSetOperation_Child_ChildType { - if m != nil { - return m.ChildType +func (x *SetOperation_Child) GetChildType() isSetOperation_Child_ChildType { + if x != nil { + return x.ChildType } return nil } func (x *SetOperation_Child) GetXThis() *SetOperation_Child_This { - if x, ok := x.GetChildType().(*SetOperation_Child_XThis); ok { - return x.XThis + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_XThis); ok { + return x.XThis + } } return nil } func (x *SetOperation_Child) GetComputedUserset() *ComputedUserset { - if x, ok := x.GetChildType().(*SetOperation_Child_ComputedUserset); ok { - return x.ComputedUserset + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_ComputedUserset); ok { + return x.ComputedUserset + } } return nil } func (x *SetOperation_Child) GetTupleToUserset() *TupleToUserset { - if x, ok := x.GetChildType().(*SetOperation_Child_TupleToUserset); ok { - return x.TupleToUserset + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_TupleToUserset); ok { + return x.TupleToUserset + } } return nil } func (x *SetOperation_Child) GetUsersetRewrite() *UsersetRewrite { - if x, ok := x.GetChildType().(*SetOperation_Child_UsersetRewrite); ok { - return x.UsersetRewrite + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_UsersetRewrite); ok { + return x.UsersetRewrite + } } return nil } func (x *SetOperation_Child) GetFunctionedTupleToUserset() *FunctionedTupleToUserset { - if x, ok := x.GetChildType().(*SetOperation_Child_FunctionedTupleToUserset); ok { - return x.FunctionedTupleToUserset + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_FunctionedTupleToUserset); ok { + return x.FunctionedTupleToUserset + } } return nil } func (x *SetOperation_Child) GetXNil() *SetOperation_Child_Nil { - if x, ok := x.GetChildType().(*SetOperation_Child_XNil); ok { - return x.XNil + if x != nil { + if x, ok := x.ChildType.(*SetOperation_Child_XNil); ok { + return x.XNil + } } return nil } @@ -2863,18 +2791,16 @@ func (*SetOperation_Child_FunctionedTupleToUserset) isSetOperation_Child_ChildTy func (*SetOperation_Child_XNil) isSetOperation_Child_ChildType() {} type SetOperation_Child_This struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetOperation_Child_This) Reset() { *x = SetOperation_Child_This{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOperation_Child_This) String() string { @@ -2885,7 +2811,7 @@ func (*SetOperation_Child_This) ProtoMessage() {} func (x *SetOperation_Child_This) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2901,18 +2827,16 @@ func (*SetOperation_Child_This) Descriptor() ([]byte, []int) { } type SetOperation_Child_Nil struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetOperation_Child_Nil) Reset() { *x = SetOperation_Child_Nil{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOperation_Child_Nil) String() string { @@ -2923,7 +2847,7 @@ func (*SetOperation_Child_Nil) ProtoMessage() {} func (x *SetOperation_Child_Nil) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2939,20 +2863,17 @@ func (*SetOperation_Child_Nil) Descriptor() ([]byte, []int) { } type TupleToUserset_Tupleset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` unknownFields protoimpl.UnknownFields - - Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TupleToUserset_Tupleset) Reset() { *x = TupleToUserset_Tupleset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TupleToUserset_Tupleset) String() string { @@ -2963,7 +2884,7 @@ func (*TupleToUserset_Tupleset) ProtoMessage() {} func (x *TupleToUserset_Tupleset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2986,20 +2907,17 @@ func (x *TupleToUserset_Tupleset) GetRelation() string { } type FunctionedTupleToUserset_Tupleset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` unknownFields protoimpl.UnknownFields - - Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FunctionedTupleToUserset_Tupleset) Reset() { *x = FunctionedTupleToUserset_Tupleset{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionedTupleToUserset_Tupleset) String() string { @@ -3010,7 +2928,7 @@ func (*FunctionedTupleToUserset_Tupleset) ProtoMessage() {} func (x *FunctionedTupleToUserset_Tupleset) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3033,20 +2951,17 @@ func (x *FunctionedTupleToUserset_Tupleset) GetRelation() string { } type SubjectFilter_RelationFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` unknownFields protoimpl.UnknownFields - - Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubjectFilter_RelationFilter) Reset() { *x = SubjectFilter_RelationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_v1_core_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectFilter_RelationFilter) String() string { @@ -3057,7 +2972,7 @@ func (*SubjectFilter_RelationFilter) ProtoMessage() {} func (x *SubjectFilter_RelationFilter) ProtoReflect() protoreflect.Message { mi := &file_core_v1_core_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3081,606 +2996,218 @@ func (x *SubjectFilter_RelationFilter) GetRelation() string { var File_core_v1_core_proto protoreflect.FileDescriptor -var file_core_v1_core_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, - 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x88, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, - 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3f, 0x0a, 0x06, - 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x46, 0x0a, - 0x09, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x54, 0x0a, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x7b, 0x0a, 0x15, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, - 0x37, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, - 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, 0x01, - 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, 0x5d, - 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x0a, 0x63, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xd4, 0x03, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, - 0x28, 0x80, 0x01, 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, - 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x7a, 0x05, 0x10, 0x00, 0x18, 0x80, - 0x20, 0x52, 0x14, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x78, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x9a, 0x01, 0x04, 0x08, 0x01, 0x10, 0x14, 0x52, 0x0e, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5f, 0x0a, 0x13, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, - 0x13, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x00, 0x10, 0x01, - 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x91, 0x02, 0x0a, - 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, - 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, - 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, - 0x42, 0x26, 0x72, 0x24, 0x28, 0x80, 0x08, 0x32, 0x1f, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, - 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, - 0x2c, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, - 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, - 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, - 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4c, - 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, - 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, - 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, - 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x06, - 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, - 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x54, - 0x4f, 0x55, 0x43, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, - 0x10, 0x03, 0x22, 0xa9, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6c, 0x65, 0x61, - 0x66, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x61, 0x76, - 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, - 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x44, 0x0a, - 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x49, 0x4f, 0x4e, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, - 0x4e, 0x10, 0x03, 0x22, 0x8d, 0x01, 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x63, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x0e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xab, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x6a, 0xfa, 0x42, 0x67, 0x92, 0x01, 0x64, 0x08, - 0x01, 0x22, 0x60, 0x8a, 0x01, 0x02, 0x10, 0x01, 0xa2, 0x01, 0x58, 0x08, 0x01, 0x12, 0x26, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, 0x02, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, - 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, - 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, - 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x6e, - 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, - 0x6c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x11, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, - 0x77, 0x0a, 0x1b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, - 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x1f, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, - 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x1c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, - 0x0a, 0x1d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x71, 0x0a, - 0x21, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, - 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xce, 0x04, 0x0a, 0x16, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, - 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x7a, 0x0a, 0x1a, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, - 0x13, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, - 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, - 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, - 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x55, 0x50, 0x4c, 0x45, - 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, - 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x57, 0x0a, 0x16, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, - 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, - 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x52, 0x45, 0x43, - 0x54, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, - 0x4c, 0x54, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x65, 0x0a, 0x0f, 0x54, 0x79, - 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, - 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x95, 0x04, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, - 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, - 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, - 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, - 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, - 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, - 0x24, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, - 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, - 0x00, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, - 0x64, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, - 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x74, 0x52, 0x12, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x64, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0x10, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, - 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, - 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x74, 0x22, 0x30, 0x0a, 0x0d, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xad, - 0x02, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb2, - 0x05, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x42, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0f, 0xfa, 0x42, 0x0c, - 0x92, 0x01, 0x09, 0x08, 0x01, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x1a, 0xdd, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, - 0x05, 0x5f, 0x74, 0x68, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x48, 0x00, - 0x52, 0x04, 0x54, 0x68, 0x69, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x1b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x65, 0x64, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x18, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x5f, 0x6e, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x4e, 0x69, - 0x6c, 0x48, 0x00, 0x52, 0x03, 0x4e, 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, - 0x68, 0x1a, 0x06, 0x0a, 0x04, 0x54, 0x68, 0x69, 0x73, 0x1a, 0x05, 0x0a, 0x03, 0x4e, 0x69, 0x6c, - 0x42, 0x11, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0xba, 0x02, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, - 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, - 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xec, 0x03, 0x0a, 0x18, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x52, 0x0a, - 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x50, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, - 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, - 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, - 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, - 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, - 0x91, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, - 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, - 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, - 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, - 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x55, 0x50, 0x4c, 0x45, - 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x55, 0x50, - 0x4c, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x3f, 0x0a, 0x1c, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x37, 0x0a, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x22, - 0xb0, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, - 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x52, 0x10, 0x01, - 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, - 0x10, 0x03, 0x22, 0xee, 0x03, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x68, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x4b, 0xfa, 0x42, 0x48, 0x72, 0x46, 0x28, 0x80, 0x01, 0x32, 0x41, 0x5e, 0x28, 0x28, 0x5b, - 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, - 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, - 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, - 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x14, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, - 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, - 0x52, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x64, 0x0a, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, - 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, - 0x52, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x11, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, 0x21, - 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, - 0x24, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0x86, 0x03, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, - 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x80, 0x08, 0x32, 0x20, 0x5e, 0x28, 0x28, 0x5b, 0x61, - 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, - 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x3f, 0x24, 0x52, 0x11, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x52, - 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x58, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, - 0x21, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, - 0x3f, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8a, 0x01, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x43, 0x6f, - 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, 0x70, - 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x07, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x43, 0x6f, 0x72, 0x65, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x08, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} +const file_core_v1_core_proto_rawDesc = "" + + "\n" + + "\x12core/v1/core.proto\x12\acore.v1\x1a\x1bbuf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x03\n" + + "\rRelationTuple\x12V\n" + + "\x15resource_and_relation\x18\x01 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\x13resourceAndRelation\x12<\n" + + "\asubject\x18\x02 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\asubject\x12=\n" + + "\x06caveat\x18\x03 \x01(\v2\x1d.core.v1.ContextualizedCaveatB\x06\xbaH\x03\xc8\x01\x00R\x06caveat\x12D\n" + + "\tintegrity\x18\x04 \x01(\v2\x1e.core.v1.RelationshipIntegrityB\x06\xbaH\x03\xc8\x01\x00R\tintegrity\x12T\n" + + "\x18optional_expiration_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x16optionalExpirationTime\"{\n" + + "\x15RelationshipIntegrity\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x12\n" + + "\x04hash\x18\x02 \x01(\fR\x04hash\x127\n" + + "\thashed_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\bhashedAt\"\xa9\x01\n" + + "\x14ContextualizedCaveat\x12V\n" + + "\vcaveat_name\x18\x01 \x01(\tB5\xbaH2r0(\x80\x012+^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$R\n" + + "caveatName\x129\n" + + "\acontext\x18\x02 \x01(\v2\x17.google.protobuf.StructB\x06\xbaH\x03\xc8\x01\x00R\acontext\"\xd4\x03\n" + + "\x10CaveatDefinition\x12I\n" + + "\x04name\x18\x01 \x01(\tB5\xbaH2r0(\x80\x012+^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$R\x04name\x12?\n" + + "\x15serialized_expression\x18\x02 \x01(\fB\n" + + "\xbaH\az\x05\x10\x00\x18\x80 R\x14serializedExpression\x12b\n" + + "\x0fparameter_types\x18\x03 \x03(\v2-.core.v1.CaveatDefinition.ParameterTypesEntryB\n" + + "\xbaH\a\x9a\x01\x04\b\x01\x10\x14R\x0eparameterTypes\x12-\n" + + "\bmetadata\x18\x04 \x01(\v2\x11.core.v1.MetadataR\bmetadata\x12@\n" + + "\x0fsource_position\x18\x05 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x1a_\n" + + "\x13ParameterTypesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.core.v1.CaveatTypeReferenceR\x05value:\x028\x01\"}\n" + + "\x13CaveatTypeReference\x12\x1b\n" + + "\ttype_name\x18\x01 \x01(\tR\btypeName\x12I\n" + + "\vchild_types\x18\x02 \x03(\v2\x1c.core.v1.CaveatTypeReferenceB\n" + + "\xbaH\a\x92\x01\x04\b\x00\x10\x01R\n" + + "childTypes\"\x91\x02\n" + + "\x11ObjectAndRelation\x12f\n" + + "\tnamespace\x18\x01 \x01(\tBH\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\tnamespace\x12F\n" + + "\tobject_id\x18\x02 \x01(\tB)\xbaH&r$(\x80\b2\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\bobjectId\x12L\n" + + "\brelation\x18\x03 \x01(\tB0\xbaH-r+(@2'^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$R\brelation\"\xc9\x01\n" + + "\x11RelationReference\x12f\n" + + "\tnamespace\x18\x01 \x01(\tBH\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\tnamespace\x12L\n" + + "\brelation\x18\x03 \x01(\tB0\xbaH-r+(@2'^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$R\brelation\"'\n" + + "\x06Zookie\x12\x1d\n" + + "\x05token\x18\x01 \x01(\tB\a\xbaH\x04r\x02 \x01R\x05token\"\xd8\x01\n" + + "\x13RelationTupleUpdate\x12N\n" + + "\toperation\x18\x01 \x01(\x0e2&.core.v1.RelationTupleUpdate.OperationB\b\xbaH\x05\x82\x01\x02\x10\x01R\toperation\x124\n" + + "\x05tuple\x18\x02 \x01(\v2\x16.core.v1.RelationTupleB\x06\xbaH\x03\xc8\x01\x01R\x05tuple\";\n" + + "\tOperation\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\n" + + "\n" + + "\x06CREATE\x10\x01\x12\t\n" + + "\x05TOUCH\x10\x02\x12\n" + + "\n" + + "\x06DELETE\x10\x03\"\xa9\x02\n" + + "\x15RelationTupleTreeNode\x12K\n" + + "\x11intermediate_node\x18\x01 \x01(\v2\x1c.core.v1.SetOperationUsersetH\x00R\x10intermediateNode\x126\n" + + "\tleaf_node\x18\x02 \x01(\v2\x17.core.v1.DirectSubjectsH\x00R\bleafNode\x126\n" + + "\bexpanded\x18\x03 \x01(\v2\x1a.core.v1.ObjectAndRelationR\bexpanded\x12F\n" + + "\x11caveat_expression\x18\x04 \x01(\v2\x19.core.v1.CaveatExpressionR\x10caveatExpressionB\v\n" + + "\tnode_type\"\xe2\x01\n" + + "\x13SetOperationUserset\x12D\n" + + "\toperation\x18\x01 \x01(\x0e2&.core.v1.SetOperationUserset.OperationR\toperation\x12?\n" + + "\vchild_nodes\x18\x02 \x03(\v2\x1e.core.v1.RelationTupleTreeNodeR\n" + + "childNodes\"D\n" + + "\tOperation\x12\v\n" + + "\aINVALID\x10\x00\x12\t\n" + + "\x05UNION\x10\x01\x12\x10\n" + + "\fINTERSECTION\x10\x02\x12\r\n" + + "\tEXCLUSION\x10\x03\"\x8d\x01\n" + + "\rDirectSubject\x124\n" + + "\asubject\x18\x01 \x01(\v2\x1a.core.v1.ObjectAndRelationR\asubject\x12F\n" + + "\x11caveat_expression\x18\x02 \x01(\v2\x19.core.v1.CaveatExpressionR\x10caveatExpression\"D\n" + + "\x0eDirectSubjects\x122\n" + + "\bsubjects\x18\x01 \x03(\v2\x16.core.v1.DirectSubjectR\bsubjects\"\xb7\x01\n" + + "\bMetadata\x12\xaa\x01\n" + + "\x10metadata_message\x18\x01 \x03(\v2\x14.google.protobuf.AnyBi\xbaHf\xc8\x01\x01\x92\x01`\b\x01\"\\\xc8\x01\x01\xa2\x01V\x12&type.googleapis.com/impl.v1.DocComment\x12,type.googleapis.com/impl.v1.RelationMetadataR\x0fmetadataMessage\"\x93\x02\n" + + "\x13NamespaceDefinition\x12\\\n" + + "\x04name\x18\x01 \x01(\tBH\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x04name\x12-\n" + + "\brelation\x18\x02 \x03(\v2\x11.core.v1.RelationR\brelation\x12-\n" + + "\bmetadata\x18\x03 \x01(\v2\x11.core.v1.MetadataR\bmetadata\x12@\n" + + "\x0fsource_position\x18\x04 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\"\x9c\x03\n" + + "\bRelation\x12;\n" + + "\x04name\x18\x01 \x01(\tB'\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x04name\x12@\n" + + "\x0fuserset_rewrite\x18\x02 \x01(\v2\x17.core.v1.UsersetRewriteR\x0eusersetRewrite\x12C\n" + + "\x10type_information\x18\x03 \x01(\v2\x18.core.v1.TypeInformationR\x0ftypeInformation\x12-\n" + + "\bmetadata\x18\x04 \x01(\v2\x11.core.v1.MetadataR\bmetadata\x12@\n" + + "\x0fsource_position\x18\x05 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x12+\n" + + "\x11aliasing_relation\x18\x06 \x01(\tR\x10aliasingRelation\x12.\n" + + "\x13canonical_cache_key\x18\a \x01(\tR\x11canonicalCacheKey\"\xf4\x03\n" + + "\x11ReachabilityGraph\x12w\n" + + "\x1bentrypoints_by_subject_type\x18\x01 \x03(\v28.core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntryR\x18entrypointsBySubjectType\x12\x83\x01\n" + + "\x1fentrypoints_by_subject_relation\x18\x02 \x03(\v2<.core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntryR\x1centrypointsBySubjectRelation\x1am\n" + + "\x1dEntrypointsBySubjectTypeEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + + "\x05value\x18\x02 \x01(\v2 .core.v1.ReachabilityEntrypointsR\x05value:\x028\x01\x1aq\n" + + "!EntrypointsBySubjectRelationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + + "\x05value\x18\x02 \x01(\v2 .core.v1.ReachabilityEntrypointsR\x05value:\x028\x01\"\xc6\x01\n" + + "\x17ReachabilityEntrypoints\x12A\n" + + "\ventrypoints\x18\x01 \x03(\v2\x1f.core.v1.ReachabilityEntrypointR\ventrypoints\x12!\n" + + "\fsubject_type\x18\x02 \x01(\tR\vsubjectType\x12E\n" + + "\x10subject_relation\x18\x03 \x01(\v2\x1a.core.v1.RelationReferenceR\x0fsubjectRelation\"\xce\x04\n" + + "\x16ReachabilityEntrypoint\x12N\n" + + "\x04kind\x18\x01 \x01(\x0e2:.core.v1.ReachabilityEntrypoint.ReachabilityEntrypointKindR\x04kind\x12C\n" + + "\x0ftarget_relation\x18\x02 \x01(\v2\x1a.core.v1.RelationReferenceR\x0etargetRelation\x12[\n" + + "\rresult_status\x18\x04 \x01(\x0e26.core.v1.ReachabilityEntrypoint.EntrypointResultStatusR\fresultStatus\x12+\n" + + "\x11tupleset_relation\x18\x05 \x01(\tR\x10tuplesetRelation\x12:\n" + + "\x19computed_userset_relation\x18\x06 \x01(\tR\x17computedUsersetRelation\"z\n" + + "\x1aReachabilityEntrypointKind\x12\x17\n" + + "\x13RELATION_ENTRYPOINT\x10\x00\x12\x1f\n" + + "\x1bCOMPUTED_USERSET_ENTRYPOINT\x10\x01\x12\"\n" + + "\x1eTUPLESET_TO_USERSET_ENTRYPOINT\x10\x02\"W\n" + + "\x16EntrypointResultStatus\x12 \n" + + "\x1cREACHABLE_CONDITIONAL_RESULT\x10\x00\x12\x1b\n" + + "\x17DIRECT_OPERATION_RESULT\x10\x01J\x04\b\x03\x10\x04\"e\n" + + "\x0fTypeInformation\x12R\n" + + "\x18allowed_direct_relations\x18\x01 \x03(\v2\x18.core.v1.AllowedRelationR\x16allowedDirectRelations\"\x95\x04\n" + + "\x0fAllowedRelation\x12f\n" + + "\tnamespace\x18\x01 \x01(\tBH\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\tnamespace\x12N\n" + + "\brelation\x18\x03 \x01(\tB0\xbaH-r+(@2'^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$H\x00R\brelation\x12R\n" + + "\x0fpublic_wildcard\x18\x04 \x01(\v2'.core.v1.AllowedRelation.PublicWildcardH\x00R\x0epublicWildcard\x12@\n" + + "\x0fsource_position\x18\x05 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x12?\n" + + "\x0frequired_caveat\x18\x06 \x01(\v2\x16.core.v1.AllowedCaveatR\x0erequiredCaveat\x12I\n" + + "\x13required_expiration\x18\a \x01(\v2\x18.core.v1.ExpirationTraitR\x12requiredExpiration\x1a\x10\n" + + "\x0ePublicWildcardB\x16\n" + + "\x14relation_or_wildcard\"\x11\n" + + "\x0fExpirationTrait\"0\n" + + "\rAllowedCaveat\x12\x1f\n" + + "\vcaveat_name\x18\x01 \x01(\tR\n" + + "caveatName\"\x91\x02\n" + + "\x0eUsersetRewrite\x12-\n" + + "\x05union\x18\x01 \x01(\v2\x15.core.v1.SetOperationH\x00R\x05union\x12;\n" + + "\fintersection\x18\x02 \x01(\v2\x15.core.v1.SetOperationH\x00R\fintersection\x125\n" + + "\texclusion\x18\x03 \x01(\v2\x15.core.v1.SetOperationH\x00R\texclusion\x12@\n" + + "\x0fsource_position\x18\x04 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePositionB\x1a\n" + + "\x11rewrite_operation\x12\x05\xbaH\x02\b\x01\"\x8a\x05\n" + + "\fSetOperation\x12@\n" + + "\x05child\x18\x01 \x03(\v2\x1b.core.v1.SetOperation.ChildB\r\xbaH\n" + + "\x92\x01\a\b\x01\"\x03\xc8\x01\x01R\x05child\x1a\xb7\x04\n" + + "\x05Child\x127\n" + + "\x05_this\x18\x01 \x01(\v2 .core.v1.SetOperation.Child.ThisH\x00R\x04This\x12E\n" + + "\x10computed_userset\x18\x02 \x01(\v2\x18.core.v1.ComputedUsersetH\x00R\x0fcomputedUserset\x12C\n" + + "\x10tuple_to_userset\x18\x03 \x01(\v2\x17.core.v1.TupleToUsersetH\x00R\x0etupleToUserset\x12B\n" + + "\x0fuserset_rewrite\x18\x04 \x01(\v2\x17.core.v1.UsersetRewriteH\x00R\x0eusersetRewrite\x12b\n" + + "\x1bfunctioned_tuple_to_userset\x18\b \x01(\v2!.core.v1.FunctionedTupleToUsersetH\x00R\x18functionedTupleToUserset\x124\n" + + "\x04_nil\x18\x06 \x01(\v2\x1f.core.v1.SetOperation.Child.NilH\x00R\x03Nil\x12@\n" + + "\x0fsource_position\x18\x05 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x12%\n" + + "\x0eoperation_path\x18\a \x03(\rR\roperationPath\x1a\x06\n" + + "\x04This\x1a\x05\n" + + "\x03NilB\x13\n" + + "\n" + + "child_type\x12\x05\xbaH\x02\b\x01\"\xb6\x02\n" + + "\x0eTupleToUserset\x12D\n" + + "\btupleset\x18\x01 \x01(\v2 .core.v1.TupleToUserset.TuplesetB\x06\xbaH\x03\xc8\x01\x01R\btupleset\x12K\n" + + "\x10computed_userset\x18\x02 \x01(\v2\x18.core.v1.ComputedUsersetB\x06\xbaH\x03\xc8\x01\x01R\x0fcomputedUserset\x12@\n" + + "\x0fsource_position\x18\x03 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x1aO\n" + + "\bTupleset\x12C\n" + + "\brelation\x18\x01 \x01(\tB'\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\brelation\"\xe8\x03\n" + + "\x18FunctionedTupleToUserset\x12R\n" + + "\bfunction\x18\x01 \x01(\x0e2*.core.v1.FunctionedTupleToUserset.FunctionB\n" + + "\xbaH\a\x82\x01\x04\x10\x01 \x00R\bfunction\x12N\n" + + "\btupleset\x18\x02 \x01(\v2*.core.v1.FunctionedTupleToUserset.TuplesetB\x06\xbaH\x03\xc8\x01\x01R\btupleset\x12K\n" + + "\x10computed_userset\x18\x03 \x01(\v2\x18.core.v1.ComputedUsersetB\x06\xbaH\x03\xc8\x01\x01R\x0fcomputedUserset\x12@\n" + + "\x0fsource_position\x18\x04 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\x1aO\n" + + "\bTupleset\x12C\n" + + "\brelation\x18\x01 \x01(\tB'\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\brelation\"H\n" + + "\bFunction\x12\x18\n" + + "\x14FUNCTION_UNSPECIFIED\x10\x00\x12\x10\n" + + "\fFUNCTION_ANY\x10\x01\x12\x10\n" + + "\fFUNCTION_ALL\x10\x02\"\x91\x02\n" + + "\x0fComputedUserset\x12A\n" + + "\x06object\x18\x01 \x01(\x0e2\x1f.core.v1.ComputedUserset.ObjectB\b\xbaH\x05\x82\x01\x02\x10\x01R\x06object\x12C\n" + + "\brelation\x18\x02 \x01(\tB'\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\brelation\x12@\n" + + "\x0fsource_position\x18\x03 \x01(\v2\x17.core.v1.SourcePositionR\x0esourcePosition\"4\n" + + "\x06Object\x12\x10\n" + + "\fTUPLE_OBJECT\x10\x00\x12\x18\n" + + "\x14TUPLE_USERSET_OBJECT\x10\x01\"\x8a\x01\n" + + "\x0eSourcePosition\x127\n" + + "\x18zero_indexed_line_number\x18\x01 \x01(\x04R\x15zeroIndexedLineNumber\x12?\n" + + "\x1czero_indexed_column_position\x18\x02 \x01(\x04R\x19zeroIndexedColumnPosition\"\x9c\x01\n" + + "\x10CaveatExpression\x128\n" + + "\toperation\x18\x01 \x01(\v2\x18.core.v1.CaveatOperationH\x00R\toperation\x127\n" + + "\x06caveat\x18\x02 \x01(\v2\x1d.core.v1.ContextualizedCaveatH\x00R\x06caveatB\x15\n" + + "\x13operation_or_caveat\"\xb0\x01\n" + + "\x0fCaveatOperation\x122\n" + + "\x02op\x18\x01 \x01(\x0e2\".core.v1.CaveatOperation.OperationR\x02op\x125\n" + + "\bchildren\x18\x02 \x03(\v2\x19.core.v1.CaveatExpressionR\bchildren\"2\n" + + "\tOperation\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\x06\n" + + "\x02OR\x10\x01\x12\a\n" + + "\x03AND\x10\x02\x12\a\n" + + "\x03NOT\x10\x03\"\xee\x03\n" + + "\x12RelationshipFilter\x12p\n" + + "\rresource_type\x18\x01 \x01(\tBK\xbaHHrF(\x80\x012A^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$R\fresourceType\x12W\n" + + "\x14optional_resource_id\x18\x02 \x01(\tB%\xbaH\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12d\n" + + "\x1boptional_resource_id_prefix\x18\x05 \x01(\tB%\xbaH\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x18optionalResourceIdPrefix\x12W\n" + + "\x11optional_relation\x18\x03 \x01(\tB*\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12N\n" + + "\x17optional_subject_filter\x18\x04 \x01(\v2\x16.core.v1.SubjectFilterR\x15optionalSubjectFilter\"\x86\x03\n" + + "\rSubjectFilter\x12k\n" + + "\fsubject_type\x18\x01 \x01(\tBH\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\vsubjectType\x12Z\n" + + "\x13optional_subject_id\x18\x02 \x01(\tB*\xbaH'r%(\x80\b2 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12R\n" + + "\x11optional_relation\x18\x03 \x01(\v2%.core.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n" + + "\x0eRelationFilter\x12F\n" + + "\brelation\x18\x01 \x01(\tB*\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\brelationB\x8a\x01\n" + + "\vcom.core.v1B\tCoreProtoP\x01Z3github.com/authzed/spicedb/pkg/proto/core/v1;corev1\xa2\x02\x03CXX\xaa\x02\aCore.V1\xca\x02\aCore\\V1\xe2\x02\x13Core\\V1\\GPBMetadata\xea\x02\bCore::V1b\x06proto3" var ( file_core_v1_core_proto_rawDescOnce sync.Once - file_core_v1_core_proto_rawDescData = file_core_v1_core_proto_rawDesc + file_core_v1_core_proto_rawDescData []byte ) func file_core_v1_core_proto_rawDescGZIP() []byte { file_core_v1_core_proto_rawDescOnce.Do(func() { - file_core_v1_core_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_v1_core_proto_rawDescData) + file_core_v1_core_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_core_v1_core_proto_rawDesc), len(file_core_v1_core_proto_rawDesc))) }) return file_core_v1_core_proto_rawDescData } @@ -3827,488 +3354,6 @@ func file_core_v1_core_proto_init() { if File_core_v1_core_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_v1_core_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RelationTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RelationshipIntegrity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContextualizedCaveat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CaveatDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CaveatTypeReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ObjectAndRelation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RelationReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Zookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RelationTupleUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RelationTupleTreeNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SetOperationUserset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DirectSubject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DirectSubjects); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NamespaceDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Relation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ReachabilityGraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReachabilityEntrypoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReachabilityEntrypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TypeInformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AllowedRelation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ExpirationTrait); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AllowedCaveat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UsersetRewrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SetOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*TupleToUserset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*FunctionedTupleToUserset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ComputedUserset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SourcePosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CaveatExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CaveatOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*RelationshipFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SubjectFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AllowedRelation_PublicWildcard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SetOperation_Child); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SetOperation_Child_This); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*SetOperation_Child_Nil); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*TupleToUserset_Tupleset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*FunctionedTupleToUserset_Tupleset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SubjectFilter_RelationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_core_v1_core_proto_msgTypes[9].OneofWrappers = []any{ (*RelationTupleTreeNode_IntermediateNode)(nil), (*RelationTupleTreeNode_LeafNode)(nil), @@ -4338,7 +3383,7 @@ func file_core_v1_core_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_core_v1_core_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_core_v1_core_proto_rawDesc), len(file_core_v1_core_proto_rawDesc)), NumEnums: 7, NumMessages: 43, NumExtensions: 0, @@ -4350,7 +3395,6 @@ func file_core_v1_core_proto_init() { MessageInfos: file_core_v1_core_proto_msgTypes, }.Build() File_core_v1_core_proto = out.File - file_core_v1_core_proto_rawDesc = nil file_core_v1_core_proto_goTypes = nil file_core_v1_core_proto_depIdxs = nil } diff --git a/pkg/proto/core/v1/core.pb.validate.go b/pkg/proto/core/v1/core.pb.validate.go deleted file mode 100644 index f8a01af22..000000000 --- a/pkg/proto/core/v1/core.pb.validate.go +++ /dev/null @@ -1,7023 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: core/v1/core.proto - -package corev1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RelationTuple with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RelationTuple) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationTuple with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RelationTupleMultiError, or -// nil if none found. -func (m *RelationTuple) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationTuple) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetResourceAndRelation() == nil { - err := RelationTupleValidationError{ - field: "ResourceAndRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceAndRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceAndRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSubject() == nil { - err := RelationTupleValidationError{ - field: "Subject", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCaveat()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetIntegrity()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Integrity", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "Integrity", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIntegrity()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleValidationError{ - field: "Integrity", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOptionalExpirationTime()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "OptionalExpirationTime", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleValidationError{ - field: "OptionalExpirationTime", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOptionalExpirationTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleValidationError{ - field: "OptionalExpirationTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RelationTupleMultiError(errors) - } - - return nil -} - -// RelationTupleMultiError is an error wrapping multiple validation errors -// returned by RelationTuple.ValidateAll() if the designated constraints -// aren't met. -type RelationTupleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationTupleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationTupleMultiError) AllErrors() []error { return m } - -// RelationTupleValidationError is the validation error returned by -// RelationTuple.Validate if the designated constraints aren't met. -type RelationTupleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationTupleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationTupleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationTupleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationTupleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationTupleValidationError) ErrorName() string { return "RelationTupleValidationError" } - -// Error satisfies the builtin error interface -func (e RelationTupleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationTuple.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationTupleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationTupleValidationError{} - -// Validate checks the field values on RelationshipIntegrity with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RelationshipIntegrity) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationshipIntegrity with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationshipIntegrityMultiError, or nil if none found. -func (m *RelationshipIntegrity) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationshipIntegrity) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for KeyId - - // no validation rules for Hash - - if all { - switch v := interface{}(m.GetHashedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationshipIntegrityValidationError{ - field: "HashedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationshipIntegrityValidationError{ - field: "HashedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHashedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationshipIntegrityValidationError{ - field: "HashedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RelationshipIntegrityMultiError(errors) - } - - return nil -} - -// RelationshipIntegrityMultiError is an error wrapping multiple validation -// errors returned by RelationshipIntegrity.ValidateAll() if the designated -// constraints aren't met. -type RelationshipIntegrityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationshipIntegrityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationshipIntegrityMultiError) AllErrors() []error { return m } - -// RelationshipIntegrityValidationError is the validation error returned by -// RelationshipIntegrity.Validate if the designated constraints aren't met. -type RelationshipIntegrityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationshipIntegrityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationshipIntegrityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationshipIntegrityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationshipIntegrityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationshipIntegrityValidationError) ErrorName() string { - return "RelationshipIntegrityValidationError" -} - -// Error satisfies the builtin error interface -func (e RelationshipIntegrityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationshipIntegrity.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationshipIntegrityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationshipIntegrityValidationError{} - -// Validate checks the field values on ContextualizedCaveat with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ContextualizedCaveat) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ContextualizedCaveat with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ContextualizedCaveatMultiError, or nil if none found. -func (m *ContextualizedCaveat) ValidateAll() error { - return m.validate(true) -} - -func (m *ContextualizedCaveat) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetCaveatName()) > 128 { - err := ContextualizedCaveatValidationError{ - field: "CaveatName", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ContextualizedCaveat_CaveatName_Pattern.MatchString(m.GetCaveatName()) { - err := ContextualizedCaveatValidationError{ - field: "CaveatName", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\\\*)$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ContextualizedCaveatValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ContextualizedCaveatValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ContextualizedCaveatValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ContextualizedCaveatMultiError(errors) - } - - return nil -} - -// ContextualizedCaveatMultiError is an error wrapping multiple validation -// errors returned by ContextualizedCaveat.ValidateAll() if the designated -// constraints aren't met. -type ContextualizedCaveatMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ContextualizedCaveatMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ContextualizedCaveatMultiError) AllErrors() []error { return m } - -// ContextualizedCaveatValidationError is the validation error returned by -// ContextualizedCaveat.Validate if the designated constraints aren't met. -type ContextualizedCaveatValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ContextualizedCaveatValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ContextualizedCaveatValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ContextualizedCaveatValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ContextualizedCaveatValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ContextualizedCaveatValidationError) ErrorName() string { - return "ContextualizedCaveatValidationError" -} - -// Error satisfies the builtin error interface -func (e ContextualizedCaveatValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sContextualizedCaveat.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ContextualizedCaveatValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ContextualizedCaveatValidationError{} - -var _ContextualizedCaveat_CaveatName_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$") - -// Validate checks the field values on CaveatDefinition with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CaveatDefinition) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CaveatDefinition with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CaveatDefinitionMultiError, or nil if none found. -func (m *CaveatDefinition) ValidateAll() error { - return m.validate(true) -} - -func (m *CaveatDefinition) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) > 128 { - err := CaveatDefinitionValidationError{ - field: "Name", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_CaveatDefinition_Name_Pattern.MatchString(m.GetName()) { - err := CaveatDefinitionValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\\\*)$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if l := len(m.GetSerializedExpression()); l < 0 || l > 4096 { - err := CaveatDefinitionValidationError{ - field: "SerializedExpression", - reason: "value length must be between 0 and 4096 bytes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - if l := len(m.GetParameterTypes()); l < 1 || l > 20 { - err := CaveatDefinitionValidationError{ - field: "ParameterTypes", - reason: "value must contain between 1 and 20 pairs, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - { - sorted_keys := make([]string, len(m.GetParameterTypes())) - i := 0 - for key := range m.GetParameterTypes() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetParameterTypes()[key] - _ = val - - // no validation rules for ParameterTypes[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: fmt.Sprintf("ParameterTypes[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: fmt.Sprintf("ParameterTypes[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatDefinitionValidationError{ - field: fmt.Sprintf("ParameterTypes[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CaveatDefinitionMultiError(errors) - } - - return nil -} - -// CaveatDefinitionMultiError is an error wrapping multiple validation errors -// returned by CaveatDefinition.ValidateAll() if the designated constraints -// aren't met. -type CaveatDefinitionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CaveatDefinitionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CaveatDefinitionMultiError) AllErrors() []error { return m } - -// CaveatDefinitionValidationError is the validation error returned by -// CaveatDefinition.Validate if the designated constraints aren't met. -type CaveatDefinitionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CaveatDefinitionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CaveatDefinitionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CaveatDefinitionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CaveatDefinitionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CaveatDefinitionValidationError) ErrorName() string { return "CaveatDefinitionValidationError" } - -// Error satisfies the builtin error interface -func (e CaveatDefinitionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCaveatDefinition.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CaveatDefinitionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CaveatDefinitionValidationError{} - -var _CaveatDefinition_Name_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$") - -// Validate checks the field values on CaveatTypeReference with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CaveatTypeReference) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CaveatTypeReference with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CaveatTypeReferenceMultiError, or nil if none found. -func (m *CaveatTypeReference) ValidateAll() error { - return m.validate(true) -} - -func (m *CaveatTypeReference) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for TypeName - - if len(m.GetChildTypes()) > 1 { - err := CaveatTypeReferenceValidationError{ - field: "ChildTypes", - reason: "value must contain no more than 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetChildTypes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatTypeReferenceValidationError{ - field: fmt.Sprintf("ChildTypes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatTypeReferenceValidationError{ - field: fmt.Sprintf("ChildTypes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatTypeReferenceValidationError{ - field: fmt.Sprintf("ChildTypes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return CaveatTypeReferenceMultiError(errors) - } - - return nil -} - -// CaveatTypeReferenceMultiError is an error wrapping multiple validation -// errors returned by CaveatTypeReference.ValidateAll() if the designated -// constraints aren't met. -type CaveatTypeReferenceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CaveatTypeReferenceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CaveatTypeReferenceMultiError) AllErrors() []error { return m } - -// CaveatTypeReferenceValidationError is the validation error returned by -// CaveatTypeReference.Validate if the designated constraints aren't met. -type CaveatTypeReferenceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CaveatTypeReferenceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CaveatTypeReferenceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CaveatTypeReferenceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CaveatTypeReferenceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CaveatTypeReferenceValidationError) ErrorName() string { - return "CaveatTypeReferenceValidationError" -} - -// Error satisfies the builtin error interface -func (e CaveatTypeReferenceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCaveatTypeReference.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CaveatTypeReferenceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CaveatTypeReferenceValidationError{} - -// Validate checks the field values on ObjectAndRelation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ObjectAndRelation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ObjectAndRelation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ObjectAndRelationMultiError, or nil if none found. -func (m *ObjectAndRelation) ValidateAll() error { - return m.validate(true) -} - -func (m *ObjectAndRelation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetNamespace()) > 128 { - err := ObjectAndRelationValidationError{ - field: "Namespace", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ObjectAndRelation_Namespace_Pattern.MatchString(m.GetNamespace()) { - err := ObjectAndRelationValidationError{ - field: "Namespace", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetObjectId()) > 1024 { - err := ObjectAndRelationValidationError{ - field: "ObjectId", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ObjectAndRelation_ObjectId_Pattern.MatchString(m.GetObjectId()) { - err := ObjectAndRelationValidationError{ - field: "ObjectId", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9/_|\\\\-=+]{1,})|\\\\*)$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRelation()) > 64 { - err := ObjectAndRelationValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ObjectAndRelation_Relation_Pattern.MatchString(m.GetRelation()) { - err := ObjectAndRelationValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^(\\\\.\\\\.\\\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ObjectAndRelationMultiError(errors) - } - - return nil -} - -// ObjectAndRelationMultiError is an error wrapping multiple validation errors -// returned by ObjectAndRelation.ValidateAll() if the designated constraints -// aren't met. -type ObjectAndRelationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ObjectAndRelationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ObjectAndRelationMultiError) AllErrors() []error { return m } - -// ObjectAndRelationValidationError is the validation error returned by -// ObjectAndRelation.Validate if the designated constraints aren't met. -type ObjectAndRelationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ObjectAndRelationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ObjectAndRelationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ObjectAndRelationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ObjectAndRelationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ObjectAndRelationValidationError) ErrorName() string { - return "ObjectAndRelationValidationError" -} - -// Error satisfies the builtin error interface -func (e ObjectAndRelationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sObjectAndRelation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ObjectAndRelationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ObjectAndRelationValidationError{} - -var _ObjectAndRelation_Namespace_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -var _ObjectAndRelation_ObjectId_Pattern = regexp.MustCompile("^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$") - -var _ObjectAndRelation_Relation_Pattern = regexp.MustCompile("^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$") - -// Validate checks the field values on RelationReference with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RelationReference) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationReference with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationReferenceMultiError, or nil if none found. -func (m *RelationReference) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationReference) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetNamespace()) > 128 { - err := RelationReferenceValidationError{ - field: "Namespace", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationReference_Namespace_Pattern.MatchString(m.GetNamespace()) { - err := RelationReferenceValidationError{ - field: "Namespace", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRelation()) > 64 { - err := RelationReferenceValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationReference_Relation_Pattern.MatchString(m.GetRelation()) { - err := RelationReferenceValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^(\\\\.\\\\.\\\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RelationReferenceMultiError(errors) - } - - return nil -} - -// RelationReferenceMultiError is an error wrapping multiple validation errors -// returned by RelationReference.ValidateAll() if the designated constraints -// aren't met. -type RelationReferenceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationReferenceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationReferenceMultiError) AllErrors() []error { return m } - -// RelationReferenceValidationError is the validation error returned by -// RelationReference.Validate if the designated constraints aren't met. -type RelationReferenceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationReferenceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationReferenceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationReferenceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationReferenceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationReferenceValidationError) ErrorName() string { - return "RelationReferenceValidationError" -} - -// Error satisfies the builtin error interface -func (e RelationReferenceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationReference.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationReferenceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationReferenceValidationError{} - -var _RelationReference_Namespace_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -var _RelationReference_Relation_Pattern = regexp.MustCompile("^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$") - -// Validate checks the field values on Zookie with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Zookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Zookie with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in ZookieMultiError, or nil if none found. -func (m *Zookie) ValidateAll() error { - return m.validate(true) -} - -func (m *Zookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetToken()) < 1 { - err := ZookieValidationError{ - field: "Token", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ZookieMultiError(errors) - } - - return nil -} - -// ZookieMultiError is an error wrapping multiple validation errors returned by -// Zookie.ValidateAll() if the designated constraints aren't met. -type ZookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ZookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ZookieMultiError) AllErrors() []error { return m } - -// ZookieValidationError is the validation error returned by Zookie.Validate if -// the designated constraints aren't met. -type ZookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ZookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ZookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ZookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ZookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ZookieValidationError) ErrorName() string { return "ZookieValidationError" } - -// Error satisfies the builtin error interface -func (e ZookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sZookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ZookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ZookieValidationError{} - -// Validate checks the field values on RelationTupleUpdate with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RelationTupleUpdate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationTupleUpdate with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationTupleUpdateMultiError, or nil if none found. -func (m *RelationTupleUpdate) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationTupleUpdate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := RelationTupleUpdate_Operation_name[int32(m.GetOperation())]; !ok { - err := RelationTupleUpdateValidationError{ - field: "Operation", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTuple() == nil { - err := RelationTupleUpdateValidationError{ - field: "Tuple", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTuple()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleUpdateValidationError{ - field: "Tuple", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleUpdateValidationError{ - field: "Tuple", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleUpdateValidationError{ - field: "Tuple", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RelationTupleUpdateMultiError(errors) - } - - return nil -} - -// RelationTupleUpdateMultiError is an error wrapping multiple validation -// errors returned by RelationTupleUpdate.ValidateAll() if the designated -// constraints aren't met. -type RelationTupleUpdateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationTupleUpdateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationTupleUpdateMultiError) AllErrors() []error { return m } - -// RelationTupleUpdateValidationError is the validation error returned by -// RelationTupleUpdate.Validate if the designated constraints aren't met. -type RelationTupleUpdateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationTupleUpdateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationTupleUpdateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationTupleUpdateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationTupleUpdateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationTupleUpdateValidationError) ErrorName() string { - return "RelationTupleUpdateValidationError" -} - -// Error satisfies the builtin error interface -func (e RelationTupleUpdateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationTupleUpdate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationTupleUpdateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationTupleUpdateValidationError{} - -// Validate checks the field values on RelationTupleTreeNode with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RelationTupleTreeNode) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationTupleTreeNode with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationTupleTreeNodeMultiError, or nil if none found. -func (m *RelationTupleTreeNode) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationTupleTreeNode) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetExpanded()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "Expanded", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "Expanded", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpanded()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleTreeNodeValidationError{ - field: "Expanded", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCaveatExpression()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveatExpression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleTreeNodeValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.NodeType.(type) { - case *RelationTupleTreeNode_IntermediateNode: - if v == nil { - err := RelationTupleTreeNodeValidationError{ - field: "NodeType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetIntermediateNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "IntermediateNode", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "IntermediateNode", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIntermediateNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleTreeNodeValidationError{ - field: "IntermediateNode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RelationTupleTreeNode_LeafNode: - if v == nil { - err := RelationTupleTreeNodeValidationError{ - field: "NodeType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetLeafNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "LeafNode", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationTupleTreeNodeValidationError{ - field: "LeafNode", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLeafNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationTupleTreeNodeValidationError{ - field: "LeafNode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RelationTupleTreeNodeMultiError(errors) - } - - return nil -} - -// RelationTupleTreeNodeMultiError is an error wrapping multiple validation -// errors returned by RelationTupleTreeNode.ValidateAll() if the designated -// constraints aren't met. -type RelationTupleTreeNodeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationTupleTreeNodeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationTupleTreeNodeMultiError) AllErrors() []error { return m } - -// RelationTupleTreeNodeValidationError is the validation error returned by -// RelationTupleTreeNode.Validate if the designated constraints aren't met. -type RelationTupleTreeNodeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationTupleTreeNodeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationTupleTreeNodeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationTupleTreeNodeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationTupleTreeNodeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationTupleTreeNodeValidationError) ErrorName() string { - return "RelationTupleTreeNodeValidationError" -} - -// Error satisfies the builtin error interface -func (e RelationTupleTreeNodeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationTupleTreeNode.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationTupleTreeNodeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationTupleTreeNodeValidationError{} - -// Validate checks the field values on SetOperationUserset with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SetOperationUserset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SetOperationUserset with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SetOperationUsersetMultiError, or nil if none found. -func (m *SetOperationUserset) ValidateAll() error { - return m.validate(true) -} - -func (m *SetOperationUserset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Operation - - for idx, item := range m.GetChildNodes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperationUsersetValidationError{ - field: fmt.Sprintf("ChildNodes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperationUsersetValidationError{ - field: fmt.Sprintf("ChildNodes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperationUsersetValidationError{ - field: fmt.Sprintf("ChildNodes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return SetOperationUsersetMultiError(errors) - } - - return nil -} - -// SetOperationUsersetMultiError is an error wrapping multiple validation -// errors returned by SetOperationUserset.ValidateAll() if the designated -// constraints aren't met. -type SetOperationUsersetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SetOperationUsersetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SetOperationUsersetMultiError) AllErrors() []error { return m } - -// SetOperationUsersetValidationError is the validation error returned by -// SetOperationUserset.Validate if the designated constraints aren't met. -type SetOperationUsersetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SetOperationUsersetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SetOperationUsersetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SetOperationUsersetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SetOperationUsersetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SetOperationUsersetValidationError) ErrorName() string { - return "SetOperationUsersetValidationError" -} - -// Error satisfies the builtin error interface -func (e SetOperationUsersetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSetOperationUserset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SetOperationUsersetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SetOperationUsersetValidationError{} - -// Validate checks the field values on DirectSubject with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DirectSubject) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DirectSubject with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DirectSubjectMultiError, or -// nil if none found. -func (m *DirectSubject) ValidateAll() error { - return m.validate(true) -} - -func (m *DirectSubject) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectSubjectValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DirectSubjectValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DirectSubjectValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCaveatExpression()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DirectSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveatExpression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DirectSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DirectSubjectMultiError(errors) - } - - return nil -} - -// DirectSubjectMultiError is an error wrapping multiple validation errors -// returned by DirectSubject.ValidateAll() if the designated constraints -// aren't met. -type DirectSubjectMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DirectSubjectMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DirectSubjectMultiError) AllErrors() []error { return m } - -// DirectSubjectValidationError is the validation error returned by -// DirectSubject.Validate if the designated constraints aren't met. -type DirectSubjectValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DirectSubjectValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DirectSubjectValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DirectSubjectValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DirectSubjectValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DirectSubjectValidationError) ErrorName() string { return "DirectSubjectValidationError" } - -// Error satisfies the builtin error interface -func (e DirectSubjectValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDirectSubject.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DirectSubjectValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DirectSubjectValidationError{} - -// Validate checks the field values on DirectSubjects with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DirectSubjects) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DirectSubjects with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DirectSubjectsMultiError, -// or nil if none found. -func (m *DirectSubjects) ValidateAll() error { - return m.validate(true) -} - -func (m *DirectSubjects) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetSubjects() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectSubjectsValidationError{ - field: fmt.Sprintf("Subjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DirectSubjectsValidationError{ - field: fmt.Sprintf("Subjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DirectSubjectsValidationError{ - field: fmt.Sprintf("Subjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DirectSubjectsMultiError(errors) - } - - return nil -} - -// DirectSubjectsMultiError is an error wrapping multiple validation errors -// returned by DirectSubjects.ValidateAll() if the designated constraints -// aren't met. -type DirectSubjectsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DirectSubjectsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DirectSubjectsMultiError) AllErrors() []error { return m } - -// DirectSubjectsValidationError is the validation error returned by -// DirectSubjects.Validate if the designated constraints aren't met. -type DirectSubjectsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DirectSubjectsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DirectSubjectsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DirectSubjectsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DirectSubjectsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DirectSubjectsValidationError) ErrorName() string { return "DirectSubjectsValidationError" } - -// Error satisfies the builtin error interface -func (e DirectSubjectsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDirectSubjects.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DirectSubjectsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DirectSubjectsValidationError{} - -// Validate checks the field values on Metadata with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Metadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Metadata with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataMultiError, or nil -// if none found. -func (m *Metadata) ValidateAll() error { - return m.validate(true) -} - -func (m *Metadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetMetadataMessage()) < 1 { - err := MetadataValidationError{ - field: "MetadataMessage", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetMetadataMessage() { - _, _ = idx, item - - if item == nil { - err := MetadataValidationError{ - field: fmt.Sprintf("MetadataMessage[%v]", idx), - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if a := item; a != nil { - - if _, ok := _Metadata_MetadataMessage_InLookup[a.GetTypeUrl()]; !ok { - err := MetadataValidationError{ - field: fmt.Sprintf("MetadataMessage[%v]", idx), - reason: "type URL must be in list [type.googleapis.com/impl.v1.DocComment type.googleapis.com/impl.v1.RelationMetadata]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - } - - if len(errors) > 0 { - return MetadataMultiError(errors) - } - - return nil -} - -// MetadataMultiError is an error wrapping multiple validation errors returned -// by Metadata.ValidateAll() if the designated constraints aren't met. -type MetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataMultiError) AllErrors() []error { return m } - -// MetadataValidationError is the validation error returned by -// Metadata.Validate if the designated constraints aren't met. -type MetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataValidationError{} - -var _Metadata_MetadataMessage_InLookup = map[string]struct{}{ - "type.googleapis.com/impl.v1.DocComment": {}, - "type.googleapis.com/impl.v1.RelationMetadata": {}, -} - -// Validate checks the field values on NamespaceDefinition with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NamespaceDefinition) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NamespaceDefinition with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NamespaceDefinitionMultiError, or nil if none found. -func (m *NamespaceDefinition) ValidateAll() error { - return m.validate(true) -} - -func (m *NamespaceDefinition) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) > 128 { - err := NamespaceDefinitionValidationError{ - field: "Name", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_NamespaceDefinition_Name_Pattern.MatchString(m.GetName()) { - err := NamespaceDefinitionValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRelation() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: fmt.Sprintf("Relation[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: fmt.Sprintf("Relation[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NamespaceDefinitionValidationError{ - field: fmt.Sprintf("Relation[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NamespaceDefinitionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NamespaceDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NamespaceDefinitionValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return NamespaceDefinitionMultiError(errors) - } - - return nil -} - -// NamespaceDefinitionMultiError is an error wrapping multiple validation -// errors returned by NamespaceDefinition.ValidateAll() if the designated -// constraints aren't met. -type NamespaceDefinitionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NamespaceDefinitionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NamespaceDefinitionMultiError) AllErrors() []error { return m } - -// NamespaceDefinitionValidationError is the validation error returned by -// NamespaceDefinition.Validate if the designated constraints aren't met. -type NamespaceDefinitionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NamespaceDefinitionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NamespaceDefinitionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NamespaceDefinitionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NamespaceDefinitionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NamespaceDefinitionValidationError) ErrorName() string { - return "NamespaceDefinitionValidationError" -} - -// Error satisfies the builtin error interface -func (e NamespaceDefinitionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNamespaceDefinition.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NamespaceDefinitionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NamespaceDefinitionValidationError{} - -var _NamespaceDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -// Validate checks the field values on Relation with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Relation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Relation with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RelationMultiError, or nil -// if none found. -func (m *Relation) ValidateAll() error { - return m.validate(true) -} - -func (m *Relation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) > 64 { - err := RelationValidationError{ - field: "Name", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_Relation_Name_Pattern.MatchString(m.GetName()) { - err := RelationValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUsersetRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUsersetRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTypeInformation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationValidationError{ - field: "TypeInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationValidationError{ - field: "TypeInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypeInformation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationValidationError{ - field: "TypeInformation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AliasingRelation - - // no validation rules for CanonicalCacheKey - - if len(errors) > 0 { - return RelationMultiError(errors) - } - - return nil -} - -// RelationMultiError is an error wrapping multiple validation errors returned -// by Relation.ValidateAll() if the designated constraints aren't met. -type RelationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationMultiError) AllErrors() []error { return m } - -// RelationValidationError is the validation error returned by -// Relation.Validate if the designated constraints aren't met. -type RelationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationValidationError) ErrorName() string { return "RelationValidationError" } - -// Error satisfies the builtin error interface -func (e RelationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationValidationError{} - -var _Relation_Name_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -// Validate checks the field values on ReachabilityGraph with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ReachabilityGraph) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ReachabilityGraph with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ReachabilityGraphMultiError, or nil if none found. -func (m *ReachabilityGraph) ValidateAll() error { - return m.validate(true) -} - -func (m *ReachabilityGraph) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetEntrypointsBySubjectType())) - i := 0 - for key := range m.GetEntrypointsBySubjectType() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetEntrypointsBySubjectType()[key] - _ = val - - // no validation rules for EntrypointsBySubjectType[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectType[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectType[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectType[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetEntrypointsBySubjectRelation())) - i := 0 - for key := range m.GetEntrypointsBySubjectRelation() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetEntrypointsBySubjectRelation()[key] - _ = val - - // no validation rules for EntrypointsBySubjectRelation[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectRelation[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectRelation[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ReachabilityGraphValidationError{ - field: fmt.Sprintf("EntrypointsBySubjectRelation[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return ReachabilityGraphMultiError(errors) - } - - return nil -} - -// ReachabilityGraphMultiError is an error wrapping multiple validation errors -// returned by ReachabilityGraph.ValidateAll() if the designated constraints -// aren't met. -type ReachabilityGraphMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ReachabilityGraphMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ReachabilityGraphMultiError) AllErrors() []error { return m } - -// ReachabilityGraphValidationError is the validation error returned by -// ReachabilityGraph.Validate if the designated constraints aren't met. -type ReachabilityGraphValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ReachabilityGraphValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ReachabilityGraphValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ReachabilityGraphValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ReachabilityGraphValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ReachabilityGraphValidationError) ErrorName() string { - return "ReachabilityGraphValidationError" -} - -// Error satisfies the builtin error interface -func (e ReachabilityGraphValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sReachabilityGraph.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ReachabilityGraphValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ReachabilityGraphValidationError{} - -// Validate checks the field values on ReachabilityEntrypoints with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ReachabilityEntrypoints) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ReachabilityEntrypoints with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ReachabilityEntrypointsMultiError, or nil if none found. -func (m *ReachabilityEntrypoints) ValidateAll() error { - return m.validate(true) -} - -func (m *ReachabilityEntrypoints) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetEntrypoints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ReachabilityEntrypointsValidationError{ - field: fmt.Sprintf("Entrypoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ReachabilityEntrypointsValidationError{ - field: fmt.Sprintf("Entrypoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ReachabilityEntrypointsValidationError{ - field: fmt.Sprintf("Entrypoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for SubjectType - - if all { - switch v := interface{}(m.GetSubjectRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ReachabilityEntrypointsValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ReachabilityEntrypointsValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubjectRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ReachabilityEntrypointsValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ReachabilityEntrypointsMultiError(errors) - } - - return nil -} - -// ReachabilityEntrypointsMultiError is an error wrapping multiple validation -// errors returned by ReachabilityEntrypoints.ValidateAll() if the designated -// constraints aren't met. -type ReachabilityEntrypointsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ReachabilityEntrypointsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ReachabilityEntrypointsMultiError) AllErrors() []error { return m } - -// ReachabilityEntrypointsValidationError is the validation error returned by -// ReachabilityEntrypoints.Validate if the designated constraints aren't met. -type ReachabilityEntrypointsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ReachabilityEntrypointsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ReachabilityEntrypointsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ReachabilityEntrypointsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ReachabilityEntrypointsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ReachabilityEntrypointsValidationError) ErrorName() string { - return "ReachabilityEntrypointsValidationError" -} - -// Error satisfies the builtin error interface -func (e ReachabilityEntrypointsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sReachabilityEntrypoints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ReachabilityEntrypointsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ReachabilityEntrypointsValidationError{} - -// Validate checks the field values on ReachabilityEntrypoint with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ReachabilityEntrypoint) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ReachabilityEntrypoint with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ReachabilityEntrypointMultiError, or nil if none found. -func (m *ReachabilityEntrypoint) ValidateAll() error { - return m.validate(true) -} - -func (m *ReachabilityEntrypoint) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Kind - - if all { - switch v := interface{}(m.GetTargetRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ReachabilityEntrypointValidationError{ - field: "TargetRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ReachabilityEntrypointValidationError{ - field: "TargetRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTargetRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ReachabilityEntrypointValidationError{ - field: "TargetRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ResultStatus - - // no validation rules for TuplesetRelation - - // no validation rules for ComputedUsersetRelation - - if len(errors) > 0 { - return ReachabilityEntrypointMultiError(errors) - } - - return nil -} - -// ReachabilityEntrypointMultiError is an error wrapping multiple validation -// errors returned by ReachabilityEntrypoint.ValidateAll() if the designated -// constraints aren't met. -type ReachabilityEntrypointMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ReachabilityEntrypointMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ReachabilityEntrypointMultiError) AllErrors() []error { return m } - -// ReachabilityEntrypointValidationError is the validation error returned by -// ReachabilityEntrypoint.Validate if the designated constraints aren't met. -type ReachabilityEntrypointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ReachabilityEntrypointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ReachabilityEntrypointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ReachabilityEntrypointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ReachabilityEntrypointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ReachabilityEntrypointValidationError) ErrorName() string { - return "ReachabilityEntrypointValidationError" -} - -// Error satisfies the builtin error interface -func (e ReachabilityEntrypointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sReachabilityEntrypoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ReachabilityEntrypointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ReachabilityEntrypointValidationError{} - -// Validate checks the field values on TypeInformation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *TypeInformation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TypeInformation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TypeInformationMultiError, or nil if none found. -func (m *TypeInformation) ValidateAll() error { - return m.validate(true) -} - -func (m *TypeInformation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetAllowedDirectRelations() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TypeInformationValidationError{ - field: fmt.Sprintf("AllowedDirectRelations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TypeInformationValidationError{ - field: fmt.Sprintf("AllowedDirectRelations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TypeInformationValidationError{ - field: fmt.Sprintf("AllowedDirectRelations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return TypeInformationMultiError(errors) - } - - return nil -} - -// TypeInformationMultiError is an error wrapping multiple validation errors -// returned by TypeInformation.ValidateAll() if the designated constraints -// aren't met. -type TypeInformationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TypeInformationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TypeInformationMultiError) AllErrors() []error { return m } - -// TypeInformationValidationError is the validation error returned by -// TypeInformation.Validate if the designated constraints aren't met. -type TypeInformationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypeInformationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypeInformationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypeInformationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypeInformationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypeInformationValidationError) ErrorName() string { return "TypeInformationValidationError" } - -// Error satisfies the builtin error interface -func (e TypeInformationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypeInformation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypeInformationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypeInformationValidationError{} - -// Validate checks the field values on AllowedRelation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AllowedRelation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AllowedRelation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AllowedRelationMultiError, or nil if none found. -func (m *AllowedRelation) ValidateAll() error { - return m.validate(true) -} - -func (m *AllowedRelation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetNamespace()) > 128 { - err := AllowedRelationValidationError{ - field: "Namespace", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_AllowedRelation_Namespace_Pattern.MatchString(m.GetNamespace()) { - err := AllowedRelationValidationError{ - field: "Namespace", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AllowedRelationValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequiredCaveat()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "RequiredCaveat", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "RequiredCaveat", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequiredCaveat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AllowedRelationValidationError{ - field: "RequiredCaveat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequiredExpiration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "RequiredExpiration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "RequiredExpiration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequiredExpiration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AllowedRelationValidationError{ - field: "RequiredExpiration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.RelationOrWildcard.(type) { - case *AllowedRelation_Relation: - if v == nil { - err := AllowedRelationValidationError{ - field: "RelationOrWildcard", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRelation()) > 64 { - err := AllowedRelationValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_AllowedRelation_Relation_Pattern.MatchString(m.GetRelation()) { - err := AllowedRelationValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^(\\\\.\\\\.\\\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *AllowedRelation_PublicWildcard_: - if v == nil { - err := AllowedRelationValidationError{ - field: "RelationOrWildcard", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPublicWildcard()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "PublicWildcard", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AllowedRelationValidationError{ - field: "PublicWildcard", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPublicWildcard()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AllowedRelationValidationError{ - field: "PublicWildcard", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return AllowedRelationMultiError(errors) - } - - return nil -} - -// AllowedRelationMultiError is an error wrapping multiple validation errors -// returned by AllowedRelation.ValidateAll() if the designated constraints -// aren't met. -type AllowedRelationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AllowedRelationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AllowedRelationMultiError) AllErrors() []error { return m } - -// AllowedRelationValidationError is the validation error returned by -// AllowedRelation.Validate if the designated constraints aren't met. -type AllowedRelationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AllowedRelationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AllowedRelationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AllowedRelationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AllowedRelationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AllowedRelationValidationError) ErrorName() string { return "AllowedRelationValidationError" } - -// Error satisfies the builtin error interface -func (e AllowedRelationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAllowedRelation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AllowedRelationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AllowedRelationValidationError{} - -var _AllowedRelation_Namespace_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -var _AllowedRelation_Relation_Pattern = regexp.MustCompile("^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$") - -// Validate checks the field values on ExpirationTrait with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ExpirationTrait) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ExpirationTrait with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ExpirationTraitMultiError, or nil if none found. -func (m *ExpirationTrait) ValidateAll() error { - return m.validate(true) -} - -func (m *ExpirationTrait) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ExpirationTraitMultiError(errors) - } - - return nil -} - -// ExpirationTraitMultiError is an error wrapping multiple validation errors -// returned by ExpirationTrait.ValidateAll() if the designated constraints -// aren't met. -type ExpirationTraitMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ExpirationTraitMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ExpirationTraitMultiError) AllErrors() []error { return m } - -// ExpirationTraitValidationError is the validation error returned by -// ExpirationTrait.Validate if the designated constraints aren't met. -type ExpirationTraitValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExpirationTraitValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExpirationTraitValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExpirationTraitValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExpirationTraitValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExpirationTraitValidationError) ErrorName() string { return "ExpirationTraitValidationError" } - -// Error satisfies the builtin error interface -func (e ExpirationTraitValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExpirationTrait.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExpirationTraitValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExpirationTraitValidationError{} - -// Validate checks the field values on AllowedCaveat with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *AllowedCaveat) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AllowedCaveat with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AllowedCaveatMultiError, or -// nil if none found. -func (m *AllowedCaveat) ValidateAll() error { - return m.validate(true) -} - -func (m *AllowedCaveat) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for CaveatName - - if len(errors) > 0 { - return AllowedCaveatMultiError(errors) - } - - return nil -} - -// AllowedCaveatMultiError is an error wrapping multiple validation errors -// returned by AllowedCaveat.ValidateAll() if the designated constraints -// aren't met. -type AllowedCaveatMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AllowedCaveatMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AllowedCaveatMultiError) AllErrors() []error { return m } - -// AllowedCaveatValidationError is the validation error returned by -// AllowedCaveat.Validate if the designated constraints aren't met. -type AllowedCaveatValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AllowedCaveatValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AllowedCaveatValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AllowedCaveatValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AllowedCaveatValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AllowedCaveatValidationError) ErrorName() string { return "AllowedCaveatValidationError" } - -// Error satisfies the builtin error interface -func (e AllowedCaveatValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAllowedCaveat.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AllowedCaveatValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AllowedCaveatValidationError{} - -// Validate checks the field values on UsersetRewrite with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *UsersetRewrite) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UsersetRewrite with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in UsersetRewriteMultiError, -// or nil if none found. -func (m *UsersetRewrite) ValidateAll() error { - return m.validate(true) -} - -func (m *UsersetRewrite) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UsersetRewriteValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofRewriteOperationPresent := false - switch v := m.RewriteOperation.(type) { - case *UsersetRewrite_Union: - if v == nil { - err := UsersetRewriteValidationError{ - field: "RewriteOperation", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRewriteOperationPresent = true - - if m.GetUnion() == nil { - err := UsersetRewriteValidationError{ - field: "Union", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUnion()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Union", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Union", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUnion()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UsersetRewriteValidationError{ - field: "Union", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *UsersetRewrite_Intersection: - if v == nil { - err := UsersetRewriteValidationError{ - field: "RewriteOperation", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRewriteOperationPresent = true - - if m.GetIntersection() == nil { - err := UsersetRewriteValidationError{ - field: "Intersection", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetIntersection()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Intersection", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Intersection", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIntersection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UsersetRewriteValidationError{ - field: "Intersection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *UsersetRewrite_Exclusion: - if v == nil { - err := UsersetRewriteValidationError{ - field: "RewriteOperation", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRewriteOperationPresent = true - - if m.GetExclusion() == nil { - err := UsersetRewriteValidationError{ - field: "Exclusion", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExclusion()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Exclusion", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UsersetRewriteValidationError{ - field: "Exclusion", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExclusion()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UsersetRewriteValidationError{ - field: "Exclusion", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofRewriteOperationPresent { - err := UsersetRewriteValidationError{ - field: "RewriteOperation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return UsersetRewriteMultiError(errors) - } - - return nil -} - -// UsersetRewriteMultiError is an error wrapping multiple validation errors -// returned by UsersetRewrite.ValidateAll() if the designated constraints -// aren't met. -type UsersetRewriteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UsersetRewriteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UsersetRewriteMultiError) AllErrors() []error { return m } - -// UsersetRewriteValidationError is the validation error returned by -// UsersetRewrite.Validate if the designated constraints aren't met. -type UsersetRewriteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UsersetRewriteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UsersetRewriteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UsersetRewriteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UsersetRewriteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UsersetRewriteValidationError) ErrorName() string { return "UsersetRewriteValidationError" } - -// Error satisfies the builtin error interface -func (e UsersetRewriteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUsersetRewrite.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UsersetRewriteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UsersetRewriteValidationError{} - -// Validate checks the field values on SetOperation with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SetOperation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SetOperation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SetOperationMultiError, or -// nil if none found. -func (m *SetOperation) ValidateAll() error { - return m.validate(true) -} - -func (m *SetOperation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetChild()) < 1 { - err := SetOperationValidationError{ - field: "Child", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetChild() { - _, _ = idx, item - - if item == nil { - err := SetOperationValidationError{ - field: fmt.Sprintf("Child[%v]", idx), - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperationValidationError{ - field: fmt.Sprintf("Child[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperationValidationError{ - field: fmt.Sprintf("Child[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperationValidationError{ - field: fmt.Sprintf("Child[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return SetOperationMultiError(errors) - } - - return nil -} - -// SetOperationMultiError is an error wrapping multiple validation errors -// returned by SetOperation.ValidateAll() if the designated constraints aren't met. -type SetOperationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SetOperationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SetOperationMultiError) AllErrors() []error { return m } - -// SetOperationValidationError is the validation error returned by -// SetOperation.Validate if the designated constraints aren't met. -type SetOperationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SetOperationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SetOperationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SetOperationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SetOperationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SetOperationValidationError) ErrorName() string { return "SetOperationValidationError" } - -// Error satisfies the builtin error interface -func (e SetOperationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSetOperation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SetOperationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SetOperationValidationError{} - -// Validate checks the field values on TupleToUserset with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TupleToUserset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TupleToUserset with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TupleToUsersetMultiError, -// or nil if none found. -func (m *TupleToUserset) ValidateAll() error { - return m.validate(true) -} - -func (m *TupleToUserset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetTupleset() == nil { - err := TupleToUsersetValidationError{ - field: "Tupleset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTupleset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTupleset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetComputedUserset() == nil { - err := TupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetComputedUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputedUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return TupleToUsersetMultiError(errors) - } - - return nil -} - -// TupleToUsersetMultiError is an error wrapping multiple validation errors -// returned by TupleToUserset.ValidateAll() if the designated constraints -// aren't met. -type TupleToUsersetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TupleToUsersetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TupleToUsersetMultiError) AllErrors() []error { return m } - -// TupleToUsersetValidationError is the validation error returned by -// TupleToUserset.Validate if the designated constraints aren't met. -type TupleToUsersetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TupleToUsersetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TupleToUsersetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TupleToUsersetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TupleToUsersetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TupleToUsersetValidationError) ErrorName() string { return "TupleToUsersetValidationError" } - -// Error satisfies the builtin error interface -func (e TupleToUsersetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTupleToUserset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TupleToUsersetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TupleToUsersetValidationError{} - -// Validate checks the field values on FunctionedTupleToUserset with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FunctionedTupleToUserset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FunctionedTupleToUserset with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FunctionedTupleToUsersetMultiError, or nil if none found. -func (m *FunctionedTupleToUserset) ValidateAll() error { - return m.validate(true) -} - -func (m *FunctionedTupleToUserset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := _FunctionedTupleToUserset_Function_NotInLookup[m.GetFunction()]; ok { - err := FunctionedTupleToUsersetValidationError{ - field: "Function", - reason: "value must not be in list [FUNCTION_UNSPECIFIED]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := FunctionedTupleToUserset_Function_name[int32(m.GetFunction())]; !ok { - err := FunctionedTupleToUsersetValidationError{ - field: "Function", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTupleset() == nil { - err := FunctionedTupleToUsersetValidationError{ - field: "Tupleset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTupleset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTupleset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FunctionedTupleToUsersetValidationError{ - field: "Tupleset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetComputedUserset() == nil { - err := FunctionedTupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetComputedUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputedUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FunctionedTupleToUsersetValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FunctionedTupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FunctionedTupleToUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return FunctionedTupleToUsersetMultiError(errors) - } - - return nil -} - -// FunctionedTupleToUsersetMultiError is an error wrapping multiple validation -// errors returned by FunctionedTupleToUserset.ValidateAll() if the designated -// constraints aren't met. -type FunctionedTupleToUsersetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FunctionedTupleToUsersetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FunctionedTupleToUsersetMultiError) AllErrors() []error { return m } - -// FunctionedTupleToUsersetValidationError is the validation error returned by -// FunctionedTupleToUserset.Validate if the designated constraints aren't met. -type FunctionedTupleToUsersetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FunctionedTupleToUsersetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FunctionedTupleToUsersetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FunctionedTupleToUsersetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FunctionedTupleToUsersetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FunctionedTupleToUsersetValidationError) ErrorName() string { - return "FunctionedTupleToUsersetValidationError" -} - -// Error satisfies the builtin error interface -func (e FunctionedTupleToUsersetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFunctionedTupleToUserset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FunctionedTupleToUsersetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FunctionedTupleToUsersetValidationError{} - -var _FunctionedTupleToUserset_Function_NotInLookup = map[FunctionedTupleToUserset_Function]struct{}{ - 0: {}, -} - -// Validate checks the field values on ComputedUserset with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ComputedUserset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ComputedUserset with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ComputedUsersetMultiError, or nil if none found. -func (m *ComputedUserset) ValidateAll() error { - return m.validate(true) -} - -func (m *ComputedUserset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := ComputedUserset_Object_name[int32(m.GetObject())]; !ok { - err := ComputedUsersetValidationError{ - field: "Object", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRelation()) > 64 { - err := ComputedUsersetValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ComputedUserset_Relation_Pattern.MatchString(m.GetRelation()) { - err := ComputedUsersetValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ComputedUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ComputedUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ComputedUsersetValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ComputedUsersetMultiError(errors) - } - - return nil -} - -// ComputedUsersetMultiError is an error wrapping multiple validation errors -// returned by ComputedUserset.ValidateAll() if the designated constraints -// aren't met. -type ComputedUsersetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComputedUsersetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComputedUsersetMultiError) AllErrors() []error { return m } - -// ComputedUsersetValidationError is the validation error returned by -// ComputedUserset.Validate if the designated constraints aren't met. -type ComputedUsersetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComputedUsersetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComputedUsersetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComputedUsersetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComputedUsersetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComputedUsersetValidationError) ErrorName() string { return "ComputedUsersetValidationError" } - -// Error satisfies the builtin error interface -func (e ComputedUsersetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComputedUserset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComputedUsersetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComputedUsersetValidationError{} - -var _ComputedUserset_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -// Validate checks the field values on SourcePosition with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SourcePosition) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SourcePosition with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SourcePositionMultiError, -// or nil if none found. -func (m *SourcePosition) ValidateAll() error { - return m.validate(true) -} - -func (m *SourcePosition) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ZeroIndexedLineNumber - - // no validation rules for ZeroIndexedColumnPosition - - if len(errors) > 0 { - return SourcePositionMultiError(errors) - } - - return nil -} - -// SourcePositionMultiError is an error wrapping multiple validation errors -// returned by SourcePosition.ValidateAll() if the designated constraints -// aren't met. -type SourcePositionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SourcePositionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SourcePositionMultiError) AllErrors() []error { return m } - -// SourcePositionValidationError is the validation error returned by -// SourcePosition.Validate if the designated constraints aren't met. -type SourcePositionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SourcePositionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SourcePositionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SourcePositionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SourcePositionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SourcePositionValidationError) ErrorName() string { return "SourcePositionValidationError" } - -// Error satisfies the builtin error interface -func (e SourcePositionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSourcePosition.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SourcePositionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SourcePositionValidationError{} - -// Validate checks the field values on CaveatExpression with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CaveatExpression) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CaveatExpression with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CaveatExpressionMultiError, or nil if none found. -func (m *CaveatExpression) ValidateAll() error { - return m.validate(true) -} - -func (m *CaveatExpression) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.OperationOrCaveat.(type) { - case *CaveatExpression_Operation: - if v == nil { - err := CaveatExpressionValidationError{ - field: "OperationOrCaveat", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOperation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatExpressionValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatExpressionValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOperation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatExpressionValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CaveatExpression_Caveat: - if v == nil { - err := CaveatExpressionValidationError{ - field: "OperationOrCaveat", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetCaveat()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatExpressionValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatExpressionValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatExpressionValidationError{ - field: "Caveat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return CaveatExpressionMultiError(errors) - } - - return nil -} - -// CaveatExpressionMultiError is an error wrapping multiple validation errors -// returned by CaveatExpression.ValidateAll() if the designated constraints -// aren't met. -type CaveatExpressionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CaveatExpressionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CaveatExpressionMultiError) AllErrors() []error { return m } - -// CaveatExpressionValidationError is the validation error returned by -// CaveatExpression.Validate if the designated constraints aren't met. -type CaveatExpressionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CaveatExpressionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CaveatExpressionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CaveatExpressionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CaveatExpressionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CaveatExpressionValidationError) ErrorName() string { return "CaveatExpressionValidationError" } - -// Error satisfies the builtin error interface -func (e CaveatExpressionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCaveatExpression.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CaveatExpressionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CaveatExpressionValidationError{} - -// Validate checks the field values on CaveatOperation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CaveatOperation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CaveatOperation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CaveatOperationMultiError, or nil if none found. -func (m *CaveatOperation) ValidateAll() error { - return m.validate(true) -} - -func (m *CaveatOperation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Op - - for idx, item := range m.GetChildren() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CaveatOperationValidationError{ - field: fmt.Sprintf("Children[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CaveatOperationValidationError{ - field: fmt.Sprintf("Children[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CaveatOperationValidationError{ - field: fmt.Sprintf("Children[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return CaveatOperationMultiError(errors) - } - - return nil -} - -// CaveatOperationMultiError is an error wrapping multiple validation errors -// returned by CaveatOperation.ValidateAll() if the designated constraints -// aren't met. -type CaveatOperationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CaveatOperationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CaveatOperationMultiError) AllErrors() []error { return m } - -// CaveatOperationValidationError is the validation error returned by -// CaveatOperation.Validate if the designated constraints aren't met. -type CaveatOperationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CaveatOperationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CaveatOperationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CaveatOperationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CaveatOperationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CaveatOperationValidationError) ErrorName() string { return "CaveatOperationValidationError" } - -// Error satisfies the builtin error interface -func (e CaveatOperationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCaveatOperation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CaveatOperationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CaveatOperationValidationError{} - -// Validate checks the field values on RelationshipFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RelationshipFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationshipFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationshipFilterMultiError, or nil if none found. -func (m *RelationshipFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationshipFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetResourceType()) > 128 { - err := RelationshipFilterValidationError{ - field: "ResourceType", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationshipFilter_ResourceType_Pattern.MatchString(m.GetResourceType()) { - err := RelationshipFilterValidationError{ - field: "ResourceType", - reason: "value does not match regex pattern \"^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetOptionalResourceId()) > 1024 { - err := RelationshipFilterValidationError{ - field: "OptionalResourceId", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationshipFilter_OptionalResourceId_Pattern.MatchString(m.GetOptionalResourceId()) { - err := RelationshipFilterValidationError{ - field: "OptionalResourceId", - reason: "value does not match regex pattern \"^([a-zA-Z0-9/_|\\\\-=+]{1,})?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetOptionalResourceIdPrefix()) > 1024 { - err := RelationshipFilterValidationError{ - field: "OptionalResourceIdPrefix", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationshipFilter_OptionalResourceIdPrefix_Pattern.MatchString(m.GetOptionalResourceIdPrefix()) { - err := RelationshipFilterValidationError{ - field: "OptionalResourceIdPrefix", - reason: "value does not match regex pattern \"^([a-zA-Z0-9/_|\\\\-=+]{1,})?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetOptionalRelation()) > 64 { - err := RelationshipFilterValidationError{ - field: "OptionalRelation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RelationshipFilter_OptionalRelation_Pattern.MatchString(m.GetOptionalRelation()) { - err := RelationshipFilterValidationError{ - field: "OptionalRelation", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOptionalSubjectFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationshipFilterValidationError{ - field: "OptionalSubjectFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationshipFilterValidationError{ - field: "OptionalSubjectFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOptionalSubjectFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationshipFilterValidationError{ - field: "OptionalSubjectFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RelationshipFilterMultiError(errors) - } - - return nil -} - -// RelationshipFilterMultiError is an error wrapping multiple validation errors -// returned by RelationshipFilter.ValidateAll() if the designated constraints -// aren't met. -type RelationshipFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationshipFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationshipFilterMultiError) AllErrors() []error { return m } - -// RelationshipFilterValidationError is the validation error returned by -// RelationshipFilter.Validate if the designated constraints aren't met. -type RelationshipFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationshipFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationshipFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationshipFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationshipFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationshipFilterValidationError) ErrorName() string { - return "RelationshipFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e RelationshipFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationshipFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationshipFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationshipFilterValidationError{} - -var _RelationshipFilter_ResourceType_Pattern = regexp.MustCompile("^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$") - -var _RelationshipFilter_OptionalResourceId_Pattern = regexp.MustCompile("^([a-zA-Z0-9/_|\\-=+]{1,})?$") - -var _RelationshipFilter_OptionalResourceIdPrefix_Pattern = regexp.MustCompile("^([a-zA-Z0-9/_|\\-=+]{1,})?$") - -var _RelationshipFilter_OptionalRelation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$") - -// Validate checks the field values on SubjectFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SubjectFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SubjectFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SubjectFilterMultiError, or -// nil if none found. -func (m *SubjectFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *SubjectFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetSubjectType()) > 128 { - err := SubjectFilterValidationError{ - field: "SubjectType", - reason: "value length must be at most 128 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_SubjectFilter_SubjectType_Pattern.MatchString(m.GetSubjectType()) { - err := SubjectFilterValidationError{ - field: "SubjectType", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetOptionalSubjectId()) > 1024 { - err := SubjectFilterValidationError{ - field: "OptionalSubjectId", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_SubjectFilter_OptionalSubjectId_Pattern.MatchString(m.GetOptionalSubjectId()) { - err := SubjectFilterValidationError{ - field: "OptionalSubjectId", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9/_|\\\\-=+]{1,})|\\\\*)?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOptionalRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SubjectFilterValidationError{ - field: "OptionalRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SubjectFilterValidationError{ - field: "OptionalRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOptionalRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubjectFilterValidationError{ - field: "OptionalRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return SubjectFilterMultiError(errors) - } - - return nil -} - -// SubjectFilterMultiError is an error wrapping multiple validation errors -// returned by SubjectFilter.ValidateAll() if the designated constraints -// aren't met. -type SubjectFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SubjectFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SubjectFilterMultiError) AllErrors() []error { return m } - -// SubjectFilterValidationError is the validation error returned by -// SubjectFilter.Validate if the designated constraints aren't met. -type SubjectFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SubjectFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SubjectFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SubjectFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SubjectFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SubjectFilterValidationError) ErrorName() string { return "SubjectFilterValidationError" } - -// Error satisfies the builtin error interface -func (e SubjectFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSubjectFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SubjectFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SubjectFilterValidationError{} - -var _SubjectFilter_SubjectType_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -var _SubjectFilter_OptionalSubjectId_Pattern = regexp.MustCompile("^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$") - -// Validate checks the field values on AllowedRelation_PublicWildcard with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AllowedRelation_PublicWildcard) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AllowedRelation_PublicWildcard with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// AllowedRelation_PublicWildcardMultiError, or nil if none found. -func (m *AllowedRelation_PublicWildcard) ValidateAll() error { - return m.validate(true) -} - -func (m *AllowedRelation_PublicWildcard) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return AllowedRelation_PublicWildcardMultiError(errors) - } - - return nil -} - -// AllowedRelation_PublicWildcardMultiError is an error wrapping multiple -// validation errors returned by AllowedRelation_PublicWildcard.ValidateAll() -// if the designated constraints aren't met. -type AllowedRelation_PublicWildcardMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AllowedRelation_PublicWildcardMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AllowedRelation_PublicWildcardMultiError) AllErrors() []error { return m } - -// AllowedRelation_PublicWildcardValidationError is the validation error -// returned by AllowedRelation_PublicWildcard.Validate if the designated -// constraints aren't met. -type AllowedRelation_PublicWildcardValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AllowedRelation_PublicWildcardValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AllowedRelation_PublicWildcardValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AllowedRelation_PublicWildcardValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AllowedRelation_PublicWildcardValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AllowedRelation_PublicWildcardValidationError) ErrorName() string { - return "AllowedRelation_PublicWildcardValidationError" -} - -// Error satisfies the builtin error interface -func (e AllowedRelation_PublicWildcardValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAllowedRelation_PublicWildcard.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AllowedRelation_PublicWildcardValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AllowedRelation_PublicWildcardValidationError{} - -// Validate checks the field values on SetOperation_Child with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SetOperation_Child) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SetOperation_Child with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SetOperation_ChildMultiError, or nil if none found. -func (m *SetOperation_Child) ValidateAll() error { - return m.validate(true) -} - -func (m *SetOperation_Child) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSourcePosition()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourcePosition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "SourcePosition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofChildTypePresent := false - switch v := m.ChildType.(type) { - case *SetOperation_Child_XThis: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if all { - switch v := interface{}(m.GetXThis()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "XThis", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "XThis", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetXThis()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "XThis", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SetOperation_Child_ComputedUserset: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if m.GetComputedUserset() == nil { - err := SetOperation_ChildValidationError{ - field: "ComputedUserset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetComputedUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputedUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "ComputedUserset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SetOperation_Child_TupleToUserset: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if m.GetTupleToUserset() == nil { - err := SetOperation_ChildValidationError{ - field: "TupleToUserset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTupleToUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "TupleToUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "TupleToUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTupleToUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "TupleToUserset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SetOperation_Child_UsersetRewrite: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if m.GetUsersetRewrite() == nil { - err := SetOperation_ChildValidationError{ - field: "UsersetRewrite", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUsersetRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUsersetRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "UsersetRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SetOperation_Child_FunctionedTupleToUserset: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if m.GetFunctionedTupleToUserset() == nil { - err := SetOperation_ChildValidationError{ - field: "FunctionedTupleToUserset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetFunctionedTupleToUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "FunctionedTupleToUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "FunctionedTupleToUserset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFunctionedTupleToUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "FunctionedTupleToUserset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SetOperation_Child_XNil: - if v == nil { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofChildTypePresent = true - - if all { - switch v := interface{}(m.GetXNil()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "XNil", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SetOperation_ChildValidationError{ - field: "XNil", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetXNil()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SetOperation_ChildValidationError{ - field: "XNil", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofChildTypePresent { - err := SetOperation_ChildValidationError{ - field: "ChildType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SetOperation_ChildMultiError(errors) - } - - return nil -} - -// SetOperation_ChildMultiError is an error wrapping multiple validation errors -// returned by SetOperation_Child.ValidateAll() if the designated constraints -// aren't met. -type SetOperation_ChildMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SetOperation_ChildMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SetOperation_ChildMultiError) AllErrors() []error { return m } - -// SetOperation_ChildValidationError is the validation error returned by -// SetOperation_Child.Validate if the designated constraints aren't met. -type SetOperation_ChildValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SetOperation_ChildValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SetOperation_ChildValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SetOperation_ChildValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SetOperation_ChildValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SetOperation_ChildValidationError) ErrorName() string { - return "SetOperation_ChildValidationError" -} - -// Error satisfies the builtin error interface -func (e SetOperation_ChildValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSetOperation_Child.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SetOperation_ChildValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SetOperation_ChildValidationError{} - -// Validate checks the field values on SetOperation_Child_This with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SetOperation_Child_This) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SetOperation_Child_This with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SetOperation_Child_ThisMultiError, or nil if none found. -func (m *SetOperation_Child_This) ValidateAll() error { - return m.validate(true) -} - -func (m *SetOperation_Child_This) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return SetOperation_Child_ThisMultiError(errors) - } - - return nil -} - -// SetOperation_Child_ThisMultiError is an error wrapping multiple validation -// errors returned by SetOperation_Child_This.ValidateAll() if the designated -// constraints aren't met. -type SetOperation_Child_ThisMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SetOperation_Child_ThisMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SetOperation_Child_ThisMultiError) AllErrors() []error { return m } - -// SetOperation_Child_ThisValidationError is the validation error returned by -// SetOperation_Child_This.Validate if the designated constraints aren't met. -type SetOperation_Child_ThisValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SetOperation_Child_ThisValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SetOperation_Child_ThisValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SetOperation_Child_ThisValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SetOperation_Child_ThisValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SetOperation_Child_ThisValidationError) ErrorName() string { - return "SetOperation_Child_ThisValidationError" -} - -// Error satisfies the builtin error interface -func (e SetOperation_Child_ThisValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSetOperation_Child_This.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SetOperation_Child_ThisValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SetOperation_Child_ThisValidationError{} - -// Validate checks the field values on SetOperation_Child_Nil with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SetOperation_Child_Nil) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SetOperation_Child_Nil with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SetOperation_Child_NilMultiError, or nil if none found. -func (m *SetOperation_Child_Nil) ValidateAll() error { - return m.validate(true) -} - -func (m *SetOperation_Child_Nil) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return SetOperation_Child_NilMultiError(errors) - } - - return nil -} - -// SetOperation_Child_NilMultiError is an error wrapping multiple validation -// errors returned by SetOperation_Child_Nil.ValidateAll() if the designated -// constraints aren't met. -type SetOperation_Child_NilMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SetOperation_Child_NilMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SetOperation_Child_NilMultiError) AllErrors() []error { return m } - -// SetOperation_Child_NilValidationError is the validation error returned by -// SetOperation_Child_Nil.Validate if the designated constraints aren't met. -type SetOperation_Child_NilValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SetOperation_Child_NilValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SetOperation_Child_NilValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SetOperation_Child_NilValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SetOperation_Child_NilValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SetOperation_Child_NilValidationError) ErrorName() string { - return "SetOperation_Child_NilValidationError" -} - -// Error satisfies the builtin error interface -func (e SetOperation_Child_NilValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSetOperation_Child_Nil.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SetOperation_Child_NilValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SetOperation_Child_NilValidationError{} - -// Validate checks the field values on TupleToUserset_Tupleset with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *TupleToUserset_Tupleset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TupleToUserset_Tupleset with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TupleToUserset_TuplesetMultiError, or nil if none found. -func (m *TupleToUserset_Tupleset) ValidateAll() error { - return m.validate(true) -} - -func (m *TupleToUserset_Tupleset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRelation()) > 64 { - err := TupleToUserset_TuplesetValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_TupleToUserset_Tupleset_Relation_Pattern.MatchString(m.GetRelation()) { - err := TupleToUserset_TuplesetValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return TupleToUserset_TuplesetMultiError(errors) - } - - return nil -} - -// TupleToUserset_TuplesetMultiError is an error wrapping multiple validation -// errors returned by TupleToUserset_Tupleset.ValidateAll() if the designated -// constraints aren't met. -type TupleToUserset_TuplesetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TupleToUserset_TuplesetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TupleToUserset_TuplesetMultiError) AllErrors() []error { return m } - -// TupleToUserset_TuplesetValidationError is the validation error returned by -// TupleToUserset_Tupleset.Validate if the designated constraints aren't met. -type TupleToUserset_TuplesetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TupleToUserset_TuplesetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TupleToUserset_TuplesetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TupleToUserset_TuplesetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TupleToUserset_TuplesetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TupleToUserset_TuplesetValidationError) ErrorName() string { - return "TupleToUserset_TuplesetValidationError" -} - -// Error satisfies the builtin error interface -func (e TupleToUserset_TuplesetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTupleToUserset_Tupleset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TupleToUserset_TuplesetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TupleToUserset_TuplesetValidationError{} - -var _TupleToUserset_Tupleset_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -// Validate checks the field values on FunctionedTupleToUserset_Tupleset with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *FunctionedTupleToUserset_Tupleset) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FunctionedTupleToUserset_Tupleset -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// FunctionedTupleToUserset_TuplesetMultiError, or nil if none found. -func (m *FunctionedTupleToUserset_Tupleset) ValidateAll() error { - return m.validate(true) -} - -func (m *FunctionedTupleToUserset_Tupleset) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRelation()) > 64 { - err := FunctionedTupleToUserset_TuplesetValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_FunctionedTupleToUserset_Tupleset_Relation_Pattern.MatchString(m.GetRelation()) { - err := FunctionedTupleToUserset_TuplesetValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return FunctionedTupleToUserset_TuplesetMultiError(errors) - } - - return nil -} - -// FunctionedTupleToUserset_TuplesetMultiError is an error wrapping multiple -// validation errors returned by -// FunctionedTupleToUserset_Tupleset.ValidateAll() if the designated -// constraints aren't met. -type FunctionedTupleToUserset_TuplesetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FunctionedTupleToUserset_TuplesetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FunctionedTupleToUserset_TuplesetMultiError) AllErrors() []error { return m } - -// FunctionedTupleToUserset_TuplesetValidationError is the validation error -// returned by FunctionedTupleToUserset_Tupleset.Validate if the designated -// constraints aren't met. -type FunctionedTupleToUserset_TuplesetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FunctionedTupleToUserset_TuplesetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FunctionedTupleToUserset_TuplesetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FunctionedTupleToUserset_TuplesetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FunctionedTupleToUserset_TuplesetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FunctionedTupleToUserset_TuplesetValidationError) ErrorName() string { - return "FunctionedTupleToUserset_TuplesetValidationError" -} - -// Error satisfies the builtin error interface -func (e FunctionedTupleToUserset_TuplesetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFunctionedTupleToUserset_Tupleset.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FunctionedTupleToUserset_TuplesetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FunctionedTupleToUserset_TuplesetValidationError{} - -var _FunctionedTupleToUserset_Tupleset_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") - -// Validate checks the field values on SubjectFilter_RelationFilter with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SubjectFilter_RelationFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SubjectFilter_RelationFilter with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SubjectFilter_RelationFilterMultiError, or nil if none found. -func (m *SubjectFilter_RelationFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *SubjectFilter_RelationFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRelation()) > 64 { - err := SubjectFilter_RelationFilterValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_SubjectFilter_RelationFilter_Relation_Pattern.MatchString(m.GetRelation()) { - err := SubjectFilter_RelationFilterValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SubjectFilter_RelationFilterMultiError(errors) - } - - return nil -} - -// SubjectFilter_RelationFilterMultiError is an error wrapping multiple -// validation errors returned by SubjectFilter_RelationFilter.ValidateAll() if -// the designated constraints aren't met. -type SubjectFilter_RelationFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SubjectFilter_RelationFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SubjectFilter_RelationFilterMultiError) AllErrors() []error { return m } - -// SubjectFilter_RelationFilterValidationError is the validation error returned -// by SubjectFilter_RelationFilter.Validate if the designated constraints -// aren't met. -type SubjectFilter_RelationFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SubjectFilter_RelationFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SubjectFilter_RelationFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SubjectFilter_RelationFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SubjectFilter_RelationFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SubjectFilter_RelationFilterValidationError) ErrorName() string { - return "SubjectFilter_RelationFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e SubjectFilter_RelationFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSubjectFilter_RelationFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SubjectFilter_RelationFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SubjectFilter_RelationFilterValidationError{} - -var _SubjectFilter_RelationFilter_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$") diff --git a/pkg/proto/core/v1/core_vtproto.pb.go b/pkg/proto/core/v1/core_vtproto.pb.go index 160a1d933..8fe58b338 100644 --- a/pkg/proto/core/v1/core_vtproto.pb.go +++ b/pkg/proto/core/v1/core_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240409071808-615f978279ca +// protoc-gen-go-vtproto version: v0.6.1-0.20240917153116-6f2963f01587 // source: core/v1/core.proto package corev1 diff --git a/pkg/proto/developer/v1/developer.pb.go b/pkg/proto/developer/v1/developer.pb.go index f553c602d..099042e26 100644 --- a/pkg/proto/developer/v1/developer.pb.go +++ b/pkg/proto/developer/v1/developer.pb.go @@ -1,21 +1,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: developer/v1/developer.proto package developerv1 import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" v12 "github.com/authzed/authzed-go/proto/authzed/api/v1" v1 "github.com/authzed/spicedb/pkg/proto/core/v1" v11 "github.com/authzed/spicedb/pkg/proto/dispatch/v1" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -211,23 +212,20 @@ func (CheckOperationsResult_Membership) EnumDescriptor() ([]byte, []int) { // DeveloperRequest is a single request made to the developer platform, containing zero or more // operations to run. type DeveloperRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // context is the context for the developer request. Context *RequestContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` // operations are the operations to be run as part of the developer request. - Operations []*Operation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + Operations []*Operation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeveloperRequest) Reset() { *x = DeveloperRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeveloperRequest) String() string { @@ -238,7 +236,7 @@ func (*DeveloperRequest) ProtoMessage() {} func (x *DeveloperRequest) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,25 +267,22 @@ func (x *DeveloperRequest) GetOperations() []*Operation { // DeveloperResponse is the response to a single request made to the developer platform. type DeveloperResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // internal_error is the internal error that occurred when attempting to run this operation, if any. InternalError string `protobuf:"bytes,1,opt,name=internal_error,json=internalError,proto3" json:"internal_error,omitempty"` // developer_errors are the developer error(s) returned in the operation, if any. DeveloperErrors *DeveloperErrors `protobuf:"bytes,2,opt,name=developer_errors,json=developerErrors,proto3" json:"developer_errors,omitempty"` // operations_results holds the results of the operations, if any and no errors. OperationsResults *OperationsResults `protobuf:"bytes,3,opt,name=operations_results,json=operationsResults,proto3" json:"operations_results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeveloperResponse) Reset() { *x = DeveloperResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeveloperResponse) String() string { @@ -298,7 +293,7 @@ func (*DeveloperResponse) ProtoMessage() {} func (x *DeveloperResponse) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,23 +332,20 @@ func (x *DeveloperResponse) GetOperationsResults() *OperationsResults { // RequestContext is the context for setting up a development package environment for one or more // operations. type RequestContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // schema is the schema on which to run the developer request. Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // relationships are the test data relationships for the developer request. Relationships []*v1.RelationTuple `protobuf:"bytes,2,rep,name=relationships,proto3" json:"relationships,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RequestContext) Reset() { *x = RequestContext{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestContext) String() string { @@ -364,7 +356,7 @@ func (*RequestContext) ProtoMessage() {} func (x *RequestContext) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,24 +387,21 @@ func (x *RequestContext) GetRelationships() []*v1.RelationTuple { // Operation is a single operation to be processed by the development package. type Operation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` CheckParameters *CheckOperationParameters `protobuf:"bytes,1,opt,name=check_parameters,json=checkParameters,proto3" json:"check_parameters,omitempty"` AssertionsParameters *RunAssertionsParameters `protobuf:"bytes,2,opt,name=assertions_parameters,json=assertionsParameters,proto3" json:"assertions_parameters,omitempty"` ValidationParameters *RunValidationParameters `protobuf:"bytes,3,opt,name=validation_parameters,json=validationParameters,proto3" json:"validation_parameters,omitempty"` FormatSchemaParameters *FormatSchemaParameters `protobuf:"bytes,4,opt,name=format_schema_parameters,json=formatSchemaParameters,proto3" json:"format_schema_parameters,omitempty"` SchemaWarningsParameters *SchemaWarningsParameters `protobuf:"bytes,5,opt,name=schema_warnings_parameters,json=schemaWarningsParameters,proto3" json:"schema_warnings_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -423,7 +412,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,20 +464,17 @@ func (x *Operation) GetSchemaWarningsParameters() *SchemaWarningsParameters { // OperationsResults holds the results for the operations, indexed by the operation. type OperationsResults struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Results map[uint64]*OperationResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Results map[uint64]*OperationResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *OperationsResults) Reset() { *x = OperationsResults{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationsResults) String() string { @@ -499,7 +485,7 @@ func (*OperationsResults) ProtoMessage() {} func (x *OperationsResults) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,24 +509,21 @@ func (x *OperationsResults) GetResults() map[uint64]*OperationResult { // OperationResult contains the result data given to the callback for an operation. type OperationResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` CheckResult *CheckOperationsResult `protobuf:"bytes,1,opt,name=check_result,json=checkResult,proto3" json:"check_result,omitempty"` AssertionsResult *RunAssertionsResult `protobuf:"bytes,2,opt,name=assertions_result,json=assertionsResult,proto3" json:"assertions_result,omitempty"` ValidationResult *RunValidationResult `protobuf:"bytes,3,opt,name=validation_result,json=validationResult,proto3" json:"validation_result,omitempty"` FormatSchemaResult *FormatSchemaResult `protobuf:"bytes,4,opt,name=format_schema_result,json=formatSchemaResult,proto3" json:"format_schema_result,omitempty"` SchemaWarningsResult *SchemaWarningsResult `protobuf:"bytes,5,opt,name=schema_warnings_result,json=schemaWarningsResult,proto3" json:"schema_warnings_result,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *OperationResult) Reset() { *x = OperationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationResult) String() string { @@ -551,7 +534,7 @@ func (*OperationResult) ProtoMessage() {} func (x *OperationResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,10 +586,7 @@ func (x *OperationResult) GetSchemaWarningsResult() *SchemaWarningsResult { // DeveloperWarning represents a single warning raised by the development package. type DeveloperWarning struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // message is the message for the developer warning. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // line is the 1-indexed line for the developer warning. @@ -614,16 +594,16 @@ type DeveloperWarning struct { // column is the 1-indexed column on the line for the developer warning. Column uint32 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` // source_code is the source code for the developer warning, if any. - SourceCode string `protobuf:"bytes,4,opt,name=source_code,json=sourceCode,proto3" json:"source_code,omitempty"` + SourceCode string `protobuf:"bytes,4,opt,name=source_code,json=sourceCode,proto3" json:"source_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeveloperWarning) Reset() { *x = DeveloperWarning{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeveloperWarning) String() string { @@ -634,7 +614,7 @@ func (*DeveloperWarning) ProtoMessage() {} func (x *DeveloperWarning) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +660,8 @@ func (x *DeveloperWarning) GetSourceCode() string { // DeveloperError represents a single error raised by the development package. Unlike an internal // error, it represents an issue with the entered information by the calling developer. type DeveloperError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // line is the 1-indexed line for the developer error. Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` // column is the 1-indexed column on the line for the developer error. @@ -702,15 +679,15 @@ type DeveloperError struct { // resolved_debug_information is the V1 API debug information for the check, if this error was raised // due to an assertion failure. CheckResolvedDebugInformation *v12.DebugInformation `protobuf:"bytes,9,opt,name=check_resolved_debug_information,json=checkResolvedDebugInformation,proto3" json:"check_resolved_debug_information,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeveloperError) Reset() { *x = DeveloperError{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeveloperError) String() string { @@ -721,7 +698,7 @@ func (*DeveloperError) ProtoMessage() {} func (x *DeveloperError) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,21 +778,18 @@ func (x *DeveloperError) GetCheckResolvedDebugInformation() *v12.DebugInformatio // DeveloperErrors represents the developer error(s) found after the run has completed. type DeveloperErrors struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // input_errors are those error(s) in the schema, relationships, or assertions inputted by the developer. - InputErrors []*DeveloperError `protobuf:"bytes,1,rep,name=input_errors,json=inputErrors,proto3" json:"input_errors,omitempty"` + InputErrors []*DeveloperError `protobuf:"bytes,1,rep,name=input_errors,json=inputErrors,proto3" json:"input_errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeveloperErrors) Reset() { *x = DeveloperErrors{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeveloperErrors) String() string { @@ -826,7 +800,7 @@ func (*DeveloperErrors) ProtoMessage() {} func (x *DeveloperErrors) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,23 +824,20 @@ func (x *DeveloperErrors) GetInputErrors() []*DeveloperError { // CheckOperationParameters are the parameters for a `check` operation. type CheckOperationParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *v1.ObjectAndRelation `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Subject *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Resource *v1.ObjectAndRelation `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Subject *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` // * caveat_context consists of any named values that are defined at write time for the caveat expression * CaveatContext *structpb.Struct `protobuf:"bytes,3,opt,name=caveat_context,json=caveatContext,proto3" json:"caveat_context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckOperationParameters) Reset() { *x = CheckOperationParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOperationParameters) String() string { @@ -877,7 +848,7 @@ func (*CheckOperationParameters) ProtoMessage() {} func (x *CheckOperationParameters) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,10 +886,7 @@ func (x *CheckOperationParameters) GetCaveatContext() *structpb.Struct { // CheckOperationsResult is the result for a `check` operation. type CheckOperationsResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Membership CheckOperationsResult_Membership `protobuf:"varint,1,opt,name=membership,proto3,enum=developer.v1.CheckOperationsResult_Membership" json:"membership,omitempty"` // check_error is the error raised by the check, if any. CheckError *DeveloperError `protobuf:"bytes,2,opt,name=check_error,json=checkError,proto3" json:"check_error,omitempty"` @@ -928,15 +896,15 @@ type CheckOperationsResult struct { PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,4,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"` // resolved_debug_information is the V1 API debug information for the check. ResolvedDebugInformation *v12.DebugInformation `protobuf:"bytes,5,opt,name=resolved_debug_information,json=resolvedDebugInformation,proto3" json:"resolved_debug_information,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckOperationsResult) Reset() { *x = CheckOperationsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOperationsResult) String() string { @@ -947,7 +915,7 @@ func (*CheckOperationsResult) ProtoMessage() {} func (x *CheckOperationsResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,22 +968,19 @@ func (x *CheckOperationsResult) GetResolvedDebugInformation() *v12.DebugInformat // PartialCaveatInfo carries information necessary for the client to take action // in the event a response contains a partially evaluated caveat type PartialCaveatInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // missing_required_context is a list of one or more fields that were missing and prevented caveats // from being fully evaluated MissingRequiredContext []string `protobuf:"bytes,1,rep,name=missing_required_context,json=missingRequiredContext,proto3" json:"missing_required_context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PartialCaveatInfo) Reset() { *x = PartialCaveatInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialCaveatInfo) String() string { @@ -1026,7 +991,7 @@ func (*PartialCaveatInfo) ProtoMessage() {} func (x *PartialCaveatInfo) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,21 +1015,18 @@ func (x *PartialCaveatInfo) GetMissingRequiredContext() []string { // RunAssertionsParameters are the parameters for a `runAssertions` operation. type RunAssertionsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // assertions_yaml are the assertions, in YAML form, to be run. AssertionsYaml string `protobuf:"bytes,1,opt,name=assertions_yaml,json=assertionsYaml,proto3" json:"assertions_yaml,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunAssertionsParameters) Reset() { *x = RunAssertionsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssertionsParameters) String() string { @@ -1075,7 +1037,7 @@ func (*RunAssertionsParameters) ProtoMessage() {} func (x *RunAssertionsParameters) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,23 +1061,20 @@ func (x *RunAssertionsParameters) GetAssertionsYaml() string { // RunAssertionsResult is the result for a `runAssertions` operation. type RunAssertionsResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // input_error is an error in the given YAML. InputError *DeveloperError `protobuf:"bytes,1,opt,name=input_error,json=inputError,proto3" json:"input_error,omitempty"` // validation_errors are the validation errors which occurred, if any. ValidationErrors []*DeveloperError `protobuf:"bytes,2,rep,name=validation_errors,json=validationErrors,proto3" json:"validation_errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunAssertionsResult) Reset() { *x = RunAssertionsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssertionsResult) String() string { @@ -1126,7 +1085,7 @@ func (*RunAssertionsResult) ProtoMessage() {} func (x *RunAssertionsResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,21 +1116,18 @@ func (x *RunAssertionsResult) GetValidationErrors() []*DeveloperError { // RunValidationParameters are the parameters for a `runValidation` operation. type RunValidationParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // validation_yaml is the expected relations validation, in YAML form, to be run. ValidationYaml string `protobuf:"bytes,1,opt,name=validation_yaml,json=validationYaml,proto3" json:"validation_yaml,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunValidationParameters) Reset() { *x = RunValidationParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunValidationParameters) String() string { @@ -1182,7 +1138,7 @@ func (*RunValidationParameters) ProtoMessage() {} func (x *RunValidationParameters) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,10 +1162,7 @@ func (x *RunValidationParameters) GetValidationYaml() string { // RunValidationResult is the result for a `runValidation` operation. type RunValidationResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // input_error is an error in the given YAML. InputError *DeveloperError `protobuf:"bytes,1,opt,name=input_error,json=inputError,proto3" json:"input_error,omitempty"` // updated_validation_yaml contains the generated and updated validation YAML for the expected @@ -1217,15 +1170,15 @@ type RunValidationResult struct { UpdatedValidationYaml string `protobuf:"bytes,2,opt,name=updated_validation_yaml,json=updatedValidationYaml,proto3" json:"updated_validation_yaml,omitempty"` // validation_errors are the validation errors which occurred, if any. ValidationErrors []*DeveloperError `protobuf:"bytes,3,rep,name=validation_errors,json=validationErrors,proto3" json:"validation_errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunValidationResult) Reset() { *x = RunValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunValidationResult) String() string { @@ -1236,7 +1189,7 @@ func (*RunValidationResult) ProtoMessage() {} func (x *RunValidationResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,18 +1227,16 @@ func (x *RunValidationResult) GetValidationErrors() []*DeveloperError { // FormatSchemaParameters are the parameters for a `formatSchema` operation. type FormatSchemaParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FormatSchemaParameters) Reset() { *x = FormatSchemaParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FormatSchemaParameters) String() string { @@ -1296,7 +1247,7 @@ func (*FormatSchemaParameters) ProtoMessage() {} func (x *FormatSchemaParameters) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,20 +1264,17 @@ func (*FormatSchemaParameters) Descriptor() ([]byte, []int) { // FormatSchemaResult is the result of the `formatSchema` operation. type FormatSchemaResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FormattedSchema string `protobuf:"bytes,1,opt,name=formatted_schema,json=formattedSchema,proto3" json:"formatted_schema,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FormattedSchema string `protobuf:"bytes,1,opt,name=formatted_schema,json=formattedSchema,proto3" json:"formatted_schema,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FormatSchemaResult) Reset() { *x = FormatSchemaResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FormatSchemaResult) String() string { @@ -1337,7 +1285,7 @@ func (*FormatSchemaResult) ProtoMessage() {} func (x *FormatSchemaResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,18 +1309,16 @@ func (x *FormatSchemaResult) GetFormattedSchema() string { // SchemaWarningsParameters are the parameters for a `schemaWarnings` operation. type SchemaWarningsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SchemaWarningsParameters) Reset() { *x = SchemaWarningsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaWarningsParameters) String() string { @@ -1383,7 +1329,7 @@ func (*SchemaWarningsParameters) ProtoMessage() {} func (x *SchemaWarningsParameters) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,20 +1346,17 @@ func (*SchemaWarningsParameters) Descriptor() ([]byte, []int) { // SchemaWarningsResult is the result of the `schemaWarnings` operation. type SchemaWarningsResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Warnings []*DeveloperWarning `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` unknownFields protoimpl.UnknownFields - - Warnings []*DeveloperWarning `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SchemaWarningsResult) Reset() { *x = SchemaWarningsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_developer_v1_developer_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaWarningsResult) String() string { @@ -1424,7 +1367,7 @@ func (*SchemaWarningsResult) ProtoMessage() {} func (x *SchemaWarningsResult) ProtoReflect() protoreflect.Message { mi := &file_developer_v1_developer_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1448,297 +1391,129 @@ func (x *SchemaWarningsResult) GetWarnings() []*DeveloperWarning { var File_developer_v1_developer_proto protoreflect.FileDescriptor -var file_developer_v1_developer_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, - 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1a, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x83, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x37, 0x0a, 0x0a, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x10, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, - 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0f, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x12, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x66, 0x0a, 0x0e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x68, 0x69, 0x70, 0x73, 0x22, 0xdc, 0x03, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x15, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x14, 0x61, 0x73, 0x73, - 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x5a, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, - 0x18, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x16, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x64, 0x0a, - 0x1a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x46, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x1a, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa7, 0x03, 0x0a, - 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x46, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x61, 0x73, 0x73, 0x65, - 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x16, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x5f, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x14, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x79, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x22, 0xc6, 0x06, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x55, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x15, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x20, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x64, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x02, 0x12, - 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x41, - 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x57, 0x41, - 0x54, 0x43, 0x48, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x53, 0x45, 0x52, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x05, 0x22, 0x93, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, - 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4b, 0x49, - 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x52, 0x53, 0x45, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, - 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x55, 0x50, 0x4c, 0x49, - 0x43, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, - 0x50, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x45, - 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x53, 0x48, 0x49, 0x50, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x54, 0x52, 0x41, 0x5f, - 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x46, 0x4f, 0x55, - 0x4e, 0x44, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, - 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x06, 0x12, 0x14, 0x0a, - 0x10, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x41, 0x58, 0x49, 0x4d, 0x55, 0x4d, 0x5f, 0x52, - 0x45, 0x43, 0x55, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x53, - 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, - 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, - 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x22, 0x52, 0x0a, 0x0f, 0x44, 0x65, - 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3f, 0x0a, - 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xd2, - 0x01, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x63, 0x61, 0x76, - 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x22, 0xef, 0x03, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, - 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, - 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3d, 0x0a, - 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x11, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x61, 0x76, 0x65, - 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5e, 0x0a, 0x1a, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x18, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, - 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, - 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x03, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, - 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x42, 0x0a, 0x18, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x16, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x42, - 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x73, 0x73, - 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x59, 0x61, - 0x6d, 0x6c, 0x22, 0x9f, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x22, 0x42, 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x79, 0x61, - 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x22, 0xd7, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x36, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x49, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3f, 0x0a, 0x12, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x1a, 0x0a, - 0x18, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x52, 0x0a, 0x14, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x57, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x42, 0xb2, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x42, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x44, 0x65, 0x76, 0x65, - 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x44, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0d, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_developer_v1_developer_proto_rawDesc = "" + + "\n" + + "\x1cdeveloper/v1/developer.proto\x12\fdeveloper.v1\x1a\x1aauthzed/api/v1/debug.proto\x1a\x1bbuf/validate/validate.proto\x1a\x12core/v1/core.proto\x1a\x1adispatch/v1/dispatch.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x83\x01\n" + + "\x10DeveloperRequest\x126\n" + + "\acontext\x18\x01 \x01(\v2\x1c.developer.v1.RequestContextR\acontext\x127\n" + + "\n" + + "operations\x18\x02 \x03(\v2\x17.developer.v1.OperationR\n" + + "operations\"\xd4\x01\n" + + "\x11DeveloperResponse\x12%\n" + + "\x0einternal_error\x18\x01 \x01(\tR\rinternalError\x12H\n" + + "\x10developer_errors\x18\x02 \x01(\v2\x1d.developer.v1.DeveloperErrorsR\x0fdeveloperErrors\x12N\n" + + "\x12operations_results\x18\x03 \x01(\v2\x1f.developer.v1.OperationsResultsR\x11operationsResults\"f\n" + + "\x0eRequestContext\x12\x16\n" + + "\x06schema\x18\x01 \x01(\tR\x06schema\x12<\n" + + "\rrelationships\x18\x02 \x03(\v2\x16.core.v1.RelationTupleR\rrelationships\"\xdc\x03\n" + + "\tOperation\x12Q\n" + + "\x10check_parameters\x18\x01 \x01(\v2&.developer.v1.CheckOperationParametersR\x0fcheckParameters\x12Z\n" + + "\x15assertions_parameters\x18\x02 \x01(\v2%.developer.v1.RunAssertionsParametersR\x14assertionsParameters\x12Z\n" + + "\x15validation_parameters\x18\x03 \x01(\v2%.developer.v1.RunValidationParametersR\x14validationParameters\x12^\n" + + "\x18format_schema_parameters\x18\x04 \x01(\v2$.developer.v1.FormatSchemaParametersR\x16formatSchemaParameters\x12d\n" + + "\x1aschema_warnings_parameters\x18\x05 \x01(\v2&.developer.v1.SchemaWarningsParametersR\x18schemaWarningsParameters\"\xb6\x01\n" + + "\x11OperationsResults\x12F\n" + + "\aresults\x18\x01 \x03(\v2,.developer.v1.OperationsResults.ResultsEntryR\aresults\x1aY\n" + + "\fResultsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x123\n" + + "\x05value\x18\x02 \x01(\v2\x1d.developer.v1.OperationResultR\x05value:\x028\x01\"\xa7\x03\n" + + "\x0fOperationResult\x12F\n" + + "\fcheck_result\x18\x01 \x01(\v2#.developer.v1.CheckOperationsResultR\vcheckResult\x12N\n" + + "\x11assertions_result\x18\x02 \x01(\v2!.developer.v1.RunAssertionsResultR\x10assertionsResult\x12N\n" + + "\x11validation_result\x18\x03 \x01(\v2!.developer.v1.RunValidationResultR\x10validationResult\x12R\n" + + "\x14format_schema_result\x18\x04 \x01(\v2 .developer.v1.FormatSchemaResultR\x12formatSchemaResult\x12X\n" + + "\x16schema_warnings_result\x18\x05 \x01(\v2\".developer.v1.SchemaWarningsResultR\x14schemaWarningsResult\"y\n" + + "\x10DeveloperWarning\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x12\n" + + "\x04line\x18\x02 \x01(\rR\x04line\x12\x16\n" + + "\x06column\x18\x03 \x01(\rR\x06column\x12\x1f\n" + + "\vsource_code\x18\x04 \x01(\tR\n" + + "sourceCode\"\xc6\x06\n" + + "\x0eDeveloperError\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x12\n" + + "\x04line\x18\x02 \x01(\rR\x04line\x12\x16\n" + + "\x06column\x18\x03 \x01(\rR\x06column\x12;\n" + + "\x06source\x18\x04 \x01(\x0e2#.developer.v1.DeveloperError.SourceR\x06source\x12:\n" + + "\x04kind\x18\x05 \x01(\x0e2&.developer.v1.DeveloperError.ErrorKindR\x04kind\x12\x12\n" + + "\x04path\x18\x06 \x03(\tR\x04path\x12\x18\n" + + "\acontext\x18\a \x01(\tR\acontext\x12U\n" + + "\x17check_debug_information\x18\b \x01(\v2\x1d.dispatch.v1.DebugInformationR\x15checkDebugInformation\x12i\n" + + " check_resolved_debug_information\x18\t \x01(\v2 .authzed.api.v1.DebugInformationR\x1dcheckResolvedDebugInformation\"o\n" + + "\x06Source\x12\x12\n" + + "\x0eUNKNOWN_SOURCE\x10\x00\x12\n" + + "\n" + + "\x06SCHEMA\x10\x01\x12\x10\n" + + "\fRELATIONSHIP\x10\x02\x12\x13\n" + + "\x0fVALIDATION_YAML\x10\x03\x12\x0f\n" + + "\vCHECK_WATCH\x10\x04\x12\r\n" + + "\tASSERTION\x10\x05\"\x93\x02\n" + + "\tErrorKind\x12\x10\n" + + "\fUNKNOWN_KIND\x10\x00\x12\x0f\n" + + "\vPARSE_ERROR\x10\x01\x12\x10\n" + + "\fSCHEMA_ISSUE\x10\x02\x12\x1a\n" + + "\x16DUPLICATE_RELATIONSHIP\x10\x03\x12!\n" + + "\x1dMISSING_EXPECTED_RELATIONSHIP\x10\x04\x12\x1c\n" + + "\x18EXTRA_RELATIONSHIP_FOUND\x10\x05\x12\x17\n" + + "\x13UNKNOWN_OBJECT_TYPE\x10\x06\x12\x14\n" + + "\x10UNKNOWN_RELATION\x10\a\x12\x15\n" + + "\x11MAXIMUM_RECURSION\x10\b\x12\x14\n" + + "\x10ASSERTION_FAILED\x10\t\x12\x18\n" + + "\x14INVALID_SUBJECT_TYPE\x10\n" + + "\"R\n" + + "\x0fDeveloperErrors\x12?\n" + + "\finput_errors\x18\x01 \x03(\v2\x1c.developer.v1.DeveloperErrorR\vinputErrors\"\xd0\x01\n" + + "\x18CheckOperationParameters\x126\n" + + "\bresource\x18\x01 \x01(\v2\x1a.core.v1.ObjectAndRelationR\bresource\x124\n" + + "\asubject\x18\x02 \x01(\v2\x1a.core.v1.ObjectAndRelationR\asubject\x12F\n" + + "\x0ecaveat_context\x18\x03 \x01(\v2\x17.google.protobuf.StructB\x06\xbaH\x03\xc8\x01\x00R\rcaveatContext\"\xef\x03\n" + + "\x15CheckOperationsResult\x12N\n" + + "\n" + + "membership\x18\x01 \x01(\x0e2..developer.v1.CheckOperationsResult.MembershipR\n" + + "membership\x12=\n" + + "\vcheck_error\x18\x02 \x01(\v2\x1c.developer.v1.DeveloperErrorR\n" + + "checkError\x12J\n" + + "\x11debug_information\x18\x03 \x01(\v2\x1d.dispatch.v1.DebugInformationR\x10debugInformation\x12O\n" + + "\x13partial_caveat_info\x18\x04 \x01(\v2\x1f.developer.v1.PartialCaveatInfoR\x11partialCaveatInfo\x12^\n" + + "\x1aresolved_debug_information\x18\x05 \x01(\v2 .authzed.api.v1.DebugInformationR\x18resolvedDebugInformation\"J\n" + + "\n" + + "Membership\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\x0e\n" + + "\n" + + "NOT_MEMBER\x10\x01\x12\n" + + "\n" + + "\x06MEMBER\x10\x02\x12\x13\n" + + "\x0fCAVEATED_MEMBER\x10\x03\"W\n" + + "\x11PartialCaveatInfo\x12B\n" + + "\x18missing_required_context\x18\x01 \x03(\tB\b\xbaH\x05\x92\x01\x02\b\x01R\x16missingRequiredContext\"B\n" + + "\x17RunAssertionsParameters\x12'\n" + + "\x0fassertions_yaml\x18\x01 \x01(\tR\x0eassertionsYaml\"\x9f\x01\n" + + "\x13RunAssertionsResult\x12=\n" + + "\vinput_error\x18\x01 \x01(\v2\x1c.developer.v1.DeveloperErrorR\n" + + "inputError\x12I\n" + + "\x11validation_errors\x18\x02 \x03(\v2\x1c.developer.v1.DeveloperErrorR\x10validationErrors\"B\n" + + "\x17RunValidationParameters\x12'\n" + + "\x0fvalidation_yaml\x18\x01 \x01(\tR\x0evalidationYaml\"\xd7\x01\n" + + "\x13RunValidationResult\x12=\n" + + "\vinput_error\x18\x01 \x01(\v2\x1c.developer.v1.DeveloperErrorR\n" + + "inputError\x126\n" + + "\x17updated_validation_yaml\x18\x02 \x01(\tR\x15updatedValidationYaml\x12I\n" + + "\x11validation_errors\x18\x03 \x03(\v2\x1c.developer.v1.DeveloperErrorR\x10validationErrors\"\x18\n" + + "\x16FormatSchemaParameters\"?\n" + + "\x12FormatSchemaResult\x12)\n" + + "\x10formatted_schema\x18\x01 \x01(\tR\x0fformattedSchema\"\x1a\n" + + "\x18SchemaWarningsParameters\"R\n" + + "\x14SchemaWarningsResult\x12:\n" + + "\bwarnings\x18\x01 \x03(\v2\x1e.developer.v1.DeveloperWarningR\bwarningsB\xb2\x01\n" + + "\x10com.developer.v1B\x0eDeveloperProtoP\x01Z=github.com/authzed/spicedb/pkg/proto/developer/v1;developerv1\xa2\x02\x03DXX\xaa\x02\fDeveloper.V1\xca\x02\fDeveloper\\V1\xe2\x02\x18Developer\\V1\\GPBMetadata\xea\x02\rDeveloper::V1b\x06proto3" var ( file_developer_v1_developer_proto_rawDescOnce sync.Once - file_developer_v1_developer_proto_rawDescData = file_developer_v1_developer_proto_rawDesc + file_developer_v1_developer_proto_rawDescData []byte ) func file_developer_v1_developer_proto_rawDescGZIP() []byte { file_developer_v1_developer_proto_rawDescOnce.Do(func() { - file_developer_v1_developer_proto_rawDescData = protoimpl.X.CompressGZIP(file_developer_v1_developer_proto_rawDescData) + file_developer_v1_developer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_developer_v1_developer_proto_rawDesc), len(file_developer_v1_developer_proto_rawDesc))) }) return file_developer_v1_developer_proto_rawDescData } @@ -1824,253 +1599,11 @@ func file_developer_v1_developer_proto_init() { if File_developer_v1_developer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_developer_v1_developer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeveloperRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeveloperResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RequestContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OperationsResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OperationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeveloperWarning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeveloperError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeveloperErrors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CheckOperationParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CheckOperationsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PartialCaveatInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RunAssertionsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RunAssertionsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RunValidationParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RunValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*FormatSchemaParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*FormatSchemaResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SchemaWarningsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_developer_v1_developer_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SchemaWarningsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_developer_v1_developer_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_developer_v1_developer_proto_rawDesc), len(file_developer_v1_developer_proto_rawDesc)), NumEnums: 3, NumMessages: 21, NumExtensions: 0, @@ -2082,7 +1615,6 @@ func file_developer_v1_developer_proto_init() { MessageInfos: file_developer_v1_developer_proto_msgTypes, }.Build() File_developer_v1_developer_proto = out.File - file_developer_v1_developer_proto_rawDesc = nil file_developer_v1_developer_proto_goTypes = nil file_developer_v1_developer_proto_depIdxs = nil } diff --git a/pkg/proto/developer/v1/developer.pb.validate.go b/pkg/proto/developer/v1/developer.pb.validate.go deleted file mode 100644 index 1767bf480..000000000 --- a/pkg/proto/developer/v1/developer.pb.validate.go +++ /dev/null @@ -1,3052 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: developer/v1/developer.proto - -package developerv1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DeveloperRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DeveloperRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeveloperRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeveloperRequestMultiError, or nil if none found. -func (m *DeveloperRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeveloperRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperRequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperRequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperRequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetOperations() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperRequestValidationError{ - field: fmt.Sprintf("Operations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperRequestValidationError{ - field: fmt.Sprintf("Operations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperRequestValidationError{ - field: fmt.Sprintf("Operations[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DeveloperRequestMultiError(errors) - } - - return nil -} - -// DeveloperRequestMultiError is an error wrapping multiple validation errors -// returned by DeveloperRequest.ValidateAll() if the designated constraints -// aren't met. -type DeveloperRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeveloperRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeveloperRequestMultiError) AllErrors() []error { return m } - -// DeveloperRequestValidationError is the validation error returned by -// DeveloperRequest.Validate if the designated constraints aren't met. -type DeveloperRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeveloperRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeveloperRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeveloperRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeveloperRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeveloperRequestValidationError) ErrorName() string { return "DeveloperRequestValidationError" } - -// Error satisfies the builtin error interface -func (e DeveloperRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeveloperRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeveloperRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeveloperRequestValidationError{} - -// Validate checks the field values on DeveloperResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DeveloperResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeveloperResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeveloperResponseMultiError, or nil if none found. -func (m *DeveloperResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeveloperResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for InternalError - - if all { - switch v := interface{}(m.GetDeveloperErrors()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperResponseValidationError{ - field: "DeveloperErrors", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperResponseValidationError{ - field: "DeveloperErrors", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDeveloperErrors()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperResponseValidationError{ - field: "DeveloperErrors", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOperationsResults()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperResponseValidationError{ - field: "OperationsResults", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperResponseValidationError{ - field: "OperationsResults", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOperationsResults()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperResponseValidationError{ - field: "OperationsResults", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DeveloperResponseMultiError(errors) - } - - return nil -} - -// DeveloperResponseMultiError is an error wrapping multiple validation errors -// returned by DeveloperResponse.ValidateAll() if the designated constraints -// aren't met. -type DeveloperResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeveloperResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeveloperResponseMultiError) AllErrors() []error { return m } - -// DeveloperResponseValidationError is the validation error returned by -// DeveloperResponse.Validate if the designated constraints aren't met. -type DeveloperResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeveloperResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeveloperResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeveloperResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeveloperResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeveloperResponseValidationError) ErrorName() string { - return "DeveloperResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeveloperResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeveloperResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeveloperResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeveloperResponseValidationError{} - -// Validate checks the field values on RequestContext with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RequestContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RequestContext with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RequestContextMultiError, -// or nil if none found. -func (m *RequestContext) ValidateAll() error { - return m.validate(true) -} - -func (m *RequestContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Schema - - for idx, item := range m.GetRelationships() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RequestContextValidationError{ - field: fmt.Sprintf("Relationships[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RequestContextValidationError{ - field: fmt.Sprintf("Relationships[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RequestContextValidationError{ - field: fmt.Sprintf("Relationships[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RequestContextMultiError(errors) - } - - return nil -} - -// RequestContextMultiError is an error wrapping multiple validation errors -// returned by RequestContext.ValidateAll() if the designated constraints -// aren't met. -type RequestContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RequestContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RequestContextMultiError) AllErrors() []error { return m } - -// RequestContextValidationError is the validation error returned by -// RequestContext.Validate if the designated constraints aren't met. -type RequestContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RequestContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RequestContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RequestContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RequestContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RequestContextValidationError) ErrorName() string { return "RequestContextValidationError" } - -// Error satisfies the builtin error interface -func (e RequestContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRequestContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RequestContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RequestContextValidationError{} - -// Validate checks the field values on Operation with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Operation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Operation with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in OperationMultiError, or nil -// if none found. -func (m *Operation) ValidateAll() error { - return m.validate(true) -} - -func (m *Operation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCheckParameters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationValidationError{ - field: "CheckParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationValidationError{ - field: "CheckParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckParameters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationValidationError{ - field: "CheckParameters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAssertionsParameters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationValidationError{ - field: "AssertionsParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationValidationError{ - field: "AssertionsParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAssertionsParameters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationValidationError{ - field: "AssertionsParameters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetValidationParameters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationValidationError{ - field: "ValidationParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationValidationError{ - field: "ValidationParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationParameters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationValidationError{ - field: "ValidationParameters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetFormatSchemaParameters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationValidationError{ - field: "FormatSchemaParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationValidationError{ - field: "FormatSchemaParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFormatSchemaParameters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationValidationError{ - field: "FormatSchemaParameters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSchemaWarningsParameters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationValidationError{ - field: "SchemaWarningsParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationValidationError{ - field: "SchemaWarningsParameters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSchemaWarningsParameters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationValidationError{ - field: "SchemaWarningsParameters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return OperationMultiError(errors) - } - - return nil -} - -// OperationMultiError is an error wrapping multiple validation errors returned -// by Operation.ValidateAll() if the designated constraints aren't met. -type OperationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperationMultiError) AllErrors() []error { return m } - -// OperationValidationError is the validation error returned by -// Operation.Validate if the designated constraints aren't met. -type OperationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperationValidationError) ErrorName() string { return "OperationValidationError" } - -// Error satisfies the builtin error interface -func (e OperationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperationValidationError{} - -// Validate checks the field values on OperationsResults with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *OperationsResults) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on OperationsResults with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// OperationsResultsMultiError, or nil if none found. -func (m *OperationsResults) ValidateAll() error { - return m.validate(true) -} - -func (m *OperationsResults) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]uint64, len(m.GetResults())) - i := 0 - for key := range m.GetResults() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetResults()[key] - _ = val - - // no validation rules for Results[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationsResultsValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationsResultsValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationsResultsValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return OperationsResultsMultiError(errors) - } - - return nil -} - -// OperationsResultsMultiError is an error wrapping multiple validation errors -// returned by OperationsResults.ValidateAll() if the designated constraints -// aren't met. -type OperationsResultsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperationsResultsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperationsResultsMultiError) AllErrors() []error { return m } - -// OperationsResultsValidationError is the validation error returned by -// OperationsResults.Validate if the designated constraints aren't met. -type OperationsResultsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperationsResultsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperationsResultsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperationsResultsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperationsResultsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperationsResultsValidationError) ErrorName() string { - return "OperationsResultsValidationError" -} - -// Error satisfies the builtin error interface -func (e OperationsResultsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperationsResults.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperationsResultsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperationsResultsValidationError{} - -// Validate checks the field values on OperationResult with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *OperationResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on OperationResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// OperationResultMultiError, or nil if none found. -func (m *OperationResult) ValidateAll() error { - return m.validate(true) -} - -func (m *OperationResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCheckResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "CheckResult", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "CheckResult", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationResultValidationError{ - field: "CheckResult", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAssertionsResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "AssertionsResult", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "AssertionsResult", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAssertionsResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationResultValidationError{ - field: "AssertionsResult", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetValidationResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "ValidationResult", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "ValidationResult", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationResultValidationError{ - field: "ValidationResult", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetFormatSchemaResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "FormatSchemaResult", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "FormatSchemaResult", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFormatSchemaResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationResultValidationError{ - field: "FormatSchemaResult", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSchemaWarningsResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "SchemaWarningsResult", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperationResultValidationError{ - field: "SchemaWarningsResult", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSchemaWarningsResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperationResultValidationError{ - field: "SchemaWarningsResult", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return OperationResultMultiError(errors) - } - - return nil -} - -// OperationResultMultiError is an error wrapping multiple validation errors -// returned by OperationResult.ValidateAll() if the designated constraints -// aren't met. -type OperationResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperationResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperationResultMultiError) AllErrors() []error { return m } - -// OperationResultValidationError is the validation error returned by -// OperationResult.Validate if the designated constraints aren't met. -type OperationResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperationResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperationResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperationResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperationResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperationResultValidationError) ErrorName() string { return "OperationResultValidationError" } - -// Error satisfies the builtin error interface -func (e OperationResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperationResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperationResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperationResultValidationError{} - -// Validate checks the field values on DeveloperWarning with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DeveloperWarning) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeveloperWarning with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeveloperWarningMultiError, or nil if none found. -func (m *DeveloperWarning) ValidateAll() error { - return m.validate(true) -} - -func (m *DeveloperWarning) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Message - - // no validation rules for Line - - // no validation rules for Column - - // no validation rules for SourceCode - - if len(errors) > 0 { - return DeveloperWarningMultiError(errors) - } - - return nil -} - -// DeveloperWarningMultiError is an error wrapping multiple validation errors -// returned by DeveloperWarning.ValidateAll() if the designated constraints -// aren't met. -type DeveloperWarningMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeveloperWarningMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeveloperWarningMultiError) AllErrors() []error { return m } - -// DeveloperWarningValidationError is the validation error returned by -// DeveloperWarning.Validate if the designated constraints aren't met. -type DeveloperWarningValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeveloperWarningValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeveloperWarningValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeveloperWarningValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeveloperWarningValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeveloperWarningValidationError) ErrorName() string { return "DeveloperWarningValidationError" } - -// Error satisfies the builtin error interface -func (e DeveloperWarningValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeveloperWarning.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeveloperWarningValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeveloperWarningValidationError{} - -// Validate checks the field values on DeveloperError with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DeveloperError) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeveloperError with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DeveloperErrorMultiError, -// or nil if none found. -func (m *DeveloperError) ValidateAll() error { - return m.validate(true) -} - -func (m *DeveloperError) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Message - - // no validation rules for Line - - // no validation rules for Column - - // no validation rules for Source - - // no validation rules for Kind - - // no validation rules for Context - - if all { - switch v := interface{}(m.GetCheckDebugInformation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperErrorValidationError{ - field: "CheckDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperErrorValidationError{ - field: "CheckDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckDebugInformation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperErrorValidationError{ - field: "CheckDebugInformation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCheckResolvedDebugInformation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperErrorValidationError{ - field: "CheckResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperErrorValidationError{ - field: "CheckResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckResolvedDebugInformation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperErrorValidationError{ - field: "CheckResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DeveloperErrorMultiError(errors) - } - - return nil -} - -// DeveloperErrorMultiError is an error wrapping multiple validation errors -// returned by DeveloperError.ValidateAll() if the designated constraints -// aren't met. -type DeveloperErrorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeveloperErrorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeveloperErrorMultiError) AllErrors() []error { return m } - -// DeveloperErrorValidationError is the validation error returned by -// DeveloperError.Validate if the designated constraints aren't met. -type DeveloperErrorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeveloperErrorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeveloperErrorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeveloperErrorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeveloperErrorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeveloperErrorValidationError) ErrorName() string { return "DeveloperErrorValidationError" } - -// Error satisfies the builtin error interface -func (e DeveloperErrorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeveloperError.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeveloperErrorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeveloperErrorValidationError{} - -// Validate checks the field values on DeveloperErrors with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DeveloperErrors) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeveloperErrors with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeveloperErrorsMultiError, or nil if none found. -func (m *DeveloperErrors) ValidateAll() error { - return m.validate(true) -} - -func (m *DeveloperErrors) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetInputErrors() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeveloperErrorsValidationError{ - field: fmt.Sprintf("InputErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeveloperErrorsValidationError{ - field: fmt.Sprintf("InputErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeveloperErrorsValidationError{ - field: fmt.Sprintf("InputErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DeveloperErrorsMultiError(errors) - } - - return nil -} - -// DeveloperErrorsMultiError is an error wrapping multiple validation errors -// returned by DeveloperErrors.ValidateAll() if the designated constraints -// aren't met. -type DeveloperErrorsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeveloperErrorsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeveloperErrorsMultiError) AllErrors() []error { return m } - -// DeveloperErrorsValidationError is the validation error returned by -// DeveloperErrors.Validate if the designated constraints aren't met. -type DeveloperErrorsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeveloperErrorsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeveloperErrorsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeveloperErrorsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeveloperErrorsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeveloperErrorsValidationError) ErrorName() string { return "DeveloperErrorsValidationError" } - -// Error satisfies the builtin error interface -func (e DeveloperErrorsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeveloperErrors.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeveloperErrorsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeveloperErrorsValidationError{} - -// Validate checks the field values on CheckOperationParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckOperationParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckOperationParameters with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckOperationParametersMultiError, or nil if none found. -func (m *CheckOperationParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckOperationParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationParametersValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationParametersValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCaveatContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "CaveatContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationParametersValidationError{ - field: "CaveatContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveatContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationParametersValidationError{ - field: "CaveatContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CheckOperationParametersMultiError(errors) - } - - return nil -} - -// CheckOperationParametersMultiError is an error wrapping multiple validation -// errors returned by CheckOperationParameters.ValidateAll() if the designated -// constraints aren't met. -type CheckOperationParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckOperationParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckOperationParametersMultiError) AllErrors() []error { return m } - -// CheckOperationParametersValidationError is the validation error returned by -// CheckOperationParameters.Validate if the designated constraints aren't met. -type CheckOperationParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckOperationParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckOperationParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckOperationParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckOperationParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckOperationParametersValidationError) ErrorName() string { - return "CheckOperationParametersValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckOperationParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckOperationParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckOperationParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckOperationParametersValidationError{} - -// Validate checks the field values on CheckOperationsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckOperationsResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckOperationsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckOperationsResultMultiError, or nil if none found. -func (m *CheckOperationsResult) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckOperationsResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Membership - - if all { - switch v := interface{}(m.GetCheckError()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "CheckError", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "CheckError", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckError()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationsResultValidationError{ - field: "CheckError", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDebugInformation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "DebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "DebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDebugInformation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationsResultValidationError{ - field: "DebugInformation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPartialCaveatInfo()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "PartialCaveatInfo", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "PartialCaveatInfo", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPartialCaveatInfo()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationsResultValidationError{ - field: "PartialCaveatInfo", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetResolvedDebugInformation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "ResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckOperationsResultValidationError{ - field: "ResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResolvedDebugInformation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckOperationsResultValidationError{ - field: "ResolvedDebugInformation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CheckOperationsResultMultiError(errors) - } - - return nil -} - -// CheckOperationsResultMultiError is an error wrapping multiple validation -// errors returned by CheckOperationsResult.ValidateAll() if the designated -// constraints aren't met. -type CheckOperationsResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckOperationsResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckOperationsResultMultiError) AllErrors() []error { return m } - -// CheckOperationsResultValidationError is the validation error returned by -// CheckOperationsResult.Validate if the designated constraints aren't met. -type CheckOperationsResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckOperationsResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckOperationsResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckOperationsResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckOperationsResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckOperationsResultValidationError) ErrorName() string { - return "CheckOperationsResultValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckOperationsResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckOperationsResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckOperationsResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckOperationsResultValidationError{} - -// Validate checks the field values on PartialCaveatInfo with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PartialCaveatInfo) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PartialCaveatInfo with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PartialCaveatInfoMultiError, or nil if none found. -func (m *PartialCaveatInfo) ValidateAll() error { - return m.validate(true) -} - -func (m *PartialCaveatInfo) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetMissingRequiredContext()) < 1 { - err := PartialCaveatInfoValidationError{ - field: "MissingRequiredContext", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return PartialCaveatInfoMultiError(errors) - } - - return nil -} - -// PartialCaveatInfoMultiError is an error wrapping multiple validation errors -// returned by PartialCaveatInfo.ValidateAll() if the designated constraints -// aren't met. -type PartialCaveatInfoMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PartialCaveatInfoMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PartialCaveatInfoMultiError) AllErrors() []error { return m } - -// PartialCaveatInfoValidationError is the validation error returned by -// PartialCaveatInfo.Validate if the designated constraints aren't met. -type PartialCaveatInfoValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PartialCaveatInfoValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PartialCaveatInfoValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PartialCaveatInfoValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PartialCaveatInfoValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PartialCaveatInfoValidationError) ErrorName() string { - return "PartialCaveatInfoValidationError" -} - -// Error satisfies the builtin error interface -func (e PartialCaveatInfoValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPartialCaveatInfo.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PartialCaveatInfoValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PartialCaveatInfoValidationError{} - -// Validate checks the field values on RunAssertionsParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RunAssertionsParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RunAssertionsParameters with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RunAssertionsParametersMultiError, or nil if none found. -func (m *RunAssertionsParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *RunAssertionsParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AssertionsYaml - - if len(errors) > 0 { - return RunAssertionsParametersMultiError(errors) - } - - return nil -} - -// RunAssertionsParametersMultiError is an error wrapping multiple validation -// errors returned by RunAssertionsParameters.ValidateAll() if the designated -// constraints aren't met. -type RunAssertionsParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RunAssertionsParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RunAssertionsParametersMultiError) AllErrors() []error { return m } - -// RunAssertionsParametersValidationError is the validation error returned by -// RunAssertionsParameters.Validate if the designated constraints aren't met. -type RunAssertionsParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RunAssertionsParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RunAssertionsParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RunAssertionsParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RunAssertionsParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RunAssertionsParametersValidationError) ErrorName() string { - return "RunAssertionsParametersValidationError" -} - -// Error satisfies the builtin error interface -func (e RunAssertionsParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRunAssertionsParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RunAssertionsParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RunAssertionsParametersValidationError{} - -// Validate checks the field values on RunAssertionsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RunAssertionsResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RunAssertionsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RunAssertionsResultMultiError, or nil if none found. -func (m *RunAssertionsResult) ValidateAll() error { - return m.validate(true) -} - -func (m *RunAssertionsResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetInputError()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RunAssertionsResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RunAssertionsResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInputError()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RunAssertionsResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetValidationErrors() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RunAssertionsResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RunAssertionsResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RunAssertionsResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RunAssertionsResultMultiError(errors) - } - - return nil -} - -// RunAssertionsResultMultiError is an error wrapping multiple validation -// errors returned by RunAssertionsResult.ValidateAll() if the designated -// constraints aren't met. -type RunAssertionsResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RunAssertionsResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RunAssertionsResultMultiError) AllErrors() []error { return m } - -// RunAssertionsResultValidationError is the validation error returned by -// RunAssertionsResult.Validate if the designated constraints aren't met. -type RunAssertionsResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RunAssertionsResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RunAssertionsResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RunAssertionsResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RunAssertionsResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RunAssertionsResultValidationError) ErrorName() string { - return "RunAssertionsResultValidationError" -} - -// Error satisfies the builtin error interface -func (e RunAssertionsResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRunAssertionsResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RunAssertionsResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RunAssertionsResultValidationError{} - -// Validate checks the field values on RunValidationParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RunValidationParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RunValidationParameters with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RunValidationParametersMultiError, or nil if none found. -func (m *RunValidationParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *RunValidationParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ValidationYaml - - if len(errors) > 0 { - return RunValidationParametersMultiError(errors) - } - - return nil -} - -// RunValidationParametersMultiError is an error wrapping multiple validation -// errors returned by RunValidationParameters.ValidateAll() if the designated -// constraints aren't met. -type RunValidationParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RunValidationParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RunValidationParametersMultiError) AllErrors() []error { return m } - -// RunValidationParametersValidationError is the validation error returned by -// RunValidationParameters.Validate if the designated constraints aren't met. -type RunValidationParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RunValidationParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RunValidationParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RunValidationParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RunValidationParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RunValidationParametersValidationError) ErrorName() string { - return "RunValidationParametersValidationError" -} - -// Error satisfies the builtin error interface -func (e RunValidationParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRunValidationParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RunValidationParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RunValidationParametersValidationError{} - -// Validate checks the field values on RunValidationResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RunValidationResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RunValidationResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RunValidationResultMultiError, or nil if none found. -func (m *RunValidationResult) ValidateAll() error { - return m.validate(true) -} - -func (m *RunValidationResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetInputError()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RunValidationResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RunValidationResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInputError()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RunValidationResultValidationError{ - field: "InputError", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UpdatedValidationYaml - - for idx, item := range m.GetValidationErrors() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RunValidationResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RunValidationResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RunValidationResultValidationError{ - field: fmt.Sprintf("ValidationErrors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RunValidationResultMultiError(errors) - } - - return nil -} - -// RunValidationResultMultiError is an error wrapping multiple validation -// errors returned by RunValidationResult.ValidateAll() if the designated -// constraints aren't met. -type RunValidationResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RunValidationResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RunValidationResultMultiError) AllErrors() []error { return m } - -// RunValidationResultValidationError is the validation error returned by -// RunValidationResult.Validate if the designated constraints aren't met. -type RunValidationResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RunValidationResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RunValidationResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RunValidationResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RunValidationResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RunValidationResultValidationError) ErrorName() string { - return "RunValidationResultValidationError" -} - -// Error satisfies the builtin error interface -func (e RunValidationResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRunValidationResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RunValidationResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RunValidationResultValidationError{} - -// Validate checks the field values on FormatSchemaParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FormatSchemaParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FormatSchemaParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FormatSchemaParametersMultiError, or nil if none found. -func (m *FormatSchemaParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *FormatSchemaParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return FormatSchemaParametersMultiError(errors) - } - - return nil -} - -// FormatSchemaParametersMultiError is an error wrapping multiple validation -// errors returned by FormatSchemaParameters.ValidateAll() if the designated -// constraints aren't met. -type FormatSchemaParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FormatSchemaParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FormatSchemaParametersMultiError) AllErrors() []error { return m } - -// FormatSchemaParametersValidationError is the validation error returned by -// FormatSchemaParameters.Validate if the designated constraints aren't met. -type FormatSchemaParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FormatSchemaParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FormatSchemaParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FormatSchemaParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FormatSchemaParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FormatSchemaParametersValidationError) ErrorName() string { - return "FormatSchemaParametersValidationError" -} - -// Error satisfies the builtin error interface -func (e FormatSchemaParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFormatSchemaParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FormatSchemaParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FormatSchemaParametersValidationError{} - -// Validate checks the field values on FormatSchemaResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FormatSchemaResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FormatSchemaResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FormatSchemaResultMultiError, or nil if none found. -func (m *FormatSchemaResult) ValidateAll() error { - return m.validate(true) -} - -func (m *FormatSchemaResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for FormattedSchema - - if len(errors) > 0 { - return FormatSchemaResultMultiError(errors) - } - - return nil -} - -// FormatSchemaResultMultiError is an error wrapping multiple validation errors -// returned by FormatSchemaResult.ValidateAll() if the designated constraints -// aren't met. -type FormatSchemaResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FormatSchemaResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FormatSchemaResultMultiError) AllErrors() []error { return m } - -// FormatSchemaResultValidationError is the validation error returned by -// FormatSchemaResult.Validate if the designated constraints aren't met. -type FormatSchemaResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FormatSchemaResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FormatSchemaResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FormatSchemaResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FormatSchemaResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FormatSchemaResultValidationError) ErrorName() string { - return "FormatSchemaResultValidationError" -} - -// Error satisfies the builtin error interface -func (e FormatSchemaResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFormatSchemaResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FormatSchemaResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FormatSchemaResultValidationError{} - -// Validate checks the field values on SchemaWarningsParameters with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SchemaWarningsParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SchemaWarningsParameters with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SchemaWarningsParametersMultiError, or nil if none found. -func (m *SchemaWarningsParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *SchemaWarningsParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return SchemaWarningsParametersMultiError(errors) - } - - return nil -} - -// SchemaWarningsParametersMultiError is an error wrapping multiple validation -// errors returned by SchemaWarningsParameters.ValidateAll() if the designated -// constraints aren't met. -type SchemaWarningsParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SchemaWarningsParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SchemaWarningsParametersMultiError) AllErrors() []error { return m } - -// SchemaWarningsParametersValidationError is the validation error returned by -// SchemaWarningsParameters.Validate if the designated constraints aren't met. -type SchemaWarningsParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SchemaWarningsParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SchemaWarningsParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SchemaWarningsParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SchemaWarningsParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SchemaWarningsParametersValidationError) ErrorName() string { - return "SchemaWarningsParametersValidationError" -} - -// Error satisfies the builtin error interface -func (e SchemaWarningsParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSchemaWarningsParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SchemaWarningsParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SchemaWarningsParametersValidationError{} - -// Validate checks the field values on SchemaWarningsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SchemaWarningsResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SchemaWarningsResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SchemaWarningsResultMultiError, or nil if none found. -func (m *SchemaWarningsResult) ValidateAll() error { - return m.validate(true) -} - -func (m *SchemaWarningsResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetWarnings() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SchemaWarningsResultValidationError{ - field: fmt.Sprintf("Warnings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SchemaWarningsResultValidationError{ - field: fmt.Sprintf("Warnings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SchemaWarningsResultValidationError{ - field: fmt.Sprintf("Warnings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return SchemaWarningsResultMultiError(errors) - } - - return nil -} - -// SchemaWarningsResultMultiError is an error wrapping multiple validation -// errors returned by SchemaWarningsResult.ValidateAll() if the designated -// constraints aren't met. -type SchemaWarningsResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SchemaWarningsResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SchemaWarningsResultMultiError) AllErrors() []error { return m } - -// SchemaWarningsResultValidationError is the validation error returned by -// SchemaWarningsResult.Validate if the designated constraints aren't met. -type SchemaWarningsResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SchemaWarningsResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SchemaWarningsResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SchemaWarningsResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SchemaWarningsResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SchemaWarningsResultValidationError) ErrorName() string { - return "SchemaWarningsResultValidationError" -} - -// Error satisfies the builtin error interface -func (e SchemaWarningsResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSchemaWarningsResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SchemaWarningsResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SchemaWarningsResultValidationError{} diff --git a/pkg/proto/developer/v1/developer_vtproto.pb.go b/pkg/proto/developer/v1/developer_vtproto.pb.go index 8f53dc6c4..8e59eb5d9 100644 --- a/pkg/proto/developer/v1/developer_vtproto.pb.go +++ b/pkg/proto/developer/v1/developer_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240409071808-615f978279ca +// protoc-gen-go-vtproto version: v0.6.1-0.20240917153116-6f2963f01587 // source: developer/v1/developer.proto package developerv1 diff --git a/pkg/proto/dispatch/v1/dispatch.pb.go b/pkg/proto/dispatch/v1/dispatch.pb.go index 4053dc473..48c5a7f73 100644 --- a/pkg/proto/dispatch/v1/dispatch.pb.go +++ b/pkg/proto/dispatch/v1/dispatch.pb.go @@ -1,20 +1,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: dispatch/v1/dispatch.proto package dispatchv1 import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" v1 "github.com/authzed/spicedb/pkg/proto/core/v1" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -267,10 +268,7 @@ func (CheckDebugTrace_RelationType) EnumDescriptor() ([]byte, []int) { } type DispatchCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` ResourceIds []string `protobuf:"bytes,3,rep,name=resource_ids,json=resourceIds,proto3" json:"resource_ids,omitempty"` @@ -283,16 +281,16 @@ type DispatchCheckRequest struct { // "relationtuple"-string for the problem, e.g. `document:example#relation@user:someuser`. // It is up to the caller to *ensure* that the hints provided are correct; if incorrect, // the resolver may return incorrect results which will in turn be cached. - CheckHints []*CheckHint `protobuf:"bytes,7,rep,name=check_hints,json=checkHints,proto3" json:"check_hints,omitempty"` + CheckHints []*CheckHint `protobuf:"bytes,7,rep,name=check_hints,json=checkHints,proto3" json:"check_hints,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchCheckRequest) Reset() { *x = DispatchCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchCheckRequest) String() string { @@ -303,7 +301,7 @@ func (*DispatchCheckRequest) ProtoMessage() {} func (x *DispatchCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,23 +366,20 @@ func (x *DispatchCheckRequest) GetCheckHints() []*CheckHint { } type CheckHint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *v1.ObjectAndRelation `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Subject *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - TtuComputedUsersetRelation string `protobuf:"bytes,3,opt,name=ttu_computed_userset_relation,json=ttuComputedUsersetRelation,proto3" json:"ttu_computed_userset_relation,omitempty"` - Result *ResourceCheckResult `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Resource *v1.ObjectAndRelation `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Subject *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + TtuComputedUsersetRelation string `protobuf:"bytes,3,opt,name=ttu_computed_userset_relation,json=ttuComputedUsersetRelation,proto3" json:"ttu_computed_userset_relation,omitempty"` + Result *ResourceCheckResult `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckHint) Reset() { *x = CheckHint{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckHint) String() string { @@ -395,7 +390,7 @@ func (*CheckHint) ProtoMessage() {} func (x *CheckHint) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,21 +434,18 @@ func (x *CheckHint) GetResult() *ResourceCheckResult { } type DispatchCheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ResultsByResourceId map[string]*ResourceCheckResult `protobuf:"bytes,2,rep,name=results_by_resource_id,json=resultsByResourceId,proto3" json:"results_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ResultsByResourceId map[string]*ResourceCheckResult `protobuf:"bytes,2,rep,name=results_by_resource_id,json=resultsByResourceId,proto3" json:"results_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchCheckResponse) Reset() { *x = DispatchCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchCheckResponse) String() string { @@ -464,7 +456,7 @@ func (*DispatchCheckResponse) ProtoMessage() {} func (x *DispatchCheckResponse) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,22 +486,19 @@ func (x *DispatchCheckResponse) GetResultsByResourceId() map[string]*ResourceChe } type ResourceCheckResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Membership ResourceCheckResult_Membership `protobuf:"varint,1,opt,name=membership,proto3,enum=dispatch.v1.ResourceCheckResult_Membership" json:"membership,omitempty"` Expression *v1.CaveatExpression `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` MissingExprFields []string `protobuf:"bytes,3,rep,name=missing_expr_fields,json=missingExprFields,proto3" json:"missing_expr_fields,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResourceCheckResult) Reset() { *x = ResourceCheckResult{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceCheckResult) String() string { @@ -520,7 +509,7 @@ func (*ResourceCheckResult) ProtoMessage() {} func (x *ResourceCheckResult) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,22 +546,19 @@ func (x *ResourceCheckResult) GetMissingExprFields() []string { } type DispatchExpandRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` ResourceAndRelation *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=resource_and_relation,json=resourceAndRelation,proto3" json:"resource_and_relation,omitempty"` ExpansionMode DispatchExpandRequest_ExpansionMode `protobuf:"varint,3,opt,name=expansion_mode,json=expansionMode,proto3,enum=dispatch.v1.DispatchExpandRequest_ExpansionMode" json:"expansion_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchExpandRequest) Reset() { *x = DispatchExpandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchExpandRequest) String() string { @@ -583,7 +569,7 @@ func (*DispatchExpandRequest) ProtoMessage() {} func (x *DispatchExpandRequest) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,21 +606,18 @@ func (x *DispatchExpandRequest) GetExpansionMode() DispatchExpandRequest_Expansi } type DispatchExpandResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + TreeNode *v1.RelationTupleTreeNode `protobuf:"bytes,2,opt,name=tree_node,json=treeNode,proto3" json:"tree_node,omitempty"` unknownFields protoimpl.UnknownFields - - Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - TreeNode *v1.RelationTupleTreeNode `protobuf:"bytes,2,opt,name=tree_node,json=treeNode,proto3" json:"tree_node,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DispatchExpandResponse) Reset() { *x = DispatchExpandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchExpandResponse) String() string { @@ -645,7 +628,7 @@ func (*DispatchExpandResponse) ProtoMessage() {} func (x *DispatchExpandResponse) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,21 +658,18 @@ func (x *DispatchExpandResponse) GetTreeNode() *v1.RelationTupleTreeNode { } type Cursor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sections []string `protobuf:"bytes,2,rep,name=sections,proto3" json:"sections,omitempty"` - DispatchVersion uint32 `protobuf:"varint,3,opt,name=dispatch_version,json=dispatchVersion,proto3" json:"dispatch_version,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Sections []string `protobuf:"bytes,2,rep,name=sections,proto3" json:"sections,omitempty"` + DispatchVersion uint32 `protobuf:"varint,3,opt,name=dispatch_version,json=dispatchVersion,proto3" json:"dispatch_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cursor) Reset() { *x = Cursor{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cursor) String() string { @@ -700,7 +680,7 @@ func (*Cursor) ProtoMessage() {} func (x *Cursor) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,27 +710,24 @@ func (x *Cursor) GetDispatchVersion() uint32 { } type DispatchLookupResources2Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` - SubjectRelation *v1.RelationReference `protobuf:"bytes,3,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` - SubjectIds []string `protobuf:"bytes,4,rep,name=subject_ids,json=subjectIds,proto3" json:"subject_ids,omitempty"` - TerminalSubject *v1.ObjectAndRelation `protobuf:"bytes,5,opt,name=terminal_subject,json=terminalSubject,proto3" json:"terminal_subject,omitempty"` - Context *structpb.Struct `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` - OptionalCursor *Cursor `protobuf:"bytes,7,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"` - OptionalLimit uint32 `protobuf:"varint,8,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` + SubjectRelation *v1.RelationReference `protobuf:"bytes,3,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` + SubjectIds []string `protobuf:"bytes,4,rep,name=subject_ids,json=subjectIds,proto3" json:"subject_ids,omitempty"` + TerminalSubject *v1.ObjectAndRelation `protobuf:"bytes,5,opt,name=terminal_subject,json=terminalSubject,proto3" json:"terminal_subject,omitempty"` + Context *structpb.Struct `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + OptionalCursor *Cursor `protobuf:"bytes,7,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"` + OptionalLimit uint32 `protobuf:"varint,8,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchLookupResources2Request) Reset() { *x = DispatchLookupResources2Request{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupResources2Request) String() string { @@ -761,7 +738,7 @@ func (*DispatchLookupResources2Request) ProtoMessage() {} func (x *DispatchLookupResources2Request) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,22 +810,19 @@ func (x *DispatchLookupResources2Request) GetOptionalLimit() uint32 { } type PossibleResource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ForSubjectIds []string `protobuf:"bytes,2,rep,name=for_subject_ids,json=forSubjectIds,proto3" json:"for_subject_ids,omitempty"` - MissingContextParams []string `protobuf:"bytes,3,rep,name=missing_context_params,json=missingContextParams,proto3" json:"missing_context_params,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ForSubjectIds []string `protobuf:"bytes,2,rep,name=for_subject_ids,json=forSubjectIds,proto3" json:"for_subject_ids,omitempty"` + MissingContextParams []string `protobuf:"bytes,3,rep,name=missing_context_params,json=missingContextParams,proto3" json:"missing_context_params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PossibleResource) Reset() { *x = PossibleResource{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PossibleResource) String() string { @@ -859,7 +833,7 @@ func (*PossibleResource) ProtoMessage() {} func (x *PossibleResource) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,22 +870,19 @@ func (x *PossibleResource) GetMissingContextParams() []string { } type DispatchLookupResources2Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *PossibleResource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Metadata *ResponseMeta `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - AfterResponseCursor *Cursor `protobuf:"bytes,3,opt,name=after_response_cursor,json=afterResponseCursor,proto3" json:"after_response_cursor,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Resource *PossibleResource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Metadata *ResponseMeta `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + AfterResponseCursor *Cursor `protobuf:"bytes,3,opt,name=after_response_cursor,json=afterResponseCursor,proto3" json:"after_response_cursor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchLookupResources2Response) Reset() { *x = DispatchLookupResources2Response{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupResources2Response) String() string { @@ -922,7 +893,7 @@ func (*DispatchLookupResources2Response) ProtoMessage() {} func (x *DispatchLookupResources2Response) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,27 +930,24 @@ func (x *DispatchLookupResources2Response) GetAfterResponseCursor() *Cursor { } type DispatchLookupResources3Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` - SubjectRelation *v1.RelationReference `protobuf:"bytes,3,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` - SubjectIds []string `protobuf:"bytes,4,rep,name=subject_ids,json=subjectIds,proto3" json:"subject_ids,omitempty"` - TerminalSubject *v1.ObjectAndRelation `protobuf:"bytes,5,opt,name=terminal_subject,json=terminalSubject,proto3" json:"terminal_subject,omitempty"` - Context *structpb.Struct `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` - OptionalCursor []string `protobuf:"bytes,7,rep,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"` - OptionalLimit uint32 `protobuf:"varint,8,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` + SubjectRelation *v1.RelationReference `protobuf:"bytes,3,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` + SubjectIds []string `protobuf:"bytes,4,rep,name=subject_ids,json=subjectIds,proto3" json:"subject_ids,omitempty"` + TerminalSubject *v1.ObjectAndRelation `protobuf:"bytes,5,opt,name=terminal_subject,json=terminalSubject,proto3" json:"terminal_subject,omitempty"` + Context *structpb.Struct `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + OptionalCursor []string `protobuf:"bytes,7,rep,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"` + OptionalLimit uint32 `protobuf:"varint,8,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchLookupResources3Request) Reset() { *x = DispatchLookupResources3Request{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupResources3Request) String() string { @@ -990,7 +958,7 @@ func (*DispatchLookupResources3Request) ProtoMessage() {} func (x *DispatchLookupResources3Request) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,20 +1030,17 @@ func (x *DispatchLookupResources3Request) GetOptionalLimit() uint32 { } type DispatchLookupResources3Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Items []*LR3Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` unknownFields protoimpl.UnknownFields - - Items []*LR3Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DispatchLookupResources3Response) Reset() { *x = DispatchLookupResources3Response{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupResources3Response) String() string { @@ -1086,7 +1051,7 @@ func (*DispatchLookupResources3Response) ProtoMessage() {} func (x *DispatchLookupResources3Response) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,23 +1074,20 @@ func (x *DispatchLookupResources3Response) GetItems() []*LR3Item { } type LR3Item struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ForSubjectIds []string `protobuf:"bytes,2,rep,name=for_subject_ids,json=forSubjectIds,proto3" json:"for_subject_ids,omitempty"` - MissingContextParams []string `protobuf:"bytes,3,rep,name=missing_context_params,json=missingContextParams,proto3" json:"missing_context_params,omitempty"` - AfterResponseCursorSections []string `protobuf:"bytes,4,rep,name=after_response_cursor_sections,json=afterResponseCursorSections,proto3" json:"after_response_cursor_sections,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ForSubjectIds []string `protobuf:"bytes,2,rep,name=for_subject_ids,json=forSubjectIds,proto3" json:"for_subject_ids,omitempty"` + MissingContextParams []string `protobuf:"bytes,3,rep,name=missing_context_params,json=missingContextParams,proto3" json:"missing_context_params,omitempty"` + AfterResponseCursorSections []string `protobuf:"bytes,4,rep,name=after_response_cursor_sections,json=afterResponseCursorSections,proto3" json:"after_response_cursor_sections,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *LR3Item) Reset() { *x = LR3Item{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LR3Item) String() string { @@ -1136,7 +1098,7 @@ func (*LR3Item) ProtoMessage() {} func (x *LR3Item) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,23 +1142,20 @@ func (x *LR3Item) GetAfterResponseCursorSections() []string { } type DispatchLookupSubjectsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` - ResourceIds []string `protobuf:"bytes,3,rep,name=resource_ids,json=resourceIds,proto3" json:"resource_ids,omitempty"` - SubjectRelation *v1.RelationReference `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResourceRelation *v1.RelationReference `protobuf:"bytes,2,opt,name=resource_relation,json=resourceRelation,proto3" json:"resource_relation,omitempty"` + ResourceIds []string `protobuf:"bytes,3,rep,name=resource_ids,json=resourceIds,proto3" json:"resource_ids,omitempty"` + SubjectRelation *v1.RelationReference `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchLookupSubjectsRequest) Reset() { *x = DispatchLookupSubjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupSubjectsRequest) String() string { @@ -1207,7 +1166,7 @@ func (*DispatchLookupSubjectsRequest) ProtoMessage() {} func (x *DispatchLookupSubjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1251,22 +1210,19 @@ func (x *DispatchLookupSubjectsRequest) GetSubjectRelation() *v1.RelationReferen } type FoundSubject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` - CaveatExpression *v1.CaveatExpression `protobuf:"bytes,2,opt,name=caveat_expression,json=caveatExpression,proto3" json:"caveat_expression,omitempty"` - ExcludedSubjects []*FoundSubject `protobuf:"bytes,3,rep,name=excluded_subjects,json=excludedSubjects,proto3" json:"excluded_subjects,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` + CaveatExpression *v1.CaveatExpression `protobuf:"bytes,2,opt,name=caveat_expression,json=caveatExpression,proto3" json:"caveat_expression,omitempty"` + ExcludedSubjects []*FoundSubject `protobuf:"bytes,3,rep,name=excluded_subjects,json=excludedSubjects,proto3" json:"excluded_subjects,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FoundSubject) Reset() { *x = FoundSubject{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FoundSubject) String() string { @@ -1277,7 +1233,7 @@ func (*FoundSubject) ProtoMessage() {} func (x *FoundSubject) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,20 +1270,17 @@ func (x *FoundSubject) GetExcludedSubjects() []*FoundSubject { } type FoundSubjects struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + FoundSubjects []*FoundSubject `protobuf:"bytes,1,rep,name=found_subjects,json=foundSubjects,proto3" json:"found_subjects,omitempty"` unknownFields protoimpl.UnknownFields - - FoundSubjects []*FoundSubject `protobuf:"bytes,1,rep,name=found_subjects,json=foundSubjects,proto3" json:"found_subjects,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FoundSubjects) Reset() { *x = FoundSubjects{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FoundSubjects) String() string { @@ -1338,7 +1291,7 @@ func (*FoundSubjects) ProtoMessage() {} func (x *FoundSubjects) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,21 +1314,18 @@ func (x *FoundSubjects) GetFoundSubjects() []*FoundSubject { } type DispatchLookupSubjectsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FoundSubjectsByResourceId map[string]*FoundSubjects `protobuf:"bytes,1,rep,name=found_subjects_by_resource_id,json=foundSubjectsByResourceId,proto3" json:"found_subjects_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + FoundSubjectsByResourceId map[string]*FoundSubjects `protobuf:"bytes,1,rep,name=found_subjects_by_resource_id,json=foundSubjectsByResourceId,proto3" json:"found_subjects_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Metadata *ResponseMeta `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DispatchLookupSubjectsResponse) Reset() { *x = DispatchLookupSubjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DispatchLookupSubjectsResponse) String() string { @@ -1386,7 +1336,7 @@ func (*DispatchLookupSubjectsResponse) ProtoMessage() {} func (x *DispatchLookupSubjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1416,24 +1366,21 @@ func (x *DispatchLookupSubjectsResponse) GetMetadata() *ResponseMeta { } type ResolverMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AtRevision string `protobuf:"bytes,1,opt,name=at_revision,json=atRevision,proto3" json:"at_revision,omitempty"` - DepthRemaining uint32 `protobuf:"varint,2,opt,name=depth_remaining,json=depthRemaining,proto3" json:"depth_remaining,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + AtRevision string `protobuf:"bytes,1,opt,name=at_revision,json=atRevision,proto3" json:"at_revision,omitempty"` + DepthRemaining uint32 `protobuf:"varint,2,opt,name=depth_remaining,json=depthRemaining,proto3" json:"depth_remaining,omitempty"` // Deprecated: Marked as deprecated in dispatch/v1/dispatch.proto. RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` TraversalBloom []byte `protobuf:"bytes,4,opt,name=traversal_bloom,json=traversalBloom,proto3" json:"traversal_bloom,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResolverMeta) Reset() { *x = ResolverMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolverMeta) String() string { @@ -1444,7 +1391,7 @@ func (*ResolverMeta) ProtoMessage() {} func (x *ResolverMeta) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,23 +1436,20 @@ func (x *ResolverMeta) GetTraversalBloom() []byte { } type ResponseMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DispatchCount uint32 `protobuf:"varint,1,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"` - DepthRequired uint32 `protobuf:"varint,2,opt,name=depth_required,json=depthRequired,proto3" json:"depth_required,omitempty"` - CachedDispatchCount uint32 `protobuf:"varint,3,opt,name=cached_dispatch_count,json=cachedDispatchCount,proto3" json:"cached_dispatch_count,omitempty"` - DebugInfo *DebugInformation `protobuf:"bytes,6,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DispatchCount uint32 `protobuf:"varint,1,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"` + DepthRequired uint32 `protobuf:"varint,2,opt,name=depth_required,json=depthRequired,proto3" json:"depth_required,omitempty"` + CachedDispatchCount uint32 `protobuf:"varint,3,opt,name=cached_dispatch_count,json=cachedDispatchCount,proto3" json:"cached_dispatch_count,omitempty"` + DebugInfo *DebugInformation `protobuf:"bytes,6,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResponseMeta) Reset() { *x = ResponseMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMeta) String() string { @@ -1516,7 +1460,7 @@ func (*ResponseMeta) ProtoMessage() {} func (x *ResponseMeta) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1560,20 +1504,17 @@ func (x *ResponseMeta) GetDebugInfo() *DebugInformation { } type DebugInformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Check *CheckDebugTrace `protobuf:"bytes,1,opt,name=check,proto3" json:"check,omitempty"` unknownFields protoimpl.UnknownFields - - Check *CheckDebugTrace `protobuf:"bytes,1,opt,name=check,proto3" json:"check,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DebugInformation) Reset() { *x = DebugInformation{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DebugInformation) String() string { @@ -1584,7 +1525,7 @@ func (*DebugInformation) ProtoMessage() {} func (x *DebugInformation) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1607,27 +1548,24 @@ func (x *DebugInformation) GetCheck() *CheckDebugTrace { } type CheckDebugTrace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Request *DispatchCheckRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` ResourceRelationType CheckDebugTrace_RelationType `protobuf:"varint,2,opt,name=resource_relation_type,json=resourceRelationType,proto3,enum=dispatch.v1.CheckDebugTrace_RelationType" json:"resource_relation_type,omitempty"` - Results map[string]*ResourceCheckResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Results map[string]*ResourceCheckResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` IsCachedResult bool `protobuf:"varint,4,opt,name=is_cached_result,json=isCachedResult,proto3" json:"is_cached_result,omitempty"` SubProblems []*CheckDebugTrace `protobuf:"bytes,5,rep,name=sub_problems,json=subProblems,proto3" json:"sub_problems,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` TraceId string `protobuf:"bytes,7,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` SourceId string `protobuf:"bytes,8,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckDebugTrace) Reset() { *x = CheckDebugTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dispatch_v1_dispatch_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckDebugTrace) String() string { @@ -1638,7 +1576,7 @@ func (*CheckDebugTrace) ProtoMessage() {} func (x *CheckDebugTrace) ProtoReflect() protoreflect.Message { mi := &file_dispatch_v1_dispatch_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,432 +1649,168 @@ func (x *CheckDebugTrace) GetSourceId() string { var File_dispatch_v1_dispatch_proto protoreflect.FileDescriptor -var file_dispatch_v1_dispatch_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x05, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, - 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x59, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, - 0x44, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x05, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x37, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x68, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x69, - 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x54, - 0x0a, 0x0c, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x0c, - 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, - 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x44, 0x45, 0x42, - 0x55, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x4e, 0x41, 0x42, - 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x47, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x22, 0x42, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, - 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x10, 0x00, 0x12, - 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, - 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x22, 0xf6, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, - 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x74, 0x74, 0x75, 0x5f, 0x63, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x74, 0x75, - 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x70, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x1a, 0x68, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, - 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, - 0x02, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4b, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, - 0x0a, 0x13, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x70, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x4a, - 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, - 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, - 0x44, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x22, 0xb8, 0x02, 0x0a, 0x15, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, - 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x57, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, - 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x61, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x48, 0x41, - 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x43, 0x55, 0x52, 0x53, - 0x49, 0x56, 0x45, 0x10, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x74, 0x72, 0x65, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x55, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x90, 0x04, 0x0a, 0x1f, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x91, - 0x01, 0x0a, 0x10, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, - 0x6f, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x16, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x20, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x47, 0x0a, 0x15, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x13, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0xfb, 0x03, 0x0a, 0x1f, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x33, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, - 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x10, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x31, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x22, 0x4e, 0x0a, 0x20, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x33, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x52, 0x33, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x22, 0xcd, 0x01, 0x0a, 0x07, 0x4c, 0x52, 0x33, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, - 0x0f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x1b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xa7, 0x02, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x01, 0x0a, 0x0c, 0x46, - 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x75, 0x6e, - 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x51, 0x0a, 0x0d, 0x46, 0x6f, - 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x66, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0d, - 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xd0, 0x02, - 0x0a, 0x1e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x8c, 0x01, 0x0a, 0x1d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x68, 0x0a, 0x1e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, - 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6d, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x6d, 0x61, 0x69, - 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x7a, 0x03, 0x18, 0x80, 0x08, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x22, 0xda, 0x01, 0x0a, 0x0c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, - 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4a, 0x04, 0x08, 0x04, 0x10, - 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x22, - 0xe7, 0x04, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x5f, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x29, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x69, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, - 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, - 0x1a, 0x5c, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, - 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, - 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x32, 0xb9, 0x04, 0x0a, 0x0f, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, - 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, - 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2a, - 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x18, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x12, 0x2c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x18, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x33, 0x12, 0x2c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0xaa, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, - 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0b, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_dispatch_v1_dispatch_proto_rawDesc = "" + + "\n" + + "\x1adispatch/v1/dispatch.proto\x12\vdispatch.v1\x1a\x1bbuf/validate/validate.proto\x1a\x12core/v1/core.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xfb\x04\n" + + "\x14DispatchCheckRequest\x12=\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResolverMetaB\x06\xbaH\x03\xc8\x01\x01R\bmetadata\x12O\n" + + "\x11resource_relation\x18\x02 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x10resourceRelation\x12!\n" + + "\fresource_ids\x18\x03 \x03(\tR\vresourceIds\x12<\n" + + "\asubject\x18\x04 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\asubject\x12Y\n" + + "\x0fresults_setting\x18\x05 \x01(\x0e20.dispatch.v1.DispatchCheckRequest.ResultsSettingR\x0eresultsSetting\x12D\n" + + "\x05debug\x18\x06 \x01(\x0e2..dispatch.v1.DispatchCheckRequest.DebugSettingR\x05debug\x127\n" + + "\vcheck_hints\x18\a \x03(\v2\x16.dispatch.v1.CheckHintR\n" + + "checkHints\"T\n" + + "\fDebugSetting\x12\f\n" + + "\bNO_DEBUG\x10\x00\x12\x1a\n" + + "\x16ENABLE_BASIC_DEBUGGING\x10\x01\x12\x1a\n" + + "\x16ENABLE_TRACE_DEBUGGING\x10\x02\"B\n" + + "\x0eResultsSetting\x12\x17\n" + + "\x13REQUIRE_ALL_RESULTS\x10\x00\x12\x17\n" + + "\x13ALLOW_SINGLE_RESULT\x10\x01\"\xf6\x01\n" + + "\tCheckHint\x126\n" + + "\bresource\x18\x01 \x01(\v2\x1a.core.v1.ObjectAndRelationR\bresource\x124\n" + + "\asubject\x18\x02 \x01(\v2\x1a.core.v1.ObjectAndRelationR\asubject\x12A\n" + + "\x1dttu_computed_userset_relation\x18\x03 \x01(\tR\x1attuComputedUsersetRelation\x128\n" + + "\x06result\x18\x04 \x01(\v2 .dispatch.v1.ResourceCheckResultR\x06result\"\xaa\x02\n" + + "\x15DispatchCheckResponse\x125\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResponseMetaR\bmetadata\x12p\n" + + "\x16results_by_resource_id\x18\x02 \x03(\v2;.dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntryR\x13resultsByResourceId\x1ah\n" + + "\x18ResultsByResourceIdEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + + "\x05value\x18\x02 \x01(\v2 .dispatch.v1.ResourceCheckResultR\x05value:\x028\x01\"\x99\x02\n" + + "\x13ResourceCheckResult\x12K\n" + + "\n" + + "membership\x18\x01 \x01(\x0e2+.dispatch.v1.ResourceCheckResult.MembershipR\n" + + "membership\x129\n" + + "\n" + + "expression\x18\x02 \x01(\v2\x19.core.v1.CaveatExpressionR\n" + + "expression\x12.\n" + + "\x13missing_expr_fields\x18\x03 \x03(\tR\x11missingExprFields\"J\n" + + "\n" + + "Membership\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\x0e\n" + + "\n" + + "NOT_MEMBER\x10\x01\x12\n" + + "\n" + + "\x06MEMBER\x10\x02\x12\x13\n" + + "\x0fCAVEATED_MEMBER\x10\x03\"\xb4\x02\n" + + "\x15DispatchExpandRequest\x12=\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResolverMetaB\x06\xbaH\x03\xc8\x01\x01R\bmetadata\x12V\n" + + "\x15resource_and_relation\x18\x02 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\x13resourceAndRelation\x12W\n" + + "\x0eexpansion_mode\x18\x03 \x01(\x0e20.dispatch.v1.DispatchExpandRequest.ExpansionModeR\rexpansionMode\"+\n" + + "\rExpansionMode\x12\v\n" + + "\aSHALLOW\x10\x00\x12\r\n" + + "\tRECURSIVE\x10\x01\"\x8c\x01\n" + + "\x16DispatchExpandResponse\x125\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResponseMetaR\bmetadata\x12;\n" + + "\ttree_node\x18\x02 \x01(\v2\x1e.core.v1.RelationTupleTreeNodeR\btreeNode\"U\n" + + "\x06Cursor\x12\x1a\n" + + "\bsections\x18\x02 \x03(\tR\bsections\x12)\n" + + "\x10dispatch_version\x18\x03 \x01(\rR\x0fdispatchVersionJ\x04\b\x01\x10\x02\"\x88\x04\n" + + "\x1fDispatchLookupResources2Request\x12=\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResolverMetaB\x06\xbaH\x03\xc8\x01\x01R\bmetadata\x12O\n" + + "\x11resource_relation\x18\x02 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x10resourceRelation\x12M\n" + + "\x10subject_relation\x18\x03 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x0fsubjectRelation\x12\x1f\n" + + "\vsubject_ids\x18\x04 \x03(\tR\n" + + "subjectIds\x12M\n" + + "\x10terminal_subject\x18\x05 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\x0fterminalSubject\x121\n" + + "\acontext\x18\x06 \x01(\v2\x17.google.protobuf.StructR\acontext\x12<\n" + + "\x0foptional_cursor\x18\a \x01(\v2\x13.dispatch.v1.CursorR\x0eoptionalCursor\x12%\n" + + "\x0eoptional_limit\x18\b \x01(\rR\roptionalLimit\"\x91\x01\n" + + "\x10PossibleResource\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12&\n" + + "\x0ffor_subject_ids\x18\x02 \x03(\tR\rforSubjectIds\x124\n" + + "\x16missing_context_params\x18\x03 \x03(\tR\x14missingContextParams\"\xdd\x01\n" + + " DispatchLookupResources2Response\x129\n" + + "\bresource\x18\x01 \x01(\v2\x1d.dispatch.v1.PossibleResourceR\bresource\x125\n" + + "\bmetadata\x18\x02 \x01(\v2\x19.dispatch.v1.ResponseMetaR\bmetadata\x12G\n" + + "\x15after_response_cursor\x18\x03 \x01(\v2\x13.dispatch.v1.CursorR\x13afterResponseCursor\"\xf3\x03\n" + + "\x1fDispatchLookupResources3Request\x12=\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResolverMetaB\x06\xbaH\x03\xc8\x01\x01R\bmetadata\x12O\n" + + "\x11resource_relation\x18\x02 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x10resourceRelation\x12M\n" + + "\x10subject_relation\x18\x03 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x0fsubjectRelation\x12\x1f\n" + + "\vsubject_ids\x18\x04 \x03(\tR\n" + + "subjectIds\x12M\n" + + "\x10terminal_subject\x18\x05 \x01(\v2\x1a.core.v1.ObjectAndRelationB\x06\xbaH\x03\xc8\x01\x01R\x0fterminalSubject\x121\n" + + "\acontext\x18\x06 \x01(\v2\x17.google.protobuf.StructR\acontext\x12'\n" + + "\x0foptional_cursor\x18\a \x03(\tR\x0eoptionalCursor\x12%\n" + + "\x0eoptional_limit\x18\b \x01(\rR\roptionalLimit\"N\n" + + " DispatchLookupResources3Response\x12*\n" + + "\x05items\x18\x01 \x03(\v2\x14.dispatch.v1.LR3ItemR\x05items\"\xcd\x01\n" + + "\aLR3Item\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12&\n" + + "\x0ffor_subject_ids\x18\x02 \x03(\tR\rforSubjectIds\x124\n" + + "\x16missing_context_params\x18\x03 \x03(\tR\x14missingContextParams\x12C\n" + + "\x1eafter_response_cursor_sections\x18\x04 \x03(\tR\x1bafterResponseCursorSections\"\xa1\x02\n" + + "\x1dDispatchLookupSubjectsRequest\x12=\n" + + "\bmetadata\x18\x01 \x01(\v2\x19.dispatch.v1.ResolverMetaB\x06\xbaH\x03\xc8\x01\x01R\bmetadata\x12O\n" + + "\x11resource_relation\x18\x02 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x10resourceRelation\x12!\n" + + "\fresource_ids\x18\x03 \x03(\tR\vresourceIds\x12M\n" + + "\x10subject_relation\x18\x04 \x01(\v2\x1a.core.v1.RelationReferenceB\x06\xbaH\x03\xc8\x01\x01R\x0fsubjectRelation\"\xbd\x01\n" + + "\fFoundSubject\x12\x1d\n" + + "\n" + + "subject_id\x18\x01 \x01(\tR\tsubjectId\x12F\n" + + "\x11caveat_expression\x18\x02 \x01(\v2\x19.core.v1.CaveatExpressionR\x10caveatExpression\x12F\n" + + "\x11excluded_subjects\x18\x03 \x03(\v2\x19.dispatch.v1.FoundSubjectR\x10excludedSubjects\"Q\n" + + "\rFoundSubjects\x12@\n" + + "\x0efound_subjects\x18\x01 \x03(\v2\x19.dispatch.v1.FoundSubjectR\rfoundSubjects\"\xd0\x02\n" + + "\x1eDispatchLookupSubjectsResponse\x12\x8c\x01\n" + + "\x1dfound_subjects_by_resource_id\x18\x01 \x03(\v2J.dispatch.v1.DispatchLookupSubjectsResponse.FoundSubjectsByResourceIdEntryR\x19foundSubjectsByResourceId\x125\n" + + "\bmetadata\x18\x02 \x01(\v2\x19.dispatch.v1.ResponseMetaR\bmetadata\x1ah\n" + + "\x1eFoundSubjectsByResourceIdEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.dispatch.v1.FoundSubjectsR\x05value:\x028\x01\"\xb7\x01\n" + + "\fResolverMeta\x12\x1f\n" + + "\vat_revision\x18\x01 \x01(\tR\n" + + "atRevision\x120\n" + + "\x0fdepth_remaining\x18\x02 \x01(\rB\a\xbaH\x04*\x02 \x00R\x0edepthRemaining\x12!\n" + + "\n" + + "request_id\x18\x03 \x01(\tB\x02\x18\x01R\trequestId\x121\n" + + "\x0ftraversal_bloom\x18\x04 \x01(\fB\b\xbaH\x05z\x03\x18\x80\bR\x0etraversalBloom\"\xda\x01\n" + + "\fResponseMeta\x12%\n" + + "\x0edispatch_count\x18\x01 \x01(\rR\rdispatchCount\x12%\n" + + "\x0edepth_required\x18\x02 \x01(\rR\rdepthRequired\x122\n" + + "\x15cached_dispatch_count\x18\x03 \x01(\rR\x13cachedDispatchCount\x12<\n" + + "\n" + + "debug_info\x18\x06 \x01(\v2\x1d.dispatch.v1.DebugInformationR\tdebugInfoJ\x04\b\x04\x10\x05J\x04\b\x05\x10\x06\"F\n" + + "\x10DebugInformation\x122\n" + + "\x05check\x18\x01 \x01(\v2\x1c.dispatch.v1.CheckDebugTraceR\x05check\"\xe7\x04\n" + + "\x0fCheckDebugTrace\x12;\n" + + "\arequest\x18\x01 \x01(\v2!.dispatch.v1.DispatchCheckRequestR\arequest\x12_\n" + + "\x16resource_relation_type\x18\x02 \x01(\x0e2).dispatch.v1.CheckDebugTrace.RelationTypeR\x14resourceRelationType\x12C\n" + + "\aresults\x18\x03 \x03(\v2).dispatch.v1.CheckDebugTrace.ResultsEntryR\aresults\x12(\n" + + "\x10is_cached_result\x18\x04 \x01(\bR\x0eisCachedResult\x12?\n" + + "\fsub_problems\x18\x05 \x03(\v2\x1c.dispatch.v1.CheckDebugTraceR\vsubProblems\x125\n" + + "\bduration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\bduration\x12\x19\n" + + "\btrace_id\x18\a \x01(\tR\atraceId\x12\x1b\n" + + "\tsource_id\x18\b \x01(\tR\bsourceId\x1a\\\n" + + "\fResultsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + + "\x05value\x18\x02 \x01(\v2 .dispatch.v1.ResourceCheckResultR\x05value:\x028\x01\"9\n" + + "\fRelationType\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\f\n" + + "\bRELATION\x10\x01\x12\x0e\n" + + "\n" + + "PERMISSION\x10\x022\xb9\x04\n" + + "\x0fDispatchService\x12X\n" + + "\rDispatchCheck\x12!.dispatch.v1.DispatchCheckRequest\x1a\".dispatch.v1.DispatchCheckResponse\"\x00\x12[\n" + + "\x0eDispatchExpand\x12\".dispatch.v1.DispatchExpandRequest\x1a#.dispatch.v1.DispatchExpandResponse\"\x00\x12u\n" + + "\x16DispatchLookupSubjects\x12*.dispatch.v1.DispatchLookupSubjectsRequest\x1a+.dispatch.v1.DispatchLookupSubjectsResponse\"\x000\x01\x12{\n" + + "\x18DispatchLookupResources2\x12,.dispatch.v1.DispatchLookupResources2Request\x1a-.dispatch.v1.DispatchLookupResources2Response\"\x000\x01\x12{\n" + + "\x18DispatchLookupResources3\x12,.dispatch.v1.DispatchLookupResources3Request\x1a-.dispatch.v1.DispatchLookupResources3Response\"\x000\x01B\xaa\x01\n" + + "\x0fcom.dispatch.v1B\rDispatchProtoP\x01Z;github.com/authzed/spicedb/pkg/proto/dispatch/v1;dispatchv1\xa2\x02\x03DXX\xaa\x02\vDispatch.V1\xca\x02\vDispatch\\V1\xe2\x02\x17Dispatch\\V1\\GPBMetadata\xea\x02\fDispatch::V1b\x06proto3" var ( file_dispatch_v1_dispatch_proto_rawDescOnce sync.Once - file_dispatch_v1_dispatch_proto_rawDescData = file_dispatch_v1_dispatch_proto_rawDesc + file_dispatch_v1_dispatch_proto_rawDescData []byte ) func file_dispatch_v1_dispatch_proto_rawDescGZIP() []byte { file_dispatch_v1_dispatch_proto_rawDescOnce.Do(func() { - file_dispatch_v1_dispatch_proto_rawDescData = protoimpl.X.CompressGZIP(file_dispatch_v1_dispatch_proto_rawDescData) + file_dispatch_v1_dispatch_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_dispatch_v1_dispatch_proto_rawDesc), len(file_dispatch_v1_dispatch_proto_rawDesc))) }) return file_dispatch_v1_dispatch_proto_rawDescData } @@ -2254,265 +1928,11 @@ func file_dispatch_v1_dispatch_proto_init() { if File_dispatch_v1_dispatch_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dispatch_v1_dispatch_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DispatchCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckHint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DispatchCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResourceCheckResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DispatchExpandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DispatchExpandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Cursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupResources2Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PossibleResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupResources2Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupResources3Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupResources3Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LR3Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupSubjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FoundSubject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FoundSubjects); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DispatchLookupSubjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ResolverMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DebugInformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CheckDebugTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_dispatch_v1_dispatch_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_dispatch_v1_dispatch_proto_rawDesc), len(file_dispatch_v1_dispatch_proto_rawDesc)), NumEnums: 5, NumMessages: 24, NumExtensions: 0, @@ -2524,7 +1944,6 @@ func file_dispatch_v1_dispatch_proto_init() { MessageInfos: file_dispatch_v1_dispatch_proto_msgTypes, }.Build() File_dispatch_v1_dispatch_proto = out.File - file_dispatch_v1_dispatch_proto_rawDesc = nil file_dispatch_v1_dispatch_proto_goTypes = nil file_dispatch_v1_dispatch_proto_depIdxs = nil } diff --git a/pkg/proto/dispatch/v1/dispatch.pb.validate.go b/pkg/proto/dispatch/v1/dispatch.pb.validate.go deleted file mode 100644 index 7f1181b86..000000000 --- a/pkg/proto/dispatch/v1/dispatch.pb.validate.go +++ /dev/null @@ -1,3721 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: dispatch/v1/dispatch.proto - -package dispatchv1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DispatchCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchCheckRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DispatchCheckRequestMultiError, or nil if none found. -func (m *DispatchCheckRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchCheckRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadata() == nil { - err := DispatchCheckRequestValidationError{ - field: "Metadata", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetResourceRelation() == nil { - err := DispatchCheckRequestValidationError{ - field: "ResourceRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSubject() == nil { - err := DispatchCheckRequestValidationError{ - field: "Subject", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckRequestValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ResultsSetting - - // no validation rules for Debug - - for idx, item := range m.GetCheckHints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: fmt.Sprintf("CheckHints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckRequestValidationError{ - field: fmt.Sprintf("CheckHints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckRequestValidationError{ - field: fmt.Sprintf("CheckHints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DispatchCheckRequestMultiError(errors) - } - - return nil -} - -// DispatchCheckRequestMultiError is an error wrapping multiple validation -// errors returned by DispatchCheckRequest.ValidateAll() if the designated -// constraints aren't met. -type DispatchCheckRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchCheckRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchCheckRequestMultiError) AllErrors() []error { return m } - -// DispatchCheckRequestValidationError is the validation error returned by -// DispatchCheckRequest.Validate if the designated constraints aren't met. -type DispatchCheckRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchCheckRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchCheckRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchCheckRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchCheckRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchCheckRequestValidationError) ErrorName() string { - return "DispatchCheckRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchCheckRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchCheckRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchCheckRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchCheckRequestValidationError{} - -// Validate checks the field values on CheckHint with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CheckHint) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckHint with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CheckHintMultiError, or nil -// if none found. -func (m *CheckHint) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckHint) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckHintValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckHintValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TtuComputedUsersetRelation - - if all { - switch v := interface{}(m.GetResult()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Result", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckHintValidationError{ - field: "Result", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckHintValidationError{ - field: "Result", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CheckHintMultiError(errors) - } - - return nil -} - -// CheckHintMultiError is an error wrapping multiple validation errors returned -// by CheckHint.ValidateAll() if the designated constraints aren't met. -type CheckHintMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckHintMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckHintMultiError) AllErrors() []error { return m } - -// CheckHintValidationError is the validation error returned by -// CheckHint.Validate if the designated constraints aren't met. -type CheckHintValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckHintValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckHintValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckHintValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckHintValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckHintValidationError) ErrorName() string { return "CheckHintValidationError" } - -// Error satisfies the builtin error interface -func (e CheckHintValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckHint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckHintValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckHintValidationError{} - -// Validate checks the field values on DispatchCheckResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchCheckResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchCheckResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DispatchCheckResponseMultiError, or nil if none found. -func (m *DispatchCheckResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchCheckResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetResultsByResourceId())) - i := 0 - for key := range m.GetResultsByResourceId() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetResultsByResourceId()[key] - _ = val - - // no validation rules for ResultsByResourceId[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckResponseValidationError{ - field: fmt.Sprintf("ResultsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckResponseValidationError{ - field: fmt.Sprintf("ResultsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckResponseValidationError{ - field: fmt.Sprintf("ResultsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return DispatchCheckResponseMultiError(errors) - } - - return nil -} - -// DispatchCheckResponseMultiError is an error wrapping multiple validation -// errors returned by DispatchCheckResponse.ValidateAll() if the designated -// constraints aren't met. -type DispatchCheckResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchCheckResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchCheckResponseMultiError) AllErrors() []error { return m } - -// DispatchCheckResponseValidationError is the validation error returned by -// DispatchCheckResponse.Validate if the designated constraints aren't met. -type DispatchCheckResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchCheckResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchCheckResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchCheckResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchCheckResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchCheckResponseValidationError) ErrorName() string { - return "DispatchCheckResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchCheckResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchCheckResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchCheckResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchCheckResponseValidationError{} - -// Validate checks the field values on ResourceCheckResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ResourceCheckResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceCheckResult with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResourceCheckResultMultiError, or nil if none found. -func (m *ResourceCheckResult) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceCheckResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Membership - - if all { - switch v := interface{}(m.GetExpression()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceCheckResultMultiError(errors) - } - - return nil -} - -// ResourceCheckResultMultiError is an error wrapping multiple validation -// errors returned by ResourceCheckResult.ValidateAll() if the designated -// constraints aren't met. -type ResourceCheckResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceCheckResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceCheckResultMultiError) AllErrors() []error { return m } - -// ResourceCheckResultValidationError is the validation error returned by -// ResourceCheckResult.Validate if the designated constraints aren't met. -type ResourceCheckResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceCheckResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceCheckResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceCheckResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceCheckResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceCheckResultValidationError) ErrorName() string { - return "ResourceCheckResultValidationError" -} - -// Error satisfies the builtin error interface -func (e ResourceCheckResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceCheckResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceCheckResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceCheckResultValidationError{} - -// Validate checks the field values on DispatchExpandRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchExpandRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchExpandRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DispatchExpandRequestMultiError, or nil if none found. -func (m *DispatchExpandRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchExpandRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadata() == nil { - err := DispatchExpandRequestValidationError{ - field: "Metadata", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchExpandRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchExpandRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchExpandRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetResourceAndRelation() == nil { - err := DispatchExpandRequestValidationError{ - field: "ResourceAndRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceAndRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchExpandRequestValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchExpandRequestValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceAndRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchExpandRequestValidationError{ - field: "ResourceAndRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ExpansionMode - - if len(errors) > 0 { - return DispatchExpandRequestMultiError(errors) - } - - return nil -} - -// DispatchExpandRequestMultiError is an error wrapping multiple validation -// errors returned by DispatchExpandRequest.ValidateAll() if the designated -// constraints aren't met. -type DispatchExpandRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchExpandRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchExpandRequestMultiError) AllErrors() []error { return m } - -// DispatchExpandRequestValidationError is the validation error returned by -// DispatchExpandRequest.Validate if the designated constraints aren't met. -type DispatchExpandRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchExpandRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchExpandRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchExpandRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchExpandRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchExpandRequestValidationError) ErrorName() string { - return "DispatchExpandRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchExpandRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchExpandRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchExpandRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchExpandRequestValidationError{} - -// Validate checks the field values on DispatchExpandResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchExpandResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchExpandResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DispatchExpandResponseMultiError, or nil if none found. -func (m *DispatchExpandResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchExpandResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchExpandResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchExpandResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchExpandResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTreeNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchExpandResponseValidationError{ - field: "TreeNode", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchExpandResponseValidationError{ - field: "TreeNode", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTreeNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchExpandResponseValidationError{ - field: "TreeNode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DispatchExpandResponseMultiError(errors) - } - - return nil -} - -// DispatchExpandResponseMultiError is an error wrapping multiple validation -// errors returned by DispatchExpandResponse.ValidateAll() if the designated -// constraints aren't met. -type DispatchExpandResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchExpandResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchExpandResponseMultiError) AllErrors() []error { return m } - -// DispatchExpandResponseValidationError is the validation error returned by -// DispatchExpandResponse.Validate if the designated constraints aren't met. -type DispatchExpandResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchExpandResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchExpandResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchExpandResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchExpandResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchExpandResponseValidationError) ErrorName() string { - return "DispatchExpandResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchExpandResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchExpandResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchExpandResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchExpandResponseValidationError{} - -// Validate checks the field values on Cursor with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Cursor) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cursor with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in CursorMultiError, or nil if none found. -func (m *Cursor) ValidateAll() error { - return m.validate(true) -} - -func (m *Cursor) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DispatchVersion - - if len(errors) > 0 { - return CursorMultiError(errors) - } - - return nil -} - -// CursorMultiError is an error wrapping multiple validation errors returned by -// Cursor.ValidateAll() if the designated constraints aren't met. -type CursorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CursorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CursorMultiError) AllErrors() []error { return m } - -// CursorValidationError is the validation error returned by Cursor.Validate if -// the designated constraints aren't met. -type CursorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CursorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CursorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CursorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CursorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CursorValidationError) ErrorName() string { return "CursorValidationError" } - -// Error satisfies the builtin error interface -func (e CursorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCursor.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CursorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CursorValidationError{} - -// Validate checks the field values on DispatchLookupResources2Request with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchLookupResources2Request) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupResources2Request with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupResources2RequestMultiError, or nil if none found. -func (m *DispatchLookupResources2Request) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupResources2Request) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadata() == nil { - err := DispatchLookupResources2RequestValidationError{ - field: "Metadata", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetResourceRelation() == nil { - err := DispatchLookupResources2RequestValidationError{ - field: "ResourceRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSubjectRelation() == nil { - err := DispatchLookupResources2RequestValidationError{ - field: "SubjectRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSubjectRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubjectRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetTerminalSubject() == nil { - err := DispatchLookupResources2RequestValidationError{ - field: "TerminalSubject", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTerminalSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTerminalSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOptionalCursor()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "OptionalCursor", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2RequestValidationError{ - field: "OptionalCursor", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2RequestValidationError{ - field: "OptionalCursor", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for OptionalLimit - - if len(errors) > 0 { - return DispatchLookupResources2RequestMultiError(errors) - } - - return nil -} - -// DispatchLookupResources2RequestMultiError is an error wrapping multiple -// validation errors returned by DispatchLookupResources2Request.ValidateAll() -// if the designated constraints aren't met. -type DispatchLookupResources2RequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupResources2RequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupResources2RequestMultiError) AllErrors() []error { return m } - -// DispatchLookupResources2RequestValidationError is the validation error -// returned by DispatchLookupResources2Request.Validate if the designated -// constraints aren't met. -type DispatchLookupResources2RequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupResources2RequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupResources2RequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupResources2RequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupResources2RequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupResources2RequestValidationError) ErrorName() string { - return "DispatchLookupResources2RequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupResources2RequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupResources2Request.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupResources2RequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupResources2RequestValidationError{} - -// Validate checks the field values on PossibleResource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PossibleResource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PossibleResource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PossibleResourceMultiError, or nil if none found. -func (m *PossibleResource) ValidateAll() error { - return m.validate(true) -} - -func (m *PossibleResource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ResourceId - - if len(errors) > 0 { - return PossibleResourceMultiError(errors) - } - - return nil -} - -// PossibleResourceMultiError is an error wrapping multiple validation errors -// returned by PossibleResource.ValidateAll() if the designated constraints -// aren't met. -type PossibleResourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PossibleResourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PossibleResourceMultiError) AllErrors() []error { return m } - -// PossibleResourceValidationError is the validation error returned by -// PossibleResource.Validate if the designated constraints aren't met. -type PossibleResourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PossibleResourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PossibleResourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PossibleResourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PossibleResourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PossibleResourceValidationError) ErrorName() string { return "PossibleResourceValidationError" } - -// Error satisfies the builtin error interface -func (e PossibleResourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPossibleResource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PossibleResourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PossibleResourceValidationError{} - -// Validate checks the field values on DispatchLookupResources2Response with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *DispatchLookupResources2Response) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupResources2Response with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupResources2ResponseMultiError, or nil if none found. -func (m *DispatchLookupResources2Response) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupResources2Response) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2ResponseValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2ResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAfterResponseCursor()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "AfterResponseCursor", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources2ResponseValidationError{ - field: "AfterResponseCursor", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAfterResponseCursor()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources2ResponseValidationError{ - field: "AfterResponseCursor", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DispatchLookupResources2ResponseMultiError(errors) - } - - return nil -} - -// DispatchLookupResources2ResponseMultiError is an error wrapping multiple -// validation errors returned by -// DispatchLookupResources2Response.ValidateAll() if the designated -// constraints aren't met. -type DispatchLookupResources2ResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupResources2ResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupResources2ResponseMultiError) AllErrors() []error { return m } - -// DispatchLookupResources2ResponseValidationError is the validation error -// returned by DispatchLookupResources2Response.Validate if the designated -// constraints aren't met. -type DispatchLookupResources2ResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupResources2ResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupResources2ResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupResources2ResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupResources2ResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupResources2ResponseValidationError) ErrorName() string { - return "DispatchLookupResources2ResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupResources2ResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupResources2Response.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupResources2ResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupResources2ResponseValidationError{} - -// Validate checks the field values on DispatchLookupResources3Request with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchLookupResources3Request) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupResources3Request with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupResources3RequestMultiError, or nil if none found. -func (m *DispatchLookupResources3Request) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupResources3Request) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadata() == nil { - err := DispatchLookupResources3RequestValidationError{ - field: "Metadata", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3RequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetResourceRelation() == nil { - err := DispatchLookupResources3RequestValidationError{ - field: "ResourceRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3RequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSubjectRelation() == nil { - err := DispatchLookupResources3RequestValidationError{ - field: "SubjectRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSubjectRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubjectRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3RequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetTerminalSubject() == nil { - err := DispatchLookupResources3RequestValidationError{ - field: "TerminalSubject", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTerminalSubject()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTerminalSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3RequestValidationError{ - field: "TerminalSubject", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3RequestValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for OptionalLimit - - if len(errors) > 0 { - return DispatchLookupResources3RequestMultiError(errors) - } - - return nil -} - -// DispatchLookupResources3RequestMultiError is an error wrapping multiple -// validation errors returned by DispatchLookupResources3Request.ValidateAll() -// if the designated constraints aren't met. -type DispatchLookupResources3RequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupResources3RequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupResources3RequestMultiError) AllErrors() []error { return m } - -// DispatchLookupResources3RequestValidationError is the validation error -// returned by DispatchLookupResources3Request.Validate if the designated -// constraints aren't met. -type DispatchLookupResources3RequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupResources3RequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupResources3RequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupResources3RequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupResources3RequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupResources3RequestValidationError) ErrorName() string { - return "DispatchLookupResources3RequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupResources3RequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupResources3Request.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupResources3RequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupResources3RequestValidationError{} - -// Validate checks the field values on DispatchLookupResources3Response with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *DispatchLookupResources3Response) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupResources3Response with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupResources3ResponseMultiError, or nil if none found. -func (m *DispatchLookupResources3Response) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupResources3Response) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetItems() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupResources3ResponseValidationError{ - field: fmt.Sprintf("Items[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupResources3ResponseValidationError{ - field: fmt.Sprintf("Items[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupResources3ResponseValidationError{ - field: fmt.Sprintf("Items[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DispatchLookupResources3ResponseMultiError(errors) - } - - return nil -} - -// DispatchLookupResources3ResponseMultiError is an error wrapping multiple -// validation errors returned by -// DispatchLookupResources3Response.ValidateAll() if the designated -// constraints aren't met. -type DispatchLookupResources3ResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupResources3ResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupResources3ResponseMultiError) AllErrors() []error { return m } - -// DispatchLookupResources3ResponseValidationError is the validation error -// returned by DispatchLookupResources3Response.Validate if the designated -// constraints aren't met. -type DispatchLookupResources3ResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupResources3ResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupResources3ResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupResources3ResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupResources3ResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupResources3ResponseValidationError) ErrorName() string { - return "DispatchLookupResources3ResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupResources3ResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupResources3Response.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupResources3ResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupResources3ResponseValidationError{} - -// Validate checks the field values on LR3Item with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *LR3Item) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LR3Item with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in LR3ItemMultiError, or nil if none found. -func (m *LR3Item) ValidateAll() error { - return m.validate(true) -} - -func (m *LR3Item) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ResourceId - - if len(errors) > 0 { - return LR3ItemMultiError(errors) - } - - return nil -} - -// LR3ItemMultiError is an error wrapping multiple validation errors returned -// by LR3Item.ValidateAll() if the designated constraints aren't met. -type LR3ItemMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LR3ItemMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LR3ItemMultiError) AllErrors() []error { return m } - -// LR3ItemValidationError is the validation error returned by LR3Item.Validate -// if the designated constraints aren't met. -type LR3ItemValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LR3ItemValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LR3ItemValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LR3ItemValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LR3ItemValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LR3ItemValidationError) ErrorName() string { return "LR3ItemValidationError" } - -// Error satisfies the builtin error interface -func (e LR3ItemValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLR3Item.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LR3ItemValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LR3ItemValidationError{} - -// Validate checks the field values on DispatchLookupSubjectsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchLookupSubjectsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupSubjectsRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupSubjectsRequestMultiError, or nil if none found. -func (m *DispatchLookupSubjectsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupSubjectsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadata() == nil { - err := DispatchLookupSubjectsRequestValidationError{ - field: "Metadata", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupSubjectsRequestValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetResourceRelation() == nil { - err := DispatchLookupSubjectsRequestValidationError{ - field: "ResourceRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetResourceRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupSubjectsRequestValidationError{ - field: "ResourceRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSubjectRelation() == nil { - err := DispatchLookupSubjectsRequestValidationError{ - field: "SubjectRelation", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSubjectRelation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupSubjectsRequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSubjectRelation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupSubjectsRequestValidationError{ - field: "SubjectRelation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DispatchLookupSubjectsRequestMultiError(errors) - } - - return nil -} - -// DispatchLookupSubjectsRequestMultiError is an error wrapping multiple -// validation errors returned by DispatchLookupSubjectsRequest.ValidateAll() -// if the designated constraints aren't met. -type DispatchLookupSubjectsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupSubjectsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupSubjectsRequestMultiError) AllErrors() []error { return m } - -// DispatchLookupSubjectsRequestValidationError is the validation error -// returned by DispatchLookupSubjectsRequest.Validate if the designated -// constraints aren't met. -type DispatchLookupSubjectsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupSubjectsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupSubjectsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupSubjectsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupSubjectsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupSubjectsRequestValidationError) ErrorName() string { - return "DispatchLookupSubjectsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupSubjectsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupSubjectsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupSubjectsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupSubjectsRequestValidationError{} - -// Validate checks the field values on FoundSubject with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FoundSubject) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FoundSubject with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FoundSubjectMultiError, or -// nil if none found. -func (m *FoundSubject) ValidateAll() error { - return m.validate(true) -} - -func (m *FoundSubject) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SubjectId - - if all { - switch v := interface{}(m.GetCaveatExpression()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FoundSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FoundSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaveatExpression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FoundSubjectValidationError{ - field: "CaveatExpression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetExcludedSubjects() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FoundSubjectValidationError{ - field: fmt.Sprintf("ExcludedSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FoundSubjectValidationError{ - field: fmt.Sprintf("ExcludedSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FoundSubjectValidationError{ - field: fmt.Sprintf("ExcludedSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return FoundSubjectMultiError(errors) - } - - return nil -} - -// FoundSubjectMultiError is an error wrapping multiple validation errors -// returned by FoundSubject.ValidateAll() if the designated constraints aren't met. -type FoundSubjectMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FoundSubjectMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FoundSubjectMultiError) AllErrors() []error { return m } - -// FoundSubjectValidationError is the validation error returned by -// FoundSubject.Validate if the designated constraints aren't met. -type FoundSubjectValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FoundSubjectValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FoundSubjectValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FoundSubjectValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FoundSubjectValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FoundSubjectValidationError) ErrorName() string { return "FoundSubjectValidationError" } - -// Error satisfies the builtin error interface -func (e FoundSubjectValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFoundSubject.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FoundSubjectValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FoundSubjectValidationError{} - -// Validate checks the field values on FoundSubjects with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FoundSubjects) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FoundSubjects with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FoundSubjectsMultiError, or -// nil if none found. -func (m *FoundSubjects) ValidateAll() error { - return m.validate(true) -} - -func (m *FoundSubjects) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetFoundSubjects() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FoundSubjectsValidationError{ - field: fmt.Sprintf("FoundSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FoundSubjectsValidationError{ - field: fmt.Sprintf("FoundSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FoundSubjectsValidationError{ - field: fmt.Sprintf("FoundSubjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return FoundSubjectsMultiError(errors) - } - - return nil -} - -// FoundSubjectsMultiError is an error wrapping multiple validation errors -// returned by FoundSubjects.ValidateAll() if the designated constraints -// aren't met. -type FoundSubjectsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FoundSubjectsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FoundSubjectsMultiError) AllErrors() []error { return m } - -// FoundSubjectsValidationError is the validation error returned by -// FoundSubjects.Validate if the designated constraints aren't met. -type FoundSubjectsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FoundSubjectsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FoundSubjectsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FoundSubjectsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FoundSubjectsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FoundSubjectsValidationError) ErrorName() string { return "FoundSubjectsValidationError" } - -// Error satisfies the builtin error interface -func (e FoundSubjectsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFoundSubjects.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FoundSubjectsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FoundSubjectsValidationError{} - -// Validate checks the field values on DispatchLookupSubjectsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DispatchLookupSubjectsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DispatchLookupSubjectsResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DispatchLookupSubjectsResponseMultiError, or nil if none found. -func (m *DispatchLookupSubjectsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchLookupSubjectsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetFoundSubjectsByResourceId())) - i := 0 - for key := range m.GetFoundSubjectsByResourceId() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetFoundSubjectsByResourceId()[key] - _ = val - - // no validation rules for FoundSubjectsByResourceId[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupSubjectsResponseValidationError{ - field: fmt.Sprintf("FoundSubjectsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupSubjectsResponseValidationError{ - field: fmt.Sprintf("FoundSubjectsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupSubjectsResponseValidationError{ - field: fmt.Sprintf("FoundSubjectsByResourceId[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchLookupSubjectsResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchLookupSubjectsResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchLookupSubjectsResponseValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DispatchLookupSubjectsResponseMultiError(errors) - } - - return nil -} - -// DispatchLookupSubjectsResponseMultiError is an error wrapping multiple -// validation errors returned by DispatchLookupSubjectsResponse.ValidateAll() -// if the designated constraints aren't met. -type DispatchLookupSubjectsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchLookupSubjectsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchLookupSubjectsResponseMultiError) AllErrors() []error { return m } - -// DispatchLookupSubjectsResponseValidationError is the validation error -// returned by DispatchLookupSubjectsResponse.Validate if the designated -// constraints aren't met. -type DispatchLookupSubjectsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchLookupSubjectsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchLookupSubjectsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchLookupSubjectsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchLookupSubjectsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchLookupSubjectsResponseValidationError) ErrorName() string { - return "DispatchLookupSubjectsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchLookupSubjectsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchLookupSubjectsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchLookupSubjectsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchLookupSubjectsResponseValidationError{} - -// Validate checks the field values on ResolverMeta with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ResolverMeta) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResolverMeta with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResolverMetaMultiError, or -// nil if none found. -func (m *ResolverMeta) ValidateAll() error { - return m.validate(true) -} - -func (m *ResolverMeta) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AtRevision - - if m.GetDepthRemaining() <= 0 { - err := ResolverMetaValidationError{ - field: "DepthRemaining", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for RequestId - - if len(m.GetTraversalBloom()) > 1024 { - err := ResolverMetaValidationError{ - field: "TraversalBloom", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ResolverMetaMultiError(errors) - } - - return nil -} - -// ResolverMetaMultiError is an error wrapping multiple validation errors -// returned by ResolverMeta.ValidateAll() if the designated constraints aren't met. -type ResolverMetaMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResolverMetaMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResolverMetaMultiError) AllErrors() []error { return m } - -// ResolverMetaValidationError is the validation error returned by -// ResolverMeta.Validate if the designated constraints aren't met. -type ResolverMetaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResolverMetaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResolverMetaValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResolverMetaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResolverMetaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResolverMetaValidationError) ErrorName() string { return "ResolverMetaValidationError" } - -// Error satisfies the builtin error interface -func (e ResolverMetaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResolverMeta.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResolverMetaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResolverMetaValidationError{} - -// Validate checks the field values on ResponseMeta with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ResponseMeta) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResponseMeta with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResponseMetaMultiError, or -// nil if none found. -func (m *ResponseMeta) ValidateAll() error { - return m.validate(true) -} - -func (m *ResponseMeta) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DispatchCount - - // no validation rules for DepthRequired - - // no validation rules for CachedDispatchCount - - if all { - switch v := interface{}(m.GetDebugInfo()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResponseMetaValidationError{ - field: "DebugInfo", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResponseMetaValidationError{ - field: "DebugInfo", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDebugInfo()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMetaValidationError{ - field: "DebugInfo", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResponseMetaMultiError(errors) - } - - return nil -} - -// ResponseMetaMultiError is an error wrapping multiple validation errors -// returned by ResponseMeta.ValidateAll() if the designated constraints aren't met. -type ResponseMetaMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResponseMetaMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResponseMetaMultiError) AllErrors() []error { return m } - -// ResponseMetaValidationError is the validation error returned by -// ResponseMeta.Validate if the designated constraints aren't met. -type ResponseMetaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseMetaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseMetaValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseMetaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseMetaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseMetaValidationError) ErrorName() string { return "ResponseMetaValidationError" } - -// Error satisfies the builtin error interface -func (e ResponseMetaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseMeta.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseMetaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseMetaValidationError{} - -// Validate checks the field values on DebugInformation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DebugInformation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DebugInformation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DebugInformationMultiError, or nil if none found. -func (m *DebugInformation) ValidateAll() error { - return m.validate(true) -} - -func (m *DebugInformation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCheck()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DebugInformationValidationError{ - field: "Check", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DebugInformationValidationError{ - field: "Check", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DebugInformationValidationError{ - field: "Check", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DebugInformationMultiError(errors) - } - - return nil -} - -// DebugInformationMultiError is an error wrapping multiple validation errors -// returned by DebugInformation.ValidateAll() if the designated constraints -// aren't met. -type DebugInformationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DebugInformationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DebugInformationMultiError) AllErrors() []error { return m } - -// DebugInformationValidationError is the validation error returned by -// DebugInformation.Validate if the designated constraints aren't met. -type DebugInformationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DebugInformationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DebugInformationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DebugInformationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DebugInformationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DebugInformationValidationError) ErrorName() string { return "DebugInformationValidationError" } - -// Error satisfies the builtin error interface -func (e DebugInformationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDebugInformation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DebugInformationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DebugInformationValidationError{} - -// Validate checks the field values on CheckDebugTrace with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CheckDebugTrace) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckDebugTrace with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckDebugTraceMultiError, or nil if none found. -func (m *CheckDebugTrace) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckDebugTrace) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckDebugTraceValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ResourceRelationType - - { - sorted_keys := make([]string, len(m.GetResults())) - i := 0 - for key := range m.GetResults() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetResults()[key] - _ = val - - // no validation rules for Results[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckDebugTraceValidationError{ - field: fmt.Sprintf("Results[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - // no validation rules for IsCachedResult - - for idx, item := range m.GetSubProblems() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: fmt.Sprintf("SubProblems[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: fmt.Sprintf("SubProblems[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckDebugTraceValidationError{ - field: fmt.Sprintf("SubProblems[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetDuration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: "Duration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckDebugTraceValidationError{ - field: "Duration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckDebugTraceValidationError{ - field: "Duration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TraceId - - // no validation rules for SourceId - - if len(errors) > 0 { - return CheckDebugTraceMultiError(errors) - } - - return nil -} - -// CheckDebugTraceMultiError is an error wrapping multiple validation errors -// returned by CheckDebugTrace.ValidateAll() if the designated constraints -// aren't met. -type CheckDebugTraceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckDebugTraceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckDebugTraceMultiError) AllErrors() []error { return m } - -// CheckDebugTraceValidationError is the validation error returned by -// CheckDebugTrace.Validate if the designated constraints aren't met. -type CheckDebugTraceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckDebugTraceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckDebugTraceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckDebugTraceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckDebugTraceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckDebugTraceValidationError) ErrorName() string { return "CheckDebugTraceValidationError" } - -// Error satisfies the builtin error interface -func (e CheckDebugTraceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckDebugTrace.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckDebugTraceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckDebugTraceValidationError{} diff --git a/pkg/proto/dispatch/v1/dispatch_grpc.pb.go b/pkg/proto/dispatch/v1/dispatch_grpc.pb.go index e63499b30..bf594d197 100644 --- a/pkg/proto/dispatch/v1/dispatch_grpc.pb.go +++ b/pkg/proto/dispatch/v1/dispatch_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: dispatch/v1/dispatch.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( DispatchService_DispatchCheck_FullMethodName = "/dispatch.v1.DispatchService/DispatchCheck" @@ -32,9 +32,9 @@ const ( type DispatchServiceClient interface { DispatchCheck(ctx context.Context, in *DispatchCheckRequest, opts ...grpc.CallOption) (*DispatchCheckResponse, error) DispatchExpand(ctx context.Context, in *DispatchExpandRequest, opts ...grpc.CallOption) (*DispatchExpandResponse, error) - DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupSubjectsClient, error) - DispatchLookupResources2(ctx context.Context, in *DispatchLookupResources2Request, opts ...grpc.CallOption) (DispatchService_DispatchLookupResources2Client, error) - DispatchLookupResources3(ctx context.Context, in *DispatchLookupResources3Request, opts ...grpc.CallOption) (DispatchService_DispatchLookupResources3Client, error) + DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupSubjectsResponse], error) + DispatchLookupResources2(ctx context.Context, in *DispatchLookupResources2Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupResources2Response], error) + DispatchLookupResources3(ctx context.Context, in *DispatchLookupResources3Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupResources3Response], error) } type dispatchServiceClient struct { @@ -46,8 +46,9 @@ func NewDispatchServiceClient(cc grpc.ClientConnInterface) DispatchServiceClient } func (c *dispatchServiceClient) DispatchCheck(ctx context.Context, in *DispatchCheckRequest, opts ...grpc.CallOption) (*DispatchCheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DispatchCheckResponse) - err := c.cc.Invoke(ctx, DispatchService_DispatchCheck_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DispatchService_DispatchCheck_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,20 +56,22 @@ func (c *dispatchServiceClient) DispatchCheck(ctx context.Context, in *DispatchC } func (c *dispatchServiceClient) DispatchExpand(ctx context.Context, in *DispatchExpandRequest, opts ...grpc.CallOption) (*DispatchExpandResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DispatchExpandResponse) - err := c.cc.Invoke(ctx, DispatchService_DispatchExpand_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DispatchService_DispatchExpand_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *dispatchServiceClient) DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupSubjectsClient, error) { - stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[0], DispatchService_DispatchLookupSubjects_FullMethodName, opts...) +func (c *dispatchServiceClient) DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupSubjectsResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[0], DispatchService_DispatchLookupSubjects_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &dispatchServiceDispatchLookupSubjectsClient{stream} + x := &grpc.GenericClientStream[DispatchLookupSubjectsRequest, DispatchLookupSubjectsResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -78,29 +81,16 @@ func (c *dispatchServiceClient) DispatchLookupSubjects(ctx context.Context, in * return x, nil } -type DispatchService_DispatchLookupSubjectsClient interface { - Recv() (*DispatchLookupSubjectsResponse, error) - grpc.ClientStream -} - -type dispatchServiceDispatchLookupSubjectsClient struct { - grpc.ClientStream -} - -func (x *dispatchServiceDispatchLookupSubjectsClient) Recv() (*DispatchLookupSubjectsResponse, error) { - m := new(DispatchLookupSubjectsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupSubjectsClient = grpc.ServerStreamingClient[DispatchLookupSubjectsResponse] -func (c *dispatchServiceClient) DispatchLookupResources2(ctx context.Context, in *DispatchLookupResources2Request, opts ...grpc.CallOption) (DispatchService_DispatchLookupResources2Client, error) { - stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[1], DispatchService_DispatchLookupResources2_FullMethodName, opts...) +func (c *dispatchServiceClient) DispatchLookupResources2(ctx context.Context, in *DispatchLookupResources2Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupResources2Response], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[1], DispatchService_DispatchLookupResources2_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &dispatchServiceDispatchLookupResources2Client{stream} + x := &grpc.GenericClientStream[DispatchLookupResources2Request, DispatchLookupResources2Response]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -110,29 +100,16 @@ func (c *dispatchServiceClient) DispatchLookupResources2(ctx context.Context, in return x, nil } -type DispatchService_DispatchLookupResources2Client interface { - Recv() (*DispatchLookupResources2Response, error) - grpc.ClientStream -} - -type dispatchServiceDispatchLookupResources2Client struct { - grpc.ClientStream -} - -func (x *dispatchServiceDispatchLookupResources2Client) Recv() (*DispatchLookupResources2Response, error) { - m := new(DispatchLookupResources2Response) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupResources2Client = grpc.ServerStreamingClient[DispatchLookupResources2Response] -func (c *dispatchServiceClient) DispatchLookupResources3(ctx context.Context, in *DispatchLookupResources3Request, opts ...grpc.CallOption) (DispatchService_DispatchLookupResources3Client, error) { - stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[2], DispatchService_DispatchLookupResources3_FullMethodName, opts...) +func (c *dispatchServiceClient) DispatchLookupResources3(ctx context.Context, in *DispatchLookupResources3Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DispatchLookupResources3Response], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[2], DispatchService_DispatchLookupResources3_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &dispatchServiceDispatchLookupResources3Client{stream} + x := &grpc.GenericClientStream[DispatchLookupResources3Request, DispatchLookupResources3Response]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -142,38 +119,27 @@ func (c *dispatchServiceClient) DispatchLookupResources3(ctx context.Context, in return x, nil } -type DispatchService_DispatchLookupResources3Client interface { - Recv() (*DispatchLookupResources3Response, error) - grpc.ClientStream -} - -type dispatchServiceDispatchLookupResources3Client struct { - grpc.ClientStream -} - -func (x *dispatchServiceDispatchLookupResources3Client) Recv() (*DispatchLookupResources3Response, error) { - m := new(DispatchLookupResources3Response) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupResources3Client = grpc.ServerStreamingClient[DispatchLookupResources3Response] // DispatchServiceServer is the server API for DispatchService service. // All implementations must embed UnimplementedDispatchServiceServer -// for forward compatibility +// for forward compatibility. type DispatchServiceServer interface { DispatchCheck(context.Context, *DispatchCheckRequest) (*DispatchCheckResponse, error) DispatchExpand(context.Context, *DispatchExpandRequest) (*DispatchExpandResponse, error) - DispatchLookupSubjects(*DispatchLookupSubjectsRequest, DispatchService_DispatchLookupSubjectsServer) error - DispatchLookupResources2(*DispatchLookupResources2Request, DispatchService_DispatchLookupResources2Server) error - DispatchLookupResources3(*DispatchLookupResources3Request, DispatchService_DispatchLookupResources3Server) error + DispatchLookupSubjects(*DispatchLookupSubjectsRequest, grpc.ServerStreamingServer[DispatchLookupSubjectsResponse]) error + DispatchLookupResources2(*DispatchLookupResources2Request, grpc.ServerStreamingServer[DispatchLookupResources2Response]) error + DispatchLookupResources3(*DispatchLookupResources3Request, grpc.ServerStreamingServer[DispatchLookupResources3Response]) error mustEmbedUnimplementedDispatchServiceServer() } -// UnimplementedDispatchServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDispatchServiceServer struct { -} +// UnimplementedDispatchServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDispatchServiceServer struct{} func (UnimplementedDispatchServiceServer) DispatchCheck(context.Context, *DispatchCheckRequest) (*DispatchCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DispatchCheck not implemented") @@ -181,16 +147,17 @@ func (UnimplementedDispatchServiceServer) DispatchCheck(context.Context, *Dispat func (UnimplementedDispatchServiceServer) DispatchExpand(context.Context, *DispatchExpandRequest) (*DispatchExpandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DispatchExpand not implemented") } -func (UnimplementedDispatchServiceServer) DispatchLookupSubjects(*DispatchLookupSubjectsRequest, DispatchService_DispatchLookupSubjectsServer) error { +func (UnimplementedDispatchServiceServer) DispatchLookupSubjects(*DispatchLookupSubjectsRequest, grpc.ServerStreamingServer[DispatchLookupSubjectsResponse]) error { return status.Errorf(codes.Unimplemented, "method DispatchLookupSubjects not implemented") } -func (UnimplementedDispatchServiceServer) DispatchLookupResources2(*DispatchLookupResources2Request, DispatchService_DispatchLookupResources2Server) error { +func (UnimplementedDispatchServiceServer) DispatchLookupResources2(*DispatchLookupResources2Request, grpc.ServerStreamingServer[DispatchLookupResources2Response]) error { return status.Errorf(codes.Unimplemented, "method DispatchLookupResources2 not implemented") } -func (UnimplementedDispatchServiceServer) DispatchLookupResources3(*DispatchLookupResources3Request, DispatchService_DispatchLookupResources3Server) error { +func (UnimplementedDispatchServiceServer) DispatchLookupResources3(*DispatchLookupResources3Request, grpc.ServerStreamingServer[DispatchLookupResources3Response]) error { return status.Errorf(codes.Unimplemented, "method DispatchLookupResources3 not implemented") } func (UnimplementedDispatchServiceServer) mustEmbedUnimplementedDispatchServiceServer() {} +func (UnimplementedDispatchServiceServer) testEmbeddedByValue() {} // UnsafeDispatchServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DispatchServiceServer will @@ -200,6 +167,13 @@ type UnsafeDispatchServiceServer interface { } func RegisterDispatchServiceServer(s grpc.ServiceRegistrar, srv DispatchServiceServer) { + // If the following call pancis, it indicates UnimplementedDispatchServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&DispatchService_ServiceDesc, srv) } @@ -244,63 +218,33 @@ func _DispatchService_DispatchLookupSubjects_Handler(srv interface{}, stream grp if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DispatchServiceServer).DispatchLookupSubjects(m, &dispatchServiceDispatchLookupSubjectsServer{stream}) -} - -type DispatchService_DispatchLookupSubjectsServer interface { - Send(*DispatchLookupSubjectsResponse) error - grpc.ServerStream + return srv.(DispatchServiceServer).DispatchLookupSubjects(m, &grpc.GenericServerStream[DispatchLookupSubjectsRequest, DispatchLookupSubjectsResponse]{ServerStream: stream}) } -type dispatchServiceDispatchLookupSubjectsServer struct { - grpc.ServerStream -} - -func (x *dispatchServiceDispatchLookupSubjectsServer) Send(m *DispatchLookupSubjectsResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupSubjectsServer = grpc.ServerStreamingServer[DispatchLookupSubjectsResponse] func _DispatchService_DispatchLookupResources2_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(DispatchLookupResources2Request) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DispatchServiceServer).DispatchLookupResources2(m, &dispatchServiceDispatchLookupResources2Server{stream}) + return srv.(DispatchServiceServer).DispatchLookupResources2(m, &grpc.GenericServerStream[DispatchLookupResources2Request, DispatchLookupResources2Response]{ServerStream: stream}) } -type DispatchService_DispatchLookupResources2Server interface { - Send(*DispatchLookupResources2Response) error - grpc.ServerStream -} - -type dispatchServiceDispatchLookupResources2Server struct { - grpc.ServerStream -} - -func (x *dispatchServiceDispatchLookupResources2Server) Send(m *DispatchLookupResources2Response) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupResources2Server = grpc.ServerStreamingServer[DispatchLookupResources2Response] func _DispatchService_DispatchLookupResources3_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(DispatchLookupResources3Request) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DispatchServiceServer).DispatchLookupResources3(m, &dispatchServiceDispatchLookupResources3Server{stream}) + return srv.(DispatchServiceServer).DispatchLookupResources3(m, &grpc.GenericServerStream[DispatchLookupResources3Request, DispatchLookupResources3Response]{ServerStream: stream}) } -type DispatchService_DispatchLookupResources3Server interface { - Send(*DispatchLookupResources3Response) error - grpc.ServerStream -} - -type dispatchServiceDispatchLookupResources3Server struct { - grpc.ServerStream -} - -func (x *dispatchServiceDispatchLookupResources3Server) Send(m *DispatchLookupResources3Response) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DispatchService_DispatchLookupResources3Server = grpc.ServerStreamingServer[DispatchLookupResources3Response] // DispatchService_ServiceDesc is the grpc.ServiceDesc for DispatchService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go index 104aae21c..e03bb3ac8 100644 --- a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go +++ b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240409071808-615f978279ca +// protoc-gen-go-vtproto version: v0.6.1-0.20240917153116-6f2963f01587 // source: dispatch/v1/dispatch.proto package dispatchv1 diff --git a/pkg/proto/impl/v1/impl.pb.go b/pkg/proto/impl/v1/impl.pb.go index 713286c86..8a2b2eec2 100644 --- a/pkg/proto/impl/v1/impl.pb.go +++ b/pkg/proto/impl/v1/impl.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: impl/v1/impl.proto @@ -12,6 +12,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -71,26 +72,23 @@ func (RelationMetadata_RelationKind) EnumDescriptor() ([]byte, []int) { } type DecodedCaveat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // we do kind_oneof in case we decide to have non-CEL expressions // - // Types that are assignable to KindOneof: + // Types that are valid to be assigned to KindOneof: // // *DecodedCaveat_Cel - KindOneof isDecodedCaveat_KindOneof `protobuf_oneof:"kind_oneof"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + KindOneof isDecodedCaveat_KindOneof `protobuf_oneof:"kind_oneof"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecodedCaveat) Reset() { *x = DecodedCaveat{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedCaveat) String() string { @@ -101,7 +99,7 @@ func (*DecodedCaveat) ProtoMessage() {} func (x *DecodedCaveat) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,16 +114,18 @@ func (*DecodedCaveat) Descriptor() ([]byte, []int) { return file_impl_v1_impl_proto_rawDescGZIP(), []int{0} } -func (m *DecodedCaveat) GetKindOneof() isDecodedCaveat_KindOneof { - if m != nil { - return m.KindOneof +func (x *DecodedCaveat) GetKindOneof() isDecodedCaveat_KindOneof { + if x != nil { + return x.KindOneof } return nil } func (x *DecodedCaveat) GetCel() *v1alpha1.CheckedExpr { - if x, ok := x.GetKindOneof().(*DecodedCaveat_Cel); ok { - return x.Cel + if x != nil { + if x, ok := x.KindOneof.(*DecodedCaveat_Cel); ok { + return x.Cel + } } return nil } @@ -148,25 +148,22 @@ type DecodedCaveat_Cel struct { func (*DecodedCaveat_Cel) isDecodedCaveat_KindOneof() {} type DecodedZookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - // Types that are assignable to VersionOneof: + state protoimpl.MessageState `protogen:"open.v1"` + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Types that are valid to be assigned to VersionOneof: // // *DecodedZookie_V1 // *DecodedZookie_V2 - VersionOneof isDecodedZookie_VersionOneof `protobuf_oneof:"version_oneof"` + VersionOneof isDecodedZookie_VersionOneof `protobuf_oneof:"version_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecodedZookie) Reset() { *x = DecodedZookie{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZookie) String() string { @@ -177,7 +174,7 @@ func (*DecodedZookie) ProtoMessage() {} func (x *DecodedZookie) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,23 +196,27 @@ func (x *DecodedZookie) GetVersion() uint32 { return 0 } -func (m *DecodedZookie) GetVersionOneof() isDecodedZookie_VersionOneof { - if m != nil { - return m.VersionOneof +func (x *DecodedZookie) GetVersionOneof() isDecodedZookie_VersionOneof { + if x != nil { + return x.VersionOneof } return nil } func (x *DecodedZookie) GetV1() *DecodedZookie_V1Zookie { - if x, ok := x.GetVersionOneof().(*DecodedZookie_V1); ok { - return x.V1 + if x != nil { + if x, ok := x.VersionOneof.(*DecodedZookie_V1); ok { + return x.V1 + } } return nil } func (x *DecodedZookie) GetV2() *DecodedZookie_V2Zookie { - if x, ok := x.GetVersionOneof().(*DecodedZookie_V2); ok { - return x.V2 + if x != nil { + if x, ok := x.VersionOneof.(*DecodedZookie_V2); ok { + return x.V2 + } } return nil } @@ -237,24 +238,21 @@ func (*DecodedZookie_V1) isDecodedZookie_VersionOneof() {} func (*DecodedZookie_V2) isDecodedZookie_VersionOneof() {} type DecodedZedToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to VersionOneof: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to VersionOneof: // // *DecodedZedToken_DeprecatedV1Zookie // *DecodedZedToken_V1 - VersionOneof isDecodedZedToken_VersionOneof `protobuf_oneof:"version_oneof"` + VersionOneof isDecodedZedToken_VersionOneof `protobuf_oneof:"version_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecodedZedToken) Reset() { *x = DecodedZedToken{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZedToken) String() string { @@ -265,7 +263,7 @@ func (*DecodedZedToken) ProtoMessage() {} func (x *DecodedZedToken) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,23 +278,27 @@ func (*DecodedZedToken) Descriptor() ([]byte, []int) { return file_impl_v1_impl_proto_rawDescGZIP(), []int{2} } -func (m *DecodedZedToken) GetVersionOneof() isDecodedZedToken_VersionOneof { - if m != nil { - return m.VersionOneof +func (x *DecodedZedToken) GetVersionOneof() isDecodedZedToken_VersionOneof { + if x != nil { + return x.VersionOneof } return nil } func (x *DecodedZedToken) GetDeprecatedV1Zookie() *DecodedZedToken_V1Zookie { - if x, ok := x.GetVersionOneof().(*DecodedZedToken_DeprecatedV1Zookie); ok { - return x.DeprecatedV1Zookie + if x != nil { + if x, ok := x.VersionOneof.(*DecodedZedToken_DeprecatedV1Zookie); ok { + return x.DeprecatedV1Zookie + } } return nil } func (x *DecodedZedToken) GetV1() *DecodedZedToken_V1ZedToken { - if x, ok := x.GetVersionOneof().(*DecodedZedToken_V1); ok { - return x.V1 + if x != nil { + if x, ok := x.VersionOneof.(*DecodedZedToken_V1); ok { + return x.V1 + } } return nil } @@ -318,25 +320,22 @@ func (*DecodedZedToken_DeprecatedV1Zookie) isDecodedZedToken_VersionOneof() {} func (*DecodedZedToken_V1) isDecodedZedToken_VersionOneof() {} type DecodedCursor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // we do version_oneof in case we decide to add a new version. // - // Types that are assignable to VersionOneof: + // Types that are valid to be assigned to VersionOneof: // // *DecodedCursor_V1 - VersionOneof isDecodedCursor_VersionOneof `protobuf_oneof:"version_oneof"` + VersionOneof isDecodedCursor_VersionOneof `protobuf_oneof:"version_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecodedCursor) Reset() { *x = DecodedCursor{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedCursor) String() string { @@ -347,7 +346,7 @@ func (*DecodedCursor) ProtoMessage() {} func (x *DecodedCursor) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,16 +361,18 @@ func (*DecodedCursor) Descriptor() ([]byte, []int) { return file_impl_v1_impl_proto_rawDescGZIP(), []int{3} } -func (m *DecodedCursor) GetVersionOneof() isDecodedCursor_VersionOneof { - if m != nil { - return m.VersionOneof +func (x *DecodedCursor) GetVersionOneof() isDecodedCursor_VersionOneof { + if x != nil { + return x.VersionOneof } return nil } func (x *DecodedCursor) GetV1() *V1Cursor { - if x, ok := x.GetVersionOneof().(*DecodedCursor_V1); ok { - return x.V1 + if x != nil { + if x, ok := x.VersionOneof.(*DecodedCursor_V1); ok { + return x.V1 + } } return nil } @@ -387,10 +388,7 @@ type DecodedCursor_V1 struct { func (*DecodedCursor_V1) isDecodedCursor_VersionOneof() {} type V1Cursor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // revision is the string form of the revision for the cursor. Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` // sections are the sections of the dispatching cursor. @@ -401,19 +399,19 @@ type V1Cursor struct { // dispatch_version is the version of the dispatcher which created the cursor. DispatchVersion uint32 `protobuf:"varint,4,opt,name=dispatch_version,json=dispatchVersion,proto3" json:"dispatch_version,omitempty"` // flags are flags set by the API caller. - Flags map[string]string `protobuf:"bytes,5,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Flags map[string]string `protobuf:"bytes,5,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // datastore_unique_id is the unique ID for the datastore. Will be empty for legacy // cursors. DatastoreUniqueId string `protobuf:"bytes,6,opt,name=datastore_unique_id,json=datastoreUniqueId,proto3" json:"datastore_unique_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *V1Cursor) Reset() { *x = V1Cursor{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1Cursor) String() string { @@ -424,7 +422,7 @@ func (*V1Cursor) ProtoMessage() {} func (x *V1Cursor) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,20 +480,17 @@ func (x *V1Cursor) GetDatastoreUniqueId() string { } type DocComment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` unknownFields protoimpl.UnknownFields - - Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DocComment) Reset() { *x = DocComment{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocComment) String() string { @@ -506,7 +501,7 @@ func (*DocComment) ProtoMessage() {} func (x *DocComment) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,20 +524,17 @@ func (x *DocComment) GetComment() string { } type TypeAnnotations struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` unknownFields protoimpl.UnknownFields - - Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TypeAnnotations) Reset() { *x = TypeAnnotations{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeAnnotations) String() string { @@ -553,7 +545,7 @@ func (*TypeAnnotations) ProtoMessage() {} func (x *TypeAnnotations) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,21 +568,18 @@ func (x *TypeAnnotations) GetTypes() []string { } type RelationMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Kind RelationMetadata_RelationKind `protobuf:"varint,1,opt,name=kind,proto3,enum=impl.v1.RelationMetadata_RelationKind" json:"kind,omitempty"` TypeAnnotations *TypeAnnotations `protobuf:"bytes,2,opt,name=type_annotations,json=typeAnnotations,proto3" json:"type_annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationMetadata) Reset() { *x = RelationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationMetadata) String() string { @@ -601,7 +590,7 @@ func (*RelationMetadata) ProtoMessage() {} func (x *RelationMetadata) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,21 +620,18 @@ func (x *RelationMetadata) GetTypeAnnotations() *TypeAnnotations { } type NamespaceAndRevision struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceName string `protobuf:"bytes,1,opt,name=namespace_name,json=namespaceName,proto3" json:"namespace_name,omitempty"` + Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` unknownFields protoimpl.UnknownFields - - NamespaceName string `protobuf:"bytes,1,opt,name=namespace_name,json=namespaceName,proto3" json:"namespace_name,omitempty"` - Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` + sizeCache protoimpl.SizeCache } func (x *NamespaceAndRevision) Reset() { *x = NamespaceAndRevision{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NamespaceAndRevision) String() string { @@ -656,7 +642,7 @@ func (*NamespaceAndRevision) ProtoMessage() {} func (x *NamespaceAndRevision) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,20 +672,17 @@ func (x *NamespaceAndRevision) GetRevision() string { } type V1Alpha1Revision struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NsRevisions []*NamespaceAndRevision `protobuf:"bytes,1,rep,name=ns_revisions,json=nsRevisions,proto3" json:"ns_revisions,omitempty"` unknownFields protoimpl.UnknownFields - - NsRevisions []*NamespaceAndRevision `protobuf:"bytes,1,rep,name=ns_revisions,json=nsRevisions,proto3" json:"ns_revisions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *V1Alpha1Revision) Reset() { *x = V1Alpha1Revision{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1Alpha1Revision) String() string { @@ -710,7 +693,7 @@ func (*V1Alpha1Revision) ProtoMessage() {} func (x *V1Alpha1Revision) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,20 +716,17 @@ func (x *V1Alpha1Revision) GetNsRevisions() []*NamespaceAndRevision { } type DecodedZookie_V1Zookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` unknownFields protoimpl.UnknownFields - - Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DecodedZookie_V1Zookie) Reset() { *x = DecodedZookie_V1Zookie{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZookie_V1Zookie) String() string { @@ -757,7 +737,7 @@ func (*DecodedZookie_V1Zookie) ProtoMessage() {} func (x *DecodedZookie_V1Zookie) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,20 +760,17 @@ func (x *DecodedZookie_V1Zookie) GetRevision() uint64 { } type DecodedZookie_V2Zookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` unknownFields protoimpl.UnknownFields - - Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DecodedZookie_V2Zookie) Reset() { *x = DecodedZookie_V2Zookie{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZookie_V2Zookie) String() string { @@ -804,7 +781,7 @@ func (*DecodedZookie_V2Zookie) ProtoMessage() {} func (x *DecodedZookie_V2Zookie) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,20 +804,17 @@ func (x *DecodedZookie_V2Zookie) GetRevision() string { } type DecodedZedToken_V1Zookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` unknownFields protoimpl.UnknownFields - - Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DecodedZedToken_V1Zookie) Reset() { *x = DecodedZedToken_V1Zookie{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZedToken_V1Zookie) String() string { @@ -851,7 +825,7 @@ func (*DecodedZedToken_V1Zookie) ProtoMessage() {} func (x *DecodedZedToken_V1Zookie) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,23 +848,20 @@ func (x *DecodedZedToken_V1Zookie) GetRevision() uint64 { } type DecodedZedToken_V1ZedToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` // datastore_unique_id_prefix is a prefix of the unique ID for the datastore that created // this token. Will be empty for legacy tokens. DatastoreUniqueIdPrefix string `protobuf:"bytes,2,opt,name=datastore_unique_id_prefix,json=datastoreUniqueIdPrefix,proto3" json:"datastore_unique_id_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecodedZedToken_V1ZedToken) Reset() { *x = DecodedZedToken_V1ZedToken{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_impl_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_impl_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecodedZedToken_V1ZedToken) String() string { @@ -901,7 +872,7 @@ func (*DecodedZedToken_V1ZedToken) ProtoMessage() {} func (x *DecodedZedToken_V1ZedToken) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_impl_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,128 +903,75 @@ func (x *DecodedZedToken_V1ZedToken) GetDatastoreUniqueIdPrefix() string { var File_impl_v1_impl_proto protoreflect.FileDescriptor -var file_impl_v1_impl_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x69, 0x6d, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x26, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, - 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x39, 0x0a, 0x03, 0x63, 0x65, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x63, 0x65, - 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x6b, 0x69, 0x6e, 0x64, 0x5f, 0x6f, 0x6e, - 0x65, 0x6f, 0x66, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5a, - 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x31, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6d, - 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5a, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x2e, 0x56, 0x31, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x02, - 0x76, 0x31, 0x12, 0x31, 0x0a, 0x02, 0x76, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, - 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x56, 0x32, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x48, - 0x00, 0x52, 0x02, 0x76, 0x32, 0x1a, 0x26, 0x0a, 0x08, 0x56, 0x31, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x26, 0x0a, - 0x08, 0x56, 0x32, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x6f, 0x64, - 0x65, 0x64, 0x5a, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x55, 0x0a, 0x14, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, 0x5f, 0x7a, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5a, 0x65, 0x64, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x2e, 0x56, 0x31, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x12, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, - 0x65, 0x12, 0x35, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5a, - 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x56, 0x31, 0x5a, 0x65, 0x64, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x26, 0x0a, 0x08, 0x56, 0x31, 0x5a, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x1a, 0x65, 0x0a, 0x0a, 0x56, 0x31, 0x5a, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x1a, 0x64, 0x61, - 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, - 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, - 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, - 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x45, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6f, - 0x64, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x02, 0x76, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x31, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x0f, - 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, - 0xc4, 0x02, 0x0a, 0x08, 0x56, 0x31, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x6e, 0x64, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x61, 0x6c, 0x6c, 0x41, 0x6e, 0x64, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, - 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x31, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x13, - 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x1a, 0x38, 0x0a, 0x0a, - 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x27, - 0x0a, 0x0f, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x69, 0x6d, 0x70, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, - 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x74, 0x79, - 0x70, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3e, 0x0a, - 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, - 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, - 0x0a, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0x59, 0x0a, - 0x14, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x10, 0x56, 0x31, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0c, - 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x6e, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x8a, - 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x09, - 0x49, 0x6d, 0x70, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, - 0x73, 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6d, 0x70, 0x6c, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x49, 0x6d, 0x70, 0x6c, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x07, 0x49, 0x6d, 0x70, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x49, 0x6d, 0x70, - 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x08, 0x49, 0x6d, 0x70, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} +const file_impl_v1_impl_proto_rawDesc = "" + + "\n" + + "\x12impl/v1/impl.proto\x12\aimpl.v1\x1a&google/api/expr/v1alpha1/checked.proto\"l\n" + + "\rDecodedCaveat\x129\n" + + "\x03cel\x18\x01 \x01(\v2%.google.api.expr.v1alpha1.CheckedExprH\x00R\x03cel\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04nameB\f\n" + + "\n" + + "kind_oneof\"\xf0\x01\n" + + "\rDecodedZookie\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x121\n" + + "\x02v1\x18\x02 \x01(\v2\x1f.impl.v1.DecodedZookie.V1ZookieH\x00R\x02v1\x121\n" + + "\x02v2\x18\x03 \x01(\v2\x1f.impl.v1.DecodedZookie.V2ZookieH\x00R\x02v2\x1a&\n" + + "\bV1Zookie\x12\x1a\n" + + "\brevision\x18\x01 \x01(\x04R\brevision\x1a&\n" + + "\bV2Zookie\x12\x1a\n" + + "\brevision\x18\x01 \x01(\tR\brevisionB\x0f\n" + + "\rversion_oneof\"\xbf\x02\n" + + "\x0fDecodedZedToken\x12U\n" + + "\x14deprecated_v1_zookie\x18\x02 \x01(\v2!.impl.v1.DecodedZedToken.V1ZookieH\x00R\x12deprecatedV1Zookie\x125\n" + + "\x02v1\x18\x03 \x01(\v2#.impl.v1.DecodedZedToken.V1ZedTokenH\x00R\x02v1\x1a&\n" + + "\bV1Zookie\x12\x1a\n" + + "\brevision\x18\x01 \x01(\x04R\brevision\x1ae\n" + + "\n" + + "V1ZedToken\x12\x1a\n" + + "\brevision\x18\x01 \x01(\tR\brevision\x12;\n" + + "\x1adatastore_unique_id_prefix\x18\x02 \x01(\tR\x17datastoreUniqueIdPrefixB\x0f\n" + + "\rversion_oneof\"E\n" + + "\rDecodedCursor\x12#\n" + + "\x02v1\x18\x01 \x01(\v2\x11.impl.v1.V1CursorH\x00R\x02v1B\x0f\n" + + "\rversion_oneof\"\xc4\x02\n" + + "\bV1Cursor\x12\x1a\n" + + "\brevision\x18\x01 \x01(\tR\brevision\x12\x1a\n" + + "\bsections\x18\x02 \x03(\tR\bsections\x127\n" + + "\x18call_and_parameters_hash\x18\x03 \x01(\tR\x15callAndParametersHash\x12)\n" + + "\x10dispatch_version\x18\x04 \x01(\rR\x0fdispatchVersion\x122\n" + + "\x05flags\x18\x05 \x03(\v2\x1c.impl.v1.V1Cursor.FlagsEntryR\x05flags\x12.\n" + + "\x13datastore_unique_id\x18\x06 \x01(\tR\x11datastoreUniqueId\x1a8\n" + + "\n" + + "FlagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"&\n" + + "\n" + + "DocComment\x12\x18\n" + + "\acomment\x18\x01 \x01(\tR\acomment\"'\n" + + "\x0fTypeAnnotations\x12\x14\n" + + "\x05types\x18\x01 \x03(\tR\x05types\"\xd3\x01\n" + + "\x10RelationMetadata\x12:\n" + + "\x04kind\x18\x01 \x01(\x0e2&.impl.v1.RelationMetadata.RelationKindR\x04kind\x12C\n" + + "\x10type_annotations\x18\x02 \x01(\v2\x18.impl.v1.TypeAnnotationsR\x0ftypeAnnotations\">\n" + + "\fRelationKind\x12\x10\n" + + "\fUNKNOWN_KIND\x10\x00\x12\f\n" + + "\bRELATION\x10\x01\x12\x0e\n" + + "\n" + + "PERMISSION\x10\x02\"Y\n" + + "\x14NamespaceAndRevision\x12%\n" + + "\x0enamespace_name\x18\x01 \x01(\tR\rnamespaceName\x12\x1a\n" + + "\brevision\x18\x02 \x01(\tR\brevision\"T\n" + + "\x10V1Alpha1Revision\x12@\n" + + "\fns_revisions\x18\x01 \x03(\v2\x1d.impl.v1.NamespaceAndRevisionR\vnsRevisionsB\x8a\x01\n" + + "\vcom.impl.v1B\tImplProtoP\x01Z3github.com/authzed/spicedb/pkg/proto/impl/v1;implv1\xa2\x02\x03IXX\xaa\x02\aImpl.V1\xca\x02\aImpl\\V1\xe2\x02\x13Impl\\V1\\GPBMetadata\xea\x02\bImpl::V1b\x06proto3" var ( file_impl_v1_impl_proto_rawDescOnce sync.Once - file_impl_v1_impl_proto_rawDescData = file_impl_v1_impl_proto_rawDesc + file_impl_v1_impl_proto_rawDescData []byte ) func file_impl_v1_impl_proto_rawDescGZIP() []byte { file_impl_v1_impl_proto_rawDescOnce.Do(func() { - file_impl_v1_impl_proto_rawDescData = protoimpl.X.CompressGZIP(file_impl_v1_impl_proto_rawDescData) + file_impl_v1_impl_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_impl_v1_impl_proto_rawDesc), len(file_impl_v1_impl_proto_rawDesc))) }) return file_impl_v1_impl_proto_rawDescData } @@ -1102,176 +1020,6 @@ func file_impl_v1_impl_proto_init() { if File_impl_v1_impl_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_impl_v1_impl_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DecodedCaveat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZedToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DecodedCursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*V1Cursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocComment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TypeAnnotations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RelationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NamespaceAndRevision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*V1Alpha1Revision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZookie_V1Zookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZookie_V2Zookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZedToken_V1Zookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_impl_v1_impl_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DecodedZedToken_V1ZedToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_impl_v1_impl_proto_msgTypes[0].OneofWrappers = []any{ (*DecodedCaveat_Cel)(nil), } @@ -1290,7 +1038,7 @@ func file_impl_v1_impl_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_impl_v1_impl_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_impl_v1_impl_proto_rawDesc), len(file_impl_v1_impl_proto_rawDesc)), NumEnums: 1, NumMessages: 15, NumExtensions: 0, @@ -1302,7 +1050,6 @@ func file_impl_v1_impl_proto_init() { MessageInfos: file_impl_v1_impl_proto_msgTypes, }.Build() File_impl_v1_impl_proto = out.File - file_impl_v1_impl_proto_rawDesc = nil file_impl_v1_impl_proto_goTypes = nil file_impl_v1_impl_proto_depIdxs = nil } diff --git a/pkg/proto/impl/v1/impl.pb.validate.go b/pkg/proto/impl/v1/impl.pb.validate.go deleted file mode 100644 index 7ea3352cb..000000000 --- a/pkg/proto/impl/v1/impl.pb.validate.go +++ /dev/null @@ -1,1805 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: impl/v1/impl.proto - -package implv1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DecodedCaveat with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DecodedCaveat) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedCaveat with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DecodedCaveatMultiError, or -// nil if none found. -func (m *DecodedCaveat) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedCaveat) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - switch v := m.KindOneof.(type) { - case *DecodedCaveat_Cel: - if v == nil { - err := DecodedCaveatValidationError{ - field: "KindOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetCel()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedCaveatValidationError{ - field: "Cel", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedCaveatValidationError{ - field: "Cel", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCel()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedCaveatValidationError{ - field: "Cel", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DecodedCaveatMultiError(errors) - } - - return nil -} - -// DecodedCaveatMultiError is an error wrapping multiple validation errors -// returned by DecodedCaveat.ValidateAll() if the designated constraints -// aren't met. -type DecodedCaveatMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedCaveatMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedCaveatMultiError) AllErrors() []error { return m } - -// DecodedCaveatValidationError is the validation error returned by -// DecodedCaveat.Validate if the designated constraints aren't met. -type DecodedCaveatValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedCaveatValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedCaveatValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedCaveatValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedCaveatValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedCaveatValidationError) ErrorName() string { return "DecodedCaveatValidationError" } - -// Error satisfies the builtin error interface -func (e DecodedCaveatValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedCaveat.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedCaveatValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedCaveatValidationError{} - -// Validate checks the field values on DecodedZookie with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DecodedZookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZookie with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DecodedZookieMultiError, or -// nil if none found. -func (m *DecodedZookie) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Version - - switch v := m.VersionOneof.(type) { - case *DecodedZookie_V1: - if v == nil { - err := DecodedZookieValidationError{ - field: "VersionOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetV1()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedZookieValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedZookieValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedZookieValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DecodedZookie_V2: - if v == nil { - err := DecodedZookieValidationError{ - field: "VersionOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetV2()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedZookieValidationError{ - field: "V2", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedZookieValidationError{ - field: "V2", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetV2()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedZookieValidationError{ - field: "V2", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DecodedZookieMultiError(errors) - } - - return nil -} - -// DecodedZookieMultiError is an error wrapping multiple validation errors -// returned by DecodedZookie.ValidateAll() if the designated constraints -// aren't met. -type DecodedZookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZookieMultiError) AllErrors() []error { return m } - -// DecodedZookieValidationError is the validation error returned by -// DecodedZookie.Validate if the designated constraints aren't met. -type DecodedZookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZookieValidationError) ErrorName() string { return "DecodedZookieValidationError" } - -// Error satisfies the builtin error interface -func (e DecodedZookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZookieValidationError{} - -// Validate checks the field values on DecodedZedToken with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DecodedZedToken) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZedToken with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DecodedZedTokenMultiError, or nil if none found. -func (m *DecodedZedToken) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZedToken) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.VersionOneof.(type) { - case *DecodedZedToken_DeprecatedV1Zookie: - if v == nil { - err := DecodedZedTokenValidationError{ - field: "VersionOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDeprecatedV1Zookie()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedZedTokenValidationError{ - field: "DeprecatedV1Zookie", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedZedTokenValidationError{ - field: "DeprecatedV1Zookie", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDeprecatedV1Zookie()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedZedTokenValidationError{ - field: "DeprecatedV1Zookie", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DecodedZedToken_V1: - if v == nil { - err := DecodedZedTokenValidationError{ - field: "VersionOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetV1()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedZedTokenValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedZedTokenValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedZedTokenValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DecodedZedTokenMultiError(errors) - } - - return nil -} - -// DecodedZedTokenMultiError is an error wrapping multiple validation errors -// returned by DecodedZedToken.ValidateAll() if the designated constraints -// aren't met. -type DecodedZedTokenMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZedTokenMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZedTokenMultiError) AllErrors() []error { return m } - -// DecodedZedTokenValidationError is the validation error returned by -// DecodedZedToken.Validate if the designated constraints aren't met. -type DecodedZedTokenValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZedTokenValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZedTokenValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZedTokenValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZedTokenValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZedTokenValidationError) ErrorName() string { return "DecodedZedTokenValidationError" } - -// Error satisfies the builtin error interface -func (e DecodedZedTokenValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZedToken.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZedTokenValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZedTokenValidationError{} - -// Validate checks the field values on DecodedCursor with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DecodedCursor) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedCursor with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DecodedCursorMultiError, or -// nil if none found. -func (m *DecodedCursor) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedCursor) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.VersionOneof.(type) { - case *DecodedCursor_V1: - if v == nil { - err := DecodedCursorValidationError{ - field: "VersionOneof", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetV1()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecodedCursorValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecodedCursorValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecodedCursorValidationError{ - field: "V1", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DecodedCursorMultiError(errors) - } - - return nil -} - -// DecodedCursorMultiError is an error wrapping multiple validation errors -// returned by DecodedCursor.ValidateAll() if the designated constraints -// aren't met. -type DecodedCursorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedCursorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedCursorMultiError) AllErrors() []error { return m } - -// DecodedCursorValidationError is the validation error returned by -// DecodedCursor.Validate if the designated constraints aren't met. -type DecodedCursorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedCursorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedCursorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedCursorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedCursorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedCursorValidationError) ErrorName() string { return "DecodedCursorValidationError" } - -// Error satisfies the builtin error interface -func (e DecodedCursorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedCursor.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedCursorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedCursorValidationError{} - -// Validate checks the field values on V1Cursor with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *V1Cursor) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on V1Cursor with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in V1CursorMultiError, or nil -// if none found. -func (m *V1Cursor) ValidateAll() error { - return m.validate(true) -} - -func (m *V1Cursor) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Revision - - // no validation rules for CallAndParametersHash - - // no validation rules for DispatchVersion - - // no validation rules for Flags - - // no validation rules for DatastoreUniqueId - - if len(errors) > 0 { - return V1CursorMultiError(errors) - } - - return nil -} - -// V1CursorMultiError is an error wrapping multiple validation errors returned -// by V1Cursor.ValidateAll() if the designated constraints aren't met. -type V1CursorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m V1CursorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m V1CursorMultiError) AllErrors() []error { return m } - -// V1CursorValidationError is the validation error returned by -// V1Cursor.Validate if the designated constraints aren't met. -type V1CursorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e V1CursorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e V1CursorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e V1CursorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e V1CursorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e V1CursorValidationError) ErrorName() string { return "V1CursorValidationError" } - -// Error satisfies the builtin error interface -func (e V1CursorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sV1Cursor.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = V1CursorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = V1CursorValidationError{} - -// Validate checks the field values on DocComment with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DocComment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DocComment with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DocCommentMultiError, or -// nil if none found. -func (m *DocComment) ValidateAll() error { - return m.validate(true) -} - -func (m *DocComment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Comment - - if len(errors) > 0 { - return DocCommentMultiError(errors) - } - - return nil -} - -// DocCommentMultiError is an error wrapping multiple validation errors -// returned by DocComment.ValidateAll() if the designated constraints aren't met. -type DocCommentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DocCommentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DocCommentMultiError) AllErrors() []error { return m } - -// DocCommentValidationError is the validation error returned by -// DocComment.Validate if the designated constraints aren't met. -type DocCommentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DocCommentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DocCommentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DocCommentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DocCommentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DocCommentValidationError) ErrorName() string { return "DocCommentValidationError" } - -// Error satisfies the builtin error interface -func (e DocCommentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDocComment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DocCommentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DocCommentValidationError{} - -// Validate checks the field values on TypeAnnotations with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *TypeAnnotations) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TypeAnnotations with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TypeAnnotationsMultiError, or nil if none found. -func (m *TypeAnnotations) ValidateAll() error { - return m.validate(true) -} - -func (m *TypeAnnotations) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return TypeAnnotationsMultiError(errors) - } - - return nil -} - -// TypeAnnotationsMultiError is an error wrapping multiple validation errors -// returned by TypeAnnotations.ValidateAll() if the designated constraints -// aren't met. -type TypeAnnotationsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TypeAnnotationsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TypeAnnotationsMultiError) AllErrors() []error { return m } - -// TypeAnnotationsValidationError is the validation error returned by -// TypeAnnotations.Validate if the designated constraints aren't met. -type TypeAnnotationsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypeAnnotationsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypeAnnotationsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypeAnnotationsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypeAnnotationsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypeAnnotationsValidationError) ErrorName() string { return "TypeAnnotationsValidationError" } - -// Error satisfies the builtin error interface -func (e TypeAnnotationsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypeAnnotations.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypeAnnotationsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypeAnnotationsValidationError{} - -// Validate checks the field values on RelationMetadata with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RelationMetadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RelationMetadata with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RelationMetadataMultiError, or nil if none found. -func (m *RelationMetadata) ValidateAll() error { - return m.validate(true) -} - -func (m *RelationMetadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Kind - - if all { - switch v := interface{}(m.GetTypeAnnotations()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RelationMetadataValidationError{ - field: "TypeAnnotations", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RelationMetadataValidationError{ - field: "TypeAnnotations", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypeAnnotations()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationMetadataValidationError{ - field: "TypeAnnotations", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RelationMetadataMultiError(errors) - } - - return nil -} - -// RelationMetadataMultiError is an error wrapping multiple validation errors -// returned by RelationMetadata.ValidateAll() if the designated constraints -// aren't met. -type RelationMetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RelationMetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RelationMetadataMultiError) AllErrors() []error { return m } - -// RelationMetadataValidationError is the validation error returned by -// RelationMetadata.Validate if the designated constraints aren't met. -type RelationMetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RelationMetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RelationMetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RelationMetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RelationMetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RelationMetadataValidationError) ErrorName() string { return "RelationMetadataValidationError" } - -// Error satisfies the builtin error interface -func (e RelationMetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRelationMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RelationMetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RelationMetadataValidationError{} - -// Validate checks the field values on NamespaceAndRevision with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NamespaceAndRevision) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NamespaceAndRevision with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NamespaceAndRevisionMultiError, or nil if none found. -func (m *NamespaceAndRevision) ValidateAll() error { - return m.validate(true) -} - -func (m *NamespaceAndRevision) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceName - - // no validation rules for Revision - - if len(errors) > 0 { - return NamespaceAndRevisionMultiError(errors) - } - - return nil -} - -// NamespaceAndRevisionMultiError is an error wrapping multiple validation -// errors returned by NamespaceAndRevision.ValidateAll() if the designated -// constraints aren't met. -type NamespaceAndRevisionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NamespaceAndRevisionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NamespaceAndRevisionMultiError) AllErrors() []error { return m } - -// NamespaceAndRevisionValidationError is the validation error returned by -// NamespaceAndRevision.Validate if the designated constraints aren't met. -type NamespaceAndRevisionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NamespaceAndRevisionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NamespaceAndRevisionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NamespaceAndRevisionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NamespaceAndRevisionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NamespaceAndRevisionValidationError) ErrorName() string { - return "NamespaceAndRevisionValidationError" -} - -// Error satisfies the builtin error interface -func (e NamespaceAndRevisionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNamespaceAndRevision.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NamespaceAndRevisionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NamespaceAndRevisionValidationError{} - -// Validate checks the field values on V1Alpha1Revision with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *V1Alpha1Revision) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on V1Alpha1Revision with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// V1Alpha1RevisionMultiError, or nil if none found. -func (m *V1Alpha1Revision) ValidateAll() error { - return m.validate(true) -} - -func (m *V1Alpha1Revision) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetNsRevisions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, V1Alpha1RevisionValidationError{ - field: fmt.Sprintf("NsRevisions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, V1Alpha1RevisionValidationError{ - field: fmt.Sprintf("NsRevisions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return V1Alpha1RevisionValidationError{ - field: fmt.Sprintf("NsRevisions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return V1Alpha1RevisionMultiError(errors) - } - - return nil -} - -// V1Alpha1RevisionMultiError is an error wrapping multiple validation errors -// returned by V1Alpha1Revision.ValidateAll() if the designated constraints -// aren't met. -type V1Alpha1RevisionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m V1Alpha1RevisionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m V1Alpha1RevisionMultiError) AllErrors() []error { return m } - -// V1Alpha1RevisionValidationError is the validation error returned by -// V1Alpha1Revision.Validate if the designated constraints aren't met. -type V1Alpha1RevisionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e V1Alpha1RevisionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e V1Alpha1RevisionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e V1Alpha1RevisionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e V1Alpha1RevisionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e V1Alpha1RevisionValidationError) ErrorName() string { return "V1Alpha1RevisionValidationError" } - -// Error satisfies the builtin error interface -func (e V1Alpha1RevisionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sV1Alpha1Revision.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = V1Alpha1RevisionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = V1Alpha1RevisionValidationError{} - -// Validate checks the field values on DecodedZookie_V1Zookie with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DecodedZookie_V1Zookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZookie_V1Zookie with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DecodedZookie_V1ZookieMultiError, or nil if none found. -func (m *DecodedZookie_V1Zookie) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZookie_V1Zookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Revision - - if len(errors) > 0 { - return DecodedZookie_V1ZookieMultiError(errors) - } - - return nil -} - -// DecodedZookie_V1ZookieMultiError is an error wrapping multiple validation -// errors returned by DecodedZookie_V1Zookie.ValidateAll() if the designated -// constraints aren't met. -type DecodedZookie_V1ZookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZookie_V1ZookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZookie_V1ZookieMultiError) AllErrors() []error { return m } - -// DecodedZookie_V1ZookieValidationError is the validation error returned by -// DecodedZookie_V1Zookie.Validate if the designated constraints aren't met. -type DecodedZookie_V1ZookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZookie_V1ZookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZookie_V1ZookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZookie_V1ZookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZookie_V1ZookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZookie_V1ZookieValidationError) ErrorName() string { - return "DecodedZookie_V1ZookieValidationError" -} - -// Error satisfies the builtin error interface -func (e DecodedZookie_V1ZookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZookie_V1Zookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZookie_V1ZookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZookie_V1ZookieValidationError{} - -// Validate checks the field values on DecodedZookie_V2Zookie with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DecodedZookie_V2Zookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZookie_V2Zookie with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DecodedZookie_V2ZookieMultiError, or nil if none found. -func (m *DecodedZookie_V2Zookie) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZookie_V2Zookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Revision - - if len(errors) > 0 { - return DecodedZookie_V2ZookieMultiError(errors) - } - - return nil -} - -// DecodedZookie_V2ZookieMultiError is an error wrapping multiple validation -// errors returned by DecodedZookie_V2Zookie.ValidateAll() if the designated -// constraints aren't met. -type DecodedZookie_V2ZookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZookie_V2ZookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZookie_V2ZookieMultiError) AllErrors() []error { return m } - -// DecodedZookie_V2ZookieValidationError is the validation error returned by -// DecodedZookie_V2Zookie.Validate if the designated constraints aren't met. -type DecodedZookie_V2ZookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZookie_V2ZookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZookie_V2ZookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZookie_V2ZookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZookie_V2ZookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZookie_V2ZookieValidationError) ErrorName() string { - return "DecodedZookie_V2ZookieValidationError" -} - -// Error satisfies the builtin error interface -func (e DecodedZookie_V2ZookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZookie_V2Zookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZookie_V2ZookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZookie_V2ZookieValidationError{} - -// Validate checks the field values on DecodedZedToken_V1Zookie with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DecodedZedToken_V1Zookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZedToken_V1Zookie with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DecodedZedToken_V1ZookieMultiError, or nil if none found. -func (m *DecodedZedToken_V1Zookie) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZedToken_V1Zookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Revision - - if len(errors) > 0 { - return DecodedZedToken_V1ZookieMultiError(errors) - } - - return nil -} - -// DecodedZedToken_V1ZookieMultiError is an error wrapping multiple validation -// errors returned by DecodedZedToken_V1Zookie.ValidateAll() if the designated -// constraints aren't met. -type DecodedZedToken_V1ZookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZedToken_V1ZookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZedToken_V1ZookieMultiError) AllErrors() []error { return m } - -// DecodedZedToken_V1ZookieValidationError is the validation error returned by -// DecodedZedToken_V1Zookie.Validate if the designated constraints aren't met. -type DecodedZedToken_V1ZookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZedToken_V1ZookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZedToken_V1ZookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZedToken_V1ZookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZedToken_V1ZookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZedToken_V1ZookieValidationError) ErrorName() string { - return "DecodedZedToken_V1ZookieValidationError" -} - -// Error satisfies the builtin error interface -func (e DecodedZedToken_V1ZookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZedToken_V1Zookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZedToken_V1ZookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZedToken_V1ZookieValidationError{} - -// Validate checks the field values on DecodedZedToken_V1ZedToken with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DecodedZedToken_V1ZedToken) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DecodedZedToken_V1ZedToken with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DecodedZedToken_V1ZedTokenMultiError, or nil if none found. -func (m *DecodedZedToken_V1ZedToken) ValidateAll() error { - return m.validate(true) -} - -func (m *DecodedZedToken_V1ZedToken) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Revision - - // no validation rules for DatastoreUniqueIdPrefix - - if len(errors) > 0 { - return DecodedZedToken_V1ZedTokenMultiError(errors) - } - - return nil -} - -// DecodedZedToken_V1ZedTokenMultiError is an error wrapping multiple -// validation errors returned by DecodedZedToken_V1ZedToken.ValidateAll() if -// the designated constraints aren't met. -type DecodedZedToken_V1ZedTokenMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecodedZedToken_V1ZedTokenMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecodedZedToken_V1ZedTokenMultiError) AllErrors() []error { return m } - -// DecodedZedToken_V1ZedTokenValidationError is the validation error returned -// by DecodedZedToken_V1ZedToken.Validate if the designated constraints aren't met. -type DecodedZedToken_V1ZedTokenValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecodedZedToken_V1ZedTokenValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecodedZedToken_V1ZedTokenValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecodedZedToken_V1ZedTokenValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecodedZedToken_V1ZedTokenValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecodedZedToken_V1ZedTokenValidationError) ErrorName() string { - return "DecodedZedToken_V1ZedTokenValidationError" -} - -// Error satisfies the builtin error interface -func (e DecodedZedToken_V1ZedTokenValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecodedZedToken_V1ZedToken.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecodedZedToken_V1ZedTokenValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecodedZedToken_V1ZedTokenValidationError{} diff --git a/pkg/proto/impl/v1/impl_vtproto.pb.go b/pkg/proto/impl/v1/impl_vtproto.pb.go index fc4bf80ba..d5323399c 100644 --- a/pkg/proto/impl/v1/impl_vtproto.pb.go +++ b/pkg/proto/impl/v1/impl_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240409071808-615f978279ca +// protoc-gen-go-vtproto version: v0.6.1-0.20240917153116-6f2963f01587 // source: impl/v1/impl.proto package implv1 diff --git a/pkg/proto/impl/v1/pgrevision.pb.go b/pkg/proto/impl/v1/pgrevision.pb.go index 71525dcf5..8044726ff 100644 --- a/pkg/proto/impl/v1/pgrevision.pb.go +++ b/pkg/proto/impl/v1/pgrevision.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: impl/v1/pgrevision.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -29,27 +30,24 @@ const ( // required for binary encoding using the protobuf varint datatype: // https://protobuf.dev/programming-guides/encoding/#varints type PostgresRevision struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Xmin uint64 `protobuf:"varint,1,opt,name=xmin,proto3" json:"xmin,omitempty"` - RelativeXmax int64 `protobuf:"varint,2,opt,name=relative_xmax,json=relativeXmax,proto3" json:"relative_xmax,omitempty"` - RelativeXips []int64 `protobuf:"varint,3,rep,packed,name=relative_xips,json=relativeXips,proto3" json:"relative_xips,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Xmin uint64 `protobuf:"varint,1,opt,name=xmin,proto3" json:"xmin,omitempty"` + RelativeXmax int64 `protobuf:"varint,2,opt,name=relative_xmax,json=relativeXmax,proto3" json:"relative_xmax,omitempty"` + RelativeXips []int64 `protobuf:"varint,3,rep,packed,name=relative_xips,json=relativeXips,proto3" json:"relative_xips,omitempty"` // these are optional fields that are only present in strategic places that // need the information, but otherwise is omitted to reduce the overhead // of loading it from the DB and keeping it around in memory OptionalTxid uint64 `protobuf:"varint,4,opt,name=optional_txid,json=optionalTxid,proto3" json:"optional_txid,omitempty"` OptionalTimestamp uint64 `protobuf:"varint,5,opt,name=optional_timestamp,json=optionalTimestamp,proto3" json:"optional_timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PostgresRevision) Reset() { *x = PostgresRevision{} - if protoimpl.UnsafeEnabled { - mi := &file_impl_v1_pgrevision_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_impl_v1_pgrevision_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresRevision) String() string { @@ -60,7 +58,7 @@ func (*PostgresRevision) ProtoMessage() {} func (x *PostgresRevision) ProtoReflect() protoreflect.Message { mi := &file_impl_v1_pgrevision_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,42 +110,25 @@ func (x *PostgresRevision) GetOptionalTimestamp() uint64 { var File_impl_v1_pgrevision_proto protoreflect.FileDescriptor -var file_impl_v1_pgrevision_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x69, 0x6d, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x67, 0x72, 0x65, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x69, 0x6d, 0x70, 0x6c, - 0x2e, 0x76, 0x31, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x6d, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x78, 0x6d, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x78, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x58, 0x6d, 0x61, - 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x78, 0x69, - 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x58, 0x69, 0x70, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x78, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x90, 0x01, 0x0a, 0x0b, 0x63, - 0x6f, 0x6d, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x50, 0x67, 0x72, 0x65, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, - 0x64, 0x2f, 0x73, 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6d, 0x70, 0x6c, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x49, 0x6d, 0x70, 0x6c, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x07, 0x49, 0x6d, 0x70, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x49, - 0x6d, 0x70, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x08, 0x49, 0x6d, 0x70, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_impl_v1_pgrevision_proto_rawDesc = "" + + "\n" + + "\x18impl/v1/pgrevision.proto\x12\aimpl.v1\"\xc4\x01\n" + + "\x10PostgresRevision\x12\x12\n" + + "\x04xmin\x18\x01 \x01(\x04R\x04xmin\x12#\n" + + "\rrelative_xmax\x18\x02 \x01(\x03R\frelativeXmax\x12#\n" + + "\rrelative_xips\x18\x03 \x03(\x03R\frelativeXips\x12#\n" + + "\roptional_txid\x18\x04 \x01(\x04R\foptionalTxid\x12-\n" + + "\x12optional_timestamp\x18\x05 \x01(\x04R\x11optionalTimestampB\x90\x01\n" + + "\vcom.impl.v1B\x0fPgrevisionProtoP\x01Z3github.com/authzed/spicedb/pkg/proto/impl/v1;implv1\xa2\x02\x03IXX\xaa\x02\aImpl.V1\xca\x02\aImpl\\V1\xe2\x02\x13Impl\\V1\\GPBMetadata\xea\x02\bImpl::V1b\x06proto3" var ( file_impl_v1_pgrevision_proto_rawDescOnce sync.Once - file_impl_v1_pgrevision_proto_rawDescData = file_impl_v1_pgrevision_proto_rawDesc + file_impl_v1_pgrevision_proto_rawDescData []byte ) func file_impl_v1_pgrevision_proto_rawDescGZIP() []byte { file_impl_v1_pgrevision_proto_rawDescOnce.Do(func() { - file_impl_v1_pgrevision_proto_rawDescData = protoimpl.X.CompressGZIP(file_impl_v1_pgrevision_proto_rawDescData) + file_impl_v1_pgrevision_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_impl_v1_pgrevision_proto_rawDesc), len(file_impl_v1_pgrevision_proto_rawDesc))) }) return file_impl_v1_pgrevision_proto_rawDescData } @@ -169,25 +150,11 @@ func file_impl_v1_pgrevision_proto_init() { if File_impl_v1_pgrevision_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_impl_v1_pgrevision_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PostgresRevision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_impl_v1_pgrevision_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_impl_v1_pgrevision_proto_rawDesc), len(file_impl_v1_pgrevision_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -198,7 +165,6 @@ func file_impl_v1_pgrevision_proto_init() { MessageInfos: file_impl_v1_pgrevision_proto_msgTypes, }.Build() File_impl_v1_pgrevision_proto = out.File - file_impl_v1_pgrevision_proto_rawDesc = nil file_impl_v1_pgrevision_proto_goTypes = nil file_impl_v1_pgrevision_proto_depIdxs = nil } diff --git a/pkg/proto/impl/v1/pgrevision.pb.validate.go b/pkg/proto/impl/v1/pgrevision.pb.validate.go deleted file mode 100644 index db12ba43c..000000000 --- a/pkg/proto/impl/v1/pgrevision.pb.validate.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: impl/v1/pgrevision.proto - -package implv1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on PostgresRevision with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PostgresRevision) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PostgresRevision with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PostgresRevisionMultiError, or nil if none found. -func (m *PostgresRevision) ValidateAll() error { - return m.validate(true) -} - -func (m *PostgresRevision) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Xmin - - // no validation rules for RelativeXmax - - // no validation rules for OptionalTxid - - // no validation rules for OptionalTimestamp - - if len(errors) > 0 { - return PostgresRevisionMultiError(errors) - } - - return nil -} - -// PostgresRevisionMultiError is an error wrapping multiple validation errors -// returned by PostgresRevision.ValidateAll() if the designated constraints -// aren't met. -type PostgresRevisionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PostgresRevisionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PostgresRevisionMultiError) AllErrors() []error { return m } - -// PostgresRevisionValidationError is the validation error returned by -// PostgresRevision.Validate if the designated constraints aren't met. -type PostgresRevisionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PostgresRevisionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PostgresRevisionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PostgresRevisionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PostgresRevisionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PostgresRevisionValidationError) ErrorName() string { return "PostgresRevisionValidationError" } - -// Error satisfies the builtin error interface -func (e PostgresRevisionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPostgresRevision.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PostgresRevisionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PostgresRevisionValidationError{} diff --git a/pkg/proto/impl/v1/pgrevision_vtproto.pb.go b/pkg/proto/impl/v1/pgrevision_vtproto.pb.go index c7a9dfff7..5c67cdb92 100644 --- a/pkg/proto/impl/v1/pgrevision_vtproto.pb.go +++ b/pkg/proto/impl/v1/pgrevision_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240409071808-615f978279ca +// protoc-gen-go-vtproto version: v0.6.1-0.20240917153116-6f2963f01587 // source: impl/v1/pgrevision.proto package implv1 diff --git a/pkg/schemadsl/compiler/compiler_test.go b/pkg/schemadsl/compiler/compiler_test.go index 2e419c427..05e7f22da 100644 --- a/pkg/schemadsl/compiler/compiler_test.go +++ b/pkg/schemadsl/compiler/compiler_test.go @@ -509,7 +509,7 @@ func TestCompile(t *testing.T) { "invalid definition name", nilPrefix, `definition someTenant/fo {}`, - "parse error in `invalid definition name`, line 1, column 1: error in object definition someTenant/fo: invalid NamespaceDefinition.Name: value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + "parse error in `invalid definition name`, line 1, column 1: error in object definition someTenant/fo: validation error:\n - name: value does not match regex pattern `^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$` [string.pattern]", []SchemaDefinition{}, }, { @@ -518,7 +518,7 @@ func TestCompile(t *testing.T) { `definition some_tenant/foos { relation ab: some_tenant/foos }`, - "parse error in `invalid relation name`, line 2, column 5: error in relation ab: invalid Relation.Name: value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + "parse error in `invalid relation name`, line 2, column 5: error in relation ab: validation error:\n - name: value does not match regex pattern `^[a-z][a-z0-9_]{1,62}[a-z0-9]$` [string.pattern]", []SchemaDefinition{}, }, { diff --git a/pkg/schemadsl/compiler/translator.go b/pkg/schemadsl/compiler/translator.go index df721078a..eb0bbcb38 100644 --- a/pkg/schemadsl/compiler/translator.go +++ b/pkg/schemadsl/compiler/translator.go @@ -6,6 +6,7 @@ import ( "slices" "strings" + "buf.build/go/protovalidate" "github.com/ccoveille/go-safecast" "github.com/jzelinskie/stringz" @@ -250,7 +251,7 @@ func translateObjectDefinition(tctx *translationContext, defNode *dslNode) (*cor ns.SourcePosition = getSourcePosition(defNode, tctx.mapper) if !tctx.skipValidate { - if err = ns.Validate(); err != nil { + if err = protovalidate.Validate(ns); err != nil { return nil, defNode.Errorf("error in object definition %s: %w", nspath, err) } } @@ -263,7 +264,7 @@ func translateObjectDefinition(tctx *translationContext, defNode *dslNode) (*cor ns.SourcePosition = getSourcePosition(defNode, tctx.mapper) if !tctx.skipValidate { - if err := ns.Validate(); err != nil { + if err := protovalidate.Validate(ns); err != nil { return nil, defNode.Errorf("error in object definition %s: %w", nspath, err) } } @@ -365,7 +366,7 @@ func translateRelation(tctx *translationContext, relationNode *dslNode) (*core.R } if !tctx.skipValidate { - if err := relation.Validate(); err != nil { + if err := protovalidate.Validate(relation); err != nil { return nil, relationNode.Errorf("error in relation %s: %w", relationName, err) } } @@ -414,7 +415,7 @@ func translatePermission(tctx *translationContext, permissionNode *dslNode) (*co } if !tctx.skipValidate { - if err := permission.Validate(); err != nil { + if err := protovalidate.Validate(permission); err != nil { return nil, permissionNode.Errorf("error in permission %s: %w", permissionName, err) } } @@ -684,7 +685,7 @@ func translateSpecificTypeReference(tctx *translationContext, typeRefNode *dslNo } if !tctx.skipValidate { - if err := ref.Validate(); err != nil { + if err := protovalidate.Validate(ref); err != nil { return nil, typeRefNode.Errorf("invalid type relation: %w", err) } } diff --git a/pkg/schemadsl/lexer/flaggablelexer_test.go b/pkg/schemadsl/lexer/flaggablelexer_test.go index 3ecc89bf1..892c62ac3 100644 --- a/pkg/schemadsl/lexer/flaggablelexer_test.go +++ b/pkg/schemadsl/lexer/flaggablelexer_test.go @@ -70,5 +70,5 @@ func performFlaggedLex(t *lexerTest) (tokens []Lexeme) { break } } - return + return tokens } diff --git a/pkg/schemadsl/lexer/lex_test.go b/pkg/schemadsl/lexer/lex_test.go index a223cc225..0a80d50fd 100644 --- a/pkg/schemadsl/lexer/lex_test.go +++ b/pkg/schemadsl/lexer/lex_test.go @@ -281,7 +281,7 @@ func performLex(t *lexerTest) (tokens []Lexeme) { break } } - return + return tokens } func equal(found, expected []Lexeme) bool { diff --git a/pkg/schemadsl/parser/nodestack.go b/pkg/schemadsl/parser/nodestack.go index 0d49e09b4..aa7adeeeb 100644 --- a/pkg/schemadsl/parser/nodestack.go +++ b/pkg/schemadsl/parser/nodestack.go @@ -29,7 +29,7 @@ func (s *nodeStack) pop() (value AstNode) { if s.size > 0 { value, s.top = s.top.value, s.top.next s.size-- - return + return value } return nil } diff --git a/pkg/spiceerrors/assert_off.go b/pkg/spiceerrors/assert_off.go index 96e9b8d76..3861f5a71 100644 --- a/pkg/spiceerrors/assert_off.go +++ b/pkg/spiceerrors/assert_off.go @@ -6,12 +6,12 @@ package spiceerrors const DebugAssertionsEnabled = false // DebugAssert is a no-op in non-CI builds -func DebugAssert(condition func() bool, format string, args ...any) { +func DebugAssertf(condition func() bool, format string, args ...any) { // Do nothing on purpose } // DebugAssertNotNil is a no-op in non-CI builds -func DebugAssertNotNil(obj any, format string, args ...any) { +func DebugAssertNotNilf(obj any, format string, args ...any) { // Do nothing on purpose } diff --git a/pkg/spiceerrors/assert_on.go b/pkg/spiceerrors/assert_on.go index 8ba98749a..b9c558e70 100644 --- a/pkg/spiceerrors/assert_on.go +++ b/pkg/spiceerrors/assert_on.go @@ -11,14 +11,14 @@ import ( const DebugAssertionsEnabled = true // DebugAssert panics if the condition is false in CI builds. -func DebugAssert(condition func() bool, format string, args ...any) { +func DebugAssertf(condition func() bool, format string, args ...any) { if !condition() { panic(fmt.Sprintf(format, args...)) } } // DebugAssertNotNil panics if the object is nil in CI builds. -func DebugAssertNotNil(obj any, format string, args ...any) { +func DebugAssertNotNilf(obj any, format string, args ...any) { if obj == nil { panic(fmt.Sprintf(format, args...)) } diff --git a/pkg/spiceerrors/bug.go b/pkg/spiceerrors/bug.go index 7680c33e9..6de5593d3 100644 --- a/pkg/spiceerrors/bug.go +++ b/pkg/spiceerrors/bug.go @@ -20,7 +20,7 @@ func IsInTests() bool { } // MustPanic is a special function for panicing when necessary to violate the linter. -func MustPanic(format string, args ...any) { +func MustPanicf(format string, args ...any) { panic(fmt.Sprintf(format, args...)) } diff --git a/pkg/tuple/core.go b/pkg/tuple/core.go index d71a01600..b3a4c829c 100644 --- a/pkg/tuple/core.go +++ b/pkg/tuple/core.go @@ -3,13 +3,15 @@ package tuple import ( "time" + "buf.build/go/protovalidate" + core "github.com/authzed/spicedb/pkg/proto/core/v1" "github.com/authzed/spicedb/pkg/spiceerrors" ) // ONRStringToCore creates an ONR from string pieces. func ONRStringToCore(ns, oid, rel string) *core.ObjectAndRelation { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return ns != "" && oid != "" && rel != "" }, "namespace, object ID, and relation must not be empty") @@ -41,7 +43,7 @@ func MustCoreRelationToString(rel *core.RelationTuple) string { // RRStringToCore creates a RelationReference from the string pieces. func RRStringToCore(namespaceName string, relationName string) *core.RelationReference { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return namespaceName != "" && relationName != "" }, "namespace and relation must not be empty") @@ -53,8 +55,8 @@ func RRStringToCore(namespaceName string, relationName string) *core.RelationRef // FromCoreRelationTuple creates a Relationship from a core.RelationTuple. func FromCoreRelationTuple(rt *core.RelationTuple) Relationship { - spiceerrors.DebugAssert(func() bool { - return rt.Validate() == nil + spiceerrors.DebugAssertf(func() bool { + return protovalidate.Validate(rt) == nil }, "relation tuple must be valid") var expiration *time.Time @@ -83,8 +85,8 @@ func FromCoreRelationTuple(rt *core.RelationTuple) Relationship { // FromCoreObjectAndRelation creates an ObjectAndRelation from a core.ObjectAndRelation. func FromCoreObjectAndRelation(oar *core.ObjectAndRelation) ObjectAndRelation { - spiceerrors.DebugAssert(func() bool { - return oar.Validate() == nil + spiceerrors.DebugAssertf(func() bool { + return protovalidate.Validate(oar) == nil }, "object and relation must be valid") return ObjectAndRelation{ @@ -96,7 +98,7 @@ func FromCoreObjectAndRelation(oar *core.ObjectAndRelation) ObjectAndRelation { // CoreONR creates a core ObjectAndRelation from the string pieces. func CoreONR(namespace, objectID, relation string) *core.ObjectAndRelation { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return namespace != "" && objectID != "" && relation != "" }, "namespace, object ID, and relation must not be empty") @@ -109,7 +111,7 @@ func CoreONR(namespace, objectID, relation string) *core.ObjectAndRelation { // CoreRR creates a core RelationReference from the string pieces. func CoreRR(namespace, relation string) *core.RelationReference { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return namespace != "" && relation != "" }, "namespace and relation must not be empty") @@ -121,8 +123,8 @@ func CoreRR(namespace, relation string) *core.RelationReference { // FromCoreRelationReference creates a RelationReference from a core.RelationReference. func FromCoreRelationReference(rr *core.RelationReference) RelationReference { - spiceerrors.DebugAssert(func() bool { - return rr.Validate() == nil + spiceerrors.DebugAssertf(func() bool { + return protovalidate.Validate(rr) == nil }, "relation reference must be valid") return RelationReference{ diff --git a/pkg/tuple/hashing.go b/pkg/tuple/hashing.go index 5b43671f6..7774d0089 100644 --- a/pkg/tuple/hashing.go +++ b/pkg/tuple/hashing.go @@ -14,7 +14,7 @@ import ( // CanonicalBytes converts a tuple to a canonical set of bytes. // Can be used for hashing purposes. func CanonicalBytes(rel Relationship) ([]byte, error) { - spiceerrors.DebugAssert(rel.ValidateNotEmpty, "relationship must not be empty") + spiceerrors.DebugAssertf(rel.ValidateNotEmpty, "relationship must not be empty") var sb bytes.Buffer sb.WriteString(rel.Resource.ObjectType) diff --git a/pkg/tuple/strings.go b/pkg/tuple/strings.go index 7b5a378a5..352dc819c 100644 --- a/pkg/tuple/strings.go +++ b/pkg/tuple/strings.go @@ -26,7 +26,7 @@ func MustSplitRelRef(relRef string) (namespace, relation string) { if !ok { panic("improperly formatted relation reference") } - return + return namespace, relation } // StringRR converts a RR object to a string. @@ -86,7 +86,7 @@ func MustString(rel Relationship) string { // String converts a relationship to a string. func String(rel Relationship) (string, error) { - spiceerrors.DebugAssert(rel.ValidateNotEmpty, "relationship must not be empty") + spiceerrors.DebugAssertf(rel.ValidateNotEmpty, "relationship must not be empty") caveatString, err := StringCaveat(rel.OptionalCaveat) if err != nil { @@ -111,7 +111,7 @@ func StringExpiration(expiration *time.Time) (string, error) { // StringWithoutCaveatOrExpiration converts a relationship to a string, without its caveat or expiration included. func StringWithoutCaveatOrExpiration(rel Relationship) string { - spiceerrors.DebugAssert(rel.ValidateNotEmpty, "relationship must not be empty") + spiceerrors.DebugAssertf(rel.ValidateNotEmpty, "relationship must not be empty") return StringONR(rel.Resource) + "@" + StringONR(rel.Subject) } diff --git a/pkg/tuple/structs.go b/pkg/tuple/structs.go index 839177845..ac0176e3a 100644 --- a/pkg/tuple/structs.go +++ b/pkg/tuple/structs.go @@ -193,7 +193,7 @@ func (rr RelationReference) String() string { // ONR creates an ObjectAndRelation. func ONR(namespace, objectID, relation string) ObjectAndRelation { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return namespace != "" && objectID != "" && relation != "" }, "invalid ONR: %s %s %s", namespace, objectID, relation) @@ -212,7 +212,7 @@ func ONRRef(namespace, objectID, relation string) *ObjectAndRelation { // RR creates a RelationReference. func RR(namespace, relation string) RelationReference { - spiceerrors.DebugAssert(func() bool { + spiceerrors.DebugAssertf(func() bool { return namespace != "" && relation != "" }, "invalid RR: %s %s", namespace, relation) diff --git a/proto/internal/buf.lock b/proto/internal/buf.lock deleted file mode 100644 index 10b256a07..000000000 --- a/proto/internal/buf.lock +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: authzed - repository: api - commit: 53f3e981ed3346bab8c050c597f74602 - - remote: buf.build - owner: envoyproxy - repository: protoc-gen-validate - commit: bb405eae115246f0b5ccf8997136e3d8 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 62f35d8aed1149c291d606d958a7ce32 - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - commit: bc28b723cd774c32b6fbc77621518765 diff --git a/proto/internal/core/v1/core.proto b/proto/internal/core/v1/core.proto index a393eed14..77fe4c040 100644 --- a/proto/internal/core/v1/core.proto +++ b/proto/internal/core/v1/core.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package core.v1; +import "buf/validate/validate.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; -import "validate/validate.proto"; option go_package = "github.com/authzed/spicedb/pkg/proto/core/v1"; message RelationTuple { /** resource_and_relation is the resource for the tuple */ - ObjectAndRelation resource_and_relation = 1 [(validate.rules).message.required = true]; + ObjectAndRelation resource_and_relation = 1 [(buf.validate.field).required = true]; /** subject is the subject for the tuple */ - ObjectAndRelation subject = 2 [(validate.rules).message.required = true]; + ObjectAndRelation subject = 2 [(buf.validate.field).required = true]; /** caveat is a reference to a the caveat that must be enforced over the tuple **/ - ContextualizedCaveat caveat = 3 [(validate.rules).message.required = false]; + ContextualizedCaveat caveat = 3 [(buf.validate.field).required = false]; /** integrity holds (optional) information about the integrity of the tuple */ - RelationshipIntegrity integrity = 4 [(validate.rules).message.required = false]; + RelationshipIntegrity integrity = 4 [(buf.validate.field).required = false]; /** optional_expiration_time is the (optional) time at which the tuple expires */ google.protobuf.Timestamp optional_expiration_time = 5; @@ -42,30 +42,30 @@ message RelationshipIntegrity { */ message ContextualizedCaveat { /** caveat_name is the name used in the schema for a stored caveat **/ - string caveat_name = 1 [(validate.rules).string = { + string caveat_name = 1 [(buf.validate.field).string = { pattern: "^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$" max_bytes: 128 }]; /** context are arguments used as input during caveat evaluation with a predefined value **/ - google.protobuf.Struct context = 2 [(validate.rules).message.required = false]; + google.protobuf.Struct context = 2 [(buf.validate.field).required = false]; } message CaveatDefinition { /** name represents the globally-unique identifier of the caveat **/ - string name = 1 [(validate.rules).string = { + string name = 1 [(buf.validate.field).string = { pattern: "^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$" max_bytes: 128 }]; /** serialized_expression is the byte representation of a caveat's logic */ - bytes serialized_expression = 2 [(validate.rules).bytes = { + bytes serialized_expression = 2 [(buf.validate.field).bytes = { min_len: 0 max_len: 4096 }]; /** parameters_and_types is a map from parameter name to its type */ - map parameter_types = 3 [(validate.rules).map = { + map parameter_types = 3 [(buf.validate.field).map = { min_pairs: 1 max_pairs: 20 }]; @@ -79,7 +79,7 @@ message CaveatDefinition { message CaveatTypeReference { string type_name = 1; - repeated CaveatTypeReference child_types = 2 [(validate.rules).repeated = { + repeated CaveatTypeReference child_types = 2 [(buf.validate.field).repeated = { min_items: 0 max_items: 1 }]; @@ -87,19 +87,19 @@ message CaveatTypeReference { message ObjectAndRelation { /** namespace is the full namespace path for the referenced object */ - string namespace = 1 [(validate.rules).string = { + string namespace = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 128 }]; /** object_id is the unique ID for the object within the namespace */ - string object_id = 2 [(validate.rules).string = { + string object_id = 2 [(buf.validate.field).string = { pattern: "^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$" max_bytes: 1024 }]; /** relation is the name of the referenced relation or permission under the namespace */ - string relation = 3 [(validate.rules).string = { + string relation = 3 [(buf.validate.field).string = { pattern: "^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$" max_bytes: 64 }]; @@ -107,20 +107,20 @@ message ObjectAndRelation { message RelationReference { /** namespace is the full namespace path */ - string namespace = 1 [(validate.rules).string = { + string namespace = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 128 }]; /** relation is the name of the referenced relation or permission under the namespace */ - string relation = 3 [(validate.rules).string = { + string relation = 3 [(buf.validate.field).string = { pattern: "^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$" max_bytes: 64 }]; } message Zookie { - string token = 1 [(validate.rules).string = {min_bytes: 1}]; + string token = 1 [(buf.validate.field).string = {min_bytes: 1}]; } message RelationTupleUpdate { @@ -130,8 +130,8 @@ message RelationTupleUpdate { TOUCH = 2; DELETE = 3; } - Operation operation = 1 [(validate.rules).enum.defined_only = true]; - RelationTuple tuple = 2 [(validate.rules).message.required = true]; + Operation operation = 1 [(buf.validate.field).enum.defined_only = true]; + RelationTuple tuple = 2 [(buf.validate.field).required = true]; } message RelationTupleTreeNode { @@ -170,19 +170,15 @@ message DirectSubjects { */ message Metadata { repeated google.protobuf.Any metadata_message = 1 [ - (validate.rules).repeated.min_items = 1, - (validate.rules).repeated.items.message.required = true, - - // NOTE: This is generating code without the associated map, which we added in manually - // until it is fixed upstream. - // See: https://github.com/envoyproxy/protoc-gen-validate/issues/481 - (validate.rules).repeated.items.any = { + (buf.validate.field).repeated.min_items = 1, + (buf.validate.field).repeated.items.required = true, + (buf.validate.field).repeated.items.any = { in: [ "type.googleapis.com/impl.v1.DocComment", "type.googleapis.com/impl.v1.RelationMetadata" ] - required: true - } + }, + (buf.validate.field).required = true ]; } @@ -191,7 +187,7 @@ message Metadata { */ message NamespaceDefinition { /** name is the unique for the namespace, including prefixes (which are optional) */ - string name = 1 [(validate.rules).string = { + string name = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 128 }]; @@ -211,7 +207,7 @@ message NamespaceDefinition { */ message Relation { /** name is the full name for the relation or permission */ - string name = 1 [(validate.rules).string = { + string name = 1 [(buf.validate.field).string = { pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 64 }]; @@ -392,7 +388,7 @@ message AllowedRelation { message PublicWildcard {} /** namespace is the full namespace path of the allowed object type */ - string namespace = 1 [(validate.rules).string = { + string namespace = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 128 }]; @@ -401,7 +397,7 @@ message AllowedRelation { * relation_or_wildcard indicates the relation for the objects, or a wildcard. */ oneof relation_or_wildcard { - string relation = 3 [(validate.rules).string = { + string relation = 3 [(buf.validate.field).string = { pattern: "^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$" max_bytes: 64 }]; @@ -439,11 +435,11 @@ message AllowedCaveat { message UsersetRewrite { oneof rewrite_operation { - option (validate.required) = true; + option (buf.validate.oneof).required = true; - SetOperation union = 1 [(validate.rules).message.required = true]; - SetOperation intersection = 2 [(validate.rules).message.required = true]; - SetOperation exclusion = 3 [(validate.rules).message.required = true]; + SetOperation union = 1; + SetOperation intersection = 2; + SetOperation exclusion = 3; } SourcePosition source_position = 4; @@ -455,13 +451,13 @@ message SetOperation { message Nil {} oneof child_type { - option (validate.required) = true; + option (buf.validate.oneof).required = true; This _this = 1; - ComputedUserset computed_userset = 2 [(validate.rules).message.required = true]; - TupleToUserset tuple_to_userset = 3 [(validate.rules).message.required = true]; - UsersetRewrite userset_rewrite = 4 [(validate.rules).message.required = true]; - FunctionedTupleToUserset functioned_tuple_to_userset = 8 [(validate.rules).message.required = true]; + ComputedUserset computed_userset = 2; + TupleToUserset tuple_to_userset = 3; + UsersetRewrite userset_rewrite = 4; + FunctionedTupleToUserset functioned_tuple_to_userset = 8; Nil _nil = 6; } @@ -477,21 +473,21 @@ message SetOperation { } repeated Child child = 1 [ - (validate.rules).repeated.min_items = 1, - (validate.rules).repeated.items.message.required = true + (buf.validate.field).repeated.min_items = 1, + (buf.validate.field).repeated.items.required = true ]; } message TupleToUserset { message Tupleset { - string relation = 1 [(validate.rules).string = { + string relation = 1 [(buf.validate.field).string = { pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 64 }]; } - Tupleset tupleset = 1 [(validate.rules).message.required = true]; - ComputedUserset computed_userset = 2 [(validate.rules).message.required = true]; + Tupleset tupleset = 1 [(buf.validate.field).required = true]; + ComputedUserset computed_userset = 2 [(buf.validate.field).required = true]; SourcePosition source_position = 3; } @@ -503,18 +499,18 @@ message FunctionedTupleToUserset { } message Tupleset { - string relation = 1 [(validate.rules).string = { + string relation = 1 [(buf.validate.field).string = { pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 64 }]; } - Function function = 1 [(validate.rules).enum = { + Function function = 1 [(buf.validate.field).enum = { defined_only: true not_in: [0] }]; - Tupleset tupleset = 2 [(validate.rules).message.required = true]; - ComputedUserset computed_userset = 3 [(validate.rules).message.required = true]; + Tupleset tupleset = 2 [(buf.validate.field).required = true]; + ComputedUserset computed_userset = 3 [(buf.validate.field).required = true]; SourcePosition source_position = 4; } @@ -524,8 +520,8 @@ message ComputedUserset { TUPLE_USERSET_OBJECT = 1; } - Object object = 1 [(validate.rules).enum.defined_only = true]; - string relation = 2 [(validate.rules).string = { + Object object = 1 [(buf.validate.field).enum.defined_only = true]; + string relation = 2 [(buf.validate.field).string = { pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 64 }]; @@ -559,27 +555,27 @@ message CaveatOperation { message RelationshipFilter { // resource_type is the *optional* resource type of the relationship. // NOTE: It is not prefixed with "optional_" for legacy compatibility. - string resource_type = 1 [(validate.rules).string = { + string resource_type = 1 [(buf.validate.field).string = { pattern: "^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$" max_bytes: 128 }]; // optional_resource_id is the *optional* resource ID of the relationship. // If specified, optional_resource_id_prefix cannot be specified. - string optional_resource_id = 2 [(validate.rules).string = { + string optional_resource_id = 2 [(buf.validate.field).string = { pattern: "^([a-zA-Z0-9/_|\\-=+]{1,})?$" max_bytes: 1024 }]; // optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship. // If specified, optional_resource_id cannot be specified. - string optional_resource_id_prefix = 5 [(validate.rules).string = { + string optional_resource_id_prefix = 5 [(buf.validate.field).string = { pattern: "^([a-zA-Z0-9/_|\\-=+]{1,})?$" max_bytes: 1024 }]; // relation is the *optional* relation of the relationship. - string optional_relation = 3 [(validate.rules).string = { + string optional_relation = 3 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$" max_bytes: 64 }]; @@ -594,18 +590,18 @@ message RelationshipFilter { // impose any additional requirements if left unspecified. message SubjectFilter { message RelationFilter { - string relation = 1 [(validate.rules).string = { + string relation = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$" max_bytes: 64 }]; } - string subject_type = 1 [(validate.rules).string = { + string subject_type = 1 [(buf.validate.field).string = { pattern: "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$" max_bytes: 128 }]; - string optional_subject_id = 2 [(validate.rules).string = { + string optional_subject_id = 2 [(buf.validate.field).string = { pattern: "^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$" max_bytes: 1024 }]; diff --git a/proto/internal/developer/v1/developer.proto b/proto/internal/developer/v1/developer.proto index c0f856765..98011571f 100644 --- a/proto/internal/developer/v1/developer.proto +++ b/proto/internal/developer/v1/developer.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package developer.v1; import "authzed/api/v1/debug.proto"; +import "buf/validate/validate.proto"; import "core/v1/core.proto"; import "dispatch/v1/dispatch.proto"; import "google/protobuf/struct.proto"; -import "validate/validate.proto"; option go_package = "github.com/authzed/spicedb/pkg/proto/developer/v1"; @@ -144,7 +144,7 @@ message CheckOperationParameters { core.v1.ObjectAndRelation subject = 2; /** caveat_context consists of any named values that are defined at write time for the caveat expression **/ - google.protobuf.Struct caveat_context = 3 [(validate.rules).message.required = false]; + google.protobuf.Struct caveat_context = 3 [(buf.validate.field).required = false]; } // CheckOperationsResult is the result for a `check` operation. @@ -176,7 +176,7 @@ message CheckOperationsResult { message PartialCaveatInfo { // missing_required_context is a list of one or more fields that were missing and prevented caveats // from being fully evaluated - repeated string missing_required_context = 1 [(validate.rules).repeated.min_items = 1]; + repeated string missing_required_context = 1 [(buf.validate.field).repeated.min_items = 1]; } // RunAssertionsParameters are the parameters for a `runAssertions` operation. diff --git a/proto/internal/dispatch/v1/dispatch.proto b/proto/internal/dispatch/v1/dispatch.proto index 16e2a6c29..57f6961b1 100644 --- a/proto/internal/dispatch/v1/dispatch.proto +++ b/proto/internal/dispatch/v1/dispatch.proto @@ -1,10 +1,10 @@ syntax = "proto3"; package dispatch.v1; +import "buf/validate/validate.proto"; import "core/v1/core.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; -import "validate/validate.proto"; option go_package = "github.com/authzed/spicedb/pkg/proto/dispatch/v1"; @@ -29,12 +29,12 @@ message DispatchCheckRequest { ALLOW_SINGLE_RESULT = 1; } - ResolverMeta metadata = 1 [(validate.rules).message.required = true]; + ResolverMeta metadata = 1 [(buf.validate.field).required = true]; - core.v1.RelationReference resource_relation = 2 [(validate.rules).message.required = true]; + core.v1.RelationReference resource_relation = 2 [(buf.validate.field).required = true]; repeated string resource_ids = 3; - core.v1.ObjectAndRelation subject = 4 [(validate.rules).message.required = true]; + core.v1.ObjectAndRelation subject = 4 [(buf.validate.field).required = true]; ResultsSetting results_setting = 5; @@ -81,9 +81,9 @@ message DispatchExpandRequest { RECURSIVE = 1; } - ResolverMeta metadata = 1 [(validate.rules).message.required = true]; + ResolverMeta metadata = 1 [(buf.validate.field).required = true]; - core.v1.ObjectAndRelation resource_and_relation = 2 [(validate.rules).message.required = true]; + core.v1.ObjectAndRelation resource_and_relation = 2 [(buf.validate.field).required = true]; ExpansionMode expansion_mode = 3; } @@ -99,13 +99,13 @@ message Cursor { } message DispatchLookupResources2Request { - ResolverMeta metadata = 1 [(validate.rules).message.required = true]; + ResolverMeta metadata = 1 [(buf.validate.field).required = true]; - core.v1.RelationReference resource_relation = 2 [(validate.rules).message.required = true]; - core.v1.RelationReference subject_relation = 3 [(validate.rules).message.required = true]; + core.v1.RelationReference resource_relation = 2 [(buf.validate.field).required = true]; + core.v1.RelationReference subject_relation = 3 [(buf.validate.field).required = true]; repeated string subject_ids = 4; - core.v1.ObjectAndRelation terminal_subject = 5 [(validate.rules).message.required = true]; + core.v1.ObjectAndRelation terminal_subject = 5 [(buf.validate.field).required = true]; google.protobuf.Struct context = 6; Cursor optional_cursor = 7; @@ -125,13 +125,13 @@ message DispatchLookupResources2Response { } message DispatchLookupResources3Request { - ResolverMeta metadata = 1 [(validate.rules).message.required = true]; + ResolverMeta metadata = 1 [(buf.validate.field).required = true]; - core.v1.RelationReference resource_relation = 2 [(validate.rules).message.required = true]; - core.v1.RelationReference subject_relation = 3 [(validate.rules).message.required = true]; + core.v1.RelationReference resource_relation = 2 [(buf.validate.field).required = true]; + core.v1.RelationReference subject_relation = 3 [(buf.validate.field).required = true]; repeated string subject_ids = 4; - core.v1.ObjectAndRelation terminal_subject = 5 [(validate.rules).message.required = true]; + core.v1.ObjectAndRelation terminal_subject = 5 [(buf.validate.field).required = true]; google.protobuf.Struct context = 6; repeated string optional_cursor = 7; @@ -150,12 +150,12 @@ message LR3Item { } message DispatchLookupSubjectsRequest { - ResolverMeta metadata = 1 [(validate.rules).message.required = true]; + ResolverMeta metadata = 1 [(buf.validate.field).required = true]; - core.v1.RelationReference resource_relation = 2 [(validate.rules).message.required = true]; + core.v1.RelationReference resource_relation = 2 [(buf.validate.field).required = true]; repeated string resource_ids = 3; - core.v1.RelationReference subject_relation = 4 [(validate.rules).message.required = true]; + core.v1.RelationReference subject_relation = 4 [(buf.validate.field).required = true]; } message FoundSubject { @@ -175,9 +175,9 @@ message DispatchLookupSubjectsResponse { message ResolverMeta { string at_revision = 1; - uint32 depth_remaining = 2 [(validate.rules).uint32.gt = 0]; + uint32 depth_remaining = 2 [(buf.validate.field).uint32.gt = 0]; string request_id = 3 [deprecated = true]; - bytes traversal_bloom = 4 [(validate.rules).bytes = {max_len: 1024}]; + bytes traversal_bloom = 4 [(buf.validate.field).bytes = {max_len: 1024}]; } message ResponseMeta { diff --git a/tools/analyzers/cmd/analyzers/main.go b/tools/analyzers/cmd/analyzers/main.go index 60136002e..ba8bfa220 100644 --- a/tools/analyzers/cmd/analyzers/main.go +++ b/tools/analyzers/cmd/analyzers/main.go @@ -1,6 +1,8 @@ package main import ( + "golang.org/x/tools/go/analysis/multichecker" + "github.com/authzed/spicedb/tools/analyzers/closeafterusagecheck" "github.com/authzed/spicedb/tools/analyzers/exprstatementcheck" "github.com/authzed/spicedb/tools/analyzers/iferrafterrowclosecheck" @@ -11,7 +13,6 @@ import ( "github.com/authzed/spicedb/tools/analyzers/protomarshalcheck" "github.com/authzed/spicedb/tools/analyzers/telemetryconvcheck" "github.com/authzed/spicedb/tools/analyzers/zerologmarshalcheck" - "golang.org/x/tools/go/analysis/multichecker" ) func main() { diff --git a/tools/analyzers/mutexcheck/mutexcheck.go b/tools/analyzers/mutexcheck/mutexcheck.go index 052b718ae..c9a18036f 100644 --- a/tools/analyzers/mutexcheck/mutexcheck.go +++ b/tools/analyzers/mutexcheck/mutexcheck.go @@ -9,7 +9,6 @@ import ( "strings" "github.com/samber/lo" - "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" "golang.org/x/tools/go/ast/inspector"