From 24dd182f2fce28da10ff62e07e1e3f01ec26c7da Mon Sep 17 00:00:00 2001 From: Amir Hasanbasic <43892661+hamir-suspect@users.noreply.github.com> Date: Wed, 29 Oct 2025 13:48:14 +0100 Subject: [PATCH 1/5] feat(mcp): initial bootstrap (#665) Co-authored-by: Damjan Becirovic --- .semaphore/semaphore.yml | 71 + .semaphore/services.json | 6 + mcp_server/.air.dev.toml | 12 + mcp_server/AGENTS.md | 19 + mcp_server/Dockerfile | 41 + mcp_server/Makefile | 47 + mcp_server/README.md | 95 + mcp_server/cmd/mcp_server/main.go | 304 + mcp_server/go.mod | 29 + mcp_server/go.sum | 78 + .../pkg/internal_api/loghub/loghub.pb.go | 296 + .../pkg/internal_api/loghub/loghub_grpc.pb.go | 119 + .../pkg/internal_api/loghub2/loghub2.pb.go | 278 + .../internal_api/loghub2/loghub2_grpc.pb.go | 119 + .../organization/organization.pb.go | 4852 +++++++++++ .../organization/organization_grpc.pb.go | 1152 +++ .../plumber.pipeline/plumber.pipeline.pb.go | 7434 +++++++++++++++++ .../plumber.pipeline_grpc.pb.go | 849 ++ .../plumber_w_f.workflow.pb.go | 4048 +++++++++ .../plumber_w_f.workflow_grpc.pb.go | 693 ++ .../internal_api/projecthub/projecthub.pb.go | 5703 +++++++++++++ .../projecthub/projecthub_grpc.pb.go | 807 ++ mcp_server/pkg/internal_api/rbac/rbac.pb.go | 2941 +++++++ .../pkg/internal_api/rbac/rbac_grpc.pb.go | 737 ++ .../repository_integrator.pb.go | 1168 +++ .../repository_integrator_grpc.pb.go | 348 + .../response_status/response_status.pb.go | 208 + .../server_farm.job/server_farm.job.pb.go | 3418 ++++++++ .../server_farm.job_grpc.pb.go | 553 ++ .../pkg/internal_api/status/status.pb.go | 156 + mcp_server/pkg/internal_api/user/user.pb.go | 3402 ++++++++ .../pkg/internal_api/user/user_grpc.pb.go | 797 ++ mcp_server/pkg/internalapi/config.go | 161 + mcp_server/pkg/internalapi/manager.go | 236 + mcp_server/pkg/internalapi/mock.go | 56 + mcp_server/pkg/internalapi/stubs/stubs.go | 312 + mcp_server/pkg/logging/logging.go | 61 + .../pkg/tools/internal/shared/markdown.go | 132 + .../pkg/tools/internal/shared/numeric.go | 14 + .../pkg/tools/internal/shared/shared.go | 63 + .../pkg/tools/internal/shared/truncate.go | 45 + .../pkg/tools/internal/shared/validation.go | 53 + mcp_server/pkg/tools/jobs/describe.go | 123 + mcp_server/pkg/tools/jobs/helpers.go | 258 + mcp_server/pkg/tools/jobs/jobs_test.go | 241 + mcp_server/pkg/tools/jobs/logs.go | 337 + mcp_server/pkg/tools/jobs/register.go | 16 + .../pkg/tools/organizations/organizations.go | 559 ++ .../tools/organizations/organizations_test.go | 225 + mcp_server/pkg/tools/pipelines/pipelines.go | 732 ++ .../pkg/tools/pipelines/pipelines_test.go | 229 + mcp_server/pkg/tools/projects/projects.go | 983 +++ .../pkg/tools/projects/projects.go.backup | 577 ++ .../pkg/tools/projects/projects_test.go | 227 + mcp_server/pkg/tools/workflows/workflows.go | 435 + .../pkg/tools/workflows/workflows_test.go | 236 + mcp_server/script/internal_api/gen.sh | 174 + 57 files changed, 47265 insertions(+) create mode 100644 mcp_server/.air.dev.toml create mode 100644 mcp_server/AGENTS.md create mode 100644 mcp_server/Dockerfile create mode 100644 mcp_server/Makefile create mode 100644 mcp_server/README.md create mode 100644 mcp_server/cmd/mcp_server/main.go create mode 100644 mcp_server/go.mod create mode 100644 mcp_server/go.sum create mode 100644 mcp_server/pkg/internal_api/loghub/loghub.pb.go create mode 100644 mcp_server/pkg/internal_api/loghub/loghub_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/loghub2/loghub2.pb.go create mode 100644 mcp_server/pkg/internal_api/loghub2/loghub2_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/organization/organization.pb.go create mode 100644 mcp_server/pkg/internal_api/organization/organization_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline.pb.go create mode 100644 mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow.pb.go create mode 100644 mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/projecthub/projecthub.pb.go create mode 100644 mcp_server/pkg/internal_api/projecthub/projecthub_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/rbac/rbac.pb.go create mode 100644 mcp_server/pkg/internal_api/rbac/rbac_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/repository_integrator/repository_integrator.pb.go create mode 100644 mcp_server/pkg/internal_api/repository_integrator/repository_integrator_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/response_status/response_status.pb.go create mode 100644 mcp_server/pkg/internal_api/server_farm.job/server_farm.job.pb.go create mode 100644 mcp_server/pkg/internal_api/server_farm.job/server_farm.job_grpc.pb.go create mode 100644 mcp_server/pkg/internal_api/status/status.pb.go create mode 100644 mcp_server/pkg/internal_api/user/user.pb.go create mode 100644 mcp_server/pkg/internal_api/user/user_grpc.pb.go create mode 100644 mcp_server/pkg/internalapi/config.go create mode 100644 mcp_server/pkg/internalapi/manager.go create mode 100644 mcp_server/pkg/internalapi/mock.go create mode 100644 mcp_server/pkg/internalapi/stubs/stubs.go create mode 100644 mcp_server/pkg/logging/logging.go create mode 100644 mcp_server/pkg/tools/internal/shared/markdown.go create mode 100644 mcp_server/pkg/tools/internal/shared/numeric.go create mode 100644 mcp_server/pkg/tools/internal/shared/shared.go create mode 100644 mcp_server/pkg/tools/internal/shared/truncate.go create mode 100644 mcp_server/pkg/tools/internal/shared/validation.go create mode 100644 mcp_server/pkg/tools/jobs/describe.go create mode 100644 mcp_server/pkg/tools/jobs/helpers.go create mode 100644 mcp_server/pkg/tools/jobs/jobs_test.go create mode 100644 mcp_server/pkg/tools/jobs/logs.go create mode 100644 mcp_server/pkg/tools/jobs/register.go create mode 100644 mcp_server/pkg/tools/organizations/organizations.go create mode 100644 mcp_server/pkg/tools/organizations/organizations_test.go create mode 100644 mcp_server/pkg/tools/pipelines/pipelines.go create mode 100644 mcp_server/pkg/tools/pipelines/pipelines_test.go create mode 100644 mcp_server/pkg/tools/projects/projects.go create mode 100644 mcp_server/pkg/tools/projects/projects.go.backup create mode 100644 mcp_server/pkg/tools/projects/projects_test.go create mode 100644 mcp_server/pkg/tools/workflows/workflows.go create mode 100644 mcp_server/pkg/tools/workflows/workflows_test.go create mode 100755 mcp_server/script/internal_api/gen.sh diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 061741618..99850f362 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -2626,6 +2626,77 @@ blocks: - name: "Lint" commands: - make lint + + + # MCP Server + - name: "MCP Server: Provision Prod Image" + dependencies: [] + run: + when: "change_in('/mcp_server', {pipeline_file: 'ignore', default_branch: 'main'})" + task: + env_vars: + - name: DOCKER_BUILDKIT + value: "1" + - name: APP_ENV + value: prod + prologue: + commands: + - checkout && cd mcp_server + jobs: + - name: "Build prod image" + commands: + - make pull + - make build + - make push + - name: "MCP Server: Deployment Preconditions" + dependencies: ["MCP Server: Provision Prod Image"] + run: + when: "change_in('/mcp_server', {pipeline_file: 'ignore', default_branch: 'main'})" + task: + env_vars: + - name: DOCKER_BUILDKIT + value: "1" + - name: APP_ENV + value: prod + - name: SERVICE_NAME + value: "MCP Server" + prologue: + commands: + - checkout && cd mcp_server + - make pull + jobs: + - name: "Check code" + commands: + - make check.go.code + - name: "Check dependencies" + commands: + - make check.go.deps + - name: "Check docker" + commands: + - make build + - make check.docker + - name: "MCP Server: QA" + dependencies: ["MCP Server: Provision Prod Image"] + run: + when: "change_in('/mcp_server', {pipeline_file: 'ignore', default_branch: 'main'})" + task: + env_vars: + - name: DOCKER_BUILDKIT + value: "1" + - name: APP_ENV + value: prod + prologue: + commands: + - checkout && cd mcp_server + - make build + jobs: + - name: "Test" + commands: + - make test.setup + - make test + - name: "Lint" + commands: + - make lint # Encryptor - name: "Encryptor: Provision Prod Image" dependencies: [] diff --git a/.semaphore/services.json b/.semaphore/services.json index 7e7ae84d9..003b43d1a 100644 --- a/.semaphore/services.json +++ b/.semaphore/services.json @@ -145,6 +145,12 @@ "component": "loghub2" } ], + "MCP Server": [ + { + "path": "mcp_server", + "component": "mcp-server" + } + ], "Zebra": [ { "path": "zebra", diff --git a/mcp_server/.air.dev.toml b/mcp_server/.air.dev.toml new file mode 100644 index 000000000..9716f00e7 --- /dev/null +++ b/mcp_server/.air.dev.toml @@ -0,0 +1,12 @@ +root = "." +tmp_dir = "tmp/dev" + +[build] +cmd = "go build -o ./tmp/dev/mcp_server ./cmd/mcp_server" +bin = "./tmp/dev/mcp_server" +args = ["-http", ":3001"] +include_ext = ["go"] +exclude_dir = ["tmp", "vendor"] + +[env] +MCP_USE_STUBS = "true" diff --git a/mcp_server/AGENTS.md b/mcp_server/AGENTS.md new file mode 100644 index 000000000..9794d8188 --- /dev/null +++ b/mcp_server/AGENTS.md @@ -0,0 +1,19 @@ +# Repository Guidelines + +## Project Structure & Module Organization +Semaphore is a polyglot monorepo. Core Elixir services (`auth/`, `guard/`, `projecthub/`) keep runtime code in `lib/` with ExUnit suites in `test/`. Go utilities such as `bootstrapper/`, `repohub/`, and this `mcp_server/` follow the `cmd/` (entrypoints) and `pkg/` (libraries, generated protobufs) layout. The Phoenix/React frontend lives in `front/` with assets under `front/assets/`. Shared documentation resides in `docs/` and `rfcs/`, and enterprise-only modules live in `ee/`. + +## Build, Test, and Development Commands +Use `make build` at the repo root to produce Docker images. Run Elixir suites with `make test.ex` or target a file via `make test.ex TEST_FILE=test/.exs`. Go packages (including `mcp_server`) rely on `make test` (`go test ./...`) and `make lint` for `go vet` plus static checks. Frontend bundles run through `make test.js`. For a local UI, start `make dev.server`; `LOCAL-DEVELOPMENT.md` covers Minikube and dev-container workflows. + +## Coding Style & Naming Conventions +Elixir modules use PascalCase with snake_case filenames; tests end in `_test.exs`. Go packages stay lowercase, with table-driven `_test.go` suites. React components prefer PascalCase filenames. Formatters and linters are mandatory before commits: `make format.ex` for Elixir, `make lint` for Go, and `make lint.js` for frontend assets. Share helpers through `test/support/` instead of duplicating utilities. + +## Testing Guidelines +Elixir services use ExUnit with focused `describe` blocks; add `--only integration` for slower suites. Go code should include regression cases when bugfixing; run `go test ./...` (and `go test -race ./...` when touching concurrency paths). Frontend updates require `make test.js`. Align Phoenix endpoint changes with their paired ExUnit suites. + +## Commit & Pull Request Guidelines +Follow Conventional Commits (e.g., `feat(auth):`, `fix(front):`, `docs:`) and keep scopes tight. Summaries must state rationale and risk. Before opening a PR, ensure formatters, linters, and relevant `make test*` targets pass. Link issues where available and attach screenshots or logs for UI or automation changes. + +## Security & Configuration Tips +Surface dependency issues early with `make check.ex.deps`, `make check.go.deps`, and `make check.docker`. Store secrets in local `.env` files; never commit credentials. Runtime configuration reads internal gRPC endpoints from `INTERNAL_API_URL_PLUMBER`, `INTERNAL_API_URL_JOB`, `INTERNAL_API_URL_LOGHUB`, and `INTERNAL_API_URL_LOGHUB2`, falling back to legacy `MCP_*` variables. Export `DOCKER_BUILDKIT=1` to mirror CI Docker builds. diff --git a/mcp_server/Dockerfile b/mcp_server/Dockerfile new file mode 100644 index 000000000..979fd6a97 --- /dev/null +++ b/mcp_server/Dockerfile @@ -0,0 +1,41 @@ +ARG GO_VERSION=1.24.9 +ARG ALPINE_VERSION=3.22 + +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base +ARG APP_NAME +ARG BUILD_ENV +WORKDIR /app + +ENV CGO_ENABLED=0 \ + GO111MODULE=on \ + GOOS=linux \ + GOARCH=amd64 + +COPY go.mod go.sum ./ +RUN --mount=type=cache,target=/go/pkg/mod \ + --mount=type=cache,target=/root/.cache/go-build \ + go mod download + +COPY cmd ./cmd +COPY pkg ./pkg + +FROM base AS dev +RUN --mount=type=cache,target=/root/.cache/go-build \ + go build ./cmd/mcp_server +CMD ["sh", "-c", "while sleep 1000; do :; done"] + +FROM base AS builder +RUN --mount=type=cache,target=/root/.cache/go-build \ + go build -o /tmp/mcp_server ./cmd/mcp_server + +FROM alpine:${ALPINE_VERSION} AS runner +RUN adduser -D -H -s /sbin/nologin appuser +USER appuser +WORKDIR /app + +COPY --from=builder /tmp/mcp_server /usr/local/bin/mcp_server + +EXPOSE 3001 + +ENTRYPOINT ["/usr/local/bin/mcp_server"] +CMD ["-http", ":3001"] diff --git a/mcp_server/Makefile b/mcp_server/Makefile new file mode 100644 index 000000000..5bc31efbb --- /dev/null +++ b/mcp_server/Makefile @@ -0,0 +1,47 @@ +include ../Makefile + +APP_NAME=mcp_server +APP_ENV=prod + +INTERNAL_API_BRANCH?=master +TMP_REPO_DIR ?= /tmp/internal_api +INTERNAL_API_MODULES?=include/internal_api/status,include/internal_api/response_status,plumber_w_f.workflow,plumber.pipeline,server_farm.job,loghub,loghub2,user,repository_integrator,rbac,organization,projecthub +PROTOC_IMAGE?=golang:1.24-alpine + +.PHONY: tidy test test.setup lint pb.gen dev.run + +tidy: + go mod tidy + +test.setup: + @true + +test: + go test ./... + +lint: + go vet ./... + +pb.gen: + rm -rf $(TMP_REPO_DIR) + mkdir -p $(TMP_REPO_DIR) + git clone git@github.com:renderedtext/internal_api.git $(TMP_REPO_DIR) && (cd $(TMP_REPO_DIR) && git checkout $(INTERNAL_API_BRANCH) && cd -) + docker run --rm \ + -v $(PWD):/app \ + -v $(TMP_REPO_DIR):/tmp/internal_api \ + -w /app \ + $(PROTOC_IMAGE) \ + sh -c 'apk add --no-cache bash protobuf && \ + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.2 && \ + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 && \ + bash script/internal_api/gen.sh "$(INTERNAL_API_MODULES)" $(INTERNAL_API_BRANCH) /tmp/internal_api' + rm -rf $(TMP_REPO_DIR) + +dev.run: + @if command -v air >/dev/null 2>&1; then \ + echo "Starting MCP server with air (hot reload)"; \ + air -c .air.dev.toml; \ + else \ + echo "air not found, falling back to go run"; \ + MCP_USE_STUBS=true go run ./cmd/mcp_server -http :3001; \ + fi diff --git a/mcp_server/README.md b/mcp_server/README.md new file mode 100644 index 000000000..ff002e400 --- /dev/null +++ b/mcp_server/README.md @@ -0,0 +1,95 @@ +# mcp_server + +The `mcp_server` service is a Model Context Protocol (MCP) server implemented with [github.com/mark3labs/mcp-go](https://github.com/mark3labs/mcp-go). It exposes Semaphore workflow, pipeline, and job data to MCP-compatible clients. + +## Contributor Guide + +Refer to [`AGENTS.md`](AGENTS.md) for repository guidelines, project structure, and development workflows. + +## Exposed tools + +| Tool | Description | +| ---- | ----------- | +| `echo` | Returns the provided `message` verbatim (handy for smoke tests). | +| `workflows_list` | Lists workflows for a project using keyset pagination. | +| `pipelines_list` | Lists pipelines for a workflow, including state/result metadata. | +| `pipelines_describe` | Describes a pipeline and its blocks (optionally detailed). | +| `jobs_describe` | Describes a job, surfacing agent details and lifecycle timestamps. | +| `jobs_logs` | Fetches job logs. Hosted jobs stream loghub events; self-hosted jobs mint a Loghub2 pull token. | + +## Requirements + +- Go 1.24 (toolchain `go1.24.9` is configured in `go.mod`). +- SSH access to `renderedtext/internal_api` for protobuf generation. + +## Generating protobuf stubs + +The server consumes internal gRPC definitions. Generate (or refresh) the Go descriptors whenever the protos change: + +```bash +cd mcp_server +make pb.gen INTERNAL_API_BRANCH=master +``` + +`make pb.gen` clones `renderedtext/internal_api` and emits Go code under `pkg/internal_api/`. The generated files are required for builds—remember to commit them after regeneration. + +## Configuration + +The server dials internal gRPC services based on environment variables. Deployment defaults come from the `INTERNAL_API_URL_*` ConfigMap entries; legacy `MCP_*` variables and historical endpoints remain as fallbacks. + +| Purpose | Environment variables (first non-empty wins) | +| ------- | -------------------------------------------- | +| Workflow gRPC endpoint | `INTERNAL_API_URL_PLUMBER`, `MCP_WORKFLOW_GRPC_ENDPOINT`, `WF_GRPC_URL` | +| Pipeline gRPC endpoint | `INTERNAL_API_URL_PLUMBER`, `MCP_PIPELINE_GRPC_ENDPOINT`, `PPL_GRPC_URL` | +| Job gRPC endpoint | `INTERNAL_API_URL_JOB`, `MCP_JOB_GRPC_ENDPOINT`, `JOBS_API_URL` | +| Loghub gRPC endpoint (hosted logs) | `INTERNAL_API_URL_LOGHUB`, `MCP_LOGHUB_GRPC_ENDPOINT`, `LOGHUB_API_URL` | +| Loghub2 gRPC endpoint (self-hosted logs) | `INTERNAL_API_URL_LOGHUB2`, `MCP_LOGHUB2_GRPC_ENDPOINT`, `LOGHUB2_API_URL` | +| Dial timeout | `MCP_GRPC_DIAL_TIMEOUT` (default `5s`) | +| Call timeout | `MCP_GRPC_CALL_TIMEOUT` (default `15s`) | + +Hosted jobs require `loghub` to be reachable. Self-hosted jobs require `loghub2`. Missing endpoints yield structured MCP errors from the relevant tools. + +## Running locally + +```bash +cd mcp_server +make pb.gen # only needed after proto updates +go run ./cmd/mcp_server -http :3001 +# or: make dev.run # launches with stubbed responses on :3001 +``` + +The server advertises itself as `semaphore-echo` and serves the MCP Streamable HTTP transport on `:3001`. Health probes remain on `GET /readyz` and `GET /healthz`. Use `-version` to print the binary version, `-name` to override the advertised implementation identifier, or `-http` to change the listening address. + +### Development stubs + +When you just want to exercise the MCP tools without wiring real services, export `MCP_USE_STUBS=true` before starting the server. The process will skip gRPC dialing and respond with deterministic in-memory data for workflows, pipelines, jobs, and logs. + +```bash +export MCP_USE_STUBS=true +go run ./cmd/mcp_server +# or: make dev.run +``` + +Disable the variable (or set it to anything other than `true`) to talk to real internal APIs again. + +> Tip: when [`air`](https://github.com/cosmtrek/air) is installed, `make dev.run` automatically enables hot reloading using `.air.dev.toml`; otherwise it falls back to `go run`. + +## Docker + +Build the container image: + +```bash +cd mcp_server +docker build -t semaphore-mcp-server . +``` + +Run it locally (listening on port 3001): + +```bash +docker run --rm -p 3001:3001 \ + -e INTERNAL_API_URL_PLUMBER=ppl:50053 \ + -e INTERNAL_API_URL_JOB=semaphore-job-api:50051 \ + -e INTERNAL_API_URL_LOGHUB=loghub:50051 \ + -e INTERNAL_API_URL_LOGHUB2=loghub2-internal-api:50051 \ + semaphore-mcp-server +``` diff --git a/mcp_server/cmd/mcp_server/main.go b/mcp_server/cmd/mcp_server/main.go new file mode 100644 index 000000000..5be613db0 --- /dev/null +++ b/mcp_server/cmd/mcp_server/main.go @@ -0,0 +1,304 @@ +package main + +import ( + "context" + "errors" + "flag" + "fmt" + "net/http" + "os" + "os/signal" + "strings" + "sync/atomic" + "syscall" + "time" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + "github.com/sirupsen/logrus" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi/stubs" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/jobs" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/organizations" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/pipelines" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/projects" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/workflows" +) + +var ( + versionFlag = flag.Bool("version", false, "print the server version and exit") + nameFlag = flag.String("name", "semaphore-mcp-server", "implementation name advertised to MCP clients") + httpAddr = flag.String("http", ":3001", "address to serve the streamable MCP transport") + version = "0.1.0" +) + +func main() { + flag.Parse() + + if *versionFlag { + fmt.Println(version) + return + } + + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) + defer stop() + + var ready atomic.Bool + var healthy atomic.Bool + hooks := &server.Hooks{} + configureHooks(hooks) + + srv := server.NewMCPServer( + *nameFlag, + version, + server.WithToolCapabilities(true), + server.WithHooks(hooks), + ) + + var ( + provider internalapi.Provider + closeFn func() error + ) + + bootstrapLog := logging.ForComponent("bootstrap") + if strings.EqualFold(os.Getenv("MCP_USE_STUBS"), "true") { + bootstrapLog.Info("using stubbed internal API clients (MCP_USE_STUBS=true)") + provider = stubs.New() + } else { + cfg, err := internalapi.LoadConfig() + if err != nil { + bootstrapLog.WithError(err).Fatal("failed to load internal API configuration") + } + if err := cfg.Validate(); err != nil { + bootstrapLog.WithError(err).Fatal("invalid internal API configuration") + } + + manager, err := internalapi.NewManager(ctx, cfg) + if err != nil { + bootstrapLog.WithError(err).Fatal("failed to connect to internal APIs") + } + provider = manager + closeFn = manager.Close + } + + if closeFn != nil { + defer func() { + if err := closeFn(); err != nil { + logging.ForComponent("internal_api").WithError(err).Warn("closing internal API manager") + } + }() + } + + organizations.Register(srv, provider) + projects.Register(srv, provider) + workflows.Register(srv, provider) + pipelines.Register(srv, provider) + jobs.Register(srv, provider) + + mux := http.NewServeMux() + streamable := server.NewStreamableHTTPServer( + srv, + server.WithStreamableHTTPServer(&http.Server{ + Handler: mux, + ReadHeaderTimeout: 10 * time.Second, + }), + server.WithLogger(logging.NewStreamableLogger()), + ) + + streamableHandler := instrumentStreamableHandler(streamable) + + mux.Handle("/mcp", streamableHandler) + mux.Handle("/mcp/", streamableHandler) + + mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { + if !healthy.Load() { + http.Error(w, "unhealthy", http.StatusServiceUnavailable) + return + } + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("ok")) + }) + + mux.HandleFunc("/readyz", func(w http.ResponseWriter, r *http.Request) { + if !ready.Load() { + http.Error(w, "not ready", http.StatusServiceUnavailable) + return + } + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("ok")) + }) + + errCh := make(chan error, 1) + ready.Store(true) + healthy.Store(true) + + go func() { + errCh <- streamable.Start(*httpAddr) + }() + + logging.ForComponent("http"). + WithField("addr", *httpAddr). + Info("streamable HTTP listener started") + + select { + case err := <-errCh: + if err != nil && !errors.Is(err, http.ErrServerClosed) { + logging.ForComponent("streamable_http"). + WithError(err). + Fatal("streamable HTTP server failed") + } + case <-ctx.Done(): + healthy.Store(false) + logging.ForComponent("http").Info("shutdown signal received, draining connections") + shutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + if err := streamable.Shutdown(shutdownCtx); err != nil && !errors.Is(err, context.Canceled) { + logging.ForComponent("streamable_http"). + WithError(err). + Error("graceful shutdown encountered an error") + } + + if err := <-errCh; err != nil && !errors.Is(err, http.ErrServerClosed) { + logging.ForComponent("streamable_http"). + WithError(err). + Error("streamable HTTP server closed with error") + } + } +} + +func configureHooks(hooks *server.Hooks) { + if hooks == nil { + return + } + + hooks.AddOnRegisterSession(func(ctx context.Context, session server.ClientSession) { + logging.ForComponent("session"). + WithField("sessionId", session.SessionID()). + Info("session registered") + }) + + hooks.AddOnUnregisterSession(func(ctx context.Context, session server.ClientSession) { + logging.ForComponent("session"). + WithField("sessionId", session.SessionID()). + Info("session unregistered") + }) + + hooks.AddBeforeCallTool(func(ctx context.Context, id any, request *mcp.CallToolRequest) { + toolLogger(ctx, id, request.Params.Name). + WithField("arguments", request.Params.Arguments). + Info("tool call started") + }) + + hooks.AddAfterCallTool(func(ctx context.Context, id any, request *mcp.CallToolRequest, result *mcp.CallToolResult) { + entry := toolLogger(ctx, id, request.Params.Name) + if result == nil { + entry.Warn("tool call completed without a result payload") + return + } + if result.IsError { + errorMessage := extractErrorMessage(result) + if errorMessage != "" { + entry = entry.WithField("errorMessage", errorMessage) + } + entry.Warn("tool call completed with an error result") + return + } + entry.Info("tool call completed successfully") + }) + + hooks.AddOnError(func(ctx context.Context, id any, method mcp.MCPMethod, message any, err error) { + if method != mcp.MethodToolsCall { + return + } + toolName := "" + if req, ok := message.(*mcp.CallToolRequest); ok && req != nil { + toolName = req.Params.Name + } + toolLogger(ctx, id, toolName). + WithError(err). + Error("tool call failed") + }) +} + +func toolLogger(ctx context.Context, id any, toolName string) *logrus.Entry { + fields := logrus.Fields{ + "tool": toolName, + } + if rid := requestIDString(id); rid != "" { + fields["requestId"] = rid + } + if sid := sessionIDFromContext(ctx); sid != "" { + fields["sessionId"] = sid + } + return logging.ForComponent("tool").WithFields(fields) +} + +func sessionIDFromContext(ctx context.Context) string { + if session := server.ClientSessionFromContext(ctx); session != nil { + return session.SessionID() + } + return "" +} + +func requestIDString(id any) string { + if id == nil { + return "" + } + return fmt.Sprint(id) +} + +func extractErrorMessage(result *mcp.CallToolResult) string { + if result == nil { + return "" + } + for _, content := range result.Content { + if text, ok := content.(mcp.TextContent); ok { + value := strings.TrimSpace(text.Text) + if value != "" { + return value + } + } + } + if structured, ok := result.StructuredContent.(map[string]any); ok { + if msg, found := structured["message"]; found { + return fmt.Sprint(msg) + } + if errField, found := structured["error"]; found { + return fmt.Sprint(errField) + } + } + if str, ok := result.StructuredContent.(string); ok { + value := strings.TrimSpace(str) + if value != "" { + return value + } + } + return "" +} + +func instrumentStreamableHandler(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if next == nil { + return + } + + if r.Method == http.MethodGet || r.Method == http.MethodPost { + entry := logging.ForComponent("http"). + WithFields(logrus.Fields{ + "method": r.Method, + "path": r.URL.Path, + "remoteAddr": r.RemoteAddr, + }) + if r.Method == http.MethodGet { + entry.Info("streamable connection opened") + } else { + entry.Info("streamable request received") + } + } + + next.ServeHTTP(w, r) + }) +} diff --git a/mcp_server/go.mod b/mcp_server/go.mod new file mode 100644 index 000000000..0e3e55a70 --- /dev/null +++ b/mcp_server/go.mod @@ -0,0 +1,29 @@ +module github.com/semaphoreio/semaphore/mcp_server + +go 1.24.0 + +toolchain go1.24.9 + +require ( + github.com/golang/protobuf v1.5.4 + github.com/google/uuid v1.6.0 + github.com/mark3labs/mcp-go v0.41.1 + github.com/sirupsen/logrus v1.9.3 + google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f + google.golang.org/grpc v1.75.1 + google.golang.org/protobuf v1.36.10 +) + +require ( + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/buger/jsonparser v1.1.1 // indirect + github.com/invopop/jsonschema v0.13.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/spf13/cast v1.7.1 // indirect + github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect + github.com/yosida95/uritemplate/v3 v3.0.2 // indirect + golang.org/x/net v0.41.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.26.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/mcp_server/go.sum b/mcp_server/go.sum new file mode 100644 index 000000000..b9ff37e5b --- /dev/null +++ b/mcp_server/go.sum @@ -0,0 +1,78 @@ +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E= +github.com/invopop/jsonschema v0.13.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mark3labs/mcp-go v0.41.1 h1:w78eWfiQam2i8ICL7AL0WFiq7KHNJQ6UB53ZVtH4KGA= +github.com/mark3labs/mcp-go v0.41.1/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= +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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= +github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= +github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= +github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f h1:1FTH6cpXFsENbPR5Bu8NQddPSaUUE6NA2XdZdDSAJK4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= +google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/mcp_server/pkg/internal_api/loghub/loghub.pb.go b/mcp_server/pkg/internal_api/loghub/loghub.pb.go new file mode 100644 index 000000000..f1f18d359 --- /dev/null +++ b/mcp_server/pkg/internal_api/loghub/loghub.pb.go @@ -0,0 +1,296 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: loghub.proto + +package loghub + +import ( + response_status "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GetLogEvents call request +// +// - job_id = [required] UUID of the job. +// - starting_line = [required] line from which we want to get a list +type GetLogEventsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + StartingLine int32 `protobuf:"varint,2,opt,name=starting_line,json=startingLine,proto3" json:"starting_line,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLogEventsRequest) Reset() { + *x = GetLogEventsRequest{} + mi := &file_loghub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLogEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLogEventsRequest) ProtoMessage() {} + +func (x *GetLogEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_loghub_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLogEventsRequest.ProtoReflect.Descriptor instead. +func (*GetLogEventsRequest) Descriptor() ([]byte, []int) { + return file_loghub_proto_rawDescGZIP(), []int{0} +} + +func (x *GetLogEventsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GetLogEventsRequest) GetStartingLine() int32 { + if x != nil { + return x.StartingLine + } + return 0 +} + +// Event is a key/value hash encoded in JSON. We use JSON encoding to boost +// performance and minimaze the need for data transformation from builders to +// the browser, or JSON apis, our current two main user interfaces. +// +// The format of the logs +// ---------------------- +// +// Every log event begins with an "event" key that describes the type of the +// event. This is then followed by the timestamp when the event was created. +// We are keeping these two key/values pairs at the beggining two make it easy +// to filter the logs without actually parsing them. This filtering without JSON +// parsing comes handy on builders. +// +// Example events: +// +// {"event": "job_started", "timestamp": 15234242342342} +// {"event": "cmd_output", "timestamp": 15234242342341, "output": "running after deployment steps"} +// +// Types: +// +// - All timestamps are Unix Timestamps in UTC zone encoded as integers. +// - Exit Statuses are values from 0..255 and they represent Unix exit statuses of a process. +// +// Event types and definition of keys that are expected to be in them: +// +// - Job Started Event +// +// {"event": "job_started", "timestamp": } +// +// - Job Finished Event +// +// {"event": "job_finished", "timestamp": , "job_result": } +// +// - Command Started Event +// +// {"event": "cmd_started", "timestamp": , "directive": } +// +// - Command Finished Event +// +// {"event": "cmd_finished", "timestamp": , "directive": , "exit_status": } +// +// - Command Output Event +// +// {"event": "cmd_output", "timestamp": , "output": } +// +// - Environment Variable Export Started +// +// {"event": "env_var_export_started", "timestamp": , "env_var_name": } +// +// - Environment Variable Export Finished +// +// {"event": "env_var_export_finished", "timestamp": , "env_var_name": , "exit_status": } +// +// - File Upload Started +// +// {"event": "file_upload_started", "timestamp": , "file_path": } +// +// - File Upload Finished +// +// {"event": "file_upload_finished", "timestamp": , "file_path": , "exit_status": } +// +// -------------------------------------------------------------- +// +// - status = [required] Status of the reponse. +// - events = [required] List of events. +// - final = [required] True if this is a final batch of events. +type GetLogEventsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Events []string `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` + Final bool `protobuf:"varint,3,opt,name=final,proto3" json:"final,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLogEventsResponse) Reset() { + *x = GetLogEventsResponse{} + mi := &file_loghub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLogEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLogEventsResponse) ProtoMessage() {} + +func (x *GetLogEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_loghub_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLogEventsResponse.ProtoReflect.Descriptor instead. +func (*GetLogEventsResponse) Descriptor() ([]byte, []int) { + return file_loghub_proto_rawDescGZIP(), []int{1} +} + +func (x *GetLogEventsResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *GetLogEventsResponse) GetEvents() []string { + if x != nil { + return x.Events + } + return nil +} + +func (x *GetLogEventsResponse) GetFinal() bool { + if x != nil { + return x.Final + } + return false +} + +var File_loghub_proto protoreflect.FileDescriptor + +var file_loghub_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x68, + 0x75, 0x62, 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, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0x79, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x32, 0x6b, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x12, + 0x61, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, 0x6f, + 0x67, 0x68, 0x75, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, + 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_loghub_proto_rawDescOnce sync.Once + file_loghub_proto_rawDescData = file_loghub_proto_rawDesc +) + +func file_loghub_proto_rawDescGZIP() []byte { + file_loghub_proto_rawDescOnce.Do(func() { + file_loghub_proto_rawDescData = protoimpl.X.CompressGZIP(file_loghub_proto_rawDescData) + }) + return file_loghub_proto_rawDescData +} + +var file_loghub_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_loghub_proto_goTypes = []any{ + (*GetLogEventsRequest)(nil), // 0: InternalApi.Loghub.GetLogEventsRequest + (*GetLogEventsResponse)(nil), // 1: InternalApi.Loghub.GetLogEventsResponse + (*response_status.ResponseStatus)(nil), // 2: InternalApi.ResponseStatus +} +var file_loghub_proto_depIdxs = []int32{ + 2, // 0: InternalApi.Loghub.GetLogEventsResponse.status:type_name -> InternalApi.ResponseStatus + 0, // 1: InternalApi.Loghub.Loghub.GetLogEvents:input_type -> InternalApi.Loghub.GetLogEventsRequest + 1, // 2: InternalApi.Loghub.Loghub.GetLogEvents:output_type -> InternalApi.Loghub.GetLogEventsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_loghub_proto_init() } +func file_loghub_proto_init() { + if File_loghub_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_loghub_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_loghub_proto_goTypes, + DependencyIndexes: file_loghub_proto_depIdxs, + MessageInfos: file_loghub_proto_msgTypes, + }.Build() + File_loghub_proto = out.File + file_loghub_proto_rawDesc = nil + file_loghub_proto_goTypes = nil + file_loghub_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/loghub/loghub_grpc.pb.go b/mcp_server/pkg/internal_api/loghub/loghub_grpc.pb.go new file mode 100644 index 000000000..16d01ab71 --- /dev/null +++ b/mcp_server/pkg/internal_api/loghub/loghub_grpc.pb.go @@ -0,0 +1,119 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: loghub.proto + +package loghub + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Loghub_GetLogEvents_FullMethodName = "/InternalApi.Loghub.Loghub/GetLogEvents" // #nosec G101 -- gRPC method name, not credential +) + +// LoghubClient is the client API for Loghub service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LoghubClient interface { + GetLogEvents(ctx context.Context, in *GetLogEventsRequest, opts ...grpc.CallOption) (*GetLogEventsResponse, error) +} + +type loghubClient struct { + cc grpc.ClientConnInterface +} + +func NewLoghubClient(cc grpc.ClientConnInterface) LoghubClient { + return &loghubClient{cc} +} + +func (c *loghubClient) GetLogEvents(ctx context.Context, in *GetLogEventsRequest, opts ...grpc.CallOption) (*GetLogEventsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLogEventsResponse) + err := c.cc.Invoke(ctx, Loghub_GetLogEvents_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LoghubServer is the server API for Loghub service. +// All implementations should embed UnimplementedLoghubServer +// for forward compatibility. +type LoghubServer interface { + GetLogEvents(context.Context, *GetLogEventsRequest) (*GetLogEventsResponse, error) +} + +// UnimplementedLoghubServer should 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 UnimplementedLoghubServer struct{} + +func (UnimplementedLoghubServer) GetLogEvents(context.Context, *GetLogEventsRequest) (*GetLogEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLogEvents not implemented") +} +func (UnimplementedLoghubServer) testEmbeddedByValue() {} + +// UnsafeLoghubServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LoghubServer will +// result in compilation errors. +type UnsafeLoghubServer interface { + mustEmbedUnimplementedLoghubServer() +} + +func RegisterLoghubServer(s grpc.ServiceRegistrar, srv LoghubServer) { + // If the following call pancis, it indicates UnimplementedLoghubServer 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(&Loghub_ServiceDesc, srv) +} + +func _Loghub_GetLogEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLogEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoghubServer).GetLogEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Loghub_GetLogEvents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoghubServer).GetLogEvents(ctx, req.(*GetLogEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Loghub_ServiceDesc is the grpc.ServiceDesc for Loghub service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Loghub_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Loghub.Loghub", + HandlerType: (*LoghubServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLogEvents", + Handler: _Loghub_GetLogEvents_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "loghub.proto", +} diff --git a/mcp_server/pkg/internal_api/loghub2/loghub2.pb.go b/mcp_server/pkg/internal_api/loghub2/loghub2.pb.go new file mode 100644 index 000000000..d670ab122 --- /dev/null +++ b/mcp_server/pkg/internal_api/loghub2/loghub2.pb.go @@ -0,0 +1,278 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: loghub2.proto + +package loghub2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TokenType int32 + +const ( + TokenType_PULL TokenType = 0 + TokenType_PUSH TokenType = 1 +) + +// Enum value maps for TokenType. +var ( + TokenType_name = map[int32]string{ + 0: "PULL", + 1: "PUSH", + } + TokenType_value = map[string]int32{ + "PULL": 0, + "PUSH": 1, + } +) + +func (x TokenType) Enum() *TokenType { + p := new(TokenType) + *p = x + return p +} + +func (x TokenType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TokenType) Descriptor() protoreflect.EnumDescriptor { + return file_loghub2_proto_enumTypes[0].Descriptor() +} + +func (TokenType) Type() protoreflect.EnumType { + return &file_loghub2_proto_enumTypes[0] +} + +func (x TokenType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TokenType.Descriptor instead. +func (TokenType) EnumDescriptor() ([]byte, []int) { + return file_loghub2_proto_rawDescGZIP(), []int{0} +} + +// Request for GenerateToken +// - job_id = [required] UUID of the job. +// - type = the type of token, either to PULL logs or to PUSH logs; default is PULL. +type GenerateTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + Type TokenType `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.Loghub2.TokenType" json:"type,omitempty"` + Duration uint32 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateTokenRequest) Reset() { + *x = GenerateTokenRequest{} + mi := &file_loghub2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateTokenRequest) ProtoMessage() {} + +func (x *GenerateTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_loghub2_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateTokenRequest.ProtoReflect.Descriptor instead. +func (*GenerateTokenRequest) Descriptor() ([]byte, []int) { + return file_loghub2_proto_rawDescGZIP(), []int{0} +} + +func (x *GenerateTokenRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GenerateTokenRequest) GetType() TokenType { + if x != nil { + return x.Type + } + return TokenType_PULL +} + +func (x *GenerateTokenRequest) GetDuration() uint32 { + if x != nil { + return x.Duration + } + return 0 +} + +// Response for GenerateToken +// - token = [required] JWT token generated for job_id +// - type = [required] type of token generated, either PULL or PUSH +type GenerateTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Type TokenType `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.Loghub2.TokenType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateTokenResponse) Reset() { + *x = GenerateTokenResponse{} + mi := &file_loghub2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateTokenResponse) ProtoMessage() {} + +func (x *GenerateTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_loghub2_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateTokenResponse.ProtoReflect.Descriptor instead. +func (*GenerateTokenResponse) Descriptor() ([]byte, []int) { + return file_loghub2_proto_rawDescGZIP(), []int{1} +} + +func (x *GenerateTokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *GenerateTokenResponse) GetType() TokenType { + if x != nil { + return x.Type + } + return TokenType_PULL +} + +var File_loghub2_proto protoreflect.FileDescriptor + +var file_loghub2_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, + 0x68, 0x75, 0x62, 0x32, 0x22, 0x7d, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x32, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x15, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, + 0x6f, 0x67, 0x68, 0x75, 0x62, 0x32, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x1f, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x50, 0x55, 0x53, 0x48, 0x10, 0x01, 0x32, 0x71, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x68, 0x75, + 0x62, 0x32, 0x12, 0x66, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x68, 0x75, 0x62, 0x32, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, + 0x68, 0x75, 0x62, 0x32, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, + 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, + 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x68, 0x75, + 0x62, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_loghub2_proto_rawDescOnce sync.Once + file_loghub2_proto_rawDescData = file_loghub2_proto_rawDesc +) + +func file_loghub2_proto_rawDescGZIP() []byte { + file_loghub2_proto_rawDescOnce.Do(func() { + file_loghub2_proto_rawDescData = protoimpl.X.CompressGZIP(file_loghub2_proto_rawDescData) + }) + return file_loghub2_proto_rawDescData +} + +var file_loghub2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_loghub2_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_loghub2_proto_goTypes = []any{ + (TokenType)(0), // 0: InternalApi.Loghub2.TokenType + (*GenerateTokenRequest)(nil), // 1: InternalApi.Loghub2.GenerateTokenRequest + (*GenerateTokenResponse)(nil), // 2: InternalApi.Loghub2.GenerateTokenResponse +} +var file_loghub2_proto_depIdxs = []int32{ + 0, // 0: InternalApi.Loghub2.GenerateTokenRequest.type:type_name -> InternalApi.Loghub2.TokenType + 0, // 1: InternalApi.Loghub2.GenerateTokenResponse.type:type_name -> InternalApi.Loghub2.TokenType + 1, // 2: InternalApi.Loghub2.Loghub2.GenerateToken:input_type -> InternalApi.Loghub2.GenerateTokenRequest + 2, // 3: InternalApi.Loghub2.Loghub2.GenerateToken:output_type -> InternalApi.Loghub2.GenerateTokenResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_loghub2_proto_init() } +func file_loghub2_proto_init() { + if File_loghub2_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_loghub2_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_loghub2_proto_goTypes, + DependencyIndexes: file_loghub2_proto_depIdxs, + EnumInfos: file_loghub2_proto_enumTypes, + MessageInfos: file_loghub2_proto_msgTypes, + }.Build() + File_loghub2_proto = out.File + file_loghub2_proto_rawDesc = nil + file_loghub2_proto_goTypes = nil + file_loghub2_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/loghub2/loghub2_grpc.pb.go b/mcp_server/pkg/internal_api/loghub2/loghub2_grpc.pb.go new file mode 100644 index 000000000..b8f4ab6ab --- /dev/null +++ b/mcp_server/pkg/internal_api/loghub2/loghub2_grpc.pb.go @@ -0,0 +1,119 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: loghub2.proto + +package loghub2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Loghub2_GenerateToken_FullMethodName = "/InternalApi.Loghub2.Loghub2/GenerateToken" // #nosec G101 -- gRPC method name, not credential +) + +// Loghub2Client is the client API for Loghub2 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type Loghub2Client interface { + GenerateToken(ctx context.Context, in *GenerateTokenRequest, opts ...grpc.CallOption) (*GenerateTokenResponse, error) +} + +type loghub2Client struct { + cc grpc.ClientConnInterface +} + +func NewLoghub2Client(cc grpc.ClientConnInterface) Loghub2Client { + return &loghub2Client{cc} +} + +func (c *loghub2Client) GenerateToken(ctx context.Context, in *GenerateTokenRequest, opts ...grpc.CallOption) (*GenerateTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GenerateTokenResponse) + err := c.cc.Invoke(ctx, Loghub2_GenerateToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Loghub2Server is the server API for Loghub2 service. +// All implementations should embed UnimplementedLoghub2Server +// for forward compatibility. +type Loghub2Server interface { + GenerateToken(context.Context, *GenerateTokenRequest) (*GenerateTokenResponse, error) +} + +// UnimplementedLoghub2Server should 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 UnimplementedLoghub2Server struct{} + +func (UnimplementedLoghub2Server) GenerateToken(context.Context, *GenerateTokenRequest) (*GenerateTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateToken not implemented") +} +func (UnimplementedLoghub2Server) testEmbeddedByValue() {} + +// UnsafeLoghub2Server may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to Loghub2Server will +// result in compilation errors. +type UnsafeLoghub2Server interface { + mustEmbedUnimplementedLoghub2Server() +} + +func RegisterLoghub2Server(s grpc.ServiceRegistrar, srv Loghub2Server) { + // If the following call pancis, it indicates UnimplementedLoghub2Server 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(&Loghub2_ServiceDesc, srv) +} + +func _Loghub2_GenerateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Loghub2Server).GenerateToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Loghub2_GenerateToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Loghub2Server).GenerateToken(ctx, req.(*GenerateTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Loghub2_ServiceDesc is the grpc.ServiceDesc for Loghub2 service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Loghub2_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Loghub2.Loghub2", + HandlerType: (*Loghub2Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateToken", + Handler: _Loghub2_GenerateToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "loghub2.proto", +} diff --git a/mcp_server/pkg/internal_api/organization/organization.pb.go b/mcp_server/pkg/internal_api/organization/organization.pb.go new file mode 100644 index 000000000..13a5dff74 --- /dev/null +++ b/mcp_server/pkg/internal_api/organization/organization.pb.go @@ -0,0 +1,4852 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: organization.proto + +package organization + +import ( + repository_integrator "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + response_status "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListRequest_Order int32 + +const ( + ListRequest_BY_NAME_ASC ListRequest_Order = 0 + ListRequest_BY_CREATION_TIME_ASC ListRequest_Order = 1 +) + +// Enum value maps for ListRequest_Order. +var ( + ListRequest_Order_name = map[int32]string{ + 0: "BY_NAME_ASC", + 1: "BY_CREATION_TIME_ASC", + } + ListRequest_Order_value = map[string]int32{ + "BY_NAME_ASC": 0, + "BY_CREATION_TIME_ASC": 1, + } +) + +func (x ListRequest_Order) Enum() *ListRequest_Order { + p := new(ListRequest_Order) + *p = x + return p +} + +func (x ListRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_organization_proto_enumTypes[0].Descriptor() +} + +func (ListRequest_Order) Type() protoreflect.EnumType { + return &file_organization_proto_enumTypes[0] +} + +func (x ListRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListRequest_Order.Descriptor instead. +func (ListRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{4, 0} +} + +type Suspension_Reason int32 + +const ( + // This account has no funds to continue paying for the service. + // Examples: Credit card expired, empty credit card, etc... + Suspension_INSUFFICIENT_FUNDS Suspension_Reason = 0 + // If we suspect an account has been hacked or compromised, we may suspend + // it until it can be secured and restored to the account owner in order to + // reduce potentially malicious activity caused by the compromise. + Suspension_ACCOUNT_AT_RISK Suspension_Reason = 1 + // If we suspect an account has is violated our terms of service, we are + // suspending it. + Suspension_VIOLATION_OF_TOS Suspension_Reason = 2 +) + +// Enum value maps for Suspension_Reason. +var ( + Suspension_Reason_name = map[int32]string{ + 0: "INSUFFICIENT_FUNDS", + 1: "ACCOUNT_AT_RISK", + 2: "VIOLATION_OF_TOS", + } + Suspension_Reason_value = map[string]int32{ + "INSUFFICIENT_FUNDS": 0, + "ACCOUNT_AT_RISK": 1, + "VIOLATION_OF_TOS": 2, + } +) + +func (x Suspension_Reason) Enum() *Suspension_Reason { + p := new(Suspension_Reason) + *p = x + return p +} + +func (x Suspension_Reason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Suspension_Reason) Descriptor() protoreflect.EnumDescriptor { + return file_organization_proto_enumTypes[1].Descriptor() +} + +func (Suspension_Reason) Type() protoreflect.EnumType { + return &file_organization_proto_enumTypes[1] +} + +func (x Suspension_Reason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Suspension_Reason.Descriptor instead. +func (Suspension_Reason) EnumDescriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{36, 0} +} + +type Member_Role int32 + +const ( + Member_MEMBER Member_Role = 0 + Member_OWNER Member_Role = 1 + Member_ADMIN Member_Role = 2 +) + +// Enum value maps for Member_Role. +var ( + Member_Role_name = map[int32]string{ + 0: "MEMBER", + 1: "OWNER", + 2: "ADMIN", + } + Member_Role_value = map[string]int32{ + "MEMBER": 0, + "OWNER": 1, + "ADMIN": 2, + } +) + +func (x Member_Role) Enum() *Member_Role { + p := new(Member_Role) + *p = x + return p +} + +func (x Member_Role) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Member_Role) Descriptor() protoreflect.EnumDescriptor { + return file_organization_proto_enumTypes[2].Descriptor() +} + +func (Member_Role) Type() protoreflect.EnumType { + return &file_organization_proto_enumTypes[2] +} + +func (x Member_Role) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Member_Role.Descriptor instead. +func (Member_Role) EnumDescriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{37, 0} +} + +type OrganizationContact_ContactType int32 + +const ( + OrganizationContact_CONTACT_TYPE_UNSPECIFIED OrganizationContact_ContactType = 0 + OrganizationContact_CONTACT_TYPE_MAIN OrganizationContact_ContactType = 1 + OrganizationContact_CONTACT_TYPE_FINANCES OrganizationContact_ContactType = 2 + OrganizationContact_CONTACT_TYPE_SECURITY OrganizationContact_ContactType = 3 +) + +// Enum value maps for OrganizationContact_ContactType. +var ( + OrganizationContact_ContactType_name = map[int32]string{ + 0: "CONTACT_TYPE_UNSPECIFIED", + 1: "CONTACT_TYPE_MAIN", + 2: "CONTACT_TYPE_FINANCES", + 3: "CONTACT_TYPE_SECURITY", + } + OrganizationContact_ContactType_value = map[string]int32{ + "CONTACT_TYPE_UNSPECIFIED": 0, + "CONTACT_TYPE_MAIN": 1, + "CONTACT_TYPE_FINANCES": 2, + "CONTACT_TYPE_SECURITY": 3, + } +) + +func (x OrganizationContact_ContactType) Enum() *OrganizationContact_ContactType { + p := new(OrganizationContact_ContactType) + *p = x + return p +} + +func (x OrganizationContact_ContactType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OrganizationContact_ContactType) Descriptor() protoreflect.EnumDescriptor { + return file_organization_proto_enumTypes[3].Descriptor() +} + +func (OrganizationContact_ContactType) Type() protoreflect.EnumType { + return &file_organization_proto_enumTypes[3] +} + +func (x OrganizationContact_ContactType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OrganizationContact_ContactType.Descriptor instead. +func (OrganizationContact_ContactType) EnumDescriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{45, 0} +} + +// Describe call request +// +// - org_id = Organization UUID. +// - org_username = Organization username. +// - include_quotas = If set to true, quotas are returned in the Organization response. +// - soft_deleted = [optional] If present, the response will include only soft deleted orgs +// +// If org_id is present, it is used for looking up the organization. +// If org_id is not present, but org_username is present, it is used for +// looking up the organization. +// +// One of org_id or username is [required] for a valid request. +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + OrgUsername string `protobuf:"bytes,2,opt,name=org_username,json=orgUsername,proto3" json:"org_username,omitempty"` + IncludeQuotas bool `protobuf:"varint,3,opt,name=include_quotas,json=includeQuotas,proto3" json:"include_quotas,omitempty"` + SoftDeleted bool `protobuf:"varint,4,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_organization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{0} +} + +func (x *DescribeRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DescribeRequest) GetOrgUsername() string { + if x != nil { + return x.OrgUsername + } + return "" +} + +func (x *DescribeRequest) GetIncludeQuotas() bool { + if x != nil { + return x.IncludeQuotas + } + return false +} + +func (x *DescribeRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +// Describe call response +// +// Response: +// - status = [required] ResponseStatus +// - organization = [required if response status is OK] Information about the organization. +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Organization *Organization `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_organization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{1} +} + +func (x *DescribeResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeResponse) GetOrganization() *Organization { + if x != nil { + return x.Organization + } + return nil +} + +// DescribeMany call request +// +// - org_ids = Organization UUIDs. +// - soft_deleted = [optional] If present, the response will include only soft deleted orgs +type DescribeManyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgIds []string `protobuf:"bytes,1,rep,name=org_ids,json=orgIds,proto3" json:"org_ids,omitempty"` + SoftDeleted bool `protobuf:"varint,2,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyRequest) Reset() { + *x = DescribeManyRequest{} + mi := &file_organization_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyRequest) ProtoMessage() {} + +func (x *DescribeManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyRequest.ProtoReflect.Descriptor instead. +func (*DescribeManyRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{2} +} + +func (x *DescribeManyRequest) GetOrgIds() []string { + if x != nil { + return x.OrgIds + } + return nil +} + +func (x *DescribeManyRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +// DescribeMany call response +// +// Response: +// - organizations = [required if response status is OK] Information about the organizations. +type DescribeManyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Organizations []*Organization `protobuf:"bytes,1,rep,name=organizations,proto3" json:"organizations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyResponse) Reset() { + *x = DescribeManyResponse{} + mi := &file_organization_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyResponse) ProtoMessage() {} + +func (x *DescribeManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyResponse.ProtoReflect.Descriptor instead. +func (*DescribeManyResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{3} +} + +func (x *DescribeManyResponse) GetOrganizations() []*Organization { + if x != nil { + return x.Organizations + } + return nil +} + +// List call request +// +// - user_id = [optional] If present, the response will include orgs the user belongs to. +// - created_at_gt = [optional] If present, the response will include orgs created at after the timestamp +// - order = [required] Sorting order direction +// - page_size = [required] Number of orgs in one response +// - page_token = [required] Token for the page +// - soft_deleted = [optional] If present, the response will include only soft deleted orgs +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + CreatedAtGt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at_gt,json=createdAtGt,proto3" json:"created_at_gt,omitempty"` + Order ListRequest_Order `protobuf:"varint,4,opt,name=order,proto3,enum=InternalApi.Organization.ListRequest_Order" json:"order,omitempty"` + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + SoftDeleted bool `protobuf:"varint,7,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_organization_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{4} +} + +func (x *ListRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListRequest) GetCreatedAtGt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAtGt + } + return nil +} + +func (x *ListRequest) GetOrder() ListRequest_Order { + if x != nil { + return x.Order + } + return ListRequest_BY_NAME_ASC +} + +func (x *ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +// List call response +// +// Response: +// - organizations = [required] Organizations belonging to the user. +// - next_page_token = [required] Token for the next page. +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Organizations []*Organization `protobuf:"bytes,2,rep,name=organizations,proto3" json:"organizations,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_organization_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{5} +} + +func (x *ListResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListResponse) GetOrganizations() []*Organization { + if x != nil { + return x.Organizations + } + return nil +} + +func (x *ListResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Create call request +// +// Request: +// - creator_id = [required] The ID of the user who wants to create an organization +// - organization_name = [required] The name of organization to be created +// - organization_username = [required] The username of organization to be created, representing the org subdomain +type CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + CreatorId string `protobuf:"bytes,1,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + OrganizationName string `protobuf:"bytes,2,opt,name=organization_name,json=organizationName,proto3" json:"organization_name,omitempty"` + OrganizationUsername string `protobuf:"bytes,3,opt,name=organization_username,json=organizationUsername,proto3" json:"organization_username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + mi := &file_organization_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateRequest) GetCreatorId() string { + if x != nil { + return x.CreatorId + } + return "" +} + +func (x *CreateRequest) GetOrganizationName() string { + if x != nil { + return x.OrganizationName + } + return "" +} + +func (x *CreateRequest) GetOrganizationUsername() string { + if x != nil { + return x.OrganizationUsername + } + return "" +} + +// Create call response +// +// Response: +// - status = [required] Status of response +// - organization = [required] The description of organization +type CreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Organization *Organization `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + mi := &file_organization_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *CreateResponse) GetOrganization() *Organization { + if x != nil { + return x.Organization + } + return nil +} + +// Update call request +// +// Request: +// - organization = [required] The org to be updated. The ID identifies the org, while +// other fileds are to be changed. +type UpdateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateRequest) Reset() { + *x = UpdateRequest{} + mi := &file_organization_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRequest) ProtoMessage() {} + +func (x *UpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. +func (*UpdateRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateRequest) GetOrganization() *Organization { + if x != nil { + return x.Organization + } + return nil +} + +// Update call response +// +// Response: +// - status = [required] Status of response +// - organization = [required] The description of updated organization +type UpdateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Organization *Organization `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResponse) Reset() { + *x = UpdateResponse{} + mi := &file_organization_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResponse) ProtoMessage() {} + +func (x *UpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. +func (*UpdateResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *UpdateResponse) GetOrganization() *Organization { + if x != nil { + return x.Organization + } + return nil +} + +type IsValidResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` + Errors string `protobuf:"bytes,2,opt,name=errors,proto3" json:"errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsValidResponse) Reset() { + *x = IsValidResponse{} + mi := &file_organization_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsValidResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsValidResponse) ProtoMessage() {} + +func (x *IsValidResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsValidResponse.ProtoReflect.Descriptor instead. +func (*IsValidResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{10} +} + +func (x *IsValidResponse) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +func (x *IsValidResponse) GetErrors() string { + if x != nil { + return x.Errors + } + return "" +} + +// IsMember call request +// +// - user_id = [required] User UUID. +// - org_id = Organization UUID. +// - org_username = Organization username. +// +// If org_id is present, it is used for looking up the organization. +// If org_id is not present, but org_username is present, it is used for looking up the organization. +// +// One of org_id or username is [required] for a valid request. +type IsMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + OrgUsername string `protobuf:"bytes,4,opt,name=org_username,json=orgUsername,proto3" json:"org_username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsMemberRequest) Reset() { + *x = IsMemberRequest{} + mi := &file_organization_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsMemberRequest) ProtoMessage() {} + +func (x *IsMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsMemberRequest.ProtoReflect.Descriptor instead. +func (*IsMemberRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{11} +} + +func (x *IsMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *IsMemberRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *IsMemberRequest) GetOrgUsername() string { + if x != nil { + return x.OrgUsername + } + return "" +} + +// IsMember call response +// +// Response: +// - is_member = [required] True or False. +type IsMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + IsMember bool `protobuf:"varint,2,opt,name=is_member,json=isMember,proto3" json:"is_member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsMemberResponse) Reset() { + *x = IsMemberResponse{} + mi := &file_organization_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsMemberResponse) ProtoMessage() {} + +func (x *IsMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsMemberResponse.ProtoReflect.Descriptor instead. +func (*IsMemberResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{12} +} + +func (x *IsMemberResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *IsMemberResponse) GetIsMember() bool { + if x != nil { + return x.IsMember + } + return false +} + +// IsOwner call request +// +// - user_id = User UUID. +// - org_id = Organization UUID. +type IsOwnerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsOwnerRequest) Reset() { + *x = IsOwnerRequest{} + mi := &file_organization_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsOwnerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsOwnerRequest) ProtoMessage() {} + +func (x *IsOwnerRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsOwnerRequest.ProtoReflect.Descriptor instead. +func (*IsOwnerRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{13} +} + +func (x *IsOwnerRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *IsOwnerRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// IsOwner call response +// +// Response: +// - is_owner = [required] True or False. +type IsOwnerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + IsOwner bool `protobuf:"varint,2,opt,name=is_owner,json=isOwner,proto3" json:"is_owner,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsOwnerResponse) Reset() { + *x = IsOwnerResponse{} + mi := &file_organization_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsOwnerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsOwnerResponse) ProtoMessage() {} + +func (x *IsOwnerResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsOwnerResponse.ProtoReflect.Descriptor instead. +func (*IsOwnerResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{14} +} + +func (x *IsOwnerResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *IsOwnerResponse) GetIsOwner() bool { + if x != nil { + return x.IsOwner + } + return false +} + +// MakeOwner call request +// +// - org_id = [required] Organization for which we are changing owner +// - owner_id = [required] UUID of new owner +type MakeOwnerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MakeOwnerRequest) Reset() { + *x = MakeOwnerRequest{} + mi := &file_organization_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MakeOwnerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MakeOwnerRequest) ProtoMessage() {} + +func (x *MakeOwnerRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MakeOwnerRequest.ProtoReflect.Descriptor instead. +func (*MakeOwnerRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{15} +} + +func (x *MakeOwnerRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *MakeOwnerRequest) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +// Members call request +// +// - org_id = Organization UUID. +// - org_username = Organization username. +// - only_members = Skip not_logged_in_members in response. +// - name_contains = Filter members by display name and github login. +// +// If org_id is present, it is used for looking up the organization. +// If org_id is not present, but org_username is present, it is used for looking up the organization. +// +// One of org_id or username is [required] for a valid request. +type MembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + OrgUsername string `protobuf:"bytes,2,opt,name=org_username,json=orgUsername,proto3" json:"org_username,omitempty"` + OnlyMembers bool `protobuf:"varint,3,opt,name=only_members,json=onlyMembers,proto3" json:"only_members,omitempty"` + NameContains string `protobuf:"bytes,4,opt,name=name_contains,json=nameContains,proto3" json:"name_contains,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MembersRequest) Reset() { + *x = MembersRequest{} + mi := &file_organization_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembersRequest) ProtoMessage() {} + +func (x *MembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MembersRequest.ProtoReflect.Descriptor instead. +func (*MembersRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{16} +} + +func (x *MembersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *MembersRequest) GetOrgUsername() string { + if x != nil { + return x.OrgUsername + } + return "" +} + +func (x *MembersRequest) GetOnlyMembers() bool { + if x != nil { + return x.OnlyMembers + } + return false +} + +func (x *MembersRequest) GetNameContains() string { + if x != nil { + return x.NameContains + } + return "" +} + +// Members call response +// +// Response: +// - members = [required] Members of the organization who created their account on Semaphore. +// - not_logged_in_members = [required] Added members of the organization who haven't created their account on Semaphore. +// Empty if only_members if true in reuqest. +type MembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` + NotLoggedInMembers []*Member `protobuf:"bytes,3,rep,name=not_logged_in_members,json=notLoggedInMembers,proto3" json:"not_logged_in_members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MembersResponse) Reset() { + *x = MembersResponse{} + mi := &file_organization_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembersResponse) ProtoMessage() {} + +func (x *MembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MembersResponse.ProtoReflect.Descriptor instead. +func (*MembersResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{17} +} + +func (x *MembersResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *MembersResponse) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *MembersResponse) GetNotLoggedInMembers() []*Member { + if x != nil { + return x.NotLoggedInMembers + } + return nil +} + +// AddMember call request +// +// - org_id = [required] Organization to which the member is added UUId +// - creator_id = [required] The user adding the new member UUID +// - username = [required] Github username of the member to be added +type AddMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + CreatorId string `protobuf:"bytes,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMemberRequest) Reset() { + *x = AddMemberRequest{} + mi := &file_organization_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMemberRequest) ProtoMessage() {} + +func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddMemberRequest.ProtoReflect.Descriptor instead. +func (*AddMemberRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{18} +} + +func (x *AddMemberRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AddMemberRequest) GetCreatorId() string { + if x != nil { + return x.CreatorId + } + return "" +} + +func (x *AddMemberRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +// AddMember call response +// +// Response: +// - member = [required] The created member. +type AddMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMemberResponse) Reset() { + *x = AddMemberResponse{} + mi := &file_organization_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMemberResponse) ProtoMessage() {} + +func (x *AddMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddMemberResponse.ProtoReflect.Descriptor instead. +func (*AddMemberResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{19} +} + +func (x *AddMemberResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *AddMemberResponse) GetMember() *Member { + if x != nil { + return x.Member + } + return nil +} + +// AddMembers call request +// +// - org_id = [required] Organization to which the member is added UUId +// - creator_id = [required] The user adding the new member UUID +// - members_data = [required] Requests for member registration in an Org +type AddMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + CreatorId string `protobuf:"bytes,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + MembersData []*AddMembersRequest_MemberData `protobuf:"bytes,3,rep,name=members_data,json=membersData,proto3" json:"members_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMembersRequest) Reset() { + *x = AddMembersRequest{} + mi := &file_organization_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMembersRequest) ProtoMessage() {} + +func (x *AddMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddMembersRequest.ProtoReflect.Descriptor instead. +func (*AddMembersRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{20} +} + +func (x *AddMembersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AddMembersRequest) GetCreatorId() string { + if x != nil { + return x.CreatorId + } + return "" +} + +func (x *AddMembersRequest) GetMembersData() []*AddMembersRequest_MemberData { + if x != nil { + return x.MembersData + } + return nil +} + +// AddMembers call response +// +// Response: +// - members = [required] The created members. +type AddMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMembersResponse) Reset() { + *x = AddMembersResponse{} + mi := &file_organization_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMembersResponse) ProtoMessage() {} + +func (x *AddMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddMembersResponse.ProtoReflect.Descriptor instead. +func (*AddMembersResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{21} +} + +func (x *AddMembersResponse) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +// DeleteMember call request +// +// - org_id = [required] ID of organization from which the member is removed +// - membership_id = [required if user_id is empty] ID of the membership to be removed +// - user_id = [required if membership_id is empty] ID of the user to be removed +type DeleteMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + MembershipId string `protobuf:"bytes,3,opt,name=membership_id,json=membershipId,proto3" json:"membership_id,omitempty"` + UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemberRequest) Reset() { + *x = DeleteMemberRequest{} + mi := &file_organization_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemberRequest) ProtoMessage() {} + +func (x *DeleteMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemberRequest.ProtoReflect.Descriptor instead. +func (*DeleteMemberRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{22} +} + +func (x *DeleteMemberRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DeleteMemberRequest) GetMembershipId() string { + if x != nil { + return x.MembershipId + } + return "" +} + +func (x *DeleteMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// DeleteMemberResponse call response +type DeleteMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemberResponse) Reset() { + *x = DeleteMemberResponse{} + mi := &file_organization_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemberResponse) ProtoMessage() {} + +func (x *DeleteMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemberResponse.ProtoReflect.Descriptor instead. +func (*DeleteMemberResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{23} +} + +func (x *DeleteMemberResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// Suspend call request +// +// - org_id = [required] ID of organization +// - reason = [required] Reason for suspension. +// - origin = [required] String describing the origin of unsuspension. +// Examples: +// - Automatic/BillingService +// - Manual/Admin/d7478b75-f925-4977-9005-d370b9032dbb +// - Automatic/ThreatDetector +// +// - description = [optional] details about the suspensions +// +// If there is already a suspension with the same reason, the suspension is updated. +// If there is no suspension with the provided reason, a new suspension is added. +type SuspendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Reason Suspension_Reason `protobuf:"varint,4,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SuspendRequest) Reset() { + *x = SuspendRequest{} + mi := &file_organization_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SuspendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuspendRequest) ProtoMessage() {} + +func (x *SuspendRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead. +func (*SuspendRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{24} +} + +func (x *SuspendRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *SuspendRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *SuspendRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SuspendRequest) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +// SuspendResponse call response +// +// This call should always succeed if the params are correct. +// If the account was already suspended, the new suspension will overwrite the +// previous one. +// +// Example: +// - Account was suspended for INSUFFICIENT_FUNDS +// - Then our system has noticed a VIOLATION_OF_TOS +// - When suspended, the new suspension reason is added to the list of reasons. +type SuspendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SuspendResponse) Reset() { + *x = SuspendResponse{} + mi := &file_organization_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SuspendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuspendResponse) ProtoMessage() {} + +func (x *SuspendResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuspendResponse.ProtoReflect.Descriptor instead. +func (*SuspendResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{25} +} + +func (x *SuspendResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// SetOpenSource call request +// +// - org_id = [required] ID of organization +// +// If there org is already open sources, nothing will happen +type SetOpenSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetOpenSourceRequest) Reset() { + *x = SetOpenSourceRequest{} + mi := &file_organization_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetOpenSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOpenSourceRequest) ProtoMessage() {} + +func (x *SetOpenSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOpenSourceRequest.ProtoReflect.Descriptor instead. +func (*SetOpenSourceRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{26} +} + +func (x *SetOpenSourceRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// SetOpenSource call response +// +// This call should always succeed if the params are correct. +// If the org was already open sourced, nothing will happen +// +// - organization = [required] The description of organization +type SetOpenSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetOpenSourceResponse) Reset() { + *x = SetOpenSourceResponse{} + mi := &file_organization_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetOpenSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOpenSourceResponse) ProtoMessage() {} + +func (x *SetOpenSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOpenSourceResponse.ProtoReflect.Descriptor instead. +func (*SetOpenSourceResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{27} +} + +func (x *SetOpenSourceResponse) GetOrganization() *Organization { + if x != nil { + return x.Organization + } + return nil +} + +// Unsuspend call request +// +// - org_id = [required] ID of organization +// - description = [optional] Optinal detailed explanation for unsuspension. +// - origin = [required] String describing the origin of unsuspension. +// Examples: +// - Automatic/BillingService +// - Manual/Admin/d7478b75-f925-4977-9005-d370b9032dbb +// - Automatic/ThreatDetector +// +// - reason = [required] Specifies which suspension reason needs to be removed. +// +// Example: +// Org is suspended with (VIOLATION_OF_TOS, INSUFFICIENT_FUNDS) +// calling Org.Unsuspend(from_suspension_reason: INSUFFICIENT_FUNDS) +// returns an OK and changes the reasons to (VIOLATION_OF_TOS) +// +// If the organization is not suspended with the provided reason, no action is +// executed and OK is returned. +type UnsuspendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Reason Suspension_Reason `protobuf:"varint,4,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnsuspendRequest) Reset() { + *x = UnsuspendRequest{} + mi := &file_organization_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnsuspendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsuspendRequest) ProtoMessage() {} + +func (x *UnsuspendRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsuspendRequest.ProtoReflect.Descriptor instead. +func (*UnsuspendRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{28} +} + +func (x *UnsuspendRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UnsuspendRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *UnsuspendRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UnsuspendRequest) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +// UnsuspendResponse call response +// +// If account is suspended with the reason => unsuspends it and returns OK +// If account is not suspended with the reason => returns OK and does nothing +type UnsuspendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnsuspendResponse) Reset() { + *x = UnsuspendResponse{} + mi := &file_organization_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnsuspendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsuspendResponse) ProtoMessage() {} + +func (x *UnsuspendResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsuspendResponse.ProtoReflect.Descriptor instead. +func (*UnsuspendResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{29} +} + +func (x *UnsuspendResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +type VerifyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifyRequest) Reset() { + *x = VerifyRequest{} + mi := &file_organization_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyRequest) ProtoMessage() {} + +func (x *VerifyRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead. +func (*VerifyRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{30} +} + +func (x *VerifyRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Lists all suspensions for the organization. +// +// - org_id = [required] ID of organization +// +// If the organization is not suspended the array will be empty. +type ListSuspensionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSuspensionsRequest) Reset() { + *x = ListSuspensionsRequest{} + mi := &file_organization_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSuspensionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSuspensionsRequest) ProtoMessage() {} + +func (x *ListSuspensionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSuspensionsRequest.ProtoReflect.Descriptor instead. +func (*ListSuspensionsRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{31} +} + +func (x *ListSuspensionsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// status = [required] Ok if Org exists. +// suspensions = [required] List of suspensions, empty if org is not suspended. +type ListSuspensionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Suspensions []*Suspension `protobuf:"bytes,2,rep,name=suspensions,proto3" json:"suspensions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSuspensionsResponse) Reset() { + *x = ListSuspensionsResponse{} + mi := &file_organization_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSuspensionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSuspensionsResponse) ProtoMessage() {} + +func (x *ListSuspensionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSuspensionsResponse.ProtoReflect.Descriptor instead. +func (*ListSuspensionsResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{32} +} + +func (x *ListSuspensionsResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListSuspensionsResponse) GetSuspensions() []*Suspension { + if x != nil { + return x.Suspensions + } + return nil +} + +// Request to destroy the organization. +// +// - org_id = [required] ID of organization +type DestroyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DestroyRequest) Reset() { + *x = DestroyRequest{} + mi := &file_organization_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DestroyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestroyRequest) ProtoMessage() {} + +func (x *DestroyRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestroyRequest.ProtoReflect.Descriptor instead. +func (*DestroyRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{33} +} + +func (x *DestroyRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Request to restore a soft deleted organization. +// +// - org_id = [required] ID of organization +type RestoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RestoreRequest) Reset() { + *x = RestoreRequest{} + mi := &file_organization_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RestoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreRequest) ProtoMessage() {} + +func (x *RestoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreRequest.ProtoReflect.Descriptor instead. +func (*RestoreRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{34} +} + +func (x *RestoreRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// - org_username = [required] unique name of a organization in system. +// - created_at = [required] date of creation a organization. +// - avatar_url = [required] url to organization avatar. +// - org_id = [required] Organization UUID. +// - name = [required] Organization name. +// - owner_id = [required] Organization owner id. +// - suspended = [required] Returns true if the organization is suspended. +// - verified = [required] Returns true if the organization is explicitly verified. +// - restricted = [required] Returns true if the organization is restricted. +// - open_source = [required] Returns true if organization is allowed only +// to use open source repositories and public projects +// - allowed_id_providers = Returns list of id providers that can be used to +// access this organization (oka, github, bitbucket...). +// If the list is empty, that means any id provider +// can be used +// +// - quotas = [optional] Returned only if explicitely requested in +// Describe. +type Organization struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgUsername string `protobuf:"bytes,1,opt,name=org_username,json=orgUsername,proto3" json:"org_username,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + OwnerId string `protobuf:"bytes,6,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + Suspended bool `protobuf:"varint,7,opt,name=suspended,proto3" json:"suspended,omitempty"` + OpenSource bool `protobuf:"varint,9,opt,name=open_source,json=openSource,proto3" json:"open_source,omitempty"` + Verified bool `protobuf:"varint,10,opt,name=verified,proto3" json:"verified,omitempty"` + Restricted bool `protobuf:"varint,11,opt,name=restricted,proto3" json:"restricted,omitempty"` + IpAllowList []string `protobuf:"bytes,12,rep,name=ip_allow_list,json=ipAllowList,proto3" json:"ip_allow_list,omitempty"` + AllowedIdProviders []string `protobuf:"bytes,13,rep,name=allowed_id_providers,json=allowedIdProviders,proto3" json:"allowed_id_providers,omitempty"` + DenyMemberWorkflows bool `protobuf:"varint,14,opt,name=deny_member_workflows,json=denyMemberWorkflows,proto3" json:"deny_member_workflows,omitempty"` + DenyNonMemberWorkflows bool `protobuf:"varint,15,opt,name=deny_non_member_workflows,json=denyNonMemberWorkflows,proto3" json:"deny_non_member_workflows,omitempty"` + Settings []*OrganizationSetting `protobuf:"bytes,16,rep,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Organization) Reset() { + *x = Organization{} + mi := &file_organization_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Organization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Organization) ProtoMessage() {} + +func (x *Organization) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Organization.ProtoReflect.Descriptor instead. +func (*Organization) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{35} +} + +func (x *Organization) GetOrgUsername() string { + if x != nil { + return x.OrgUsername + } + return "" +} + +func (x *Organization) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Organization) GetAvatarUrl() string { + if x != nil { + return x.AvatarUrl + } + return "" +} + +func (x *Organization) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Organization) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Organization) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *Organization) GetSuspended() bool { + if x != nil { + return x.Suspended + } + return false +} + +func (x *Organization) GetOpenSource() bool { + if x != nil { + return x.OpenSource + } + return false +} + +func (x *Organization) GetVerified() bool { + if x != nil { + return x.Verified + } + return false +} + +func (x *Organization) GetRestricted() bool { + if x != nil { + return x.Restricted + } + return false +} + +func (x *Organization) GetIpAllowList() []string { + if x != nil { + return x.IpAllowList + } + return nil +} + +func (x *Organization) GetAllowedIdProviders() []string { + if x != nil { + return x.AllowedIdProviders + } + return nil +} + +func (x *Organization) GetDenyMemberWorkflows() bool { + if x != nil { + return x.DenyMemberWorkflows + } + return false +} + +func (x *Organization) GetDenyNonMemberWorkflows() bool { + if x != nil { + return x.DenyNonMemberWorkflows + } + return false +} + +func (x *Organization) GetSettings() []*OrganizationSetting { + if x != nil { + return x.Settings + } + return nil +} + +// - origin = [required] String describing the origin of suspension. +// - description = [optional] Optinal detailed explanation for unsuspension. +// - reason = [required] Reason for suspending this organization. +// Examples: +// - Automatic/BillingService +// - Manual/Admin/d7478b75-f925-4977-9005-d370b9032dbb +// - Automatic/ThreatDetector +// +// - timestamp of the suspension [required] +type Suspension struct { + state protoimpl.MessageState `protogen:"open.v1"` + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Reason Suspension_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Suspension) Reset() { + *x = Suspension{} + mi := &file_organization_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Suspension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Suspension) ProtoMessage() {} + +func (x *Suspension) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Suspension.ProtoReflect.Descriptor instead. +func (*Suspension) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{36} +} + +func (x *Suspension) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Suspension) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Suspension) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +func (x *Suspension) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// - screen_name = [required] User's screen name used by user on Semaphore. +// - avatar_url = [required] URL to user's avatar image. +// - user_id = [required] User's UUID if he is a member of the org on Semaphore. +// - role = [required] Member role in the organization +// - membership_id = [required] ID of the membership record connecting user and org +type Member struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScreenName string `protobuf:"bytes,1,opt,name=screen_name,json=screenName,proto3" json:"screen_name,omitempty"` + AvatarUrl string `protobuf:"bytes,2,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Role Member_Role `protobuf:"varint,4,opt,name=role,proto3,enum=InternalApi.Organization.Member_Role" json:"role,omitempty"` + InvitedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=invited_at,json=invitedAt,proto3" json:"invited_at,omitempty"` + MembershipId string `protobuf:"bytes,6,opt,name=membership_id,json=membershipId,proto3" json:"membership_id,omitempty"` + GithubUsername string `protobuf:"bytes,7,opt,name=github_username,json=githubUsername,proto3" json:"github_username,omitempty"` + GithubUid string `protobuf:"bytes,8,opt,name=github_uid,json=githubUid,proto3" json:"github_uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Member) Reset() { + *x = Member{} + mi := &file_organization_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Member) ProtoMessage() {} + +func (x *Member) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Member.ProtoReflect.Descriptor instead. +func (*Member) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{37} +} + +func (x *Member) GetScreenName() string { + if x != nil { + return x.ScreenName + } + return "" +} + +func (x *Member) GetAvatarUrl() string { + if x != nil { + return x.AvatarUrl + } + return "" +} + +func (x *Member) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *Member) GetRole() Member_Role { + if x != nil { + return x.Role + } + return Member_MEMBER +} + +func (x *Member) GetInvitedAt() *timestamppb.Timestamp { + if x != nil { + return x.InvitedAt + } + return nil +} + +func (x *Member) GetMembershipId() string { + if x != nil { + return x.MembershipId + } + return "" +} + +func (x *Member) GetGithubUsername() string { + if x != nil { + return x.GithubUsername + } + return "" +} + +func (x *Member) GetGithubUid() string { + if x != nil { + return x.GithubUid + } + return "" +} + +type OrganizationSetting struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationSetting) Reset() { + *x = OrganizationSetting{} + mi := &file_organization_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationSetting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationSetting) ProtoMessage() {} + +func (x *OrganizationSetting) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationSetting.ProtoReflect.Descriptor instead. +func (*OrganizationSetting) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{38} +} + +func (x *OrganizationSetting) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *OrganizationSetting) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// - org_id = [required] Organization ID for which we request the information. +type RepositoryIntegratorsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepositoryIntegratorsRequest) Reset() { + *x = RepositoryIntegratorsRequest{} + mi := &file_organization_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepositoryIntegratorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryIntegratorsRequest) ProtoMessage() {} + +func (x *RepositoryIntegratorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryIntegratorsRequest.ProtoReflect.Descriptor instead. +func (*RepositoryIntegratorsRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{39} +} + +func (x *RepositoryIntegratorsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// - primary = [required] Primary integration type for an organization. +// - enabled = [required] List of enabled integration types. +// - available = [required] List of available integration types. +type RepositoryIntegratorsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Primary repository_integrator.IntegrationType `protobuf:"varint,1,opt,name=primary,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"primary,omitempty"` + Enabled []repository_integrator.IntegrationType `protobuf:"varint,2,rep,packed,name=enabled,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"enabled,omitempty"` + Available []repository_integrator.IntegrationType `protobuf:"varint,3,rep,packed,name=available,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"available,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepositoryIntegratorsResponse) Reset() { + *x = RepositoryIntegratorsResponse{} + mi := &file_organization_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepositoryIntegratorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryIntegratorsResponse) ProtoMessage() {} + +func (x *RepositoryIntegratorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryIntegratorsResponse.ProtoReflect.Descriptor instead. +func (*RepositoryIntegratorsResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{40} +} + +func (x *RepositoryIntegratorsResponse) GetPrimary() repository_integrator.IntegrationType { + if x != nil { + return x.Primary + } + return repository_integrator.IntegrationType(0) +} + +func (x *RepositoryIntegratorsResponse) GetEnabled() []repository_integrator.IntegrationType { + if x != nil { + return x.Enabled + } + return nil +} + +func (x *RepositoryIntegratorsResponse) GetAvailable() []repository_integrator.IntegrationType { + if x != nil { + return x.Available + } + return nil +} + +// - org_id = [required] Id of organization who's contacts should be fetched +type FetchOrganizationContactsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchOrganizationContactsRequest) Reset() { + *x = FetchOrganizationContactsRequest{} + mi := &file_organization_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchOrganizationContactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchOrganizationContactsRequest) ProtoMessage() {} + +func (x *FetchOrganizationContactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchOrganizationContactsRequest.ProtoReflect.Descriptor instead. +func (*FetchOrganizationContactsRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{41} +} + +func (x *FetchOrganizationContactsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// - type = [required] Type of communication for which this contact should be used. +// - name = [optional] Name of the person behind this contact info. +// - email = [optional] Contact email +// - phone = [optional] Contact phone number +type FetchOrganizationContactsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgContacts []*OrganizationContact `protobuf:"bytes,1,rep,name=org_contacts,json=orgContacts,proto3" json:"org_contacts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchOrganizationContactsResponse) Reset() { + *x = FetchOrganizationContactsResponse{} + mi := &file_organization_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchOrganizationContactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchOrganizationContactsResponse) ProtoMessage() {} + +func (x *FetchOrganizationContactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchOrganizationContactsResponse.ProtoReflect.Descriptor instead. +func (*FetchOrganizationContactsResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{42} +} + +func (x *FetchOrganizationContactsResponse) GetOrgContacts() []*OrganizationContact { + if x != nil { + return x.OrgContacts + } + return nil +} + +type ModifyOrganizationContactRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgContact *OrganizationContact `protobuf:"bytes,1,opt,name=org_contact,json=orgContact,proto3" json:"org_contact,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyOrganizationContactRequest) Reset() { + *x = ModifyOrganizationContactRequest{} + mi := &file_organization_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyOrganizationContactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyOrganizationContactRequest) ProtoMessage() {} + +func (x *ModifyOrganizationContactRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyOrganizationContactRequest.ProtoReflect.Descriptor instead. +func (*ModifyOrganizationContactRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{43} +} + +func (x *ModifyOrganizationContactRequest) GetOrgContact() *OrganizationContact { + if x != nil { + return x.OrgContact + } + return nil +} + +type ModifyOrganizationContactResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyOrganizationContactResponse) Reset() { + *x = ModifyOrganizationContactResponse{} + mi := &file_organization_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyOrganizationContactResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyOrganizationContactResponse) ProtoMessage() {} + +func (x *ModifyOrganizationContactResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyOrganizationContactResponse.ProtoReflect.Descriptor instead. +func (*ModifyOrganizationContactResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{44} +} + +type OrganizationContact struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Type OrganizationContact_ContactType `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.Organization.OrganizationContact_ContactType" json:"type,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationContact) Reset() { + *x = OrganizationContact{} + mi := &file_organization_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationContact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationContact) ProtoMessage() {} + +func (x *OrganizationContact) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationContact.ProtoReflect.Descriptor instead. +func (*OrganizationContact) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{45} +} + +func (x *OrganizationContact) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationContact) GetType() OrganizationContact_ContactType { + if x != nil { + return x.Type + } + return OrganizationContact_CONTACT_TYPE_UNSPECIFIED +} + +func (x *OrganizationContact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OrganizationContact) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *OrganizationContact) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +// - org_id = [required] Id of organization who's settings should be fetched +type FetchOrganizationSettingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchOrganizationSettingsRequest) Reset() { + *x = FetchOrganizationSettingsRequest{} + mi := &file_organization_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchOrganizationSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchOrganizationSettingsRequest) ProtoMessage() {} + +func (x *FetchOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchOrganizationSettingsRequest.ProtoReflect.Descriptor instead. +func (*FetchOrganizationSettingsRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{46} +} + +func (x *FetchOrganizationSettingsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// - settings = [required] List of settings that were fetched from the organization +type FetchOrganizationSettingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Settings []*OrganizationSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchOrganizationSettingsResponse) Reset() { + *x = FetchOrganizationSettingsResponse{} + mi := &file_organization_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchOrganizationSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchOrganizationSettingsResponse) ProtoMessage() {} + +func (x *FetchOrganizationSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchOrganizationSettingsResponse.ProtoReflect.Descriptor instead. +func (*FetchOrganizationSettingsResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{47} +} + +func (x *FetchOrganizationSettingsResponse) GetSettings() []*OrganizationSetting { + if x != nil { + return x.Settings + } + return nil +} + +// - org_id = [required] Id of organization which settings should be affected +// - settings = [required] List of settings to be applied to the organization +type ModifyOrganizationSettingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Settings []*OrganizationSetting `protobuf:"bytes,2,rep,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyOrganizationSettingsRequest) Reset() { + *x = ModifyOrganizationSettingsRequest{} + mi := &file_organization_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyOrganizationSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyOrganizationSettingsRequest) ProtoMessage() {} + +func (x *ModifyOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyOrganizationSettingsRequest.ProtoReflect.Descriptor instead. +func (*ModifyOrganizationSettingsRequest) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{48} +} + +func (x *ModifyOrganizationSettingsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ModifyOrganizationSettingsRequest) GetSettings() []*OrganizationSetting { + if x != nil { + return x.Settings + } + return nil +} + +// - settings = [required] List of settings that were applied to the organization +type ModifyOrganizationSettingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Settings []*OrganizationSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyOrganizationSettingsResponse) Reset() { + *x = ModifyOrganizationSettingsResponse{} + mi := &file_organization_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyOrganizationSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyOrganizationSettingsResponse) ProtoMessage() {} + +func (x *ModifyOrganizationSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyOrganizationSettingsResponse.ProtoReflect.Descriptor instead. +func (*ModifyOrganizationSettingsResponse) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{49} +} + +func (x *ModifyOrganizationSettingsResponse) GetSettings() []*OrganizationSetting { + if x != nil { + return x.Settings + } + return nil +} + +// Published with routing key: 'created'. +// All fields are required. +type OrganizationCreated struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationCreated) Reset() { + *x = OrganizationCreated{} + mi := &file_organization_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationCreated) ProtoMessage() {} + +func (x *OrganizationCreated) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationCreated.ProtoReflect.Descriptor instead. +func (*OrganizationCreated) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{50} +} + +func (x *OrganizationCreated) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationCreated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'deleted'. +// All fields are required. +type OrganizationDeleted struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationDeleted) Reset() { + *x = OrganizationDeleted{} + mi := &file_organization_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationDeleted) ProtoMessage() {} + +func (x *OrganizationDeleted) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationDeleted.ProtoReflect.Descriptor instead. +func (*OrganizationDeleted) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{51} +} + +func (x *OrganizationDeleted) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationDeleted) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'updated'. +// All fields are required. +type OrganizationUpdated struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationUpdated) Reset() { + *x = OrganizationUpdated{} + mi := &file_organization_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationUpdated) ProtoMessage() {} + +func (x *OrganizationUpdated) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationUpdated.ProtoReflect.Descriptor instead. +func (*OrganizationUpdated) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{52} +} + +func (x *OrganizationUpdated) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationUpdated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'blocked'. +// All fields are required. +type OrganizationBlocked struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reason Suspension_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationBlocked) Reset() { + *x = OrganizationBlocked{} + mi := &file_organization_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationBlocked) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationBlocked) ProtoMessage() {} + +func (x *OrganizationBlocked) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationBlocked.ProtoReflect.Descriptor instead. +func (*OrganizationBlocked) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{53} +} + +func (x *OrganizationBlocked) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationBlocked) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *OrganizationBlocked) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +// Published with routing key: 'suspension_created'. +// All fields are required. +// The event is emitted when a suspension for an +// organization is created, irrespective of the previous +// suspension status of the organization. +// If the organization is blocked due to this suspension +// creation, the OrganizationBlocked event will be emitted as well. +type OrganizationSuspensionCreated struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reason Suspension_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationSuspensionCreated) Reset() { + *x = OrganizationSuspensionCreated{} + mi := &file_organization_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationSuspensionCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationSuspensionCreated) ProtoMessage() {} + +func (x *OrganizationSuspensionCreated) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationSuspensionCreated.ProtoReflect.Descriptor instead. +func (*OrganizationSuspensionCreated) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{54} +} + +func (x *OrganizationSuspensionCreated) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationSuspensionCreated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *OrganizationSuspensionCreated) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +// Published with routing key: 'suspension_removed'. +// All fields are required. +// The event is emitted when a suspension is removed, +// irrespective of the suspend status of the organization. +// If an organization is unsuspended completely, the +// OrganizationUnblocked event will be emitted as well. +type OrganizationSuspensionRemoved struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reason Suspension_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=InternalApi.Organization.Suspension_Reason" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationSuspensionRemoved) Reset() { + *x = OrganizationSuspensionRemoved{} + mi := &file_organization_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationSuspensionRemoved) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationSuspensionRemoved) ProtoMessage() {} + +func (x *OrganizationSuspensionRemoved) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationSuspensionRemoved.ProtoReflect.Descriptor instead. +func (*OrganizationSuspensionRemoved) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{55} +} + +func (x *OrganizationSuspensionRemoved) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationSuspensionRemoved) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *OrganizationSuspensionRemoved) GetReason() Suspension_Reason { + if x != nil { + return x.Reason + } + return Suspension_INSUFFICIENT_FUNDS +} + +// Published with routing key: 'unblocked'. +// All fields are required. +type OrganizationUnblocked struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationUnblocked) Reset() { + *x = OrganizationUnblocked{} + mi := &file_organization_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationUnblocked) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationUnblocked) ProtoMessage() {} + +func (x *OrganizationUnblocked) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationUnblocked.ProtoReflect.Descriptor instead. +func (*OrganizationUnblocked) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{56} +} + +func (x *OrganizationUnblocked) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationUnblocked) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// [DEPRECATED] - DONT USE - this event is no longer published nor consumed. +// Published with routing key: 'daily_update'. +// All fields are required. +type OrganizationDailyUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + OrgUsername string `protobuf:"bytes,2,opt,name=org_username,json=orgUsername,proto3" json:"org_username,omitempty"` + OrgName string `protobuf:"bytes,3,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ProjectsCount int32 `protobuf:"varint,5,opt,name=projects_count,json=projectsCount,proto3" json:"projects_count,omitempty"` + MemberCount int32 `protobuf:"varint,6,opt,name=member_count,json=memberCount,proto3" json:"member_count,omitempty"` + InvitedCount int32 `protobuf:"varint,7,opt,name=invited_count,json=invitedCount,proto3" json:"invited_count,omitempty"` + OwnerId string `protobuf:"bytes,8,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + OwnerEmail string `protobuf:"bytes,9,opt,name=owner_email,json=ownerEmail,proto3" json:"owner_email,omitempty"` + OwnerOwnedOrgsCount int32 `protobuf:"varint,10,opt,name=owner_owned_orgs_count,json=ownerOwnedOrgsCount,proto3" json:"owner_owned_orgs_count,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationDailyUpdate) Reset() { + *x = OrganizationDailyUpdate{} + mi := &file_organization_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationDailyUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationDailyUpdate) ProtoMessage() {} + +func (x *OrganizationDailyUpdate) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationDailyUpdate.ProtoReflect.Descriptor instead. +func (*OrganizationDailyUpdate) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{57} +} + +func (x *OrganizationDailyUpdate) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationDailyUpdate) GetOrgUsername() string { + if x != nil { + return x.OrgUsername + } + return "" +} + +func (x *OrganizationDailyUpdate) GetOrgName() string { + if x != nil { + return x.OrgName + } + return "" +} + +func (x *OrganizationDailyUpdate) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *OrganizationDailyUpdate) GetProjectsCount() int32 { + if x != nil { + return x.ProjectsCount + } + return 0 +} + +func (x *OrganizationDailyUpdate) GetMemberCount() int32 { + if x != nil { + return x.MemberCount + } + return 0 +} + +func (x *OrganizationDailyUpdate) GetInvitedCount() int32 { + if x != nil { + return x.InvitedCount + } + return 0 +} + +func (x *OrganizationDailyUpdate) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *OrganizationDailyUpdate) GetOwnerEmail() string { + if x != nil { + return x.OwnerEmail + } + return "" +} + +func (x *OrganizationDailyUpdate) GetOwnerOwnedOrgsCount() int32 { + if x != nil { + return x.OwnerOwnedOrgsCount + } + return 0 +} + +func (x *OrganizationDailyUpdate) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'restored'. +// All fields are required. +type OrganizationRestored struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationRestored) Reset() { + *x = OrganizationRestored{} + mi := &file_organization_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationRestored) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationRestored) ProtoMessage() {} + +func (x *OrganizationRestored) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationRestored.ProtoReflect.Descriptor instead. +func (*OrganizationRestored) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{58} +} + +func (x *OrganizationRestored) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *OrganizationRestored) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Data based on which we will add a members +// +// github_username = [required] Github username of a member +// github_uid = [required] Github uid of a member +// invite_email = [optional] Email to which we will send an invitation, if present +type AddMembersRequest_MemberData struct { + state protoimpl.MessageState `protogen:"open.v1"` + GithubUsername string `protobuf:"bytes,1,opt,name=github_username,json=githubUsername,proto3" json:"github_username,omitempty"` + GithubUid string `protobuf:"bytes,2,opt,name=github_uid,json=githubUid,proto3" json:"github_uid,omitempty"` + InviteEmail string `protobuf:"bytes,3,opt,name=invite_email,json=inviteEmail,proto3" json:"invite_email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMembersRequest_MemberData) Reset() { + *x = AddMembersRequest_MemberData{} + mi := &file_organization_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMembersRequest_MemberData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMembersRequest_MemberData) ProtoMessage() {} + +func (x *AddMembersRequest_MemberData) ProtoReflect() protoreflect.Message { + mi := &file_organization_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddMembersRequest_MemberData.ProtoReflect.Descriptor instead. +func (*AddMembersRequest_MemberData) Descriptor() ([]byte, []int) { + return file_organization_proto_rawDescGZIP(), []int{20, 0} +} + +func (x *AddMembersRequest_MemberData) GetGithubUsername() string { + if x != nil { + return x.GithubUsername + } + return "" +} + +func (x *AddMembersRequest_MemberData) GetGithubUid() string { + if x != nil { + return x.GithubUid + } + return "" +} + +func (x *AddMembersRequest_MemberData) GetInviteEmail() string { + if x != nil { + return x.InviteEmail + } + return "" +} + +var File_organization_proto protoreflect.FileDescriptor + +var file_organization_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 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, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x71, 0x75, 0x6f, 0x74, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x93, + 0x01, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6f, + 0x72, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, + 0x67, 0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4c, 0x0a, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbc, 0x02, + 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x67, 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, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x12, 0x41, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x66, + 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x59, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x41, 0x53, 0x43, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x22, 0xb9, 0x01, 0x0a, + 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x5b, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, + 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x0f, 0x49, 0x73, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x64, 0x0a, + 0x0f, 0x49, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x10, 0x49, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x69, 0x73, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x69, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x0e, 0x49, 0x73, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x0f, 0x49, + 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x44, + 0x0a, 0x10, 0x4d, 0x61, 0x6b, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x61, 0x6d, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x53, + 0x0a, 0x15, 0x6e, 0x6f, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x12, 0x6e, 0x6f, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x22, 0x64, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x79, 0x0a, 0x11, 0x41, 0x64, 0x64, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x22, 0x9d, 0x02, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x12, 0x59, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x77, 0x0a, 0x0a, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, 0x69, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x50, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x6a, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x42, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x73, 0x70, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0x3d, 0x0a, 0x0f, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2d, + 0x0a, 0x14, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x63, 0x0a, + 0x15, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, + 0x11, 0x55, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x26, + 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x46, 0x0a, 0x0b, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x73, 0x75, 0x73, 0x70, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x27, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x74, 0x72, + 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x22, 0x27, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0xdc, 0x04, 0x0a, 0x0c, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, + 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 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, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, + 0x70, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x74, + 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, + 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x70, 0x5f, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x69, 0x70, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x32, + 0x0a, 0x15, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, + 0x65, 0x6e, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x65, 0x6e, 0x79, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x49, 0x0a, + 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x93, 0x02, 0x0a, 0x0a, 0x53, 0x75, 0x73, + 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, + 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x4b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x49, + 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x55, 0x4e, 0x44, + 0x53, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x41, + 0x54, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x49, 0x4f, 0x4c, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x5f, 0x54, 0x4f, 0x53, 0x10, 0x02, 0x22, 0xee, + 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x72, + 0x65, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x39, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x39, 0x0a, + 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x09, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x5f, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x55, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, + 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, + 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x22, + 0x3d, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x22, 0x35, + 0x0a, 0x1c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x8a, 0x02, 0x0a, 0x1d, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x4f, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x39, 0x0a, 0x20, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x75, 0x0a, + 0x21, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x63, 0x74, 0x73, 0x22, 0x72, 0x0a, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6f, 0x72, 0x67, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x0a, 0x6f, 0x72, + 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb5, 0x02, + 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x78, 0x0a, 0x0b, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, + 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x54, + 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, + 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, + 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x55, 0x52, + 0x49, 0x54, 0x59, 0x10, 0x03, 0x22, 0x39, 0x0a, 0x20, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x22, 0x6e, 0x0a, 0x21, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x22, 0x85, 0x01, 0x0a, 0x21, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x49, 0x0a, + 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x6f, 0x0a, 0x22, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, + 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x66, 0x0a, 0x13, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0x66, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x66, 0x0a, 0x13, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0xab, 0x01, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0xb5, 0x01, 0x0a, 0x1d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x1d, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0x68, 0x0a, 0x15, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, + 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc3, 0x03, 0x0a, 0x17, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x6f, 0x72, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x72, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, + 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x13, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x4f, 0x72, 0x67, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x0b, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x67, 0x0a, 0x14, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0x97, 0x15, 0x0a, 0x13, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x61, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x29, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, + 0x61, 0x6e, 0x79, 0x12, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x07, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x26, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x61, 0x0a, 0x08, 0x49, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x07, 0x49, 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, + 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x09, 0x4d, 0x61, 0x6b, 0x65, 0x4f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x6b, + 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, + 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0a, 0x41, + 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x07, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x28, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x09, 0x55, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, + 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x6e, 0x73, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x73, 0x70, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, + 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4b, 0x0a, 0x07, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x88, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x36, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x19, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x73, 0x12, 0x3a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x19, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x3a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x94, 0x01, 0x0a, 0x19, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x3a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x1a, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, + 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_organization_proto_rawDescOnce sync.Once + file_organization_proto_rawDescData = file_organization_proto_rawDesc +) + +func file_organization_proto_rawDescGZIP() []byte { + file_organization_proto_rawDescOnce.Do(func() { + file_organization_proto_rawDescData = protoimpl.X.CompressGZIP(file_organization_proto_rawDescData) + }) + return file_organization_proto_rawDescData +} + +var file_organization_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_organization_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_organization_proto_goTypes = []any{ + (ListRequest_Order)(0), // 0: InternalApi.Organization.ListRequest.Order + (Suspension_Reason)(0), // 1: InternalApi.Organization.Suspension.Reason + (Member_Role)(0), // 2: InternalApi.Organization.Member.Role + (OrganizationContact_ContactType)(0), // 3: InternalApi.Organization.OrganizationContact.ContactType + (*DescribeRequest)(nil), // 4: InternalApi.Organization.DescribeRequest + (*DescribeResponse)(nil), // 5: InternalApi.Organization.DescribeResponse + (*DescribeManyRequest)(nil), // 6: InternalApi.Organization.DescribeManyRequest + (*DescribeManyResponse)(nil), // 7: InternalApi.Organization.DescribeManyResponse + (*ListRequest)(nil), // 8: InternalApi.Organization.ListRequest + (*ListResponse)(nil), // 9: InternalApi.Organization.ListResponse + (*CreateRequest)(nil), // 10: InternalApi.Organization.CreateRequest + (*CreateResponse)(nil), // 11: InternalApi.Organization.CreateResponse + (*UpdateRequest)(nil), // 12: InternalApi.Organization.UpdateRequest + (*UpdateResponse)(nil), // 13: InternalApi.Organization.UpdateResponse + (*IsValidResponse)(nil), // 14: InternalApi.Organization.IsValidResponse + (*IsMemberRequest)(nil), // 15: InternalApi.Organization.IsMemberRequest + (*IsMemberResponse)(nil), // 16: InternalApi.Organization.IsMemberResponse + (*IsOwnerRequest)(nil), // 17: InternalApi.Organization.IsOwnerRequest + (*IsOwnerResponse)(nil), // 18: InternalApi.Organization.IsOwnerResponse + (*MakeOwnerRequest)(nil), // 19: InternalApi.Organization.MakeOwnerRequest + (*MembersRequest)(nil), // 20: InternalApi.Organization.MembersRequest + (*MembersResponse)(nil), // 21: InternalApi.Organization.MembersResponse + (*AddMemberRequest)(nil), // 22: InternalApi.Organization.AddMemberRequest + (*AddMemberResponse)(nil), // 23: InternalApi.Organization.AddMemberResponse + (*AddMembersRequest)(nil), // 24: InternalApi.Organization.AddMembersRequest + (*AddMembersResponse)(nil), // 25: InternalApi.Organization.AddMembersResponse + (*DeleteMemberRequest)(nil), // 26: InternalApi.Organization.DeleteMemberRequest + (*DeleteMemberResponse)(nil), // 27: InternalApi.Organization.DeleteMemberResponse + (*SuspendRequest)(nil), // 28: InternalApi.Organization.SuspendRequest + (*SuspendResponse)(nil), // 29: InternalApi.Organization.SuspendResponse + (*SetOpenSourceRequest)(nil), // 30: InternalApi.Organization.SetOpenSourceRequest + (*SetOpenSourceResponse)(nil), // 31: InternalApi.Organization.SetOpenSourceResponse + (*UnsuspendRequest)(nil), // 32: InternalApi.Organization.UnsuspendRequest + (*UnsuspendResponse)(nil), // 33: InternalApi.Organization.UnsuspendResponse + (*VerifyRequest)(nil), // 34: InternalApi.Organization.VerifyRequest + (*ListSuspensionsRequest)(nil), // 35: InternalApi.Organization.ListSuspensionsRequest + (*ListSuspensionsResponse)(nil), // 36: InternalApi.Organization.ListSuspensionsResponse + (*DestroyRequest)(nil), // 37: InternalApi.Organization.DestroyRequest + (*RestoreRequest)(nil), // 38: InternalApi.Organization.RestoreRequest + (*Organization)(nil), // 39: InternalApi.Organization.Organization + (*Suspension)(nil), // 40: InternalApi.Organization.Suspension + (*Member)(nil), // 41: InternalApi.Organization.Member + (*OrganizationSetting)(nil), // 42: InternalApi.Organization.OrganizationSetting + (*RepositoryIntegratorsRequest)(nil), // 43: InternalApi.Organization.RepositoryIntegratorsRequest + (*RepositoryIntegratorsResponse)(nil), // 44: InternalApi.Organization.RepositoryIntegratorsResponse + (*FetchOrganizationContactsRequest)(nil), // 45: InternalApi.Organization.FetchOrganizationContactsRequest + (*FetchOrganizationContactsResponse)(nil), // 46: InternalApi.Organization.FetchOrganizationContactsResponse + (*ModifyOrganizationContactRequest)(nil), // 47: InternalApi.Organization.ModifyOrganizationContactRequest + (*ModifyOrganizationContactResponse)(nil), // 48: InternalApi.Organization.ModifyOrganizationContactResponse + (*OrganizationContact)(nil), // 49: InternalApi.Organization.OrganizationContact + (*FetchOrganizationSettingsRequest)(nil), // 50: InternalApi.Organization.FetchOrganizationSettingsRequest + (*FetchOrganizationSettingsResponse)(nil), // 51: InternalApi.Organization.FetchOrganizationSettingsResponse + (*ModifyOrganizationSettingsRequest)(nil), // 52: InternalApi.Organization.ModifyOrganizationSettingsRequest + (*ModifyOrganizationSettingsResponse)(nil), // 53: InternalApi.Organization.ModifyOrganizationSettingsResponse + (*OrganizationCreated)(nil), // 54: InternalApi.Organization.OrganizationCreated + (*OrganizationDeleted)(nil), // 55: InternalApi.Organization.OrganizationDeleted + (*OrganizationUpdated)(nil), // 56: InternalApi.Organization.OrganizationUpdated + (*OrganizationBlocked)(nil), // 57: InternalApi.Organization.OrganizationBlocked + (*OrganizationSuspensionCreated)(nil), // 58: InternalApi.Organization.OrganizationSuspensionCreated + (*OrganizationSuspensionRemoved)(nil), // 59: InternalApi.Organization.OrganizationSuspensionRemoved + (*OrganizationUnblocked)(nil), // 60: InternalApi.Organization.OrganizationUnblocked + (*OrganizationDailyUpdate)(nil), // 61: InternalApi.Organization.OrganizationDailyUpdate + (*OrganizationRestored)(nil), // 62: InternalApi.Organization.OrganizationRestored + (*AddMembersRequest_MemberData)(nil), // 63: InternalApi.Organization.AddMembersRequest.MemberData + (*response_status.ResponseStatus)(nil), // 64: InternalApi.ResponseStatus + (*timestamppb.Timestamp)(nil), // 65: google.protobuf.Timestamp + (*status.Status)(nil), // 66: google.rpc.Status + (repository_integrator.IntegrationType)(0), // 67: InternalApi.RepositoryIntegrator.IntegrationType + (*emptypb.Empty)(nil), // 68: google.protobuf.Empty +} +var file_organization_proto_depIdxs = []int32{ + 64, // 0: InternalApi.Organization.DescribeResponse.status:type_name -> InternalApi.ResponseStatus + 39, // 1: InternalApi.Organization.DescribeResponse.organization:type_name -> InternalApi.Organization.Organization + 39, // 2: InternalApi.Organization.DescribeManyResponse.organizations:type_name -> InternalApi.Organization.Organization + 65, // 3: InternalApi.Organization.ListRequest.created_at_gt:type_name -> google.protobuf.Timestamp + 0, // 4: InternalApi.Organization.ListRequest.order:type_name -> InternalApi.Organization.ListRequest.Order + 64, // 5: InternalApi.Organization.ListResponse.status:type_name -> InternalApi.ResponseStatus + 39, // 6: InternalApi.Organization.ListResponse.organizations:type_name -> InternalApi.Organization.Organization + 64, // 7: InternalApi.Organization.CreateResponse.status:type_name -> InternalApi.ResponseStatus + 39, // 8: InternalApi.Organization.CreateResponse.organization:type_name -> InternalApi.Organization.Organization + 39, // 9: InternalApi.Organization.UpdateRequest.organization:type_name -> InternalApi.Organization.Organization + 66, // 10: InternalApi.Organization.UpdateResponse.status:type_name -> google.rpc.Status + 39, // 11: InternalApi.Organization.UpdateResponse.organization:type_name -> InternalApi.Organization.Organization + 64, // 12: InternalApi.Organization.IsMemberResponse.status:type_name -> InternalApi.ResponseStatus + 64, // 13: InternalApi.Organization.IsOwnerResponse.status:type_name -> InternalApi.ResponseStatus + 64, // 14: InternalApi.Organization.MembersResponse.status:type_name -> InternalApi.ResponseStatus + 41, // 15: InternalApi.Organization.MembersResponse.members:type_name -> InternalApi.Organization.Member + 41, // 16: InternalApi.Organization.MembersResponse.not_logged_in_members:type_name -> InternalApi.Organization.Member + 66, // 17: InternalApi.Organization.AddMemberResponse.status:type_name -> google.rpc.Status + 41, // 18: InternalApi.Organization.AddMemberResponse.member:type_name -> InternalApi.Organization.Member + 63, // 19: InternalApi.Organization.AddMembersRequest.members_data:type_name -> InternalApi.Organization.AddMembersRequest.MemberData + 41, // 20: InternalApi.Organization.AddMembersResponse.members:type_name -> InternalApi.Organization.Member + 66, // 21: InternalApi.Organization.DeleteMemberResponse.status:type_name -> google.rpc.Status + 1, // 22: InternalApi.Organization.SuspendRequest.reason:type_name -> InternalApi.Organization.Suspension.Reason + 66, // 23: InternalApi.Organization.SuspendResponse.status:type_name -> google.rpc.Status + 39, // 24: InternalApi.Organization.SetOpenSourceResponse.organization:type_name -> InternalApi.Organization.Organization + 1, // 25: InternalApi.Organization.UnsuspendRequest.reason:type_name -> InternalApi.Organization.Suspension.Reason + 66, // 26: InternalApi.Organization.UnsuspendResponse.status:type_name -> google.rpc.Status + 66, // 27: InternalApi.Organization.ListSuspensionsResponse.status:type_name -> google.rpc.Status + 40, // 28: InternalApi.Organization.ListSuspensionsResponse.suspensions:type_name -> InternalApi.Organization.Suspension + 65, // 29: InternalApi.Organization.Organization.created_at:type_name -> google.protobuf.Timestamp + 42, // 30: InternalApi.Organization.Organization.settings:type_name -> InternalApi.Organization.OrganizationSetting + 1, // 31: InternalApi.Organization.Suspension.reason:type_name -> InternalApi.Organization.Suspension.Reason + 65, // 32: InternalApi.Organization.Suspension.created_at:type_name -> google.protobuf.Timestamp + 2, // 33: InternalApi.Organization.Member.role:type_name -> InternalApi.Organization.Member.Role + 65, // 34: InternalApi.Organization.Member.invited_at:type_name -> google.protobuf.Timestamp + 67, // 35: InternalApi.Organization.RepositoryIntegratorsResponse.primary:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 67, // 36: InternalApi.Organization.RepositoryIntegratorsResponse.enabled:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 67, // 37: InternalApi.Organization.RepositoryIntegratorsResponse.available:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 49, // 38: InternalApi.Organization.FetchOrganizationContactsResponse.org_contacts:type_name -> InternalApi.Organization.OrganizationContact + 49, // 39: InternalApi.Organization.ModifyOrganizationContactRequest.org_contact:type_name -> InternalApi.Organization.OrganizationContact + 3, // 40: InternalApi.Organization.OrganizationContact.type:type_name -> InternalApi.Organization.OrganizationContact.ContactType + 42, // 41: InternalApi.Organization.FetchOrganizationSettingsResponse.settings:type_name -> InternalApi.Organization.OrganizationSetting + 42, // 42: InternalApi.Organization.ModifyOrganizationSettingsRequest.settings:type_name -> InternalApi.Organization.OrganizationSetting + 42, // 43: InternalApi.Organization.ModifyOrganizationSettingsResponse.settings:type_name -> InternalApi.Organization.OrganizationSetting + 65, // 44: InternalApi.Organization.OrganizationCreated.timestamp:type_name -> google.protobuf.Timestamp + 65, // 45: InternalApi.Organization.OrganizationDeleted.timestamp:type_name -> google.protobuf.Timestamp + 65, // 46: InternalApi.Organization.OrganizationUpdated.timestamp:type_name -> google.protobuf.Timestamp + 65, // 47: InternalApi.Organization.OrganizationBlocked.timestamp:type_name -> google.protobuf.Timestamp + 1, // 48: InternalApi.Organization.OrganizationBlocked.reason:type_name -> InternalApi.Organization.Suspension.Reason + 65, // 49: InternalApi.Organization.OrganizationSuspensionCreated.timestamp:type_name -> google.protobuf.Timestamp + 1, // 50: InternalApi.Organization.OrganizationSuspensionCreated.reason:type_name -> InternalApi.Organization.Suspension.Reason + 65, // 51: InternalApi.Organization.OrganizationSuspensionRemoved.timestamp:type_name -> google.protobuf.Timestamp + 1, // 52: InternalApi.Organization.OrganizationSuspensionRemoved.reason:type_name -> InternalApi.Organization.Suspension.Reason + 65, // 53: InternalApi.Organization.OrganizationUnblocked.timestamp:type_name -> google.protobuf.Timestamp + 65, // 54: InternalApi.Organization.OrganizationDailyUpdate.created_at:type_name -> google.protobuf.Timestamp + 65, // 55: InternalApi.Organization.OrganizationDailyUpdate.timestamp:type_name -> google.protobuf.Timestamp + 65, // 56: InternalApi.Organization.OrganizationRestored.timestamp:type_name -> google.protobuf.Timestamp + 4, // 57: InternalApi.Organization.OrganizationService.Describe:input_type -> InternalApi.Organization.DescribeRequest + 6, // 58: InternalApi.Organization.OrganizationService.DescribeMany:input_type -> InternalApi.Organization.DescribeManyRequest + 8, // 59: InternalApi.Organization.OrganizationService.List:input_type -> InternalApi.Organization.ListRequest + 10, // 60: InternalApi.Organization.OrganizationService.Create:input_type -> InternalApi.Organization.CreateRequest + 12, // 61: InternalApi.Organization.OrganizationService.Update:input_type -> InternalApi.Organization.UpdateRequest + 39, // 62: InternalApi.Organization.OrganizationService.IsValid:input_type -> InternalApi.Organization.Organization + 15, // 63: InternalApi.Organization.OrganizationService.IsMember:input_type -> InternalApi.Organization.IsMemberRequest + 17, // 64: InternalApi.Organization.OrganizationService.IsOwner:input_type -> InternalApi.Organization.IsOwnerRequest + 19, // 65: InternalApi.Organization.OrganizationService.MakeOwner:input_type -> InternalApi.Organization.MakeOwnerRequest + 20, // 66: InternalApi.Organization.OrganizationService.Members:input_type -> InternalApi.Organization.MembersRequest + 22, // 67: InternalApi.Organization.OrganizationService.AddMember:input_type -> InternalApi.Organization.AddMemberRequest + 24, // 68: InternalApi.Organization.OrganizationService.AddMembers:input_type -> InternalApi.Organization.AddMembersRequest + 26, // 69: InternalApi.Organization.OrganizationService.DeleteMember:input_type -> InternalApi.Organization.DeleteMemberRequest + 28, // 70: InternalApi.Organization.OrganizationService.Suspend:input_type -> InternalApi.Organization.SuspendRequest + 32, // 71: InternalApi.Organization.OrganizationService.Unsuspend:input_type -> InternalApi.Organization.UnsuspendRequest + 34, // 72: InternalApi.Organization.OrganizationService.Verify:input_type -> InternalApi.Organization.VerifyRequest + 30, // 73: InternalApi.Organization.OrganizationService.SetOpenSource:input_type -> InternalApi.Organization.SetOpenSourceRequest + 35, // 74: InternalApi.Organization.OrganizationService.ListSuspensions:input_type -> InternalApi.Organization.ListSuspensionsRequest + 37, // 75: InternalApi.Organization.OrganizationService.Destroy:input_type -> InternalApi.Organization.DestroyRequest + 38, // 76: InternalApi.Organization.OrganizationService.Restore:input_type -> InternalApi.Organization.RestoreRequest + 43, // 77: InternalApi.Organization.OrganizationService.RepositoryIntegrators:input_type -> InternalApi.Organization.RepositoryIntegratorsRequest + 45, // 78: InternalApi.Organization.OrganizationService.FetchOrganizationContacts:input_type -> InternalApi.Organization.FetchOrganizationContactsRequest + 47, // 79: InternalApi.Organization.OrganizationService.ModifyOrganizationContact:input_type -> InternalApi.Organization.ModifyOrganizationContactRequest + 50, // 80: InternalApi.Organization.OrganizationService.FetchOrganizationSettings:input_type -> InternalApi.Organization.FetchOrganizationSettingsRequest + 52, // 81: InternalApi.Organization.OrganizationService.ModifyOrganizationSettings:input_type -> InternalApi.Organization.ModifyOrganizationSettingsRequest + 5, // 82: InternalApi.Organization.OrganizationService.Describe:output_type -> InternalApi.Organization.DescribeResponse + 7, // 83: InternalApi.Organization.OrganizationService.DescribeMany:output_type -> InternalApi.Organization.DescribeManyResponse + 9, // 84: InternalApi.Organization.OrganizationService.List:output_type -> InternalApi.Organization.ListResponse + 11, // 85: InternalApi.Organization.OrganizationService.Create:output_type -> InternalApi.Organization.CreateResponse + 13, // 86: InternalApi.Organization.OrganizationService.Update:output_type -> InternalApi.Organization.UpdateResponse + 14, // 87: InternalApi.Organization.OrganizationService.IsValid:output_type -> InternalApi.Organization.IsValidResponse + 16, // 88: InternalApi.Organization.OrganizationService.IsMember:output_type -> InternalApi.Organization.IsMemberResponse + 18, // 89: InternalApi.Organization.OrganizationService.IsOwner:output_type -> InternalApi.Organization.IsOwnerResponse + 68, // 90: InternalApi.Organization.OrganizationService.MakeOwner:output_type -> google.protobuf.Empty + 21, // 91: InternalApi.Organization.OrganizationService.Members:output_type -> InternalApi.Organization.MembersResponse + 23, // 92: InternalApi.Organization.OrganizationService.AddMember:output_type -> InternalApi.Organization.AddMemberResponse + 25, // 93: InternalApi.Organization.OrganizationService.AddMembers:output_type -> InternalApi.Organization.AddMembersResponse + 27, // 94: InternalApi.Organization.OrganizationService.DeleteMember:output_type -> InternalApi.Organization.DeleteMemberResponse + 29, // 95: InternalApi.Organization.OrganizationService.Suspend:output_type -> InternalApi.Organization.SuspendResponse + 33, // 96: InternalApi.Organization.OrganizationService.Unsuspend:output_type -> InternalApi.Organization.UnsuspendResponse + 39, // 97: InternalApi.Organization.OrganizationService.Verify:output_type -> InternalApi.Organization.Organization + 31, // 98: InternalApi.Organization.OrganizationService.SetOpenSource:output_type -> InternalApi.Organization.SetOpenSourceResponse + 36, // 99: InternalApi.Organization.OrganizationService.ListSuspensions:output_type -> InternalApi.Organization.ListSuspensionsResponse + 68, // 100: InternalApi.Organization.OrganizationService.Destroy:output_type -> google.protobuf.Empty + 68, // 101: InternalApi.Organization.OrganizationService.Restore:output_type -> google.protobuf.Empty + 44, // 102: InternalApi.Organization.OrganizationService.RepositoryIntegrators:output_type -> InternalApi.Organization.RepositoryIntegratorsResponse + 46, // 103: InternalApi.Organization.OrganizationService.FetchOrganizationContacts:output_type -> InternalApi.Organization.FetchOrganizationContactsResponse + 48, // 104: InternalApi.Organization.OrganizationService.ModifyOrganizationContact:output_type -> InternalApi.Organization.ModifyOrganizationContactResponse + 51, // 105: InternalApi.Organization.OrganizationService.FetchOrganizationSettings:output_type -> InternalApi.Organization.FetchOrganizationSettingsResponse + 53, // 106: InternalApi.Organization.OrganizationService.ModifyOrganizationSettings:output_type -> InternalApi.Organization.ModifyOrganizationSettingsResponse + 82, // [82:107] is the sub-list for method output_type + 57, // [57:82] is the sub-list for method input_type + 57, // [57:57] is the sub-list for extension type_name + 57, // [57:57] is the sub-list for extension extendee + 0, // [0:57] is the sub-list for field type_name +} + +func init() { file_organization_proto_init() } +func file_organization_proto_init() { + if File_organization_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_organization_proto_rawDesc, + NumEnums: 4, + NumMessages: 60, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_organization_proto_goTypes, + DependencyIndexes: file_organization_proto_depIdxs, + EnumInfos: file_organization_proto_enumTypes, + MessageInfos: file_organization_proto_msgTypes, + }.Build() + File_organization_proto = out.File + file_organization_proto_rawDesc = nil + file_organization_proto_goTypes = nil + file_organization_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/organization/organization_grpc.pb.go b/mcp_server/pkg/internal_api/organization/organization_grpc.pb.go new file mode 100644 index 000000000..a51057e92 --- /dev/null +++ b/mcp_server/pkg/internal_api/organization/organization_grpc.pb.go @@ -0,0 +1,1152 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: organization.proto + +package organization + +import ( + context "context" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + OrganizationService_Describe_FullMethodName = "/InternalApi.Organization.OrganizationService/Describe" + OrganizationService_DescribeMany_FullMethodName = "/InternalApi.Organization.OrganizationService/DescribeMany" + OrganizationService_List_FullMethodName = "/InternalApi.Organization.OrganizationService/List" + OrganizationService_Create_FullMethodName = "/InternalApi.Organization.OrganizationService/Create" + OrganizationService_Update_FullMethodName = "/InternalApi.Organization.OrganizationService/Update" + OrganizationService_IsValid_FullMethodName = "/InternalApi.Organization.OrganizationService/IsValid" + OrganizationService_IsMember_FullMethodName = "/InternalApi.Organization.OrganizationService/IsMember" + OrganizationService_IsOwner_FullMethodName = "/InternalApi.Organization.OrganizationService/IsOwner" + OrganizationService_MakeOwner_FullMethodName = "/InternalApi.Organization.OrganizationService/MakeOwner" + OrganizationService_Members_FullMethodName = "/InternalApi.Organization.OrganizationService/Members" + OrganizationService_AddMember_FullMethodName = "/InternalApi.Organization.OrganizationService/AddMember" + OrganizationService_AddMembers_FullMethodName = "/InternalApi.Organization.OrganizationService/AddMembers" + OrganizationService_DeleteMember_FullMethodName = "/InternalApi.Organization.OrganizationService/DeleteMember" + OrganizationService_Suspend_FullMethodName = "/InternalApi.Organization.OrganizationService/Suspend" + OrganizationService_Unsuspend_FullMethodName = "/InternalApi.Organization.OrganizationService/Unsuspend" + OrganizationService_Verify_FullMethodName = "/InternalApi.Organization.OrganizationService/Verify" + OrganizationService_SetOpenSource_FullMethodName = "/InternalApi.Organization.OrganizationService/SetOpenSource" + OrganizationService_ListSuspensions_FullMethodName = "/InternalApi.Organization.OrganizationService/ListSuspensions" + OrganizationService_Destroy_FullMethodName = "/InternalApi.Organization.OrganizationService/Destroy" + OrganizationService_Restore_FullMethodName = "/InternalApi.Organization.OrganizationService/Restore" + OrganizationService_RepositoryIntegrators_FullMethodName = "/InternalApi.Organization.OrganizationService/RepositoryIntegrators" + OrganizationService_FetchOrganizationContacts_FullMethodName = "/InternalApi.Organization.OrganizationService/FetchOrganizationContacts" + OrganizationService_ModifyOrganizationContact_FullMethodName = "/InternalApi.Organization.OrganizationService/ModifyOrganizationContact" + OrganizationService_FetchOrganizationSettings_FullMethodName = "/InternalApi.Organization.OrganizationService/FetchOrganizationSettings" + OrganizationService_ModifyOrganizationSettings_FullMethodName = "/InternalApi.Organization.OrganizationService/ModifyOrganizationSettings" +) + +// OrganizationServiceClient is the client API for OrganizationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OrganizationServiceClient interface { + // Operation is called to describe an organization. + // Operation is synchronous. + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + // Operation is called to describe many organizations based on org ids. + // Operation is synchronous. + DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) + // Operation is called to list organizations for user. + // Operation is synchronous. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + // DEPRECATED + // Operation is called to create organization. + // Operation is synchronous. + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) + // Operation is called to update organization. + // Operation is synchronous. + Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + // Operation is called to check if an organization is valid. + // Operation is synchronous. + IsValid(ctx context.Context, in *Organization, opts ...grpc.CallOption) (*IsValidResponse, error) + // Operation is called to check if user is a member of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + IsMember(ctx context.Context, in *IsMemberRequest, opts ...grpc.CallOption) (*IsMemberResponse, error) + // Operation is called to check if user is an owner of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + IsOwner(ctx context.Context, in *IsOwnerRequest, opts ...grpc.CallOption) (*IsOwnerResponse, error) + // Operation is called to change owner of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + MakeOwner(ctx context.Context, in *MakeOwnerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Operation is called to list members of the organziation. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + Members(ctx context.Context, in *MembersRequest, opts ...grpc.CallOption) (*MembersResponse, error) + // Operation is called to add a github user to the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + AddMember(ctx context.Context, in *AddMemberRequest, opts ...grpc.CallOption) (*AddMemberResponse, error) + // Operation is called to add a github users to the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + AddMembers(ctx context.Context, in *AddMembersRequest, opts ...grpc.CallOption) (*AddMembersResponse, error) + // Operation is called to remove a member from an organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + DeleteMember(ctx context.Context, in *DeleteMemberRequest, opts ...grpc.CallOption) (*DeleteMemberResponse, error) + // Operation is called to suspend processing of jobs belonging to this organization. + // Operation is synchronous. + Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*SuspendResponse, error) + // Operation is called to suspend processing of jobs belonging to this organization. + // Operation is synchronous. + Unsuspend(ctx context.Context, in *UnsuspendRequest, opts ...grpc.CallOption) (*UnsuspendResponse, error) + // Operation is called to mark the organization as verified. + // Operation is synchronous. + Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*Organization, error) + // Operation is called to set organization as OpenSource + // Operation is synchronous. + SetOpenSource(ctx context.Context, in *SetOpenSourceRequest, opts ...grpc.CallOption) (*SetOpenSourceResponse, error) + // Operation is called to list organization suspensions. + // Operation is synchronous. + ListSuspensions(ctx context.Context, in *ListSuspensionsRequest, opts ...grpc.CallOption) (*ListSuspensionsResponse, error) + // Operation is called to destroy an organization. + // If it fails, a GRPC error is raised. + // Operation is synchronous. + Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Operation is called to restore a soft deleted organization. + // If it fails, a GRPC error is raised. + // Operation is synchronous. + Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Operation is called to get information about available repository integration types. + // Operation is synchronous. + RepositoryIntegrators(ctx context.Context, in *RepositoryIntegratorsRequest, opts ...grpc.CallOption) (*RepositoryIntegratorsResponse, error) + // Operation for fetching contact information regarding an organization. + // Operation is synchronous. + FetchOrganizationContacts(ctx context.Context, in *FetchOrganizationContactsRequest, opts ...grpc.CallOption) (*FetchOrganizationContactsResponse, error) + // Operation for adding/modifying organization contacts + // Operation is synchronous. + ModifyOrganizationContact(ctx context.Context, in *ModifyOrganizationContactRequest, opts ...grpc.CallOption) (*ModifyOrganizationContactResponse, error) + // Operation for fetching organization settings + // Operation is synchronous. + FetchOrganizationSettings(ctx context.Context, in *FetchOrganizationSettingsRequest, opts ...grpc.CallOption) (*FetchOrganizationSettingsResponse, error) + // Operation for adding/modifying organization settings + // Operation is synchronous. + ModifyOrganizationSettings(ctx context.Context, in *ModifyOrganizationSettingsRequest, opts ...grpc.CallOption) (*ModifyOrganizationSettingsResponse, error) +} + +type organizationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOrganizationServiceClient(cc grpc.ClientConnInterface) OrganizationServiceClient { + return &organizationServiceClient{cc} +} + +func (c *organizationServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, OrganizationService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeManyResponse) + err := c.cc.Invoke(ctx, OrganizationService_DescribeMany_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, OrganizationService_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateResponse) + err := c.cc.Invoke(ctx, OrganizationService_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateResponse) + err := c.cc.Invoke(ctx, OrganizationService_Update_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) IsValid(ctx context.Context, in *Organization, opts ...grpc.CallOption) (*IsValidResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsValidResponse) + err := c.cc.Invoke(ctx, OrganizationService_IsValid_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) IsMember(ctx context.Context, in *IsMemberRequest, opts ...grpc.CallOption) (*IsMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsMemberResponse) + err := c.cc.Invoke(ctx, OrganizationService_IsMember_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) IsOwner(ctx context.Context, in *IsOwnerRequest, opts ...grpc.CallOption) (*IsOwnerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsOwnerResponse) + err := c.cc.Invoke(ctx, OrganizationService_IsOwner_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) MakeOwner(ctx context.Context, in *MakeOwnerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(empty.Empty) + err := c.cc.Invoke(ctx, OrganizationService_MakeOwner_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Members(ctx context.Context, in *MembersRequest, opts ...grpc.CallOption) (*MembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MembersResponse) + err := c.cc.Invoke(ctx, OrganizationService_Members_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) AddMember(ctx context.Context, in *AddMemberRequest, opts ...grpc.CallOption) (*AddMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddMemberResponse) + err := c.cc.Invoke(ctx, OrganizationService_AddMember_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) AddMembers(ctx context.Context, in *AddMembersRequest, opts ...grpc.CallOption) (*AddMembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddMembersResponse) + err := c.cc.Invoke(ctx, OrganizationService_AddMembers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) DeleteMember(ctx context.Context, in *DeleteMemberRequest, opts ...grpc.CallOption) (*DeleteMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteMemberResponse) + err := c.cc.Invoke(ctx, OrganizationService_DeleteMember_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*SuspendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SuspendResponse) + err := c.cc.Invoke(ctx, OrganizationService_Suspend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Unsuspend(ctx context.Context, in *UnsuspendRequest, opts ...grpc.CallOption) (*UnsuspendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnsuspendResponse) + err := c.cc.Invoke(ctx, OrganizationService_Unsuspend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*Organization, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Organization) + err := c.cc.Invoke(ctx, OrganizationService_Verify_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) SetOpenSource(ctx context.Context, in *SetOpenSourceRequest, opts ...grpc.CallOption) (*SetOpenSourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetOpenSourceResponse) + err := c.cc.Invoke(ctx, OrganizationService_SetOpenSource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) ListSuspensions(ctx context.Context, in *ListSuspensionsRequest, opts ...grpc.CallOption) (*ListSuspensionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListSuspensionsResponse) + err := c.cc.Invoke(ctx, OrganizationService_ListSuspensions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(empty.Empty) + err := c.cc.Invoke(ctx, OrganizationService_Destroy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(empty.Empty) + err := c.cc.Invoke(ctx, OrganizationService_Restore_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) RepositoryIntegrators(ctx context.Context, in *RepositoryIntegratorsRequest, opts ...grpc.CallOption) (*RepositoryIntegratorsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RepositoryIntegratorsResponse) + err := c.cc.Invoke(ctx, OrganizationService_RepositoryIntegrators_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) FetchOrganizationContacts(ctx context.Context, in *FetchOrganizationContactsRequest, opts ...grpc.CallOption) (*FetchOrganizationContactsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FetchOrganizationContactsResponse) + err := c.cc.Invoke(ctx, OrganizationService_FetchOrganizationContacts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) ModifyOrganizationContact(ctx context.Context, in *ModifyOrganizationContactRequest, opts ...grpc.CallOption) (*ModifyOrganizationContactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ModifyOrganizationContactResponse) + err := c.cc.Invoke(ctx, OrganizationService_ModifyOrganizationContact_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) FetchOrganizationSettings(ctx context.Context, in *FetchOrganizationSettingsRequest, opts ...grpc.CallOption) (*FetchOrganizationSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FetchOrganizationSettingsResponse) + err := c.cc.Invoke(ctx, OrganizationService_FetchOrganizationSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationServiceClient) ModifyOrganizationSettings(ctx context.Context, in *ModifyOrganizationSettingsRequest, opts ...grpc.CallOption) (*ModifyOrganizationSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ModifyOrganizationSettingsResponse) + err := c.cc.Invoke(ctx, OrganizationService_ModifyOrganizationSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OrganizationServiceServer is the server API for OrganizationService service. +// All implementations should embed UnimplementedOrganizationServiceServer +// for forward compatibility. +type OrganizationServiceServer interface { + // Operation is called to describe an organization. + // Operation is synchronous. + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + // Operation is called to describe many organizations based on org ids. + // Operation is synchronous. + DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) + // Operation is called to list organizations for user. + // Operation is synchronous. + List(context.Context, *ListRequest) (*ListResponse, error) + // DEPRECATED + // Operation is called to create organization. + // Operation is synchronous. + Create(context.Context, *CreateRequest) (*CreateResponse, error) + // Operation is called to update organization. + // Operation is synchronous. + Update(context.Context, *UpdateRequest) (*UpdateResponse, error) + // Operation is called to check if an organization is valid. + // Operation is synchronous. + IsValid(context.Context, *Organization) (*IsValidResponse, error) + // Operation is called to check if user is a member of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + IsMember(context.Context, *IsMemberRequest) (*IsMemberResponse, error) + // Operation is called to check if user is an owner of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + IsOwner(context.Context, *IsOwnerRequest) (*IsOwnerResponse, error) + // Operation is called to change owner of the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + MakeOwner(context.Context, *MakeOwnerRequest) (*empty.Empty, error) + // Operation is called to list members of the organziation. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + Members(context.Context, *MembersRequest) (*MembersResponse, error) + // Operation is called to add a github user to the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + AddMember(context.Context, *AddMemberRequest) (*AddMemberResponse, error) + // Operation is called to add a github users to the organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + AddMembers(context.Context, *AddMembersRequest) (*AddMembersResponse, error) + // Operation is called to remove a member from an organization. + // Operation is synchronous. + // Deprecated - use Guard/RBAC instead + DeleteMember(context.Context, *DeleteMemberRequest) (*DeleteMemberResponse, error) + // Operation is called to suspend processing of jobs belonging to this organization. + // Operation is synchronous. + Suspend(context.Context, *SuspendRequest) (*SuspendResponse, error) + // Operation is called to suspend processing of jobs belonging to this organization. + // Operation is synchronous. + Unsuspend(context.Context, *UnsuspendRequest) (*UnsuspendResponse, error) + // Operation is called to mark the organization as verified. + // Operation is synchronous. + Verify(context.Context, *VerifyRequest) (*Organization, error) + // Operation is called to set organization as OpenSource + // Operation is synchronous. + SetOpenSource(context.Context, *SetOpenSourceRequest) (*SetOpenSourceResponse, error) + // Operation is called to list organization suspensions. + // Operation is synchronous. + ListSuspensions(context.Context, *ListSuspensionsRequest) (*ListSuspensionsResponse, error) + // Operation is called to destroy an organization. + // If it fails, a GRPC error is raised. + // Operation is synchronous. + Destroy(context.Context, *DestroyRequest) (*empty.Empty, error) + // Operation is called to restore a soft deleted organization. + // If it fails, a GRPC error is raised. + // Operation is synchronous. + Restore(context.Context, *RestoreRequest) (*empty.Empty, error) + // Operation is called to get information about available repository integration types. + // Operation is synchronous. + RepositoryIntegrators(context.Context, *RepositoryIntegratorsRequest) (*RepositoryIntegratorsResponse, error) + // Operation for fetching contact information regarding an organization. + // Operation is synchronous. + FetchOrganizationContacts(context.Context, *FetchOrganizationContactsRequest) (*FetchOrganizationContactsResponse, error) + // Operation for adding/modifying organization contacts + // Operation is synchronous. + ModifyOrganizationContact(context.Context, *ModifyOrganizationContactRequest) (*ModifyOrganizationContactResponse, error) + // Operation for fetching organization settings + // Operation is synchronous. + FetchOrganizationSettings(context.Context, *FetchOrganizationSettingsRequest) (*FetchOrganizationSettingsResponse, error) + // Operation for adding/modifying organization settings + // Operation is synchronous. + ModifyOrganizationSettings(context.Context, *ModifyOrganizationSettingsRequest) (*ModifyOrganizationSettingsResponse, error) +} + +// UnimplementedOrganizationServiceServer should 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 UnimplementedOrganizationServiceServer struct{} + +func (UnimplementedOrganizationServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedOrganizationServiceServer) DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeMany not implemented") +} +func (UnimplementedOrganizationServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedOrganizationServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedOrganizationServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedOrganizationServiceServer) IsValid(context.Context, *Organization) (*IsValidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsValid not implemented") +} +func (UnimplementedOrganizationServiceServer) IsMember(context.Context, *IsMemberRequest) (*IsMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsMember not implemented") +} +func (UnimplementedOrganizationServiceServer) IsOwner(context.Context, *IsOwnerRequest) (*IsOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsOwner not implemented") +} +func (UnimplementedOrganizationServiceServer) MakeOwner(context.Context, *MakeOwnerRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method MakeOwner not implemented") +} +func (UnimplementedOrganizationServiceServer) Members(context.Context, *MembersRequest) (*MembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Members not implemented") +} +func (UnimplementedOrganizationServiceServer) AddMember(context.Context, *AddMemberRequest) (*AddMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddMember not implemented") +} +func (UnimplementedOrganizationServiceServer) AddMembers(context.Context, *AddMembersRequest) (*AddMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddMembers not implemented") +} +func (UnimplementedOrganizationServiceServer) DeleteMember(context.Context, *DeleteMemberRequest) (*DeleteMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMember not implemented") +} +func (UnimplementedOrganizationServiceServer) Suspend(context.Context, *SuspendRequest) (*SuspendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Suspend not implemented") +} +func (UnimplementedOrganizationServiceServer) Unsuspend(context.Context, *UnsuspendRequest) (*UnsuspendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unsuspend not implemented") +} +func (UnimplementedOrganizationServiceServer) Verify(context.Context, *VerifyRequest) (*Organization, error) { + return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") +} +func (UnimplementedOrganizationServiceServer) SetOpenSource(context.Context, *SetOpenSourceRequest) (*SetOpenSourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetOpenSource not implemented") +} +func (UnimplementedOrganizationServiceServer) ListSuspensions(context.Context, *ListSuspensionsRequest) (*ListSuspensionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSuspensions not implemented") +} +func (UnimplementedOrganizationServiceServer) Destroy(context.Context, *DestroyRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Destroy not implemented") +} +func (UnimplementedOrganizationServiceServer) Restore(context.Context, *RestoreRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented") +} +func (UnimplementedOrganizationServiceServer) RepositoryIntegrators(context.Context, *RepositoryIntegratorsRequest) (*RepositoryIntegratorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RepositoryIntegrators not implemented") +} +func (UnimplementedOrganizationServiceServer) FetchOrganizationContacts(context.Context, *FetchOrganizationContactsRequest) (*FetchOrganizationContactsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchOrganizationContacts not implemented") +} +func (UnimplementedOrganizationServiceServer) ModifyOrganizationContact(context.Context, *ModifyOrganizationContactRequest) (*ModifyOrganizationContactResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModifyOrganizationContact not implemented") +} +func (UnimplementedOrganizationServiceServer) FetchOrganizationSettings(context.Context, *FetchOrganizationSettingsRequest) (*FetchOrganizationSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchOrganizationSettings not implemented") +} +func (UnimplementedOrganizationServiceServer) ModifyOrganizationSettings(context.Context, *ModifyOrganizationSettingsRequest) (*ModifyOrganizationSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModifyOrganizationSettings not implemented") +} +func (UnimplementedOrganizationServiceServer) testEmbeddedByValue() {} + +// UnsafeOrganizationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OrganizationServiceServer will +// result in compilation errors. +type UnsafeOrganizationServiceServer interface { + mustEmbedUnimplementedOrganizationServiceServer() +} + +func RegisterOrganizationServiceServer(s grpc.ServiceRegistrar, srv OrganizationServiceServer) { + // If the following call pancis, it indicates UnimplementedOrganizationServiceServer 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(&OrganizationService_ServiceDesc, srv) +} + +func _OrganizationService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_DescribeMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).DescribeMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_DescribeMany_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).DescribeMany(ctx, req.(*DescribeManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Update(ctx, req.(*UpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_IsValid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Organization) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).IsValid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_IsValid_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).IsValid(ctx, req.(*Organization)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_IsMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).IsMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_IsMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).IsMember(ctx, req.(*IsMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_IsOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsOwnerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).IsOwner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_IsOwner_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).IsOwner(ctx, req.(*IsOwnerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_MakeOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MakeOwnerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).MakeOwner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_MakeOwner_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).MakeOwner(ctx, req.(*MakeOwnerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Members_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Members(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Members_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Members(ctx, req.(*MembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_AddMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).AddMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_AddMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).AddMember(ctx, req.(*AddMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_AddMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).AddMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_AddMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).AddMembers(ctx, req.(*AddMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_DeleteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).DeleteMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_DeleteMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).DeleteMember(ctx, req.(*DeleteMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Suspend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuspendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Suspend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Suspend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Suspend(ctx, req.(*SuspendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Unsuspend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsuspendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Unsuspend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Unsuspend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Unsuspend(ctx, req.(*UnsuspendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Verify(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Verify_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Verify(ctx, req.(*VerifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_SetOpenSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetOpenSourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).SetOpenSource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_SetOpenSource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).SetOpenSource(ctx, req.(*SetOpenSourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_ListSuspensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSuspensionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).ListSuspensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_ListSuspensions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).ListSuspensions(ctx, req.(*ListSuspensionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Destroy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Destroy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Destroy(ctx, req.(*DestroyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).Restore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_Restore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).Restore(ctx, req.(*RestoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_RepositoryIntegrators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RepositoryIntegratorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).RepositoryIntegrators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_RepositoryIntegrators_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).RepositoryIntegrators(ctx, req.(*RepositoryIntegratorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_FetchOrganizationContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchOrganizationContactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).FetchOrganizationContacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_FetchOrganizationContacts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).FetchOrganizationContacts(ctx, req.(*FetchOrganizationContactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_ModifyOrganizationContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ModifyOrganizationContactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).ModifyOrganizationContact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_ModifyOrganizationContact_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).ModifyOrganizationContact(ctx, req.(*ModifyOrganizationContactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_FetchOrganizationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchOrganizationSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).FetchOrganizationSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_FetchOrganizationSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).FetchOrganizationSettings(ctx, req.(*FetchOrganizationSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrganizationService_ModifyOrganizationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ModifyOrganizationSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServiceServer).ModifyOrganizationSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrganizationService_ModifyOrganizationSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServiceServer).ModifyOrganizationSettings(ctx, req.(*ModifyOrganizationSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OrganizationService_ServiceDesc is the grpc.ServiceDesc for OrganizationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OrganizationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Organization.OrganizationService", + HandlerType: (*OrganizationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Describe", + Handler: _OrganizationService_Describe_Handler, + }, + { + MethodName: "DescribeMany", + Handler: _OrganizationService_DescribeMany_Handler, + }, + { + MethodName: "List", + Handler: _OrganizationService_List_Handler, + }, + { + MethodName: "Create", + Handler: _OrganizationService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _OrganizationService_Update_Handler, + }, + { + MethodName: "IsValid", + Handler: _OrganizationService_IsValid_Handler, + }, + { + MethodName: "IsMember", + Handler: _OrganizationService_IsMember_Handler, + }, + { + MethodName: "IsOwner", + Handler: _OrganizationService_IsOwner_Handler, + }, + { + MethodName: "MakeOwner", + Handler: _OrganizationService_MakeOwner_Handler, + }, + { + MethodName: "Members", + Handler: _OrganizationService_Members_Handler, + }, + { + MethodName: "AddMember", + Handler: _OrganizationService_AddMember_Handler, + }, + { + MethodName: "AddMembers", + Handler: _OrganizationService_AddMembers_Handler, + }, + { + MethodName: "DeleteMember", + Handler: _OrganizationService_DeleteMember_Handler, + }, + { + MethodName: "Suspend", + Handler: _OrganizationService_Suspend_Handler, + }, + { + MethodName: "Unsuspend", + Handler: _OrganizationService_Unsuspend_Handler, + }, + { + MethodName: "Verify", + Handler: _OrganizationService_Verify_Handler, + }, + { + MethodName: "SetOpenSource", + Handler: _OrganizationService_SetOpenSource_Handler, + }, + { + MethodName: "ListSuspensions", + Handler: _OrganizationService_ListSuspensions_Handler, + }, + { + MethodName: "Destroy", + Handler: _OrganizationService_Destroy_Handler, + }, + { + MethodName: "Restore", + Handler: _OrganizationService_Restore_Handler, + }, + { + MethodName: "RepositoryIntegrators", + Handler: _OrganizationService_RepositoryIntegrators_Handler, + }, + { + MethodName: "FetchOrganizationContacts", + Handler: _OrganizationService_FetchOrganizationContacts_Handler, + }, + { + MethodName: "ModifyOrganizationContact", + Handler: _OrganizationService_ModifyOrganizationContact_Handler, + }, + { + MethodName: "FetchOrganizationSettings", + Handler: _OrganizationService_FetchOrganizationSettings_Handler, + }, + { + MethodName: "ModifyOrganizationSettings", + Handler: _OrganizationService_ModifyOrganizationSettings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "organization.proto", +} diff --git a/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline.pb.go b/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline.pb.go new file mode 100644 index 000000000..298aae890 --- /dev/null +++ b/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline.pb.go @@ -0,0 +1,7434 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: plumber.pipeline.proto + +package plumber_pipeline + +import ( + plumber_w_f_workflow "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + user "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Type of queues which(which pipelines) are returned in +// ListQueues(ListGrouped)Response +type QueueType int32 + +const ( + QueueType_IMPLICIT QueueType = 0 + QueueType_USER_GENERATED QueueType = 1 +) + +// Enum value maps for QueueType. +var ( + QueueType_name = map[int32]string{ + 0: "IMPLICIT", + 1: "USER_GENERATED", + } + QueueType_value = map[string]int32{ + "IMPLICIT": 0, + "USER_GENERATED": 1, + } +) + +func (x QueueType) Enum() *QueueType { + p := new(QueueType) + *p = x + return p +} + +func (x QueueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueueType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[0].Descriptor() +} + +func (QueueType) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[0] +} + +func (x QueueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueueType.Descriptor instead. +func (QueueType) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{0} +} + +// Type of git reference for which pipeline is initiated. +type GitRefType int32 + +const ( + GitRefType_BRANCH GitRefType = 0 + GitRefType_TAG GitRefType = 1 + GitRefType_PR GitRefType = 2 +) + +// Enum value maps for GitRefType. +var ( + GitRefType_name = map[int32]string{ + 0: "BRANCH", + 1: "TAG", + 2: "PR", + } + GitRefType_value = map[string]int32{ + "BRANCH": 0, + "TAG": 1, + "PR": 2, + } +) + +func (x GitRefType) Enum() *GitRefType { + p := new(GitRefType) + *p = x + return p +} + +func (x GitRefType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GitRefType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[1].Descriptor() +} + +func (GitRefType) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[1] +} + +func (x GitRefType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GitRefType.Descriptor instead. +func (GitRefType) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{1} +} + +// Pipeline trigger source +// +// - WORKFLOW = Pipeline was triggered by workflow - it's an initial pipeline +// - PROMOTION = Pipeline was triggered by manual promotion +// - AUTO_PROMOTION = Pipeline was triggered by auto promotion +// - PARTIAL_RE_RUN = Pipeline was triggered by partial re-run of a pipeline +type TriggeredBy int32 + +const ( + TriggeredBy_WORKFLOW TriggeredBy = 0 + TriggeredBy_PROMOTION TriggeredBy = 1 + TriggeredBy_AUTO_PROMOTION TriggeredBy = 2 + TriggeredBy_PARTIAL_RE_RUN TriggeredBy = 3 +) + +// Enum value maps for TriggeredBy. +var ( + TriggeredBy_name = map[int32]string{ + 0: "WORKFLOW", + 1: "PROMOTION", + 2: "AUTO_PROMOTION", + 3: "PARTIAL_RE_RUN", + } + TriggeredBy_value = map[string]int32{ + "WORKFLOW": 0, + "PROMOTION": 1, + "AUTO_PROMOTION": 2, + "PARTIAL_RE_RUN": 3, + } +) + +func (x TriggeredBy) Enum() *TriggeredBy { + p := new(TriggeredBy) + *p = x + return p +} + +func (x TriggeredBy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TriggeredBy) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[2].Descriptor() +} + +func (TriggeredBy) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[2] +} + +func (x TriggeredBy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TriggeredBy.Descriptor instead. +func (TriggeredBy) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{2} +} + +type ScheduleRequest_ServiceType int32 + +const ( + ScheduleRequest_GIT_HUB ScheduleRequest_ServiceType = 0 + ScheduleRequest_LOCAL ScheduleRequest_ServiceType = 1 + ScheduleRequest_SNAPSHOT ScheduleRequest_ServiceType = 2 +) + +// Enum value maps for ScheduleRequest_ServiceType. +var ( + ScheduleRequest_ServiceType_name = map[int32]string{ + 0: "GIT_HUB", + 1: "LOCAL", + 2: "SNAPSHOT", + } + ScheduleRequest_ServiceType_value = map[string]int32{ + "GIT_HUB": 0, + "LOCAL": 1, + "SNAPSHOT": 2, + } +) + +func (x ScheduleRequest_ServiceType) Enum() *ScheduleRequest_ServiceType { + p := new(ScheduleRequest_ServiceType) + *p = x + return p +} + +func (x ScheduleRequest_ServiceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScheduleRequest_ServiceType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[3].Descriptor() +} + +func (ScheduleRequest_ServiceType) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[3] +} + +func (x ScheduleRequest_ServiceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ScheduleRequest_ServiceType.Descriptor instead. +func (ScheduleRequest_ServiceType) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{0, 0} +} + +// States that describe blocks's execution +// +// Normal block state transition looks like: +// +// INITIALIZING -> WAITING -> RUNNING -> DONE +// +// If block's termination is requested while block is in RUNNING it goes to STOPPING +// and than to DONE(STOPPED), otherwise it goes straight to DONE(CANCELED). +type Block_State int32 + +const ( + Block_WAITING Block_State = 0 + Block_RUNNING Block_State = 1 + Block_STOPPING Block_State = 2 + Block_DONE Block_State = 3 + Block_INITIALIZING Block_State = 4 +) + +// Enum value maps for Block_State. +var ( + Block_State_name = map[int32]string{ + 0: "WAITING", + 1: "RUNNING", + 2: "STOPPING", + 3: "DONE", + 4: "INITIALIZING", + } + Block_State_value = map[string]int32{ + "WAITING": 0, + "RUNNING": 1, + "STOPPING": 2, + "DONE": 3, + "INITIALIZING": 4, + } +) + +func (x Block_State) Enum() *Block_State { + p := new(Block_State) + *p = x + return p +} + +func (x Block_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Block_State) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[4].Descriptor() +} + +func (Block_State) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[4] +} + +func (x Block_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Block_State.Descriptor instead. +func (Block_State) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{4, 0} +} + +type Block_Result int32 + +const ( + Block_PASSED Block_Result = 0 + Block_STOPPED Block_Result = 1 + Block_CANCELED Block_Result = 2 + Block_FAILED Block_Result = 3 +) + +// Enum value maps for Block_Result. +var ( + Block_Result_name = map[int32]string{ + 0: "PASSED", + 1: "STOPPED", + 2: "CANCELED", + 3: "FAILED", + } + Block_Result_value = map[string]int32{ + "PASSED": 0, + "STOPPED": 1, + "CANCELED": 2, + "FAILED": 3, + } +) + +func (x Block_Result) Enum() *Block_Result { + p := new(Block_Result) + *p = x + return p +} + +func (x Block_Result) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Block_Result) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[5].Descriptor() +} + +func (Block_Result) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[5] +} + +func (x Block_Result) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Block_Result.Descriptor instead. +func (Block_Result) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{4, 1} +} + +// Reasons for result different from PASSED +// +// FAILED: +// - TEST - one or more of user tests failed +// - MALFORMED - Block failed due to one of next: +// - missing cmd_file, malformed job_matrix or multiple blocks with same name +// - STUCK - Block was stuck for some internal reason and then aborted +// +// STOPPED or CANCELED: +// - USER - terminated on users requests +// - INTERNAL - terminated for internal reasons (probably something was stuck) +// - STRATEGY - terminated based on selected cancelation strategy +// - FAST_FAILING - terminated because something other failed (other block run in parallel) +// - DELETED - terminated because branch was deleted while blocks's build was running +// - TIMEOUT - Block run longer than execution_time_limit and was stopped +// - SKIPPED - Filtered out (not executed because did not satisfy filter conditions) +type Block_ResultReason int32 + +const ( + Block_TEST Block_ResultReason = 0 + Block_MALFORMED Block_ResultReason = 1 + Block_STUCK Block_ResultReason = 2 + Block_USER Block_ResultReason = 3 + Block_INTERNAL Block_ResultReason = 4 + Block_STRATEGY Block_ResultReason = 5 + Block_FAST_FAILING Block_ResultReason = 6 + Block_DELETED Block_ResultReason = 7 + Block_TIMEOUT Block_ResultReason = 8 + Block_SKIPPED Block_ResultReason = 9 +) + +// Enum value maps for Block_ResultReason. +var ( + Block_ResultReason_name = map[int32]string{ + 0: "TEST", + 1: "MALFORMED", + 2: "STUCK", + 3: "USER", + 4: "INTERNAL", + 5: "STRATEGY", + 6: "FAST_FAILING", + 7: "DELETED", + 8: "TIMEOUT", + 9: "SKIPPED", + } + Block_ResultReason_value = map[string]int32{ + "TEST": 0, + "MALFORMED": 1, + "STUCK": 2, + "USER": 3, + "INTERNAL": 4, + "STRATEGY": 5, + "FAST_FAILING": 6, + "DELETED": 7, + "TIMEOUT": 8, + "SKIPPED": 9, + } +) + +func (x Block_ResultReason) Enum() *Block_ResultReason { + p := new(Block_ResultReason) + *p = x + return p +} + +func (x Block_ResultReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Block_ResultReason) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[6].Descriptor() +} + +func (Block_ResultReason) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[6] +} + +func (x Block_ResultReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Block_ResultReason.Descriptor instead. +func (Block_ResultReason) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{4, 2} +} + +type ListKeysetRequest_Order int32 + +const ( + ListKeysetRequest_BY_CREATION_TIME_DESC ListKeysetRequest_Order = 0 +) + +// Enum value maps for ListKeysetRequest_Order. +var ( + ListKeysetRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + } + ListKeysetRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + } +) + +func (x ListKeysetRequest_Order) Enum() *ListKeysetRequest_Order { + p := new(ListKeysetRequest_Order) + *p = x + return p +} + +func (x ListKeysetRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListKeysetRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[7].Descriptor() +} + +func (ListKeysetRequest_Order) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[7] +} + +func (x ListKeysetRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListKeysetRequest_Order.Descriptor instead. +func (ListKeysetRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{15, 0} +} + +type ListKeysetRequest_Direction int32 + +const ( + ListKeysetRequest_NEXT ListKeysetRequest_Direction = 0 + ListKeysetRequest_PREVIOUS ListKeysetRequest_Direction = 1 +) + +// Enum value maps for ListKeysetRequest_Direction. +var ( + ListKeysetRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListKeysetRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListKeysetRequest_Direction) Enum() *ListKeysetRequest_Direction { + p := new(ListKeysetRequest_Direction) + *p = x + return p +} + +func (x ListKeysetRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListKeysetRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[8].Descriptor() +} + +func (ListKeysetRequest_Direction) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[8] +} + +func (x ListKeysetRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListKeysetRequest_Direction.Descriptor instead. +func (ListKeysetRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{15, 1} +} + +// States that describe pipeline's execution +// +// Normal pipeline state transition looks like: +// +// INITIALIZING -> PENDING -> RUNNING -> DONE +// +// If there are older pipelines from same branch in RUNNING state than it's like: +// +// INITIALIZING -> PENDING -> QUEUING (until older finishes) -> RUNNING -> DONE +// +// If termination is requested while pipeline is in RUNNING it goes to STOPPING +// and than to DONE(STOPPED), otherwise it goes straight to DONE(CANCELED). +type Pipeline_State int32 + +const ( + Pipeline_INITIALIZING Pipeline_State = 0 + Pipeline_PENDING Pipeline_State = 1 + Pipeline_QUEUING Pipeline_State = 2 + Pipeline_RUNNING Pipeline_State = 3 + Pipeline_STOPPING Pipeline_State = 4 + Pipeline_DONE Pipeline_State = 5 +) + +// Enum value maps for Pipeline_State. +var ( + Pipeline_State_name = map[int32]string{ + 0: "INITIALIZING", + 1: "PENDING", + 2: "QUEUING", + 3: "RUNNING", + 4: "STOPPING", + 5: "DONE", + } + Pipeline_State_value = map[string]int32{ + "INITIALIZING": 0, + "PENDING": 1, + "QUEUING": 2, + "RUNNING": 3, + "STOPPING": 4, + "DONE": 5, + } +) + +func (x Pipeline_State) Enum() *Pipeline_State { + p := new(Pipeline_State) + *p = x + return p +} + +func (x Pipeline_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Pipeline_State) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[9].Descriptor() +} + +func (Pipeline_State) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[9] +} + +func (x Pipeline_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Pipeline_State.Descriptor instead. +func (Pipeline_State) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{20, 0} +} + +type Pipeline_Result int32 + +const ( + Pipeline_PASSED Pipeline_Result = 0 + Pipeline_STOPPED Pipeline_Result = 1 + Pipeline_CANCELED Pipeline_Result = 2 + Pipeline_FAILED Pipeline_Result = 3 +) + +// Enum value maps for Pipeline_Result. +var ( + Pipeline_Result_name = map[int32]string{ + 0: "PASSED", + 1: "STOPPED", + 2: "CANCELED", + 3: "FAILED", + } + Pipeline_Result_value = map[string]int32{ + "PASSED": 0, + "STOPPED": 1, + "CANCELED": 2, + "FAILED": 3, + } +) + +func (x Pipeline_Result) Enum() *Pipeline_Result { + p := new(Pipeline_Result) + *p = x + return p +} + +func (x Pipeline_Result) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Pipeline_Result) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[10].Descriptor() +} + +func (Pipeline_Result) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[10] +} + +func (x Pipeline_Result) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Pipeline_Result.Descriptor instead. +func (Pipeline_Result) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{20, 1} +} + +// Reasons for result different from PASSED +// +// FAILED: +// - TEST - one or more of user tests failed +// - MALFORMED - Pipeline failed because YAML definition is malformed +// - STUCK - Pipeline was stuck for some internal reason and then aborted +// +// STOPPED or CANCELED: +// - USER - terminated on users requests +// - INTERNAL - terminated for internal reasons (probably something was stuck) +// - STRATEGY - terminated based on selected cancelation strategy +// - FAST_FAILING - terminated because something other failed (in case of multiple subpipelines) +// - DELETED - terminated because branch was deleted while pipeline's build was running +// - TIMEOUT - Pipeline run longer than execution_time_limit and was terminated +type Pipeline_ResultReason int32 + +const ( + Pipeline_TEST Pipeline_ResultReason = 0 + Pipeline_MALFORMED Pipeline_ResultReason = 1 + Pipeline_STUCK Pipeline_ResultReason = 2 + Pipeline_USER Pipeline_ResultReason = 3 + Pipeline_INTERNAL Pipeline_ResultReason = 4 + Pipeline_STRATEGY Pipeline_ResultReason = 5 + Pipeline_FAST_FAILING Pipeline_ResultReason = 6 + Pipeline_DELETED Pipeline_ResultReason = 7 + Pipeline_TIMEOUT Pipeline_ResultReason = 8 +) + +// Enum value maps for Pipeline_ResultReason. +var ( + Pipeline_ResultReason_name = map[int32]string{ + 0: "TEST", + 1: "MALFORMED", + 2: "STUCK", + 3: "USER", + 4: "INTERNAL", + 5: "STRATEGY", + 6: "FAST_FAILING", + 7: "DELETED", + 8: "TIMEOUT", + } + Pipeline_ResultReason_value = map[string]int32{ + "TEST": 0, + "MALFORMED": 1, + "STUCK": 2, + "USER": 3, + "INTERNAL": 4, + "STRATEGY": 5, + "FAST_FAILING": 6, + "DELETED": 7, + "TIMEOUT": 8, + } +) + +func (x Pipeline_ResultReason) Enum() *Pipeline_ResultReason { + p := new(Pipeline_ResultReason) + *p = x + return p +} + +func (x Pipeline_ResultReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Pipeline_ResultReason) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[11].Descriptor() +} + +func (Pipeline_ResultReason) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[11] +} + +func (x Pipeline_ResultReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Pipeline_ResultReason.Descriptor instead. +func (Pipeline_ResultReason) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{20, 2} +} + +type ListActivityRequest_Order int32 + +const ( + ListActivityRequest_BY_CREATION_TIME_DESC ListActivityRequest_Order = 0 +) + +// Enum value maps for ListActivityRequest_Order. +var ( + ListActivityRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + } + ListActivityRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + } +) + +func (x ListActivityRequest_Order) Enum() *ListActivityRequest_Order { + p := new(ListActivityRequest_Order) + *p = x + return p +} + +func (x ListActivityRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListActivityRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[12].Descriptor() +} + +func (ListActivityRequest_Order) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[12] +} + +func (x ListActivityRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListActivityRequest_Order.Descriptor instead. +func (ListActivityRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{22, 0} +} + +type ListActivityRequest_Direction int32 + +const ( + ListActivityRequest_NEXT ListActivityRequest_Direction = 0 + ListActivityRequest_PREVIOUS ListActivityRequest_Direction = 1 +) + +// Enum value maps for ListActivityRequest_Direction. +var ( + ListActivityRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListActivityRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListActivityRequest_Direction) Enum() *ListActivityRequest_Direction { + p := new(ListActivityRequest_Direction) + *p = x + return p +} + +func (x ListActivityRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListActivityRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[13].Descriptor() +} + +func (ListActivityRequest_Direction) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[13] +} + +func (x ListActivityRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListActivityRequest_Direction.Descriptor instead. +func (ListActivityRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{22, 1} +} + +type RunNowRequest_Type int32 + +const ( + RunNowRequest_PIPELINE RunNowRequest_Type = 0 + RunNowRequest_BLOCK RunNowRequest_Type = 1 + RunNowRequest_JOB RunNowRequest_Type = 2 +) + +// Enum value maps for RunNowRequest_Type. +var ( + RunNowRequest_Type_name = map[int32]string{ + 0: "PIPELINE", + 1: "BLOCK", + 2: "JOB", + } + RunNowRequest_Type_value = map[string]int32{ + "PIPELINE": 0, + "BLOCK": 1, + "JOB": 2, + } +) + +func (x RunNowRequest_Type) Enum() *RunNowRequest_Type { + p := new(RunNowRequest_Type) + *p = x + return p +} + +func (x RunNowRequest_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RunNowRequest_Type) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[14].Descriptor() +} + +func (RunNowRequest_Type) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[14] +} + +func (x RunNowRequest_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RunNowRequest_Type.Descriptor instead. +func (RunNowRequest_Type) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{29, 0} +} + +// Codes serve to determin result of Request processing and wether to interpret the +// other fields in Response +// +// - OK = Request was processed sucessfully and other fields in response are valid +// - BAD_PARAM = Request processing failed due to bad params in request. +// Other fields in response should be disregarded. +// - LIMIT_EXCEEDED = Request is rejected because some resource(s) exceeded allowed limit(s) +// Other fields in response should be disregarded +// - REFUSED = Request is refused and reason is given in message field. +// Other fields in response should be disregarded. +type ResponseStatus_ResponseCode int32 + +const ( + ResponseStatus_OK ResponseStatus_ResponseCode = 0 + ResponseStatus_BAD_PARAM ResponseStatus_ResponseCode = 1 + ResponseStatus_LIMIT_EXCEEDED ResponseStatus_ResponseCode = 2 + ResponseStatus_REFUSED ResponseStatus_ResponseCode = 3 +) + +// Enum value maps for ResponseStatus_ResponseCode. +var ( + ResponseStatus_ResponseCode_name = map[int32]string{ + 0: "OK", + 1: "BAD_PARAM", + 2: "LIMIT_EXCEEDED", + 3: "REFUSED", + } + ResponseStatus_ResponseCode_value = map[string]int32{ + "OK": 0, + "BAD_PARAM": 1, + "LIMIT_EXCEEDED": 2, + "REFUSED": 3, + } +) + +func (x ResponseStatus_ResponseCode) Enum() *ResponseStatus_ResponseCode { + p := new(ResponseStatus_ResponseCode) + *p = x + return p +} + +func (x ResponseStatus_ResponseCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResponseStatus_ResponseCode) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[15].Descriptor() +} + +func (ResponseStatus_ResponseCode) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[15] +} + +func (x ResponseStatus_ResponseCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResponseStatus_ResponseCode.Descriptor instead. +func (ResponseStatus_ResponseCode) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{44, 0} +} + +// States that describe after pipeline execution +// +// Normal after pipeline state transition looks like: +// +// WAITING (for pipeline to finish) -> PENDING -> RUNNING -> DONE +type AfterPipeline_State int32 + +const ( + AfterPipeline_WAITING AfterPipeline_State = 0 + AfterPipeline_PENDING AfterPipeline_State = 1 + AfterPipeline_RUNNING AfterPipeline_State = 2 + AfterPipeline_DONE AfterPipeline_State = 3 +) + +// Enum value maps for AfterPipeline_State. +var ( + AfterPipeline_State_name = map[int32]string{ + 0: "WAITING", + 1: "PENDING", + 2: "RUNNING", + 3: "DONE", + } + AfterPipeline_State_value = map[string]int32{ + "WAITING": 0, + "PENDING": 1, + "RUNNING": 2, + "DONE": 3, + } +) + +func (x AfterPipeline_State) Enum() *AfterPipeline_State { + p := new(AfterPipeline_State) + *p = x + return p +} + +func (x AfterPipeline_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AfterPipeline_State) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[16].Descriptor() +} + +func (AfterPipeline_State) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[16] +} + +func (x AfterPipeline_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AfterPipeline_State.Descriptor instead. +func (AfterPipeline_State) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{47, 0} +} + +type AfterPipeline_Result int32 + +const ( + AfterPipeline_PASSED AfterPipeline_Result = 0 + AfterPipeline_STOPPED AfterPipeline_Result = 1 + AfterPipeline_FAILED AfterPipeline_Result = 2 +) + +// Enum value maps for AfterPipeline_Result. +var ( + AfterPipeline_Result_name = map[int32]string{ + 0: "PASSED", + 1: "STOPPED", + 2: "FAILED", + } + AfterPipeline_Result_value = map[string]int32{ + "PASSED": 0, + "STOPPED": 1, + "FAILED": 2, + } +) + +func (x AfterPipeline_Result) Enum() *AfterPipeline_Result { + p := new(AfterPipeline_Result) + *p = x + return p +} + +func (x AfterPipeline_Result) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AfterPipeline_Result) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[17].Descriptor() +} + +func (AfterPipeline_Result) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[17] +} + +func (x AfterPipeline_Result) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AfterPipeline_Result.Descriptor instead. +func (AfterPipeline_Result) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{47, 1} +} + +// Reasons for result different from PASSED +// +// FAILED: +// - TEST - one or more of user tests failed +// - STUCK - After pipeline was stuck for some internal reason and then aborted +type AfterPipeline_ResultReason int32 + +const ( + AfterPipeline_TEST AfterPipeline_ResultReason = 0 + AfterPipeline_STUCK AfterPipeline_ResultReason = 1 +) + +// Enum value maps for AfterPipeline_ResultReason. +var ( + AfterPipeline_ResultReason_name = map[int32]string{ + 0: "TEST", + 1: "STUCK", + } + AfterPipeline_ResultReason_value = map[string]int32{ + "TEST": 0, + "STUCK": 1, + } +) + +func (x AfterPipeline_ResultReason) Enum() *AfterPipeline_ResultReason { + p := new(AfterPipeline_ResultReason) + *p = x + return p +} + +func (x AfterPipeline_ResultReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AfterPipeline_ResultReason) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_pipeline_proto_enumTypes[18].Descriptor() +} + +func (AfterPipeline_ResultReason) Type() protoreflect.EnumType { + return &file_plumber_pipeline_proto_enumTypes[18] +} + +func (x AfterPipeline_ResultReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AfterPipeline_ResultReason.Descriptor instead. +func (AfterPipeline_ResultReason) EnumDescriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{47, 2} +} + +// Schedule call request +// +// Arguments: +// - service = [required] Repo host provider (GitHub etc.) +// - repo = [required if service == GIT_HUB] Data about repository +// - auth = [required if service == GIT_HUB] +// Data used for authentication when accessing repo +// - project_id = [required] Id of project on Semaphore +// - branch_id = [required] UUID of project's branch on Semaphore +// - hook_id = [required] Originally generated by repo-host. +// Ties the schedule-request to repo post-commit hook. +// Plumber has to pass it on, otherwise not used. +// - request_token = [required] unique string, see Idempotency +// - snapshot_id = [required if service == SANPSHOT] Snapshot id +// - definition_file = [optional] Full path to file containing pipeline definition. +// +// Preconditions: +// - service, repo and auth fields have valid values +// - hook_id value is previously generated by repo-host +// - request_token has to be unique for every pipeline execution, see Idempotency +// +// Postconditions: +// - ResponseCode = OK => Pipeline with request_token is scheduled or +// was previously scheduled. +// ppl_id is returned. +// - otherwise => Pipeline with request_token is NOT scheduled. +// Error is returned. +// +// Idempotency: +// - When schedule request is received, request_token is checked first. +// If pipeline with the same request_token is already scheduled: +// - OK and previously generated ppl_id are returned, +// without scheduling new pipeline. +// - Other parameters are not checked; they are assumed to be the same. +type ScheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Service ScheduleRequest_ServiceType `protobuf:"varint,2,opt,name=service,proto3,enum=InternalApi.Plumber.ScheduleRequest_ServiceType" json:"service,omitempty"` + Repo *ScheduleRequest_Repo `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` + Auth *ScheduleRequest_Auth `protobuf:"bytes,4,opt,name=auth,proto3" json:"auth,omitempty"` + ProjectId string `protobuf:"bytes,6,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchId string `protobuf:"bytes,7,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + HookId string `protobuf:"bytes,8,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + RequestToken string `protobuf:"bytes,9,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + SnapshotId string `protobuf:"bytes,10,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + DefinitionFile string `protobuf:"bytes,11,opt,name=definition_file,json=definitionFile,proto3" json:"definition_file,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest) Reset() { + *x = ScheduleRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest) ProtoMessage() {} + +func (x *ScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest.ProtoReflect.Descriptor instead. +func (*ScheduleRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{0} +} + +func (x *ScheduleRequest) GetService() ScheduleRequest_ServiceType { + if x != nil { + return x.Service + } + return ScheduleRequest_GIT_HUB +} + +func (x *ScheduleRequest) GetRepo() *ScheduleRequest_Repo { + if x != nil { + return x.Repo + } + return nil +} + +func (x *ScheduleRequest) GetAuth() *ScheduleRequest_Auth { + if x != nil { + return x.Auth + } + return nil +} + +func (x *ScheduleRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ScheduleRequest) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *ScheduleRequest) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *ScheduleRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +func (x *ScheduleRequest) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *ScheduleRequest) GetDefinitionFile() string { + if x != nil { + return x.DefinitionFile + } + return "" +} + +// Schedule call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = Pipeline is scheduled. +// Pipeline has to be available for Describe call. +// BAD_PARAM = Pipeline request is rejected because of +// malformed request. +// LIMIT_EXCEEDED = Schedule request is rejected because some resource(s) exceeded allowed limit(s) +// - ppl_id = [required] id of newly scheduled pipeline +type ScheduleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleResponse) Reset() { + *x = ScheduleResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleResponse) ProtoMessage() {} + +func (x *ScheduleResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleResponse.ProtoReflect.Descriptor instead. +func (*ScheduleResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{1} +} + +func (x *ScheduleResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ScheduleResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// Describe call request +// +// Synchronous operation. +// Returns status of the pipeline. +// +// Arguments: +// - ppl_id = [required] Pipeline to describe. +// - detailed = [optional] Return block details? Default is false. +// +// Preconditions: +// - Pipeline with ppl_id was previously scheduled. +// +// Postconditions: +// +// Idempotency: +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + Detailed bool `protobuf:"varint,2,opt,name=detailed,proto3" json:"detailed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{2} +} + +func (x *DescribeRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *DescribeRequest) GetDetailed() bool { + if x != nil { + return x.Detailed + } + return false +} + +// Describe call response +// +// Response: +// - pipeline = [required] Pipeline's description. +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = Pipeline with given ppl_id was not found. +// - blocks = [required if detailed == true; list] blocks description +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + Pipeline *Pipeline `protobuf:"bytes,3,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{3} +} + +func (x *DescribeResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *DescribeResponse) GetPipeline() *Pipeline { + if x != nil { + return x.Pipeline + } + return nil +} + +func (x *DescribeResponse) GetBlocks() []*Block { + if x != nil { + return x.Blocks + } + return nil +} + +// Block description +// +// Fields: +// - block_id = [required] unique block identifier +// - name = [required] Block name +// - build_req_id = [required if build is scheduled] build request identifier +// - state = [required] Current state of given block +// - result = [optional] Block execution result, only valid if state = DONE +// - result_reason = [optional] Reason for result of blocks's execution different from PASSED +// It can be: +// - TEST, MALFORMED or STUCK - when result is FAILED +// - USER, INTERNAL, STRATEGY, FAST_FAILING or DELETED - when result is STOPPED or CANCELED +// - error_description = [optional] Stores error description when block is MALFORMED +// - jobs = [list, if there are any jobs] Jobs belonging to the block +type Block struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockId string `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + BuildReqId string `protobuf:"bytes,3,opt,name=build_req_id,json=buildReqId,proto3" json:"build_req_id,omitempty"` + State Block_State `protobuf:"varint,4,opt,name=state,proto3,enum=InternalApi.Plumber.Block_State" json:"state,omitempty"` + Result Block_Result `protobuf:"varint,5,opt,name=result,proto3,enum=InternalApi.Plumber.Block_Result" json:"result,omitempty"` + ResultReason Block_ResultReason `protobuf:"varint,6,opt,name=result_reason,json=resultReason,proto3,enum=InternalApi.Plumber.Block_ResultReason" json:"result_reason,omitempty"` + ErrorDescription string `protobuf:"bytes,7,opt,name=error_description,json=errorDescription,proto3" json:"error_description,omitempty"` + Jobs []*Block_Job `protobuf:"bytes,8,rep,name=jobs,proto3" json:"jobs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Block) Reset() { + *x = Block{} + mi := &file_plumber_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{4} +} + +func (x *Block) GetBlockId() string { + if x != nil { + return x.BlockId + } + return "" +} + +func (x *Block) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Block) GetBuildReqId() string { + if x != nil { + return x.BuildReqId + } + return "" +} + +func (x *Block) GetState() Block_State { + if x != nil { + return x.State + } + return Block_WAITING +} + +func (x *Block) GetResult() Block_Result { + if x != nil { + return x.Result + } + return Block_PASSED +} + +func (x *Block) GetResultReason() Block_ResultReason { + if x != nil { + return x.ResultReason + } + return Block_TEST +} + +func (x *Block) GetErrorDescription() string { + if x != nil { + return x.ErrorDescription + } + return "" +} + +func (x *Block) GetJobs() []*Block_Job { + if x != nil { + return x.Jobs + } + return nil +} + +// DescribeMany call request +// +// Synchronous operation. +// Returns status of the pipelines. +// +// Arguments: +// - ppl_ids = [required] Pipelines to describe. +// +// Preconditions: +// - Pipelines with ppl_ids was previously scheduled. +// +// Postconditions: +// +// Idempotency: +type DescribeManyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplIds []string `protobuf:"bytes,1,rep,name=ppl_ids,json=pplIds,proto3" json:"ppl_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyRequest) Reset() { + *x = DescribeManyRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyRequest) ProtoMessage() {} + +func (x *DescribeManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyRequest.ProtoReflect.Descriptor instead. +func (*DescribeManyRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{5} +} + +func (x *DescribeManyRequest) GetPplIds() []string { + if x != nil { + return x.PplIds + } + return nil +} + +// DescribeMany call response +// +// Response: +// - pipelines = [required] Pipeline's description. +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = Pipeline with given ppl_id was not found. +type DescribeManyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + Pipelines []*Pipeline `protobuf:"bytes,2,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyResponse) Reset() { + *x = DescribeManyResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyResponse) ProtoMessage() {} + +func (x *DescribeManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyResponse.ProtoReflect.Descriptor instead. +func (*DescribeManyResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{6} +} + +func (x *DescribeManyResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *DescribeManyResponse) GetPipelines() []*Pipeline { + if x != nil { + return x.Pipelines + } + return nil +} + +// DescribeTopology call request +// +// Synchronous operation. +// Returns the topology of the pipeline. +// +// Arguments: +// - ppl_id = [required] Pipeline which topology to describe. +// +// Preconditions: +// - Pipeline with ppl_id was previously scheduled. +// +// Postconditions: +// +// Idempotency: +type DescribeTopologyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeTopologyRequest) Reset() { + *x = DescribeTopologyRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeTopologyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeTopologyRequest) ProtoMessage() {} + +func (x *DescribeTopologyRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeTopologyRequest.ProtoReflect.Descriptor instead. +func (*DescribeTopologyRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{7} +} + +func (x *DescribeTopologyRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// DescribeTopology call response +// +// Response: +// - blocks = [required] Block topologies +// - status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = Pipeline with given ppl_id was not found. +type DescribeTopologyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Blocks []*DescribeTopologyResponse_Block `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` + AfterPipeline *DescribeTopologyResponse_AfterPipeline `protobuf:"bytes,3,opt,name=after_pipeline,json=afterPipeline,proto3" json:"after_pipeline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeTopologyResponse) Reset() { + *x = DescribeTopologyResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeTopologyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeTopologyResponse) ProtoMessage() {} + +func (x *DescribeTopologyResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeTopologyResponse.ProtoReflect.Descriptor instead. +func (*DescribeTopologyResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{8} +} + +func (x *DescribeTopologyResponse) GetStatus() *ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeTopologyResponse) GetBlocks() []*DescribeTopologyResponse_Block { + if x != nil { + return x.Blocks + } + return nil +} + +func (x *DescribeTopologyResponse) GetAfterPipeline() *DescribeTopologyResponse_AfterPipeline { + if x != nil { + return x.AfterPipeline + } + return nil +} + +// Terminate call request +// +// When this request is received, pipeline service terminates the pipeline as +// soon as possible on the best effort basis. +// +// Arguments: +// - ppl_id = [required] Pipeline to terminate. +// - requester_id = [required] The user who authored termination. +// +// Preconditions: +// - Pipeline with ppl_id was previously scheduled. +// +// Postconditions: +// Pipeline is terminated if it is not already in terminal state. +// If the pipeline is already in terminal state, request is accepted and ignored. +// +// Idempotency: +// Response for existing ppl_id is always OK. +type TerminateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateRequest) Reset() { + *x = TerminateRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateRequest) ProtoMessage() {} + +func (x *TerminateRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateRequest.ProtoReflect.Descriptor instead. +func (*TerminateRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{9} +} + +func (x *TerminateRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *TerminateRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +// Terminate call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = Pipeline exists. Will be terminated if possible. +// BAD_PARAM = Pipeline with given ppl_id was not found. +type TerminateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateResponse) Reset() { + *x = TerminateResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateResponse) ProtoMessage() {} + +func (x *TerminateResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateResponse.ProtoReflect.Descriptor instead. +func (*TerminateResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{10} +} + +func (x *TerminateResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +// ListQueues call request +// +// Synchronous operation. +// Returns paginated details of all queues for given project or organization. +// +// Arguments: +// - page = [optional, default = 1] Serial number of wanted results page +// - page_size = [optional, default = 30] Number of queue per page +// - project_id = [optional if organization_id is given] Id of project which +// queues should be returned. +// - organization_id = [optional if project_id is given] Id of organization for +// which queues should be returned +// - queue_types = [required] The types of queues which should be returned +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListQueuesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + QueueTypes []QueueType `protobuf:"varint,5,rep,packed,name=queue_types,json=queueTypes,proto3,enum=InternalApi.Plumber.QueueType" json:"queue_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListQueuesRequest) Reset() { + *x = ListQueuesRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListQueuesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesRequest) ProtoMessage() {} + +func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesRequest.ProtoReflect.Descriptor instead. +func (*ListQueuesRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{11} +} + +func (x *ListQueuesRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListQueuesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListQueuesRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListQueuesRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListQueuesRequest) GetQueueTypes() []QueueType { + if x != nil { + return x.QueueTypes + } + return nil +} + +// ListQueues call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = One of the params from ListQueuesRequest is invalid +// - labels = [required] list of queues +// - page_number = [required] Serial number of returned page with queue search results +// - page_size = [required] Number of queues per page +// - total_entries = [required] Total number of queues that are result of search +// - total_pages = [required] Total number of pages with queue search results +type ListQueuesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + Queues []*Queue `protobuf:"bytes,2,rep,name=queues,proto3" json:"queues,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListQueuesResponse) Reset() { + *x = ListQueuesResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListQueuesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesResponse) ProtoMessage() {} + +func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesResponse.ProtoReflect.Descriptor instead. +func (*ListQueuesResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{12} +} + +func (x *ListQueuesResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ListQueuesResponse) GetQueues() []*Queue { + if x != nil { + return x.Queues + } + return nil +} + +func (x *ListQueuesResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListQueuesResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListQueuesResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListQueuesResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// ListGrouped call request +// +// Synchronous operation. +// Returns paginated details of one latest pipeline for each queue that matches +// the given search parameters. +// +// Arguments: +// - page = [optional, default = 1] Serial number of wanted results page +// - page_size = [optional, default = 30] Number of pipelines per page +// - project_id = [optional if organization_id is given] Id of project for +// which latest pipelines from queues should be returned +// - organization_id = [optional if project_id is given] Id of organization for +// which latest pipelines from queues should be returned +// - queue_types = [required] The types of queues for which latest pipelines +// should be returned +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListGroupedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + QueueType []QueueType `protobuf:"varint,5,rep,packed,name=queue_type,json=queueType,proto3,enum=InternalApi.Plumber.QueueType" json:"queue_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedRequest) Reset() { + *x = ListGroupedRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedRequest) ProtoMessage() {} + +func (x *ListGroupedRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedRequest.ProtoReflect.Descriptor instead. +func (*ListGroupedRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{13} +} + +func (x *ListGroupedRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListGroupedRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupedRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListGroupedRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListGroupedRequest) GetQueueType() []QueueType { + if x != nil { + return x.QueueType + } + return nil +} + +// ListGrouped call response +// +// Response: +// - pipelines = [required] Pipelines which match search params in ListGroupedRequest +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = One of the params from ListGroupedRequest is invalid +// - page_number = [required] Serial number of returned page with pipeline search results +// - page_size = [required] Number of pipelines per page +// - total_entries = [required] Total number of pipelines for given project and branch +// - total_pages = [required] Total number of pages with pipeline search results +type ListGroupedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + Pipelines []*Pipeline `protobuf:"bytes,2,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedResponse) Reset() { + *x = ListGroupedResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedResponse) ProtoMessage() {} + +func (x *ListGroupedResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedResponse.ProtoReflect.Descriptor instead. +func (*ListGroupedResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{14} +} + +func (x *ListGroupedResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ListGroupedResponse) GetPipelines() []*Pipeline { + if x != nil { + return x.Pipelines + } + return nil +} + +func (x *ListGroupedResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListGroupedResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupedResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListGroupedResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// ListKeyset call request +// +// Synchronous operation. +// Returns paginated details of all pipelines for given project or workflow which +// match the other search parameters if they are given. +// +// Arguments: +// - page_size = [required] Number of pipelines per page of List call result. +// - page_token = [required] Starting point for listing, tokens for next and previous +// page are returned in response. If you are fetching first page +// leave it empty and set direction to NEXT +// - order = [required] Sorting order direction +// - direction = [required] Listing direction. Use NEXT with value of 'next_page_token' +// from ListKeyset response as 'page_token' to fetch next page +// of results, or use PREVIOUS with value of 'previous_page_token' +// as 'page_token' to fetch the previous page. +// - project_id = [required, optional if wf_id is given] Id of project which +// pipelines should be returned. +// - yml_file_path = [optional] path within GitHub repository to yml file from +// which pipeline originated +// - wf_id = [required, optional if project_id is given] Workflow for which +// pipelines should be returned. +// - created_before = [optional] Return only pipelines created before this timestamp +// - created_after = [optional] Return only pipelines created after this timestamp +// - done_before = [optional] Return only pipelines which finished before this timestamp +// - done_after = [optional] Return only pipelines which finished after this timestamp +// - label = [optional] Return only pipeline with given label +// (label is branch/tag name, PR number, snapshot generated label etc.) +// - git_ref_types = [optional] Return only pipelines which originated from one of given git refs +// - queue_id = [optional] Return only pipelines from queue with given id +// - pr_head_branch = [optional] Return only pipelines with given PR head branch +// - pr_target_branch = [optional] Return only pipelines with given PR target branch +// +// Preconditions: +// +// Postconditions: +// - gRPC status: OK = Response contains valid data in other fields. +// - gRPC status: INVALID_ARGUMENT = Pipelines list request is rejected because +// of malformed request. +// - gRPC status: RESOURCE_EXHAUSTED = Too many requests, server is overloaded, +// try again later. +// +// Idempotency: +type ListKeysetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Order ListKeysetRequest_Order `protobuf:"varint,3,opt,name=order,proto3,enum=InternalApi.Plumber.ListKeysetRequest_Order" json:"order,omitempty"` + Direction ListKeysetRequest_Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=InternalApi.Plumber.ListKeysetRequest_Direction" json:"direction,omitempty"` + ProjectId string `protobuf:"bytes,5,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + YmlFilePath string `protobuf:"bytes,6,opt,name=yml_file_path,json=ymlFilePath,proto3" json:"yml_file_path,omitempty"` + WfId string `protobuf:"bytes,7,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"` + DoneBefore *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=done_before,json=doneBefore,proto3" json:"done_before,omitempty"` + DoneAfter *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=done_after,json=doneAfter,proto3" json:"done_after,omitempty"` + Label string `protobuf:"bytes,12,opt,name=label,proto3" json:"label,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,13,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.Plumber.GitRefType" json:"git_ref_types,omitempty"` + QueueId string `protobuf:"bytes,14,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` + PrHeadBranch string `protobuf:"bytes,15,opt,name=pr_head_branch,json=prHeadBranch,proto3" json:"pr_head_branch,omitempty"` + PrTargetBranch string `protobuf:"bytes,16,opt,name=pr_target_branch,json=prTargetBranch,proto3" json:"pr_target_branch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetRequest) Reset() { + *x = ListKeysetRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetRequest) ProtoMessage() {} + +func (x *ListKeysetRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetRequest.ProtoReflect.Descriptor instead. +func (*ListKeysetRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{15} +} + +func (x *ListKeysetRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListKeysetRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListKeysetRequest) GetOrder() ListKeysetRequest_Order { + if x != nil { + return x.Order + } + return ListKeysetRequest_BY_CREATION_TIME_DESC +} + +func (x *ListKeysetRequest) GetDirection() ListKeysetRequest_Direction { + if x != nil { + return x.Direction + } + return ListKeysetRequest_NEXT +} + +func (x *ListKeysetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListKeysetRequest) GetYmlFilePath() string { + if x != nil { + return x.YmlFilePath + } + return "" +} + +func (x *ListKeysetRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *ListKeysetRequest) GetCreatedBefore() *timestamppb.Timestamp { + if x != nil { + return x.CreatedBefore + } + return nil +} + +func (x *ListKeysetRequest) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +func (x *ListKeysetRequest) GetDoneBefore() *timestamppb.Timestamp { + if x != nil { + return x.DoneBefore + } + return nil +} + +func (x *ListKeysetRequest) GetDoneAfter() *timestamppb.Timestamp { + if x != nil { + return x.DoneAfter + } + return nil +} + +func (x *ListKeysetRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ListKeysetRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +func (x *ListKeysetRequest) GetQueueId() string { + if x != nil { + return x.QueueId + } + return "" +} + +func (x *ListKeysetRequest) GetPrHeadBranch() string { + if x != nil { + return x.PrHeadBranch + } + return "" +} + +func (x *ListKeysetRequest) GetPrTargetBranch() string { + if x != nil { + return x.PrTargetBranch + } + return "" +} + +// ListKeyset call response +// +// Response: +// - pipelines = [required] Pipelines which match search params in request +// - next_page_token = [required] Token which should be passed in ListKeysetRequest +// to fetch the next page of pipelines +// - previous_page_token = [required] Token which should be passed in ListKeysetRequest +// to fetch the previous page of pipelines +type ListKeysetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,3,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetResponse) Reset() { + *x = ListKeysetResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetResponse) ProtoMessage() {} + +func (x *ListKeysetResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetResponse.ProtoReflect.Descriptor instead. +func (*ListKeysetResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{16} +} + +func (x *ListKeysetResponse) GetPipelines() []*Pipeline { + if x != nil { + return x.Pipelines + } + return nil +} + +func (x *ListKeysetResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListKeysetResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +// List call request +// +// Synchronous operation. +// Returns paginated ids of all pipelines for given project or workflow which match +// other search parameters if they are given. +// +// Arguments: +// - project_id = [required, optional if wf_id is given] Id of project which +// pipelines should be returned. +// # DEPRECATED - instead use: label + git_ref_types = [BRANCH] +// - branch_name = [optional] Name of branch which pipelines should be returned. +// +// - page = [required] Serial number of wanted page with List call result. +// - page_size = [required] Number of pipelines per page of List call result. +// - yml_file_path = [optional] path within GitHub repository to yml file from +// which pipeline originated +// - wf_id = [required, optional if project_id is given] Workflow for which +// pipelines should be returned. +// - created_before = [optional] Return only pipelines created before this timestamp +// - created_after = [optional] Return only pipelines created after this timestamp +// - done_before = [optional] Return only pipelines which finished before this timestamp +// - done_after = [optional] Return only pipelines which finished after this timestamp +// - label = [optional] Return only pipeline with given label +// (label is branch/tag name, PR number, snapshot generated label etc.) +// - git_ref_types = [optional] Return only pipelines which originated from one of given git refs +// - queue_id = [optional] Return only pipelines from queue with given id +// - pr_head_branch = [optional] Return only pipelines with given PR head branch +// - pr_target_branch = [optional] Return only pipelines with given PR target branch +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchName string `protobuf:"bytes,2,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` // DEPRECATED + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + YmlFilePath string `protobuf:"bytes,5,opt,name=yml_file_path,json=ymlFilePath,proto3" json:"yml_file_path,omitempty"` + WfId string `protobuf:"bytes,6,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"` + DoneBefore *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=done_before,json=doneBefore,proto3" json:"done_before,omitempty"` + DoneAfter *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=done_after,json=doneAfter,proto3" json:"done_after,omitempty"` + Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,12,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.Plumber.GitRefType" json:"git_ref_types,omitempty"` + QueueId string `protobuf:"bytes,13,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` + PrHeadBranch string `protobuf:"bytes,14,opt,name=pr_head_branch,json=prHeadBranch,proto3" json:"pr_head_branch,omitempty"` + PrTargetBranch string `protobuf:"bytes,15,opt,name=pr_target_branch,json=prTargetBranch,proto3" json:"pr_target_branch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{17} +} + +func (x *ListRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListRequest) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *ListRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequest) GetYmlFilePath() string { + if x != nil { + return x.YmlFilePath + } + return "" +} + +func (x *ListRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *ListRequest) GetCreatedBefore() *timestamppb.Timestamp { + if x != nil { + return x.CreatedBefore + } + return nil +} + +func (x *ListRequest) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +func (x *ListRequest) GetDoneBefore() *timestamppb.Timestamp { + if x != nil { + return x.DoneBefore + } + return nil +} + +func (x *ListRequest) GetDoneAfter() *timestamppb.Timestamp { + if x != nil { + return x.DoneAfter + } + return nil +} + +func (x *ListRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ListRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +func (x *ListRequest) GetQueueId() string { + if x != nil { + return x.QueueId + } + return "" +} + +func (x *ListRequest) GetPrHeadBranch() string { + if x != nil { + return x.PrHeadBranch + } + return "" +} + +func (x *ListRequest) GetPrTargetBranch() string { + if x != nil { + return x.PrTargetBranch + } + return "" +} + +// List call response +// +// Response: +// - pipelines = [required] Pipelines which match search params in ListRequest +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// BAD_PARAM = One of the params from ListRequest is invalid +// - page_number = [required] Serial number of returned page with pipeline search results +// - page_size = [required] Number of pipelines per page +// - total_entries = [required] Total number of pipelines for given project and branch +// - total_pages = [required] Total number of pages with pipeline search results +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + Pipelines []*Pipeline `protobuf:"bytes,2,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{18} +} + +func (x *ListResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ListResponse) GetPipelines() []*Pipeline { + if x != nil { + return x.Pipelines + } + return nil +} + +func (x *ListResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// Queue entity details - each pipeline belongs to exactly one queue +// +// - queue_id = [required] Unique Queue identifier +// - name = [required] Name of the queue +// - scope = [required] Queue scope - either 'project' or 'organization' +// - project_id = [valid if scope = 'project'] Id of project to which given +// queue belongs +// - organization_id = [required] Id of organization to which given queue belongs +// - type = [required] The type of the given queue +type Queue struct { + state protoimpl.MessageState `protogen:"open.v1"` + QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Scope string `protobuf:"bytes,3,opt,name=scope,proto3" json:"scope,omitempty"` + ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + OrganizationId string `protobuf:"bytes,5,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Type QueueType `protobuf:"varint,6,opt,name=type,proto3,enum=InternalApi.Plumber.QueueType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Queue) Reset() { + *x = Queue{} + mi := &file_plumber_pipeline_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Queue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Queue) ProtoMessage() {} + +func (x *Queue) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Queue.ProtoReflect.Descriptor instead. +func (*Queue) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{19} +} + +func (x *Queue) GetQueueId() string { + if x != nil { + return x.QueueId + } + return "" +} + +func (x *Queue) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Queue) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *Queue) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Queue) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Queue) GetType() QueueType { + if x != nil { + return x.Type + } + return QueueType_IMPLICIT +} + +// Pipeline entity details +// +// - ppl_id = [required] Unique Pipeline identifier +// +// - name = [required] User specific (or auto-generated) name for given pipeline +// +// - project_id = [required] Id of project to which given pipeline belongs +// +// - branch_name = [required] Name of git branch for which pipeline was scheduled +// +// - commit_sha = [required] Git commit sha for which pipeline was scheduled +// +// - created_at = [required] Timestamp when pipeline schedule request was recorded +// +// - pending_at = [required] Timestamp when pipeline transitioned to pending state +// +// - queuing_at = [required] Timestamp when pipeline transitioned to queuing state +// +// - running_at = [required] Timestamp when pipeline transitioned to running state +// +// - stopping_at = [required] Timestamp when pipeline transitioned to stopping state +// +// - done_at = [required] Timestamp when pipeline execution was finished +// +// - state = [required] Current state of given pipeline +// +// - result = [optional] Pipeline execution result, only valid if state = DONE +// +// - result_reason = [optional] Reason for result of pipeline's execution different from PASSED +// It can be: +// +// - TEST, MALFORMED or STUCK - when result is FAILED +// +// - USER, INTERNAL, STRATEGY, FAST_FAILING or DELETED - when result is STOPPED or CANCELED +// +// - terminate_request = [required] It is empty string if there is no need for termination. +// Otherwise, it contains desired termination action (stop or cancel) +// +// - hook_id = [required] Received in schedule request +// +// - branch_id = [required] Received in schedule request +// +// - error_description = [optional] Stores error description when pipeline is MALFORMED +// +// - switch_id = [optional] Id from Gofer service of the switch connected to this pipeline +// (only valid if switch was defined for this pipeline in yaml definition) +// +// - working_directory = [required] Full path within git repo to folder which is set as a working dir for this pipeline +// +// - yaml_file_name = [required] Name of yaml file within git repo which contains definition of this pipeline +// +// - terminated_by = [optional] Id of user which requested termination (only valid if termination was requested) +// +// - wf_id = [required] Workflow to which given pipeline belongs +// +// - snapshot_id = [optional] Id of snapshot if the snapshot service was called +// +// - queue = [required] Details of queue to which pipeline belongs +// +// - promotion_of = [optional] Id of the pipeline that triggered the promotion to this pipeline. +// +// It can be: +// +// - Empty (""), if the pipeline is the first one in the chain. +// +// - Non-empty, if the pipeline was a promotion of another pipeline. +// +// Example: +// +// If we have a chain of pipelines, like in the bellow diagram: +// +// p1 -> p2 -> [p3] -> p4 +// +// When we describe pipeline p3, the value of the p3.promotion_of will be p2. +// +// - partial_rerun_of = [optional] Id of the pipeline from which this pipeline was partially rerun. +// +// It can be: +// - Empty (""), if the pipeline is the original (first) run. +// - Non-empty, if the pipeline was a partial rerun of a previous pipeline. +// +// - commit_message = [optional] Git commit message, only present if pipeline has passed initialization +// - partially_rerun_by = [optional] The ID of the user that requested partial rerun. +// Only available for pipelines created since 06/2020 +// - compile_task_id = [optional] The ID of the compilation task on Zebra service +// Only available if compilation was initiated for a given pipeline +// - with_after_task = [required] Indicates if pipeline has after task. This field is set before after_task_id +// and should be used to indicate if pipeline contains after task. It's set after compilation +// task is done. +// - after_task_id = [optional] The ID of the after pipeline task on Zebra service +// Only available if after pipeline task was initiated for a given pipeline +// +// -repository_id = [optional] The ID of the repository from which pipeline was initialized +// +// Only available if related hook was processed by hooks-receiver/processor (only BitBucket currently) +// +// - env_vars = [optional] Environment variables that were set for the pipeline (via extension request) +// - triggerer = [required] Who and how triggered the pipeline +// - organization_id = [required] Id of organization to which given pipeline belongs +type Pipeline struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + CommitSha string `protobuf:"bytes,5,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + PendingAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=pending_at,json=pendingAt,proto3" json:"pending_at,omitempty"` + QueuingAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=queuing_at,json=queuingAt,proto3" json:"queuing_at,omitempty"` + RunningAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=running_at,json=runningAt,proto3" json:"running_at,omitempty"` + StoppingAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=stopping_at,json=stoppingAt,proto3" json:"stopping_at,omitempty"` + DoneAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=done_at,json=doneAt,proto3" json:"done_at,omitempty"` + State Pipeline_State `protobuf:"varint,12,opt,name=state,proto3,enum=InternalApi.Plumber.Pipeline_State" json:"state,omitempty"` + Result Pipeline_Result `protobuf:"varint,13,opt,name=result,proto3,enum=InternalApi.Plumber.Pipeline_Result" json:"result,omitempty"` + ResultReason Pipeline_ResultReason `protobuf:"varint,14,opt,name=result_reason,json=resultReason,proto3,enum=InternalApi.Plumber.Pipeline_ResultReason" json:"result_reason,omitempty"` + TerminateRequest string `protobuf:"bytes,15,opt,name=terminate_request,json=terminateRequest,proto3" json:"terminate_request,omitempty"` + HookId string `protobuf:"bytes,16,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + BranchId string `protobuf:"bytes,17,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + ErrorDescription string `protobuf:"bytes,18,opt,name=error_description,json=errorDescription,proto3" json:"error_description,omitempty"` + SwitchId string `protobuf:"bytes,19,opt,name=switch_id,json=switchId,proto3" json:"switch_id,omitempty"` + WorkingDirectory string `protobuf:"bytes,20,opt,name=working_directory,json=workingDirectory,proto3" json:"working_directory,omitempty"` + YamlFileName string `protobuf:"bytes,21,opt,name=yaml_file_name,json=yamlFileName,proto3" json:"yaml_file_name,omitempty"` + TerminatedBy string `protobuf:"bytes,22,opt,name=terminated_by,json=terminatedBy,proto3" json:"terminated_by,omitempty"` + WfId string `protobuf:"bytes,23,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + SnapshotId string `protobuf:"bytes,24,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + Queue *Queue `protobuf:"bytes,25,opt,name=queue,proto3" json:"queue,omitempty"` + PromotionOf string `protobuf:"bytes,26,opt,name=promotion_of,json=promotionOf,proto3" json:"promotion_of,omitempty"` + PartialRerunOf string `protobuf:"bytes,27,opt,name=partial_rerun_of,json=partialRerunOf,proto3" json:"partial_rerun_of,omitempty"` + CommitMessage string `protobuf:"bytes,28,opt,name=commit_message,json=commitMessage,proto3" json:"commit_message,omitempty"` + PartiallyRerunBy string `protobuf:"bytes,29,opt,name=partially_rerun_by,json=partiallyRerunBy,proto3" json:"partially_rerun_by,omitempty"` + CompileTaskId string `protobuf:"bytes,30,opt,name=compile_task_id,json=compileTaskId,proto3" json:"compile_task_id,omitempty"` + WithAfterTask bool `protobuf:"varint,31,opt,name=with_after_task,json=withAfterTask,proto3" json:"with_after_task,omitempty"` + AfterTaskId string `protobuf:"bytes,32,opt,name=after_task_id,json=afterTaskId,proto3" json:"after_task_id,omitempty"` + RepositoryId string `protobuf:"bytes,33,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` + EnvVars []*EnvVariable `protobuf:"bytes,34,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` + Triggerer *Triggerer `protobuf:"bytes,35,opt,name=triggerer,proto3" json:"triggerer,omitempty"` + OrganizationId string `protobuf:"bytes,36,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Pipeline) Reset() { + *x = Pipeline{} + mi := &file_plumber_pipeline_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Pipeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pipeline) ProtoMessage() {} + +func (x *Pipeline) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pipeline.ProtoReflect.Descriptor instead. +func (*Pipeline) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{20} +} + +func (x *Pipeline) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *Pipeline) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Pipeline) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Pipeline) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *Pipeline) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +func (x *Pipeline) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Pipeline) GetPendingAt() *timestamppb.Timestamp { + if x != nil { + return x.PendingAt + } + return nil +} + +func (x *Pipeline) GetQueuingAt() *timestamppb.Timestamp { + if x != nil { + return x.QueuingAt + } + return nil +} + +func (x *Pipeline) GetRunningAt() *timestamppb.Timestamp { + if x != nil { + return x.RunningAt + } + return nil +} + +func (x *Pipeline) GetStoppingAt() *timestamppb.Timestamp { + if x != nil { + return x.StoppingAt + } + return nil +} + +func (x *Pipeline) GetDoneAt() *timestamppb.Timestamp { + if x != nil { + return x.DoneAt + } + return nil +} + +func (x *Pipeline) GetState() Pipeline_State { + if x != nil { + return x.State + } + return Pipeline_INITIALIZING +} + +func (x *Pipeline) GetResult() Pipeline_Result { + if x != nil { + return x.Result + } + return Pipeline_PASSED +} + +func (x *Pipeline) GetResultReason() Pipeline_ResultReason { + if x != nil { + return x.ResultReason + } + return Pipeline_TEST +} + +func (x *Pipeline) GetTerminateRequest() string { + if x != nil { + return x.TerminateRequest + } + return "" +} + +func (x *Pipeline) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *Pipeline) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *Pipeline) GetErrorDescription() string { + if x != nil { + return x.ErrorDescription + } + return "" +} + +func (x *Pipeline) GetSwitchId() string { + if x != nil { + return x.SwitchId + } + return "" +} + +func (x *Pipeline) GetWorkingDirectory() string { + if x != nil { + return x.WorkingDirectory + } + return "" +} + +func (x *Pipeline) GetYamlFileName() string { + if x != nil { + return x.YamlFileName + } + return "" +} + +func (x *Pipeline) GetTerminatedBy() string { + if x != nil { + return x.TerminatedBy + } + return "" +} + +func (x *Pipeline) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *Pipeline) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *Pipeline) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +func (x *Pipeline) GetPromotionOf() string { + if x != nil { + return x.PromotionOf + } + return "" +} + +func (x *Pipeline) GetPartialRerunOf() string { + if x != nil { + return x.PartialRerunOf + } + return "" +} + +func (x *Pipeline) GetCommitMessage() string { + if x != nil { + return x.CommitMessage + } + return "" +} + +func (x *Pipeline) GetPartiallyRerunBy() string { + if x != nil { + return x.PartiallyRerunBy + } + return "" +} + +func (x *Pipeline) GetCompileTaskId() string { + if x != nil { + return x.CompileTaskId + } + return "" +} + +func (x *Pipeline) GetWithAfterTask() bool { + if x != nil { + return x.WithAfterTask + } + return false +} + +func (x *Pipeline) GetAfterTaskId() string { + if x != nil { + return x.AfterTaskId + } + return "" +} + +func (x *Pipeline) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +func (x *Pipeline) GetEnvVars() []*EnvVariable { + if x != nil { + return x.EnvVars + } + return nil +} + +func (x *Pipeline) GetTriggerer() *Triggerer { + if x != nil { + return x.Triggerer + } + return nil +} + +func (x *Pipeline) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +type Triggerer struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfTriggeredBy plumber_w_f_workflow.TriggeredBy `protobuf:"varint,1,opt,name=wf_triggered_by,json=wfTriggeredBy,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"wf_triggered_by,omitempty"` + WfTriggererId string `protobuf:"bytes,2,opt,name=wf_triggerer_id,json=wfTriggererId,proto3" json:"wf_triggerer_id,omitempty"` + WfTriggererUserId string `protobuf:"bytes,3,opt,name=wf_triggerer_user_id,json=wfTriggererUserId,proto3" json:"wf_triggerer_user_id,omitempty"` + WfTriggererProviderLogin string `protobuf:"bytes,4,opt,name=wf_triggerer_provider_login,json=wfTriggererProviderLogin,proto3" json:"wf_triggerer_provider_login,omitempty"` + WfTriggererProviderUid string `protobuf:"bytes,5,opt,name=wf_triggerer_provider_uid,json=wfTriggererProviderUid,proto3" json:"wf_triggerer_provider_uid,omitempty"` + WfTriggererProviderAvatar string `protobuf:"bytes,6,opt,name=wf_triggerer_provider_avatar,json=wfTriggererProviderAvatar,proto3" json:"wf_triggerer_provider_avatar,omitempty"` + PplTriggeredBy TriggeredBy `protobuf:"varint,7,opt,name=ppl_triggered_by,json=pplTriggeredBy,proto3,enum=InternalApi.Plumber.TriggeredBy" json:"ppl_triggered_by,omitempty"` + PplTriggererId string `protobuf:"bytes,8,opt,name=ppl_triggerer_id,json=pplTriggererId,proto3" json:"ppl_triggerer_id,omitempty"` + PplTriggererUserId string `protobuf:"bytes,9,opt,name=ppl_triggerer_user_id,json=pplTriggererUserId,proto3" json:"ppl_triggerer_user_id,omitempty"` + WorkflowRerunOf string `protobuf:"bytes,10,opt,name=workflow_rerun_of,json=workflowRerunOf,proto3" json:"workflow_rerun_of,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Triggerer) Reset() { + *x = Triggerer{} + mi := &file_plumber_pipeline_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Triggerer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Triggerer) ProtoMessage() {} + +func (x *Triggerer) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Triggerer.ProtoReflect.Descriptor instead. +func (*Triggerer) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{21} +} + +func (x *Triggerer) GetWfTriggeredBy() plumber_w_f_workflow.TriggeredBy { + if x != nil { + return x.WfTriggeredBy + } + return plumber_w_f_workflow.TriggeredBy(0) +} + +func (x *Triggerer) GetWfTriggererId() string { + if x != nil { + return x.WfTriggererId + } + return "" +} + +func (x *Triggerer) GetWfTriggererUserId() string { + if x != nil { + return x.WfTriggererUserId + } + return "" +} + +func (x *Triggerer) GetWfTriggererProviderLogin() string { + if x != nil { + return x.WfTriggererProviderLogin + } + return "" +} + +func (x *Triggerer) GetWfTriggererProviderUid() string { + if x != nil { + return x.WfTriggererProviderUid + } + return "" +} + +func (x *Triggerer) GetWfTriggererProviderAvatar() string { + if x != nil { + return x.WfTriggererProviderAvatar + } + return "" +} + +func (x *Triggerer) GetPplTriggeredBy() TriggeredBy { + if x != nil { + return x.PplTriggeredBy + } + return TriggeredBy_WORKFLOW +} + +func (x *Triggerer) GetPplTriggererId() string { + if x != nil { + return x.PplTriggererId + } + return "" +} + +func (x *Triggerer) GetPplTriggererUserId() string { + if x != nil { + return x.PplTriggererUserId + } + return "" +} + +func (x *Triggerer) GetWorkflowRerunOf() string { + if x != nil { + return x.WorkflowRerunOf + } + return "" +} + +// ListActivity call request +// +// Synchronous operation. +// Returns paginated details for all currently running or queuing pipelines in organization +// +// Arguments: +// - page_size = [optional, default = 30] Number of pipelines per page of response +// - page_token = [required] Starting point for listing, tokens for next and previous +// page are returned in response. If you are fetching first +// page leave it empty and set direction to NEXT +// - direction = [required] Listing direction. Use NEXT with value of 'next_page_token' +// from ListActivity response as 'page_token' to fetch next page +// of results, or use PREVIOUS with value of 'previous_page_token' +// as 'page_token' to fetch the previous page. +// - order = [required] Sorting order direction +// - organization_id = [required] Id of organization which pipelines should be returned. +// +// Preconditions: +// +// Postconditions: +// - gRPC status: OK => Response contains list of currently active pipelines +// - gRPC status: INVALID_ARGUMENT => An invalid argument is passed. +// The error message contains a description. +// - gPRC status: INTERNAL => An unknown error happened while processing this request. +// +// Idempotency: +type ListActivityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Order ListActivityRequest_Order `protobuf:"varint,3,opt,name=order,proto3,enum=InternalApi.Plumber.ListActivityRequest_Order" json:"order,omitempty"` + OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Direction ListActivityRequest_Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=InternalApi.Plumber.ListActivityRequest_Direction" json:"direction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActivityRequest) Reset() { + *x = ListActivityRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActivityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActivityRequest) ProtoMessage() {} + +func (x *ListActivityRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActivityRequest.ProtoReflect.Descriptor instead. +func (*ListActivityRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{22} +} + +func (x *ListActivityRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListActivityRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListActivityRequest) GetOrder() ListActivityRequest_Order { + if x != nil { + return x.Order + } + return ListActivityRequest_BY_CREATION_TIME_DESC +} + +func (x *ListActivityRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListActivityRequest) GetDirection() ListActivityRequest_Direction { + if x != nil { + return x.Direction + } + return ListActivityRequest_NEXT +} + +// ListActivity call response +// +// Response: +// - next_page_token = [required] Token which should be passed in list request +// to fetch the next page of workflows +// - previous_page_token = [required] Token which should be passed in list request +// to fetch the previous page of workflows +// - pipelines = [required] Pipelines which match search params in request +type ListActivityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,2,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + Pipelines []*ActivePipeline `protobuf:"bytes,3,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActivityResponse) Reset() { + *x = ListActivityResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActivityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActivityResponse) ProtoMessage() {} + +func (x *ListActivityResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActivityResponse.ProtoReflect.Descriptor instead. +func (*ListActivityResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{23} +} + +func (x *ListActivityResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListActivityResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +func (x *ListActivityResponse) GetPipelines() []*ActivePipeline { + if x != nil { + return x.Pipelines + } + return nil +} + +// ListRequesters call request +// +// Synchronous operation. +// Returns paginated list of requesters. +// This endpoint supports two modes of operation: +// - if page_token is provided, other parameters are ignored as the parameters are embedded within the token itself +// - if page_token is not provided, one needs to supply required parameters +// +// - organization_id = [required] Id of organization which requesters should be returned +// - requested_at_gt = [required] returns requesters from this timestamp +// - requested_at_lte = [required] returns requesters to this timestamp +// - page_token = [optional] If set, returns the next page of results ignoring other parameters +// - page_size = [optional, default = 100] Number of requesters per page +type ListRequestersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + RequestedAtGt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=requested_at_gt,json=requestedAtGt,proto3" json:"requested_at_gt,omitempty"` + RequestedAtLte *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=requested_at_lte,json=requestedAtLte,proto3" json:"requested_at_lte,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequestersRequest) Reset() { + *x = ListRequestersRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequestersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequestersRequest) ProtoMessage() {} + +func (x *ListRequestersRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequestersRequest.ProtoReflect.Descriptor instead. +func (*ListRequestersRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{24} +} + +func (x *ListRequestersRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListRequestersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRequestersRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequestersRequest) GetRequestedAtGt() *timestamppb.Timestamp { + if x != nil { + return x.RequestedAtGt + } + return nil +} + +func (x *ListRequestersRequest) GetRequestedAtLte() *timestamppb.Timestamp { + if x != nil { + return x.RequestedAtLte + } + return nil +} + +// ListRequesters response +// +// Response: +// - requesters = [required] List of requesters matching the request criteria +// - next_page_token = [required] Token used for retrieving next page. If empty, there are no more pages. +type ListRequestersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Requesters []*Requester `protobuf:"bytes,1,rep,name=requesters,proto3" json:"requesters,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequestersResponse) Reset() { + *x = ListRequestersResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequestersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequestersResponse) ProtoMessage() {} + +func (x *ListRequestersResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequestersResponse.ProtoReflect.Descriptor instead. +func (*ListRequestersResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{25} +} + +func (x *ListRequestersResponse) GetRequesters() []*Requester { + if x != nil { + return x.Requesters + } + return nil +} + +func (x *ListRequestersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Details about the requester +// +// organization_id = [required] Id of the organization +// project_id = [required] Id of the project +// ppl_id = [required] Id of the pipeline +// user_id = [optional] Id of the user, can be empty - then the username is required +// provider_login = [optional] Login of the user in the git service +// provider_uid = [optional] ID of the user in the git service +// provider = [required] Which git service requested the pipeline +// triggerer = [required] How the request was triggered +type Requester struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + PplId string `protobuf:"bytes,3,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ProviderLogin string `protobuf:"bytes,5,opt,name=provider_login,json=providerLogin,proto3" json:"provider_login,omitempty"` + ProviderUid string `protobuf:"bytes,6,opt,name=provider_uid,json=providerUid,proto3" json:"provider_uid,omitempty"` + Provider user.RepositoryProvider_Type `protobuf:"varint,7,opt,name=provider,proto3,enum=InternalApi.User.RepositoryProvider_Type" json:"provider,omitempty"` + Triggerer plumber_w_f_workflow.TriggeredBy `protobuf:"varint,8,opt,name=triggerer,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"triggerer,omitempty"` + RequestedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=requested_at,json=requestedAt,proto3" json:"requested_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Requester) Reset() { + *x = Requester{} + mi := &file_plumber_pipeline_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Requester) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Requester) ProtoMessage() {} + +func (x *Requester) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Requester.ProtoReflect.Descriptor instead. +func (*Requester) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{26} +} + +func (x *Requester) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Requester) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Requester) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *Requester) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *Requester) GetProviderLogin() string { + if x != nil { + return x.ProviderLogin + } + return "" +} + +func (x *Requester) GetProviderUid() string { + if x != nil { + return x.ProviderUid + } + return "" +} + +func (x *Requester) GetProvider() user.RepositoryProvider_Type { + if x != nil { + return x.Provider + } + return user.RepositoryProvider_Type(0) +} + +func (x *Requester) GetTriggerer() plumber_w_f_workflow.TriggeredBy { + if x != nil { + return x.Triggerer + } + return plumber_w_f_workflow.TriggeredBy(0) +} + +func (x *Requester) GetRequestedAt() *timestamppb.Timestamp { + if x != nil { + return x.RequestedAt + } + return nil +} + +// Details of Active pipelines (pipelines in running or queuing state) +// +// - organization_id = [required] The organization to which pipeline belongs +// - project_id = [required] Id of project to which pipeline belongs +// - wf_id = [required] Workflow to which pipeline belongs +// - wf_number = [required] Ordinal number of the workflow to which pipeline belongs +// - name = [required] User specific (or auto-generated) name for given pipeline +// - ppl_id = [required] Unique Pipeline identifier +// - hook_id = [required] ID of the hook that triggered the workflow +// - switch_id = [optional] Id from Gofer service of the switch connected to this pipeline +// (only valid if promotions were defined for this pipeline in yaml definition) +// - definition_file = [required] Full path within git repo to file which contains definition of this pipeline +// - priority = [required] Execution priority for all job of this pipeline (can be overridden in block or job) +// - triggered_by = [required] Event that triggered workflow (hook, schedule, API call..) +// - requester_id = [required] The user who initiated workflow +// - partial_rerun_of = [optional] Id of the pipeline from which this pipeline was partially rerun. +// - promotion_of = [optional] Id of the pipeline that triggered the promotion to this pipeline. +// - promoter_id = [optional] The user who promoted this pipeline (only valid if pipeline is promotion) +// - auto_promoted = [optional] True if pipeline was auto-promoted +// - git_ref = [required] Branch name, tag, or pull request for which pipeline was initiated +// - commit_sha = [required] Git commit sha for which pipeline was initiated +// - branch_id = [required] ID of the branch in Front service +// - created_at = [required] Timestamp when pipeline schedule request was recorded +// - pending_at = [required] Timestamp when pipeline transitioned to pending state +// - queuing_at = [required] Timestamp when pipeline transitioned to queuing state +// - running_at = [required] Timestamp when pipeline transitioned to running state +// - queue = [required] Details of queue to which pipeline belongs +// - blocks = [required] Details of pipeline's blocks +// - state = [required] Pipeline's state (running or queuing) +// - git_ref_type = [required] Type of gif reference for which pipeline was initiated +// - commit_message = [required] Git commit message of th commit for which pipeline was initiated +// - commiter_username = [required] GitHub username of the person that authored given commit +// - commiter_avatar_url = [required] URL to GitHub avatar of the author of the given commit +// - triggerer = [required] Who and how triggered the pipeline +type ActivePipeline struct { + state protoimpl.MessageState `protogen:"open.v1"` + // various IDs and basic data + OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + WfId string `protobuf:"bytes,3,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + WfNumber uint32 `protobuf:"varint,4,opt,name=wf_number,json=wfNumber,proto3" json:"wf_number,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + PplId string `protobuf:"bytes,6,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + HookId string `protobuf:"bytes,7,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + SwitchId string `protobuf:"bytes,8,opt,name=switch_id,json=switchId,proto3" json:"switch_id,omitempty"` + DefinitionFile string `protobuf:"bytes,9,opt,name=definition_file,json=definitionFile,proto3" json:"definition_file,omitempty"` + Priority uint32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` + // Trigger related data + WfTriggeredBy plumber_w_f_workflow.TriggeredBy `protobuf:"varint,11,opt,name=wf_triggered_by,json=wfTriggeredBy,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"wf_triggered_by,omitempty"` + RequesterId string `protobuf:"bytes,12,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + PartialRerunOf string `protobuf:"bytes,13,opt,name=partial_rerun_of,json=partialRerunOf,proto3" json:"partial_rerun_of,omitempty"` + PromotionOf string `protobuf:"bytes,14,opt,name=promotion_of,json=promotionOf,proto3" json:"promotion_of,omitempty"` + PromoterId string `protobuf:"bytes,15,opt,name=promoter_id,json=promoterId,proto3" json:"promoter_id,omitempty"` + AutoPromoted bool `protobuf:"varint,16,opt,name=auto_promoted,json=autoPromoted,proto3" json:"auto_promoted,omitempty"` + // Git related data + GitRef string `protobuf:"bytes,17,opt,name=git_ref,json=gitRef,proto3" json:"git_ref,omitempty"` + CommitSha string `protobuf:"bytes,18,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + BranchId string `protobuf:"bytes,19,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + // Timeline + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,20,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + PendingAt *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=pending_at,json=pendingAt,proto3" json:"pending_at,omitempty"` + QueuingAt *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=queuing_at,json=queuingAt,proto3" json:"queuing_at,omitempty"` + RunningAt *timestamppb.Timestamp `protobuf:"bytes,23,opt,name=running_at,json=runningAt,proto3" json:"running_at,omitempty"` + Queue *Queue `protobuf:"bytes,24,opt,name=queue,proto3" json:"queue,omitempty"` + Blocks []*BlockDetails `protobuf:"bytes,25,rep,name=blocks,proto3" json:"blocks,omitempty"` + State Pipeline_State `protobuf:"varint,26,opt,name=state,proto3,enum=InternalApi.Plumber.Pipeline_State" json:"state,omitempty"` + GitRefType GitRefType `protobuf:"varint,27,opt,name=git_ref_type,json=gitRefType,proto3,enum=InternalApi.Plumber.GitRefType" json:"git_ref_type,omitempty"` + CommitMessage string `protobuf:"bytes,28,opt,name=commit_message,json=commitMessage,proto3" json:"commit_message,omitempty"` + // Commiter data used when they are not Semaphore users + CommiterUsername string `protobuf:"bytes,29,opt,name=commiter_username,json=commiterUsername,proto3" json:"commiter_username,omitempty"` + CommiterAvatarUrl string `protobuf:"bytes,30,opt,name=commiter_avatar_url,json=commiterAvatarUrl,proto3" json:"commiter_avatar_url,omitempty"` + Triggerer *Triggerer `protobuf:"bytes,31,opt,name=triggerer,proto3" json:"triggerer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivePipeline) Reset() { + *x = ActivePipeline{} + mi := &file_plumber_pipeline_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivePipeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivePipeline) ProtoMessage() {} + +func (x *ActivePipeline) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivePipeline.ProtoReflect.Descriptor instead. +func (*ActivePipeline) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{27} +} + +func (x *ActivePipeline) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ActivePipeline) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ActivePipeline) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *ActivePipeline) GetWfNumber() uint32 { + if x != nil { + return x.WfNumber + } + return 0 +} + +func (x *ActivePipeline) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ActivePipeline) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *ActivePipeline) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *ActivePipeline) GetSwitchId() string { + if x != nil { + return x.SwitchId + } + return "" +} + +func (x *ActivePipeline) GetDefinitionFile() string { + if x != nil { + return x.DefinitionFile + } + return "" +} + +func (x *ActivePipeline) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *ActivePipeline) GetWfTriggeredBy() plumber_w_f_workflow.TriggeredBy { + if x != nil { + return x.WfTriggeredBy + } + return plumber_w_f_workflow.TriggeredBy(0) +} + +func (x *ActivePipeline) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ActivePipeline) GetPartialRerunOf() string { + if x != nil { + return x.PartialRerunOf + } + return "" +} + +func (x *ActivePipeline) GetPromotionOf() string { + if x != nil { + return x.PromotionOf + } + return "" +} + +func (x *ActivePipeline) GetPromoterId() string { + if x != nil { + return x.PromoterId + } + return "" +} + +func (x *ActivePipeline) GetAutoPromoted() bool { + if x != nil { + return x.AutoPromoted + } + return false +} + +func (x *ActivePipeline) GetGitRef() string { + if x != nil { + return x.GitRef + } + return "" +} + +func (x *ActivePipeline) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +func (x *ActivePipeline) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *ActivePipeline) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ActivePipeline) GetPendingAt() *timestamppb.Timestamp { + if x != nil { + return x.PendingAt + } + return nil +} + +func (x *ActivePipeline) GetQueuingAt() *timestamppb.Timestamp { + if x != nil { + return x.QueuingAt + } + return nil +} + +func (x *ActivePipeline) GetRunningAt() *timestamppb.Timestamp { + if x != nil { + return x.RunningAt + } + return nil +} + +func (x *ActivePipeline) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +func (x *ActivePipeline) GetBlocks() []*BlockDetails { + if x != nil { + return x.Blocks + } + return nil +} + +func (x *ActivePipeline) GetState() Pipeline_State { + if x != nil { + return x.State + } + return Pipeline_INITIALIZING +} + +func (x *ActivePipeline) GetGitRefType() GitRefType { + if x != nil { + return x.GitRefType + } + return GitRefType_BRANCH +} + +func (x *ActivePipeline) GetCommitMessage() string { + if x != nil { + return x.CommitMessage + } + return "" +} + +func (x *ActivePipeline) GetCommiterUsername() string { + if x != nil { + return x.CommiterUsername + } + return "" +} + +func (x *ActivePipeline) GetCommiterAvatarUrl() string { + if x != nil { + return x.CommiterAvatarUrl + } + return "" +} + +func (x *ActivePipeline) GetTriggerer() *Triggerer { + if x != nil { + return x.Triggerer + } + return nil +} + +// Block details +// +// Fields: +// - block_id = [required] unique block identifier +// - name = [required] Block name +// - priority = [required] Execution priority for all job of this block +// (can be overridden for a particular job) +// - dependencies = [required] Names of the blocks that are dependencies of the current block +// - state = [required] Current state of given block +// - result = [optional] Block execution result, only valid if state = DONE +// - result_reason = [optional] Reason for result of block's execution different from PASSED +// It can be: +// - TEST, MALFORMED or STUCK - when result is FAILED +// - USER, INTERNAL, STRATEGY, FAST_FAILING or DELETED - when result is STOPPED or CANCELED +// - error_description = [optional] Stores error description when block is MALFORMED +// - jobs = [required] Jobs belonging to the block +type BlockDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockId string `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Priority uint32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` + Dependencies []string `protobuf:"bytes,4,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + State Block_State `protobuf:"varint,5,opt,name=state,proto3,enum=InternalApi.Plumber.Block_State" json:"state,omitempty"` + Result Block_Result `protobuf:"varint,6,opt,name=result,proto3,enum=InternalApi.Plumber.Block_Result" json:"result,omitempty"` + ResultReason Block_ResultReason `protobuf:"varint,7,opt,name=result_reason,json=resultReason,proto3,enum=InternalApi.Plumber.Block_ResultReason" json:"result_reason,omitempty"` + ErrorDescription string `protobuf:"bytes,8,opt,name=error_description,json=errorDescription,proto3" json:"error_description,omitempty"` + Jobs []*BlockDetails_JobDetails `protobuf:"bytes,9,rep,name=jobs,proto3" json:"jobs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockDetails) Reset() { + *x = BlockDetails{} + mi := &file_plumber_pipeline_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockDetails) ProtoMessage() {} + +func (x *BlockDetails) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockDetails.ProtoReflect.Descriptor instead. +func (*BlockDetails) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{28} +} + +func (x *BlockDetails) GetBlockId() string { + if x != nil { + return x.BlockId + } + return "" +} + +func (x *BlockDetails) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BlockDetails) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *BlockDetails) GetDependencies() []string { + if x != nil { + return x.Dependencies + } + return nil +} + +func (x *BlockDetails) GetState() Block_State { + if x != nil { + return x.State + } + return Block_WAITING +} + +func (x *BlockDetails) GetResult() Block_Result { + if x != nil { + return x.Result + } + return Block_PASSED +} + +func (x *BlockDetails) GetResultReason() Block_ResultReason { + if x != nil { + return x.ResultReason + } + return Block_TEST +} + +func (x *BlockDetails) GetErrorDescription() string { + if x != nil { + return x.ErrorDescription + } + return "" +} + +func (x *BlockDetails) GetJobs() []*BlockDetails_JobDetails { + if x != nil { + return x.Jobs + } + return nil +} + +// RunNow call request +// +// Asynchronous operation. +// The request is recorded and priorities are increased as soon as possible. +// +// Arguments: +// - requester_id = [required] ID of the user that requested priority increase. +// - type = [required] Pipeline, block or job +// - ppl_id = [required] ID of the pipeline +// - block_id = [required if type is block or job] ID of the block +// - job_id = [required if type is job] ID of the job +// +// Preconditions: +// - Pipeline exists and it is in running state. +// +// Postconditions: +// - gRPC status: OK => Request is recorded and priorities will be increased as soon as possible. +// - gRPC status: INVALID_ARGUMENT => An invalid argument is passed. The error message contains a description. +// - gPRC status: INTERNAL => An unknown error happened while processing this request. +// +// Idempotency: +// - Operation is idempotent on its own since priority is always set to the same value. +type RunNowRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequesterId string `protobuf:"bytes,1,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + Type RunNowRequest_Type `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.Plumber.RunNowRequest_Type" json:"type,omitempty"` + PplId string `protobuf:"bytes,3,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + BlockId string `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + JobId string `protobuf:"bytes,5,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RunNowRequest) Reset() { + *x = RunNowRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RunNowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunNowRequest) ProtoMessage() {} + +func (x *RunNowRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunNowRequest.ProtoReflect.Descriptor instead. +func (*RunNowRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{29} +} + +func (x *RunNowRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *RunNowRequest) GetType() RunNowRequest_Type { + if x != nil { + return x.Type + } + return RunNowRequest_PIPELINE +} + +func (x *RunNowRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *RunNowRequest) GetBlockId() string { + if x != nil { + return x.BlockId + } + return "" +} + +func (x *RunNowRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +// RunNow call response +// +// Response: +type RunNowResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RunNowResponse) Reset() { + *x = RunNowResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RunNowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunNowResponse) ProtoMessage() {} + +func (x *RunNowResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunNowResponse.ProtoReflect.Descriptor instead. +func (*RunNowResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{30} +} + +// GetProjectId call request +// +// Synchronous operation. +// Returns project_id for pipeline with given ppl_id. +// That project_id can later be used for authorization etc. +// +// Arguments: +// - ppl_id = [required] Pipeline for which project_id is needed. +// +// Preconditions: +// - Pipeline scheduling request for 'ppl_id' was accepted. +// +// Postconditions: +// +// Idempotency: +type GetProjectIdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectIdRequest) Reset() { + *x = GetProjectIdRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectIdRequest) ProtoMessage() {} + +func (x *GetProjectIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectIdRequest.ProtoReflect.Descriptor instead. +func (*GetProjectIdRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{31} +} + +func (x *GetProjectIdRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// GetProjectId call response +// +// Response: +// - project_id = [required] Id of project on Semaphore. +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in 'project_id' field +// BAD_PARAM = Invalid 'ppl_id' +type GetProjectIdResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectIdResponse) Reset() { + *x = GetProjectIdResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectIdResponse) ProtoMessage() {} + +func (x *GetProjectIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectIdResponse.ProtoReflect.Descriptor instead. +func (*GetProjectIdResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{32} +} + +func (x *GetProjectIdResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *GetProjectIdResponse) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// ValidateYaml call request +// +// Synchronous operation if called without ppl_id field. +// It is called to validate passed yaml definition against yaml schema. +// +// Asynchronous operation if +// - validation passes and +// - called with ppl_id field. +// If valid ppl_id is given, after yaml definition passes validation, pipeline +// based on that definition will be scheduled and any additional data (repo, +// auth etc.) will be copied from the pipeline with given ppl_id. +// +// Arguments: +// +// - yaml_definition = [required] YAML definition which should be verified +// - ppl_id = [optional] Id of pipeline from which repo and auth data +// will be used for scheduling +// +// Preconditions: +// - If ppl_id is given, pipeline with that id must already be scheduled +// +// Postconditions: +// - If ppl_id is given and yaml_definition passed validation, pipeline based on +// that definition should be scheduled +// +// Idempotency: +// - Since this is intended for manual testing and not automated continuous +// calls, to avoid user pain in having to change some token on every call +// decision was made to omit idempotency for this call +type ValidateYamlRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + YamlDefinition string `protobuf:"bytes,1,opt,name=yaml_definition,json=yamlDefinition,proto3" json:"yaml_definition,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateYamlRequest) Reset() { + *x = ValidateYamlRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateYamlRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateYamlRequest) ProtoMessage() {} + +func (x *ValidateYamlRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateYamlRequest.ProtoReflect.Descriptor instead. +func (*ValidateYamlRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{33} +} + +func (x *ValidateYamlRequest) GetYamlDefinition() string { + if x != nil { + return x.YamlDefinition + } + return "" +} + +func (x *ValidateYamlRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// ValidateYaml call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = 'yaml_definition' is valid and pipeline is +// scheduled if 'ppl_id' param was given in request +// BAD_PARAM = Invalid 'ppl_id' or 'yaml_definition' param +// - ppl_id = [optional] Id of newly scheduled pipeline, only valid and present if +// yaml_definition was valid and ppl_id was given in request +type ValidateYamlResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateYamlResponse) Reset() { + *x = ValidateYamlResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateYamlResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateYamlResponse) ProtoMessage() {} + +func (x *ValidateYamlResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateYamlResponse.ProtoReflect.Descriptor instead. +func (*ValidateYamlResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{34} +} + +func (x *ValidateYamlResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ValidateYamlResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// ScheduleExtension call request +// +// Synchronous operation. +// It is called to schedule pipeline based on definition from given yml config file. +// Any additional data (repo, auth etc.) needed for scheduling will be copied from +// the pipeline with given ppl_id. +// +// Arguments: +// +// - file_path = [required] Path inside repo of YAML file containing pipeline +// definition +// - ppl_id = [required] Id of pipeline from which repo and auth data +// will be used for scheduling +// - request_token = [required] Unique string, see Idempotency +// - env_variables = [optional] Env vars which will be added to ppl_env_vars +// in this pipeline's jobs +// - prev_ppl_artefact_ids = [required] ppl_artefact_ids of previous pipelines in workflow +// - promoted_by = [required] ID of the user that triggered this +// (the value is 'auto' for auto-promoted pipelines) +// - auto_promoted = [required] true if extension was auto-promoted, otherwise it is false +// - secret_names = [optional] Secret names that will be added to global job configuration +// - deployment_target_id = [optional] Deployment Target ID that guarded promoted pipeline +// +// Preconditions: +// - Pipeline with given ppl_id must already be scheduled +// +// Postconditions: +// - Pipeline based on definition from given yaml file is scheduled +// +// Idempotency: +// - When ScheduleExtension request is received, request_token is checked first. +// If pipeline with the same request_token is already scheduled: +// - OK and previously generated ppl_id are returned, +// without scheduling new pipeline. +// - Other parameters are not checked; they are assumed to be the same. +type ScheduleExtensionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + RequestToken string `protobuf:"bytes,3,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + EnvVariables []*EnvVariable `protobuf:"bytes,4,rep,name=env_variables,json=envVariables,proto3" json:"env_variables,omitempty"` + PrevPplArtefactIds []string `protobuf:"bytes,6,rep,name=prev_ppl_artefact_ids,json=prevPplArtefactIds,proto3" json:"prev_ppl_artefact_ids,omitempty"` + PromotedBy string `protobuf:"bytes,7,opt,name=promoted_by,json=promotedBy,proto3" json:"promoted_by,omitempty"` + AutoPromoted bool `protobuf:"varint,8,opt,name=auto_promoted,json=autoPromoted,proto3" json:"auto_promoted,omitempty"` + SecretNames []string `protobuf:"bytes,9,rep,name=secret_names,json=secretNames,proto3" json:"secret_names,omitempty"` + DeploymentTargetId string `protobuf:"bytes,10,opt,name=deployment_target_id,json=deploymentTargetId,proto3" json:"deployment_target_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleExtensionRequest) Reset() { + *x = ScheduleExtensionRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleExtensionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleExtensionRequest) ProtoMessage() {} + +func (x *ScheduleExtensionRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleExtensionRequest.ProtoReflect.Descriptor instead. +func (*ScheduleExtensionRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{35} +} + +func (x *ScheduleExtensionRequest) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *ScheduleExtensionRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *ScheduleExtensionRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +func (x *ScheduleExtensionRequest) GetEnvVariables() []*EnvVariable { + if x != nil { + return x.EnvVariables + } + return nil +} + +func (x *ScheduleExtensionRequest) GetPrevPplArtefactIds() []string { + if x != nil { + return x.PrevPplArtefactIds + } + return nil +} + +func (x *ScheduleExtensionRequest) GetPromotedBy() string { + if x != nil { + return x.PromotedBy + } + return "" +} + +func (x *ScheduleExtensionRequest) GetAutoPromoted() bool { + if x != nil { + return x.AutoPromoted + } + return false +} + +func (x *ScheduleExtensionRequest) GetSecretNames() []string { + if x != nil { + return x.SecretNames + } + return nil +} + +func (x *ScheduleExtensionRequest) GetDeploymentTargetId() string { + if x != nil { + return x.DeploymentTargetId + } + return "" +} + +// Type which models environment variables with name and string value +type EnvVariable struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvVariable) Reset() { + *x = EnvVariable{} + mi := &file_plumber_pipeline_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvVariable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvVariable) ProtoMessage() {} + +func (x *EnvVariable) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvVariable.ProtoReflect.Descriptor instead. +func (*EnvVariable) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{36} +} + +func (x *EnvVariable) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EnvVariable) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// ScheduleExtension call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = Pipeline is scheduled. +// Pipeline has to be available for Describe call. +// BAD_PARAM = Pipeline request is rejected because of +// malformed request. +// - ppl_id = [required] id of newly scheduled pipeline +type ScheduleExtensionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleExtensionResponse) Reset() { + *x = ScheduleExtensionResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleExtensionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleExtensionResponse) ProtoMessage() {} + +func (x *ScheduleExtensionResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleExtensionResponse.ProtoReflect.Descriptor instead. +func (*ScheduleExtensionResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{37} +} + +func (x *ScheduleExtensionResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *ScheduleExtensionResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// Delete call request +// +// Asynchronous operation. +// Delete request is persisted and actual deletion is conducted on internal schedule. +// +// Arguments: +// - project_id = [required] all pipelines from the specified project +// will to be deleted. +// - requester = [required] user who requested deletion +// +// Preconditions: +// +// Postconditions: +// - Deletion request is persisted +// +// Idempotency: +// Deletion is idempotent on its own. +// If same request is received twice it will be executed twice, no harm done. +type DeleteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Requester string `protobuf:"bytes,3,opt,name=requester,proto3" json:"requester,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{38} +} + +func (x *DeleteRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteRequest) GetRequester() string { + if x != nil { + return x.Requester + } + return "" +} + +// Delete call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = delete request persisted +type DeleteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{39} +} + +func (x *DeleteResponse) GetStatus() *ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +// PartialRebuild call request +// +// Arguments: +// - ppl_id = [required] Id of pipeline which partial rebuild is requested +// - request_token = [required] unique string, see Idempotency +// - user_id = [required] The ID of the user that requested partial rebuild +// +// Preconditions: +// - Pipeline with given ppl_id has to exist and to be in state 'done' with result 'failed' +// - request_token has to be unique for every partial rebuild execution, see Idempotency +// +// Postconditions: +// - ResponseCode = OK => Pipeline with request_token which is partial rebuild of +// given pipeline is scheduled or was previously scheduled. +// ppl_id is returned. +// - otherwise => Pipeline with request_token is NOT scheduled. +// Error is returned. +// +// Idempotency: +// - When partial rebuild request is received, request_token is checked first. +// If pipeline's partial rebuild with the same request_token is already scheduled: +// - OK and previously generated ppl_id are returned, +// without scheduling new partial rebuild of pipeline. +// - Other parameters are not checked; they are assumed to be the same. +type PartialRebuildRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + RequestToken string `protobuf:"bytes,2,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PartialRebuildRequest) Reset() { + *x = PartialRebuildRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PartialRebuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartialRebuildRequest) ProtoMessage() {} + +func (x *PartialRebuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartialRebuildRequest.ProtoReflect.Descriptor instead. +func (*PartialRebuildRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{40} +} + +func (x *PartialRebuildRequest) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *PartialRebuildRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +func (x *PartialRebuildRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// PartialRebuild call response +// +// Response: +// - response_status = [required] contains ResponseCode: +// OK = Pipeline's partial rebuild is scheduled. +// Pipeline has to be available for Describe call. +// BAD_PARAM = PartialRebuild request is rejected because of +// malformed request. +// - ppl_id = [required] id of newly scheduled pipeline which is partail +// rebuild of pipeline with id given in request +type PartialRebuildResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseStatus *ResponseStatus `protobuf:"bytes,1,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` + PplId string `protobuf:"bytes,2,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PartialRebuildResponse) Reset() { + *x = PartialRebuildResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PartialRebuildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartialRebuildResponse) ProtoMessage() {} + +func (x *PartialRebuildResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartialRebuildResponse.ProtoReflect.Descriptor instead. +func (*PartialRebuildResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{41} +} + +func (x *PartialRebuildResponse) GetResponseStatus() *ResponseStatus { + if x != nil { + return x.ResponseStatus + } + return nil +} + +func (x *PartialRebuildResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// Version call request +// +// Synchronous operation. +// Returns pipelines service version. +// This call is often used as first step in troubleshooting client-server +// communication issues. +// +// Arguments: +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type VersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VersionRequest) Reset() { + *x = VersionRequest{} + mi := &file_plumber_pipeline_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionRequest) ProtoMessage() {} + +func (x *VersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. +func (*VersionRequest) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{42} +} + +// Version call response +// +// Response: +// - version = [required] pipelines service version. +type VersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VersionResponse) Reset() { + *x = VersionResponse{} + mi := &file_plumber_pipeline_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionResponse) ProtoMessage() {} + +func (x *VersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. +func (*VersionResponse) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{43} +} + +func (x *VersionResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type ResponseStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code ResponseStatus_ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=InternalApi.Plumber.ResponseStatus_ResponseCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseStatus) Reset() { + *x = ResponseStatus{} + mi := &file_plumber_pipeline_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseStatus) ProtoMessage() {} + +func (x *ResponseStatus) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseStatus.ProtoReflect.Descriptor instead. +func (*ResponseStatus) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{44} +} + +func (x *ResponseStatus) GetCode() ResponseStatus_ResponseCode { + if x != nil { + return x.Code + } + return ResponseStatus_OK +} + +func (x *ResponseStatus) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Cloud AMQP events. Published on: pipeline_state_exchange. +// +// Published with one of these routing keys: +// +// - 'initializing' = Pipeline is initializing, no data about blocks on Describe +// or DescribeTopology. Guaranteed to be published in regular +// system and network state. +// +// - 'pending' = Pipeline is ready for scheduling, no data about blocks on +// Describe, DescribeTopology works. No guarantees of publishing +// (pipeline can go straight to done after previous state). +// +// - 'queuing' = Pipeline waits for previous one(s) to be done. No data about block on +// Describe, DescribeTopology works. No guarantees of publishing +// (pipeline can go straight to done or running after previous state). +// +// - 'running' = Pipeline is running. Both Describe and DescribeTopology will return +// data about blocks. No guarantees of publishing (pipeline can go +// straight to done from one of previous states). +// +// - 'stopping' = Pipeline is terminating. Both Describe and DescribeTopology +// will return data about blocks. No guarantees of publishing +// (termination(stop or cancel request) may not be requested). +// +// - 'done' = Pipeline's execution is finished. DescribeTopology will work if +// pipeline didn't go to done straight from initializing, and Describe +// will work if pipeline managed to enter running state prior to going to +// done. Guaranteed to be published in regular system and network state. +// +// All fields are required. +type PipelineEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + State Pipeline_State `protobuf:"varint,2,opt,name=state,proto3,enum=InternalApi.Plumber.Pipeline_State" json:"state,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PipelineEvent) Reset() { + *x = PipelineEvent{} + mi := &file_plumber_pipeline_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PipelineEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineEvent) ProtoMessage() {} + +func (x *PipelineEvent) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PipelineEvent.ProtoReflect.Descriptor instead. +func (*PipelineEvent) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{45} +} + +func (x *PipelineEvent) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *PipelineEvent) GetState() Pipeline_State { + if x != nil { + return x.State + } + return Pipeline_INITIALIZING +} + +func (x *PipelineEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Cloud AMQP events. Published on: pipeline_block_state_exchange. +// +// Published with one of these routing keys: +// +// - 'running' = PipelineBlock is running, build may or may not be started and it can +// be already finished also. No guarantees of publishing (block can go +// straight to done if there is some problem with it's initialization). +// +// - 'stopping' = PipelineBlock is terminating. No guarantees of publishing +// (termination(stop or cancel request) may not be requested). +// +// - 'done' = PipelineBlock's execution is finished. Guaranteed to be published +// in regular system and network state. +// +// All fields are required. +type PipelineBlockEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + BlockId string `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + State Block_State `protobuf:"varint,3,opt,name=state,proto3,enum=InternalApi.Plumber.Block_State" json:"state,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PipelineBlockEvent) Reset() { + *x = PipelineBlockEvent{} + mi := &file_plumber_pipeline_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PipelineBlockEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineBlockEvent) ProtoMessage() {} + +func (x *PipelineBlockEvent) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PipelineBlockEvent.ProtoReflect.Descriptor instead. +func (*PipelineBlockEvent) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{46} +} + +func (x *PipelineBlockEvent) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *PipelineBlockEvent) GetBlockId() string { + if x != nil { + return x.BlockId + } + return "" +} + +func (x *PipelineBlockEvent) GetState() Block_State { + if x != nil { + return x.State + } + return Block_WAITING +} + +func (x *PipelineBlockEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// AfterPipeline represents an after pipeline task +// NOTE: this message is not returned by any service yet, it's here for a documentation purpose +// and to serve enum values for the after pipeline event +// +// - pipeline_id = [required] id of the pipeline that after pipeline is executed +// - state = [required] state of the after pipeline +// - result = [required] result of the after pipeline +// - result_reason = [required] reason of the after pipeline failure (if RESULT != PASSED) +// - created_at = [required] when the after pipeline was created +type AfterPipeline struct { + state protoimpl.MessageState `protogen:"open.v1"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + State AfterPipeline_State `protobuf:"varint,2,opt,name=state,proto3,enum=InternalApi.Plumber.AfterPipeline_State" json:"state,omitempty"` + Result AfterPipeline_Result `protobuf:"varint,3,opt,name=result,proto3,enum=InternalApi.Plumber.AfterPipeline_Result" json:"result,omitempty"` + ResultReason AfterPipeline_ResultReason `protobuf:"varint,4,opt,name=result_reason,json=resultReason,proto3,enum=InternalApi.Plumber.AfterPipeline_ResultReason" json:"result_reason,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AfterPipeline) Reset() { + *x = AfterPipeline{} + mi := &file_plumber_pipeline_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AfterPipeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AfterPipeline) ProtoMessage() {} + +func (x *AfterPipeline) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AfterPipeline.ProtoReflect.Descriptor instead. +func (*AfterPipeline) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{47} +} + +func (x *AfterPipeline) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *AfterPipeline) GetState() AfterPipeline_State { + if x != nil { + return x.State + } + return AfterPipeline_WAITING +} + +func (x *AfterPipeline) GetResult() AfterPipeline_Result { + if x != nil { + return x.Result + } + return AfterPipeline_PASSED +} + +func (x *AfterPipeline) GetResultReason() AfterPipeline_ResultReason { + if x != nil { + return x.ResultReason + } + return AfterPipeline_TEST +} + +func (x *AfterPipeline) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// Cloud AMQP events. Published on: after_pipeline_state_exchange. +// +// Published with one of these routing keys: +// +// - 'waiting' = After pipeline is waiting for the pipeline to finish. +// +// - 'pending' = After pipeline is pending. +// +// - 'running' = After pipeline is running. +// +// - 'done' = After pipeline is done. +// +// All fields are required. +// +// - pipeline_id = [required] id of the pipeline that after pipeline is executed +// - state = [required] state of the after pipeline +// - timestamp = [required] when the event was emitted +type AfterPipelineEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + State AfterPipeline_State `protobuf:"varint,2,opt,name=state,proto3,enum=InternalApi.Plumber.AfterPipeline_State" json:"state,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AfterPipelineEvent) Reset() { + *x = AfterPipelineEvent{} + mi := &file_plumber_pipeline_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AfterPipelineEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AfterPipelineEvent) ProtoMessage() {} + +func (x *AfterPipelineEvent) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AfterPipelineEvent.ProtoReflect.Descriptor instead. +func (*AfterPipelineEvent) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{48} +} + +func (x *AfterPipelineEvent) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *AfterPipelineEvent) GetState() AfterPipeline_State { + if x != nil { + return x.State + } + return AfterPipeline_WAITING +} + +func (x *AfterPipelineEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type ScheduleRequest_Repo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + RepoName string `protobuf:"bytes,2,opt,name=repo_name,json=repoName,proto3" json:"repo_name,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + CommitSha string `protobuf:"bytes,5,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest_Repo) Reset() { + *x = ScheduleRequest_Repo{} + mi := &file_plumber_pipeline_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest_Repo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest_Repo) ProtoMessage() {} + +func (x *ScheduleRequest_Repo) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest_Repo.ProtoReflect.Descriptor instead. +func (*ScheduleRequest_Repo) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ScheduleRequest_Repo) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *ScheduleRequest_Repo) GetRepoName() string { + if x != nil { + return x.RepoName + } + return "" +} + +func (x *ScheduleRequest_Repo) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *ScheduleRequest_Repo) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +type ScheduleRequest_Auth struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` + AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest_Auth) Reset() { + *x = ScheduleRequest_Auth{} + mi := &file_plumber_pipeline_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest_Auth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest_Auth) ProtoMessage() {} + +func (x *ScheduleRequest_Auth) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest_Auth.ProtoReflect.Descriptor instead. +func (*ScheduleRequest_Auth) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ScheduleRequest_Auth) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *ScheduleRequest_Auth) GetClientSecret() string { + if x != nil { + return x.ClientSecret + } + return "" +} + +func (x *ScheduleRequest_Auth) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +// Job started within block +// Attributes: +// - name = Job name +// - index = Position in which it is definied in definition file within block +// - job_id = Job unique identifier wthin build system +// - status = Received from Build API +// - result = Received from Build API +type Block_Job struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + JobId string `protobuf:"bytes,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` + Result string `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Block_Job) Reset() { + *x = Block_Job{} + mi := &file_plumber_pipeline_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Block_Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block_Job) ProtoMessage() {} + +func (x *Block_Job) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Block_Job.ProtoReflect.Descriptor instead. +func (*Block_Job) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Block_Job) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Block_Job) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *Block_Job) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *Block_Job) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Block_Job) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + +// Block topology description +// Fields: +// - name = [required] The name of the Block +// - jobs = [required] The job names within the Block +// - dependencies = [required] List of block names, this block depends on. +// All listed blocks have to transition to done-passed +// before this block can be scheduled. +type DescribeTopologyResponse_Block struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Jobs []string `protobuf:"bytes,2,rep,name=jobs,proto3" json:"jobs,omitempty"` + Dependencies []string `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeTopologyResponse_Block) Reset() { + *x = DescribeTopologyResponse_Block{} + mi := &file_plumber_pipeline_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeTopologyResponse_Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeTopologyResponse_Block) ProtoMessage() {} + +func (x *DescribeTopologyResponse_Block) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeTopologyResponse_Block.ProtoReflect.Descriptor instead. +func (*DescribeTopologyResponse_Block) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *DescribeTopologyResponse_Block) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DescribeTopologyResponse_Block) GetJobs() []string { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *DescribeTopologyResponse_Block) GetDependencies() []string { + if x != nil { + return x.Dependencies + } + return nil +} + +type DescribeTopologyResponse_AfterPipeline struct { + state protoimpl.MessageState `protogen:"open.v1"` + Jobs []string `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeTopologyResponse_AfterPipeline) Reset() { + *x = DescribeTopologyResponse_AfterPipeline{} + mi := &file_plumber_pipeline_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeTopologyResponse_AfterPipeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeTopologyResponse_AfterPipeline) ProtoMessage() {} + +func (x *DescribeTopologyResponse_AfterPipeline) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeTopologyResponse_AfterPipeline.ProtoReflect.Descriptor instead. +func (*DescribeTopologyResponse_AfterPipeline) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{8, 1} +} + +func (x *DescribeTopologyResponse_AfterPipeline) GetJobs() []string { + if x != nil { + return x.Jobs + } + return nil +} + +// Job started within block +// Attributes: +// - name = [required] Job name +// - index = [required] Position in which it is defined in definition file within block +// - status = [required] The status of the block from plumber perspective: +// 'pending' - block is not running, job doesn't exist in Zebra +// 'scheduled' - block is running or done, job state should be read from Zebra +type BlockDetails_JobDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockDetails_JobDetails) Reset() { + *x = BlockDetails_JobDetails{} + mi := &file_plumber_pipeline_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockDetails_JobDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockDetails_JobDetails) ProtoMessage() {} + +func (x *BlockDetails_JobDetails) ProtoReflect() protoreflect.Message { + mi := &file_plumber_pipeline_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockDetails_JobDetails.ProtoReflect.Descriptor instead. +func (*BlockDetails_JobDetails) Descriptor() ([]byte, []int) { + return file_plumber_pipeline_proto_rawDescGZIP(), []int{28, 0} +} + +func (x *BlockDetails_JobDetails) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BlockDetails_JobDetails) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *BlockDetails_JobDetails) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +var File_plumber_pipeline_proto protoreflect.FileDescriptor + +var file_plumber_pipeline_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 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, 0x1a, + 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x5f, 0x66, 0x2e, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x05, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x52, + 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x3d, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, + 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, + 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x1a, 0x79, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, + 0x68, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x53, 0x68, 0x61, 0x1a, 0x6b, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x33, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x47, 0x49, 0x54, 0x5f, 0x48, 0x55, 0x42, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, + 0x48, 0x4f, 0x54, 0x10, 0x02, 0x22, 0x77, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x44, + 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x90, 0x06, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x49, + 0x64, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, + 0x6f, 0x62, 0x73, 0x1a, 0x76, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, + 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, + 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x22, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x53, 0x54, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x41, 0x4c, 0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x53, 0x54, 0x55, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, + 0x45, 0x52, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, + 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x10, 0x05, + 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x53, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x49, 0x4e, 0x47, + 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, + 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x09, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x14, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x3b, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x22, 0x30, 0x0a, + 0x17, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, + 0x82, 0x03, 0x0a, 0x18, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x62, 0x0a, 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x66, + 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x0d, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x53, 0x0a, 0x05, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x1a, + 0x23, 0x0a, 0x0d, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x22, 0x4c, 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x61, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, + 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0xa4, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0xc6, 0x06, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4e, + 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, + 0x0d, 0x79, 0x6d, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x79, 0x6d, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 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, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x09, 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, 0x0c, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x64, 0x6f, + 0x6e, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x0a, 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, 0x0a, 0x64, 0x6f, 0x6e, + 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x6f, 0x6e, 0x65, 0x5f, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x0b, 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, 0x09, 0x64, 0x6f, 0x6e, 0x65, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x43, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, + 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x67, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x75, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x70, 0x72, 0x48, 0x65, 0x61, 0x64, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x28, + 0x0a, 0x10, 0x70, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x22, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x22, 0x23, 0x0a, 0x09, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, + 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, + 0x01, 0x22, 0xa9, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2e, 0x0a, + 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xf9, 0x04, + 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, + 0x0a, 0x0d, 0x79, 0x6d, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x79, 0x6d, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x07, 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, 0x0d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x08, 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, 0x0c, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x64, + 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x09, 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, 0x0a, 0x64, 0x6f, + 0x6e, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x6f, 0x6e, 0x65, + 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x0a, 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, 0x09, 0x64, 0x6f, 0x6e, 0x65, 0x41, 0x66, + 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x43, 0x0a, 0x0d, 0x67, 0x69, 0x74, + 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x71, 0x75, 0x65, 0x75, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x72, 0x48, 0x65, 0x61, 0x64, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, + 0x28, 0x0a, 0x10, 0x70, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x9d, 0x02, 0x0a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x75, 0x65, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0xc6, 0x0e, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x61, 0x74, 0x18, 0x07, 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, 0x09, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, + 0x08, 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, 0x09, 0x71, 0x75, 0x65, 0x75, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, 0x09, 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, 0x09, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, 0x0a, 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, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x41, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x64, 0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x74, 0x18, + 0x0b, 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, 0x06, 0x64, 0x6f, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, + 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, + 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, + 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x30, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, + 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x66, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x72, 0x75, 0x6e, 0x5f, 0x6f, 0x66, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x4f, 0x66, 0x12, 0x25, 0x0a, + 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6c, + 0x79, 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x5f, 0x62, 0x79, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x72, 0x75, 0x6e, + 0x42, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x41, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x65, + 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x65, 0x72, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, + 0x58, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, + 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x51, 0x55, 0x45, 0x55, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, + 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x22, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x53, 0x54, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x41, 0x4c, 0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x55, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, + 0x53, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, + 0x4c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x10, + 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x53, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x49, 0x4e, + 0x47, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x07, + 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x08, 0x22, 0xc0, 0x04, + 0x0a, 0x09, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0f, 0x77, + 0x66, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x52, 0x0d, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x66, 0x5f, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x2f, 0x0a, 0x14, 0x77, 0x66, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, + 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x3d, 0x0a, 0x1b, 0x77, 0x66, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, + 0x39, 0x0a, 0x19, 0x77, 0x66, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x16, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x77, 0x66, + 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x19, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x4a, 0x0a, 0x10, 0x70, + 0x70, 0x6c, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x52, 0x0e, 0x70, 0x70, 0x6c, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x70, 0x6c, 0x5f, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x70, 0x70, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x31, 0x0a, 0x15, 0x70, 0x70, 0x6c, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x70, 0x70, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x4f, 0x66, + 0x22, 0xdb, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x44, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x22, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x15, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x22, 0x23, 0x0a, 0x09, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x22, 0xb1, + 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x41, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x22, 0x86, 0x02, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x5f, 0x67, 0x74, 0x18, 0x04, 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, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x47, 0x74, 0x12, 0x44, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6c, 0x74, 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, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4c, 0x74, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x95, + 0x03, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x45, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x09, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, + 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x52, 0x09, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 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, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa0, 0x0a, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x66, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x77, 0x66, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x77, 0x69, 0x74, + 0x63, 0x68, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x4a, 0x0a, 0x0f, 0x77, 0x66, 0x5f, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x52, 0x0d, 0x77, 0x66, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x5f, 0x6f, 0x66, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x72, 0x75, 0x6e, + 0x4f, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6f, 0x66, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, + 0x75, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x67, + 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, + 0x74, 0x52, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, + 0x68, 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x53, 0x68, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x14, + 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, 0x15, 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, 0x09, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x69, 0x6e, + 0x67, 0x5f, 0x61, 0x74, 0x18, 0x16, 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, 0x09, 0x71, 0x75, 0x65, 0x75, 0x69, 0x6e, 0x67, 0x41, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, + 0x17, 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, 0x09, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12, 0x30, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x39, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x67, 0x69, 0x74, + 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x65, 0x72, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x52, 0x09, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x22, 0xfd, 0x03, 0x0a, 0x0c, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4c, 0x0a, 0x0d, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x1a, 0x4e, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x0d, 0x52, 0x75, + 0x6e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3b, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x52, 0x75, 0x6e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, + 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, + 0x6f, 0x62, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, + 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, + 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x4f, 0x42, 0x10, 0x02, 0x22, 0x10, + 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x83, + 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x59, 0x61, 0x6d, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x79, + 0x61, 0x6d, 0x6c, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x7b, 0x0a, 0x14, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x59, 0x61, 0x6d, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x88, 0x03, 0x0a, 0x18, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x45, + 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x76, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x70, 0x70, + 0x6c, 0x5f, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x65, 0x76, 0x50, 0x70, 0x6c, 0x41, 0x72, 0x74, + 0x65, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x74, + 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x80, 0x01, 0x0a, + 0x19, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, + 0x4c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x22, 0x4d, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x6c, 0x0a, 0x15, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x16, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb8, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x46, 0x0a, 0x0c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, + 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x41, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, + 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, + 0x44, 0x10, 0x03, 0x22, 0xa5, 0x01, 0x0a, 0x0d, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc2, 0x01, 0x0a, 0x12, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x04, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0xd2, 0x03, 0x0a, 0x0d, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x54, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x38, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, + 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, + 0x03, 0x22, 0x2d, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, + 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, + 0x22, 0x23, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, + 0x55, 0x43, 0x4b, 0x10, 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x12, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x2d, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x29, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x50, 0x52, 0x10, + 0x02, 0x2a, 0x52, 0x0a, 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, + 0x12, 0x0c, 0x0a, 0x08, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x4d, 0x4f, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x4d, 0x4f, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x5f, + 0x52, 0x55, 0x4e, 0x10, 0x03, 0x32, 0xd7, 0x0d, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0c, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x28, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6f, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5a, 0x0a, 0x09, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x25, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, + 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0b, 0x4c, 0x69, 0x73, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x52, 0x75, + 0x6e, 0x4e, 0x6f, 0x77, 0x12, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x75, 0x6e, 0x4e, 0x6f, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, + 0x75, 0x6e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x28, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x59, 0x61, + 0x6d, 0x6c, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x59, 0x61, 0x6d, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x59, 0x61, 0x6d, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, + 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x07, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, + 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, + 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_plumber_pipeline_proto_rawDescOnce sync.Once + file_plumber_pipeline_proto_rawDescData = file_plumber_pipeline_proto_rawDesc +) + +func file_plumber_pipeline_proto_rawDescGZIP() []byte { + file_plumber_pipeline_proto_rawDescOnce.Do(func() { + file_plumber_pipeline_proto_rawDescData = protoimpl.X.CompressGZIP(file_plumber_pipeline_proto_rawDescData) + }) + return file_plumber_pipeline_proto_rawDescData +} + +var file_plumber_pipeline_proto_enumTypes = make([]protoimpl.EnumInfo, 19) +var file_plumber_pipeline_proto_msgTypes = make([]protoimpl.MessageInfo, 55) +var file_plumber_pipeline_proto_goTypes = []any{ + (QueueType)(0), // 0: InternalApi.Plumber.QueueType + (GitRefType)(0), // 1: InternalApi.Plumber.GitRefType + (TriggeredBy)(0), // 2: InternalApi.Plumber.TriggeredBy + (ScheduleRequest_ServiceType)(0), // 3: InternalApi.Plumber.ScheduleRequest.ServiceType + (Block_State)(0), // 4: InternalApi.Plumber.Block.State + (Block_Result)(0), // 5: InternalApi.Plumber.Block.Result + (Block_ResultReason)(0), // 6: InternalApi.Plumber.Block.ResultReason + (ListKeysetRequest_Order)(0), // 7: InternalApi.Plumber.ListKeysetRequest.Order + (ListKeysetRequest_Direction)(0), // 8: InternalApi.Plumber.ListKeysetRequest.Direction + (Pipeline_State)(0), // 9: InternalApi.Plumber.Pipeline.State + (Pipeline_Result)(0), // 10: InternalApi.Plumber.Pipeline.Result + (Pipeline_ResultReason)(0), // 11: InternalApi.Plumber.Pipeline.ResultReason + (ListActivityRequest_Order)(0), // 12: InternalApi.Plumber.ListActivityRequest.Order + (ListActivityRequest_Direction)(0), // 13: InternalApi.Plumber.ListActivityRequest.Direction + (RunNowRequest_Type)(0), // 14: InternalApi.Plumber.RunNowRequest.Type + (ResponseStatus_ResponseCode)(0), // 15: InternalApi.Plumber.ResponseStatus.ResponseCode + (AfterPipeline_State)(0), // 16: InternalApi.Plumber.AfterPipeline.State + (AfterPipeline_Result)(0), // 17: InternalApi.Plumber.AfterPipeline.Result + (AfterPipeline_ResultReason)(0), // 18: InternalApi.Plumber.AfterPipeline.ResultReason + (*ScheduleRequest)(nil), // 19: InternalApi.Plumber.ScheduleRequest + (*ScheduleResponse)(nil), // 20: InternalApi.Plumber.ScheduleResponse + (*DescribeRequest)(nil), // 21: InternalApi.Plumber.DescribeRequest + (*DescribeResponse)(nil), // 22: InternalApi.Plumber.DescribeResponse + (*Block)(nil), // 23: InternalApi.Plumber.Block + (*DescribeManyRequest)(nil), // 24: InternalApi.Plumber.DescribeManyRequest + (*DescribeManyResponse)(nil), // 25: InternalApi.Plumber.DescribeManyResponse + (*DescribeTopologyRequest)(nil), // 26: InternalApi.Plumber.DescribeTopologyRequest + (*DescribeTopologyResponse)(nil), // 27: InternalApi.Plumber.DescribeTopologyResponse + (*TerminateRequest)(nil), // 28: InternalApi.Plumber.TerminateRequest + (*TerminateResponse)(nil), // 29: InternalApi.Plumber.TerminateResponse + (*ListQueuesRequest)(nil), // 30: InternalApi.Plumber.ListQueuesRequest + (*ListQueuesResponse)(nil), // 31: InternalApi.Plumber.ListQueuesResponse + (*ListGroupedRequest)(nil), // 32: InternalApi.Plumber.ListGroupedRequest + (*ListGroupedResponse)(nil), // 33: InternalApi.Plumber.ListGroupedResponse + (*ListKeysetRequest)(nil), // 34: InternalApi.Plumber.ListKeysetRequest + (*ListKeysetResponse)(nil), // 35: InternalApi.Plumber.ListKeysetResponse + (*ListRequest)(nil), // 36: InternalApi.Plumber.ListRequest + (*ListResponse)(nil), // 37: InternalApi.Plumber.ListResponse + (*Queue)(nil), // 38: InternalApi.Plumber.Queue + (*Pipeline)(nil), // 39: InternalApi.Plumber.Pipeline + (*Triggerer)(nil), // 40: InternalApi.Plumber.Triggerer + (*ListActivityRequest)(nil), // 41: InternalApi.Plumber.ListActivityRequest + (*ListActivityResponse)(nil), // 42: InternalApi.Plumber.ListActivityResponse + (*ListRequestersRequest)(nil), // 43: InternalApi.Plumber.ListRequestersRequest + (*ListRequestersResponse)(nil), // 44: InternalApi.Plumber.ListRequestersResponse + (*Requester)(nil), // 45: InternalApi.Plumber.Requester + (*ActivePipeline)(nil), // 46: InternalApi.Plumber.ActivePipeline + (*BlockDetails)(nil), // 47: InternalApi.Plumber.BlockDetails + (*RunNowRequest)(nil), // 48: InternalApi.Plumber.RunNowRequest + (*RunNowResponse)(nil), // 49: InternalApi.Plumber.RunNowResponse + (*GetProjectIdRequest)(nil), // 50: InternalApi.Plumber.GetProjectIdRequest + (*GetProjectIdResponse)(nil), // 51: InternalApi.Plumber.GetProjectIdResponse + (*ValidateYamlRequest)(nil), // 52: InternalApi.Plumber.ValidateYamlRequest + (*ValidateYamlResponse)(nil), // 53: InternalApi.Plumber.ValidateYamlResponse + (*ScheduleExtensionRequest)(nil), // 54: InternalApi.Plumber.ScheduleExtensionRequest + (*EnvVariable)(nil), // 55: InternalApi.Plumber.EnvVariable + (*ScheduleExtensionResponse)(nil), // 56: InternalApi.Plumber.ScheduleExtensionResponse + (*DeleteRequest)(nil), // 57: InternalApi.Plumber.DeleteRequest + (*DeleteResponse)(nil), // 58: InternalApi.Plumber.DeleteResponse + (*PartialRebuildRequest)(nil), // 59: InternalApi.Plumber.PartialRebuildRequest + (*PartialRebuildResponse)(nil), // 60: InternalApi.Plumber.PartialRebuildResponse + (*VersionRequest)(nil), // 61: InternalApi.Plumber.VersionRequest + (*VersionResponse)(nil), // 62: InternalApi.Plumber.VersionResponse + (*ResponseStatus)(nil), // 63: InternalApi.Plumber.ResponseStatus + (*PipelineEvent)(nil), // 64: InternalApi.Plumber.PipelineEvent + (*PipelineBlockEvent)(nil), // 65: InternalApi.Plumber.PipelineBlockEvent + (*AfterPipeline)(nil), // 66: InternalApi.Plumber.AfterPipeline + (*AfterPipelineEvent)(nil), // 67: InternalApi.Plumber.AfterPipelineEvent + (*ScheduleRequest_Repo)(nil), // 68: InternalApi.Plumber.ScheduleRequest.Repo + (*ScheduleRequest_Auth)(nil), // 69: InternalApi.Plumber.ScheduleRequest.Auth + (*Block_Job)(nil), // 70: InternalApi.Plumber.Block.Job + (*DescribeTopologyResponse_Block)(nil), // 71: InternalApi.Plumber.DescribeTopologyResponse.Block + (*DescribeTopologyResponse_AfterPipeline)(nil), // 72: InternalApi.Plumber.DescribeTopologyResponse.AfterPipeline + (*BlockDetails_JobDetails)(nil), // 73: InternalApi.Plumber.BlockDetails.JobDetails + (*timestamppb.Timestamp)(nil), // 74: google.protobuf.Timestamp + (plumber_w_f_workflow.TriggeredBy)(0), // 75: InternalApi.PlumberWF.TriggeredBy + (user.RepositoryProvider_Type)(0), // 76: InternalApi.User.RepositoryProvider.Type +} +var file_plumber_pipeline_proto_depIdxs = []int32{ + 3, // 0: InternalApi.Plumber.ScheduleRequest.service:type_name -> InternalApi.Plumber.ScheduleRequest.ServiceType + 68, // 1: InternalApi.Plumber.ScheduleRequest.repo:type_name -> InternalApi.Plumber.ScheduleRequest.Repo + 69, // 2: InternalApi.Plumber.ScheduleRequest.auth:type_name -> InternalApi.Plumber.ScheduleRequest.Auth + 63, // 3: InternalApi.Plumber.ScheduleResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 63, // 4: InternalApi.Plumber.DescribeResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 39, // 5: InternalApi.Plumber.DescribeResponse.pipeline:type_name -> InternalApi.Plumber.Pipeline + 23, // 6: InternalApi.Plumber.DescribeResponse.blocks:type_name -> InternalApi.Plumber.Block + 4, // 7: InternalApi.Plumber.Block.state:type_name -> InternalApi.Plumber.Block.State + 5, // 8: InternalApi.Plumber.Block.result:type_name -> InternalApi.Plumber.Block.Result + 6, // 9: InternalApi.Plumber.Block.result_reason:type_name -> InternalApi.Plumber.Block.ResultReason + 70, // 10: InternalApi.Plumber.Block.jobs:type_name -> InternalApi.Plumber.Block.Job + 63, // 11: InternalApi.Plumber.DescribeManyResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 39, // 12: InternalApi.Plumber.DescribeManyResponse.pipelines:type_name -> InternalApi.Plumber.Pipeline + 63, // 13: InternalApi.Plumber.DescribeTopologyResponse.status:type_name -> InternalApi.Plumber.ResponseStatus + 71, // 14: InternalApi.Plumber.DescribeTopologyResponse.blocks:type_name -> InternalApi.Plumber.DescribeTopologyResponse.Block + 72, // 15: InternalApi.Plumber.DescribeTopologyResponse.after_pipeline:type_name -> InternalApi.Plumber.DescribeTopologyResponse.AfterPipeline + 63, // 16: InternalApi.Plumber.TerminateResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 0, // 17: InternalApi.Plumber.ListQueuesRequest.queue_types:type_name -> InternalApi.Plumber.QueueType + 63, // 18: InternalApi.Plumber.ListQueuesResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 38, // 19: InternalApi.Plumber.ListQueuesResponse.queues:type_name -> InternalApi.Plumber.Queue + 0, // 20: InternalApi.Plumber.ListGroupedRequest.queue_type:type_name -> InternalApi.Plumber.QueueType + 63, // 21: InternalApi.Plumber.ListGroupedResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 39, // 22: InternalApi.Plumber.ListGroupedResponse.pipelines:type_name -> InternalApi.Plumber.Pipeline + 7, // 23: InternalApi.Plumber.ListKeysetRequest.order:type_name -> InternalApi.Plumber.ListKeysetRequest.Order + 8, // 24: InternalApi.Plumber.ListKeysetRequest.direction:type_name -> InternalApi.Plumber.ListKeysetRequest.Direction + 74, // 25: InternalApi.Plumber.ListKeysetRequest.created_before:type_name -> google.protobuf.Timestamp + 74, // 26: InternalApi.Plumber.ListKeysetRequest.created_after:type_name -> google.protobuf.Timestamp + 74, // 27: InternalApi.Plumber.ListKeysetRequest.done_before:type_name -> google.protobuf.Timestamp + 74, // 28: InternalApi.Plumber.ListKeysetRequest.done_after:type_name -> google.protobuf.Timestamp + 1, // 29: InternalApi.Plumber.ListKeysetRequest.git_ref_types:type_name -> InternalApi.Plumber.GitRefType + 39, // 30: InternalApi.Plumber.ListKeysetResponse.pipelines:type_name -> InternalApi.Plumber.Pipeline + 74, // 31: InternalApi.Plumber.ListRequest.created_before:type_name -> google.protobuf.Timestamp + 74, // 32: InternalApi.Plumber.ListRequest.created_after:type_name -> google.protobuf.Timestamp + 74, // 33: InternalApi.Plumber.ListRequest.done_before:type_name -> google.protobuf.Timestamp + 74, // 34: InternalApi.Plumber.ListRequest.done_after:type_name -> google.protobuf.Timestamp + 1, // 35: InternalApi.Plumber.ListRequest.git_ref_types:type_name -> InternalApi.Plumber.GitRefType + 63, // 36: InternalApi.Plumber.ListResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 39, // 37: InternalApi.Plumber.ListResponse.pipelines:type_name -> InternalApi.Plumber.Pipeline + 0, // 38: InternalApi.Plumber.Queue.type:type_name -> InternalApi.Plumber.QueueType + 74, // 39: InternalApi.Plumber.Pipeline.created_at:type_name -> google.protobuf.Timestamp + 74, // 40: InternalApi.Plumber.Pipeline.pending_at:type_name -> google.protobuf.Timestamp + 74, // 41: InternalApi.Plumber.Pipeline.queuing_at:type_name -> google.protobuf.Timestamp + 74, // 42: InternalApi.Plumber.Pipeline.running_at:type_name -> google.protobuf.Timestamp + 74, // 43: InternalApi.Plumber.Pipeline.stopping_at:type_name -> google.protobuf.Timestamp + 74, // 44: InternalApi.Plumber.Pipeline.done_at:type_name -> google.protobuf.Timestamp + 9, // 45: InternalApi.Plumber.Pipeline.state:type_name -> InternalApi.Plumber.Pipeline.State + 10, // 46: InternalApi.Plumber.Pipeline.result:type_name -> InternalApi.Plumber.Pipeline.Result + 11, // 47: InternalApi.Plumber.Pipeline.result_reason:type_name -> InternalApi.Plumber.Pipeline.ResultReason + 38, // 48: InternalApi.Plumber.Pipeline.queue:type_name -> InternalApi.Plumber.Queue + 55, // 49: InternalApi.Plumber.Pipeline.env_vars:type_name -> InternalApi.Plumber.EnvVariable + 40, // 50: InternalApi.Plumber.Pipeline.triggerer:type_name -> InternalApi.Plumber.Triggerer + 75, // 51: InternalApi.Plumber.Triggerer.wf_triggered_by:type_name -> InternalApi.PlumberWF.TriggeredBy + 2, // 52: InternalApi.Plumber.Triggerer.ppl_triggered_by:type_name -> InternalApi.Plumber.TriggeredBy + 12, // 53: InternalApi.Plumber.ListActivityRequest.order:type_name -> InternalApi.Plumber.ListActivityRequest.Order + 13, // 54: InternalApi.Plumber.ListActivityRequest.direction:type_name -> InternalApi.Plumber.ListActivityRequest.Direction + 46, // 55: InternalApi.Plumber.ListActivityResponse.pipelines:type_name -> InternalApi.Plumber.ActivePipeline + 74, // 56: InternalApi.Plumber.ListRequestersRequest.requested_at_gt:type_name -> google.protobuf.Timestamp + 74, // 57: InternalApi.Plumber.ListRequestersRequest.requested_at_lte:type_name -> google.protobuf.Timestamp + 45, // 58: InternalApi.Plumber.ListRequestersResponse.requesters:type_name -> InternalApi.Plumber.Requester + 76, // 59: InternalApi.Plumber.Requester.provider:type_name -> InternalApi.User.RepositoryProvider.Type + 75, // 60: InternalApi.Plumber.Requester.triggerer:type_name -> InternalApi.PlumberWF.TriggeredBy + 74, // 61: InternalApi.Plumber.Requester.requested_at:type_name -> google.protobuf.Timestamp + 75, // 62: InternalApi.Plumber.ActivePipeline.wf_triggered_by:type_name -> InternalApi.PlumberWF.TriggeredBy + 74, // 63: InternalApi.Plumber.ActivePipeline.created_at:type_name -> google.protobuf.Timestamp + 74, // 64: InternalApi.Plumber.ActivePipeline.pending_at:type_name -> google.protobuf.Timestamp + 74, // 65: InternalApi.Plumber.ActivePipeline.queuing_at:type_name -> google.protobuf.Timestamp + 74, // 66: InternalApi.Plumber.ActivePipeline.running_at:type_name -> google.protobuf.Timestamp + 38, // 67: InternalApi.Plumber.ActivePipeline.queue:type_name -> InternalApi.Plumber.Queue + 47, // 68: InternalApi.Plumber.ActivePipeline.blocks:type_name -> InternalApi.Plumber.BlockDetails + 9, // 69: InternalApi.Plumber.ActivePipeline.state:type_name -> InternalApi.Plumber.Pipeline.State + 1, // 70: InternalApi.Plumber.ActivePipeline.git_ref_type:type_name -> InternalApi.Plumber.GitRefType + 40, // 71: InternalApi.Plumber.ActivePipeline.triggerer:type_name -> InternalApi.Plumber.Triggerer + 4, // 72: InternalApi.Plumber.BlockDetails.state:type_name -> InternalApi.Plumber.Block.State + 5, // 73: InternalApi.Plumber.BlockDetails.result:type_name -> InternalApi.Plumber.Block.Result + 6, // 74: InternalApi.Plumber.BlockDetails.result_reason:type_name -> InternalApi.Plumber.Block.ResultReason + 73, // 75: InternalApi.Plumber.BlockDetails.jobs:type_name -> InternalApi.Plumber.BlockDetails.JobDetails + 14, // 76: InternalApi.Plumber.RunNowRequest.type:type_name -> InternalApi.Plumber.RunNowRequest.Type + 63, // 77: InternalApi.Plumber.GetProjectIdResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 63, // 78: InternalApi.Plumber.ValidateYamlResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 55, // 79: InternalApi.Plumber.ScheduleExtensionRequest.env_variables:type_name -> InternalApi.Plumber.EnvVariable + 63, // 80: InternalApi.Plumber.ScheduleExtensionResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 63, // 81: InternalApi.Plumber.DeleteResponse.status:type_name -> InternalApi.Plumber.ResponseStatus + 63, // 82: InternalApi.Plumber.PartialRebuildResponse.response_status:type_name -> InternalApi.Plumber.ResponseStatus + 15, // 83: InternalApi.Plumber.ResponseStatus.code:type_name -> InternalApi.Plumber.ResponseStatus.ResponseCode + 9, // 84: InternalApi.Plumber.PipelineEvent.state:type_name -> InternalApi.Plumber.Pipeline.State + 74, // 85: InternalApi.Plumber.PipelineEvent.timestamp:type_name -> google.protobuf.Timestamp + 4, // 86: InternalApi.Plumber.PipelineBlockEvent.state:type_name -> InternalApi.Plumber.Block.State + 74, // 87: InternalApi.Plumber.PipelineBlockEvent.timestamp:type_name -> google.protobuf.Timestamp + 16, // 88: InternalApi.Plumber.AfterPipeline.state:type_name -> InternalApi.Plumber.AfterPipeline.State + 17, // 89: InternalApi.Plumber.AfterPipeline.result:type_name -> InternalApi.Plumber.AfterPipeline.Result + 18, // 90: InternalApi.Plumber.AfterPipeline.result_reason:type_name -> InternalApi.Plumber.AfterPipeline.ResultReason + 74, // 91: InternalApi.Plumber.AfterPipeline.created_at:type_name -> google.protobuf.Timestamp + 16, // 92: InternalApi.Plumber.AfterPipelineEvent.state:type_name -> InternalApi.Plumber.AfterPipeline.State + 74, // 93: InternalApi.Plumber.AfterPipelineEvent.timestamp:type_name -> google.protobuf.Timestamp + 19, // 94: InternalApi.Plumber.PipelineService.Schedule:input_type -> InternalApi.Plumber.ScheduleRequest + 21, // 95: InternalApi.Plumber.PipelineService.Describe:input_type -> InternalApi.Plumber.DescribeRequest + 24, // 96: InternalApi.Plumber.PipelineService.DescribeMany:input_type -> InternalApi.Plumber.DescribeManyRequest + 26, // 97: InternalApi.Plumber.PipelineService.DescribeTopology:input_type -> InternalApi.Plumber.DescribeTopologyRequest + 28, // 98: InternalApi.Plumber.PipelineService.Terminate:input_type -> InternalApi.Plumber.TerminateRequest + 34, // 99: InternalApi.Plumber.PipelineService.ListKeyset:input_type -> InternalApi.Plumber.ListKeysetRequest + 36, // 100: InternalApi.Plumber.PipelineService.List:input_type -> InternalApi.Plumber.ListRequest + 32, // 101: InternalApi.Plumber.PipelineService.ListGrouped:input_type -> InternalApi.Plumber.ListGroupedRequest + 30, // 102: InternalApi.Plumber.PipelineService.ListQueues:input_type -> InternalApi.Plumber.ListQueuesRequest + 41, // 103: InternalApi.Plumber.PipelineService.ListActivity:input_type -> InternalApi.Plumber.ListActivityRequest + 43, // 104: InternalApi.Plumber.PipelineService.ListRequesters:input_type -> InternalApi.Plumber.ListRequestersRequest + 48, // 105: InternalApi.Plumber.PipelineService.RunNow:input_type -> InternalApi.Plumber.RunNowRequest + 50, // 106: InternalApi.Plumber.PipelineService.GetProjectId:input_type -> InternalApi.Plumber.GetProjectIdRequest + 52, // 107: InternalApi.Plumber.PipelineService.ValidateYaml:input_type -> InternalApi.Plumber.ValidateYamlRequest + 54, // 108: InternalApi.Plumber.PipelineService.ScheduleExtension:input_type -> InternalApi.Plumber.ScheduleExtensionRequest + 57, // 109: InternalApi.Plumber.PipelineService.Delete:input_type -> InternalApi.Plumber.DeleteRequest + 59, // 110: InternalApi.Plumber.PipelineService.PartialRebuild:input_type -> InternalApi.Plumber.PartialRebuildRequest + 61, // 111: InternalApi.Plumber.PipelineService.Version:input_type -> InternalApi.Plumber.VersionRequest + 20, // 112: InternalApi.Plumber.PipelineService.Schedule:output_type -> InternalApi.Plumber.ScheduleResponse + 22, // 113: InternalApi.Plumber.PipelineService.Describe:output_type -> InternalApi.Plumber.DescribeResponse + 25, // 114: InternalApi.Plumber.PipelineService.DescribeMany:output_type -> InternalApi.Plumber.DescribeManyResponse + 27, // 115: InternalApi.Plumber.PipelineService.DescribeTopology:output_type -> InternalApi.Plumber.DescribeTopologyResponse + 29, // 116: InternalApi.Plumber.PipelineService.Terminate:output_type -> InternalApi.Plumber.TerminateResponse + 35, // 117: InternalApi.Plumber.PipelineService.ListKeyset:output_type -> InternalApi.Plumber.ListKeysetResponse + 37, // 118: InternalApi.Plumber.PipelineService.List:output_type -> InternalApi.Plumber.ListResponse + 33, // 119: InternalApi.Plumber.PipelineService.ListGrouped:output_type -> InternalApi.Plumber.ListGroupedResponse + 31, // 120: InternalApi.Plumber.PipelineService.ListQueues:output_type -> InternalApi.Plumber.ListQueuesResponse + 42, // 121: InternalApi.Plumber.PipelineService.ListActivity:output_type -> InternalApi.Plumber.ListActivityResponse + 44, // 122: InternalApi.Plumber.PipelineService.ListRequesters:output_type -> InternalApi.Plumber.ListRequestersResponse + 49, // 123: InternalApi.Plumber.PipelineService.RunNow:output_type -> InternalApi.Plumber.RunNowResponse + 51, // 124: InternalApi.Plumber.PipelineService.GetProjectId:output_type -> InternalApi.Plumber.GetProjectIdResponse + 53, // 125: InternalApi.Plumber.PipelineService.ValidateYaml:output_type -> InternalApi.Plumber.ValidateYamlResponse + 56, // 126: InternalApi.Plumber.PipelineService.ScheduleExtension:output_type -> InternalApi.Plumber.ScheduleExtensionResponse + 58, // 127: InternalApi.Plumber.PipelineService.Delete:output_type -> InternalApi.Plumber.DeleteResponse + 60, // 128: InternalApi.Plumber.PipelineService.PartialRebuild:output_type -> InternalApi.Plumber.PartialRebuildResponse + 62, // 129: InternalApi.Plumber.PipelineService.Version:output_type -> InternalApi.Plumber.VersionResponse + 112, // [112:130] is the sub-list for method output_type + 94, // [94:112] is the sub-list for method input_type + 94, // [94:94] is the sub-list for extension type_name + 94, // [94:94] is the sub-list for extension extendee + 0, // [0:94] is the sub-list for field type_name +} + +func init() { file_plumber_pipeline_proto_init() } +func file_plumber_pipeline_proto_init() { + if File_plumber_pipeline_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_plumber_pipeline_proto_rawDesc, + NumEnums: 19, + NumMessages: 55, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plumber_pipeline_proto_goTypes, + DependencyIndexes: file_plumber_pipeline_proto_depIdxs, + EnumInfos: file_plumber_pipeline_proto_enumTypes, + MessageInfos: file_plumber_pipeline_proto_msgTypes, + }.Build() + File_plumber_pipeline_proto = out.File + file_plumber_pipeline_proto_rawDesc = nil + file_plumber_pipeline_proto_goTypes = nil + file_plumber_pipeline_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline_grpc.pb.go b/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline_grpc.pb.go new file mode 100644 index 000000000..ca99acaf1 --- /dev/null +++ b/mcp_server/pkg/internal_api/plumber.pipeline/plumber.pipeline_grpc.pb.go @@ -0,0 +1,849 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: plumber.pipeline.proto + +package plumber_pipeline + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PipelineService_Schedule_FullMethodName = "/InternalApi.Plumber.PipelineService/Schedule" + PipelineService_Describe_FullMethodName = "/InternalApi.Plumber.PipelineService/Describe" + PipelineService_DescribeMany_FullMethodName = "/InternalApi.Plumber.PipelineService/DescribeMany" + PipelineService_DescribeTopology_FullMethodName = "/InternalApi.Plumber.PipelineService/DescribeTopology" + PipelineService_Terminate_FullMethodName = "/InternalApi.Plumber.PipelineService/Terminate" + PipelineService_ListKeyset_FullMethodName = "/InternalApi.Plumber.PipelineService/ListKeyset" + PipelineService_List_FullMethodName = "/InternalApi.Plumber.PipelineService/List" + PipelineService_ListGrouped_FullMethodName = "/InternalApi.Plumber.PipelineService/ListGrouped" + PipelineService_ListQueues_FullMethodName = "/InternalApi.Plumber.PipelineService/ListQueues" + PipelineService_ListActivity_FullMethodName = "/InternalApi.Plumber.PipelineService/ListActivity" + PipelineService_ListRequesters_FullMethodName = "/InternalApi.Plumber.PipelineService/ListRequesters" + PipelineService_RunNow_FullMethodName = "/InternalApi.Plumber.PipelineService/RunNow" + PipelineService_GetProjectId_FullMethodName = "/InternalApi.Plumber.PipelineService/GetProjectId" + PipelineService_ValidateYaml_FullMethodName = "/InternalApi.Plumber.PipelineService/ValidateYaml" + PipelineService_ScheduleExtension_FullMethodName = "/InternalApi.Plumber.PipelineService/ScheduleExtension" + PipelineService_Delete_FullMethodName = "/InternalApi.Plumber.PipelineService/Delete" + PipelineService_PartialRebuild_FullMethodName = "/InternalApi.Plumber.PipelineService/PartialRebuild" + PipelineService_Version_FullMethodName = "/InternalApi.Plumber.PipelineService/Version" +) + +// PipelineServiceClient is the client API for PipelineService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Pipeline service API specification. +type PipelineServiceClient interface { + // This operation is depricated by Workflow.schedule() + // Operation is called to schedule pipeline run. + // Operation is synchronous and idempotent. + Schedule(ctx context.Context, in *ScheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) + // Operation is called to check the state of the previously scheduled pipeline. + // Operation is synchronous. + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + // Operation is called to check the state of the previously scheduled pipelines. + // Operation is synchronous. + DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) + // Operation is called to get the Pipeline topology. + // Operation is synchronous. + DescribeTopology(ctx context.Context, in *DescribeTopologyRequest, opts ...grpc.CallOption) (*DescribeTopologyResponse, error) + // Operation is called to abort previously scheduled pipeline. + // Operation is synchronous and idempotent. + Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error) + // Operation is called to get all pipelines which match given search parameters. + // Results are paginated using keyset instead of offset. + // Operation is synchronous. + ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) + // Operation is called to get all pipelines which match given search parameters. + // Operation is synchronous. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + // Operation is called to get one latest pipeline per each queue. + // Operation is synchronous. + ListGrouped(ctx context.Context, in *ListGroupedRequest, opts ...grpc.CallOption) (*ListGroupedResponse, error) + // Operation is called to get all queues that match search criteria. + // Operation is synchronous. + ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) + // Operation is called to get details of all running or queuing pipelines in + // the given organization. + // Operation is synchronous. + ListActivity(ctx context.Context, in *ListActivityRequest, opts ...grpc.CallOption) (*ListActivityResponse, error) + // Operation is called to get a list of pipeline requesters. + // Operation is synchronous. + ListRequesters(ctx context.Context, in *ListRequestersRequest, opts ...grpc.CallOption) (*ListRequestersResponse, error) + // Operations is called to increase execution priority of job, block or pipeline. + // Operation is asynchronous and idempotent. + RunNow(ctx context.Context, in *RunNowRequest, opts ...grpc.CallOption) (*RunNowResponse, error) + // Operation is called to get project_id for pipeline with given ppl_id + // Operation is synchronous. + GetProjectId(ctx context.Context, in *GetProjectIdRequest, opts ...grpc.CallOption) (*GetProjectIdResponse, error) + // Operation is called to validate and potentially schedule passed pipeline yaml + // definition. + // Operation is synchronous. + ValidateYaml(ctx context.Context, in *ValidateYamlRequest, opts ...grpc.CallOption) (*ValidateYamlResponse, error) + // Operation is called to schedule pipeline defined in given yaml file for project, + // repo, branch and commit which are taken from pipeline with given ppl_id. + // Operation is synchronous and idempotent. + ScheduleExtension(ctx context.Context, in *ScheduleExtensionRequest, opts ...grpc.CallOption) (*ScheduleExtensionResponse, error) + // Delete all data regarding pipeline execution + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) + // It will schedule new pipeline based on given one which will only run blocks which + // execution failed in original pipeline. + PartialRebuild(ctx context.Context, in *PartialRebuildRequest, opts ...grpc.CallOption) (*PartialRebuildResponse, error) + // Operation returns string representing version of the pipeline service. + // Operation is synchronous. + Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) +} + +type pipelineServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient { + return &pipelineServiceClient{cc} +} + +func (c *pipelineServiceClient) Schedule(ctx context.Context, in *ScheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ScheduleResponse) + err := c.cc.Invoke(ctx, PipelineService_Schedule_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, PipelineService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeManyResponse) + err := c.cc.Invoke(ctx, PipelineService_DescribeMany_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DescribeTopology(ctx context.Context, in *DescribeTopologyRequest, opts ...grpc.CallOption) (*DescribeTopologyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeTopologyResponse) + err := c.cc.Invoke(ctx, PipelineService_DescribeTopology_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TerminateResponse) + err := c.cc.Invoke(ctx, PipelineService_Terminate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListKeysetResponse) + err := c.cc.Invoke(ctx, PipelineService_ListKeyset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, PipelineService_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListGrouped(ctx context.Context, in *ListGroupedRequest, opts ...grpc.CallOption) (*ListGroupedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListGroupedResponse) + err := c.cc.Invoke(ctx, PipelineService_ListGrouped_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListQueuesResponse) + err := c.cc.Invoke(ctx, PipelineService_ListQueues_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListActivity(ctx context.Context, in *ListActivityRequest, opts ...grpc.CallOption) (*ListActivityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActivityResponse) + err := c.cc.Invoke(ctx, PipelineService_ListActivity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListRequesters(ctx context.Context, in *ListRequestersRequest, opts ...grpc.CallOption) (*ListRequestersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRequestersResponse) + err := c.cc.Invoke(ctx, PipelineService_ListRequesters_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) RunNow(ctx context.Context, in *RunNowRequest, opts ...grpc.CallOption) (*RunNowResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RunNowResponse) + err := c.cc.Invoke(ctx, PipelineService_RunNow_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetProjectId(ctx context.Context, in *GetProjectIdRequest, opts ...grpc.CallOption) (*GetProjectIdResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProjectIdResponse) + err := c.cc.Invoke(ctx, PipelineService_GetProjectId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ValidateYaml(ctx context.Context, in *ValidateYamlRequest, opts ...grpc.CallOption) (*ValidateYamlResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ValidateYamlResponse) + err := c.cc.Invoke(ctx, PipelineService_ValidateYaml_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ScheduleExtension(ctx context.Context, in *ScheduleExtensionRequest, opts ...grpc.CallOption) (*ScheduleExtensionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ScheduleExtensionResponse) + err := c.cc.Invoke(ctx, PipelineService_ScheduleExtension_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, PipelineService_Delete_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) PartialRebuild(ctx context.Context, in *PartialRebuildRequest, opts ...grpc.CallOption) (*PartialRebuildResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PartialRebuildResponse) + err := c.cc.Invoke(ctx, PipelineService_PartialRebuild_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VersionResponse) + err := c.cc.Invoke(ctx, PipelineService_Version_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PipelineServiceServer is the server API for PipelineService service. +// All implementations should embed UnimplementedPipelineServiceServer +// for forward compatibility. +// +// Pipeline service API specification. +type PipelineServiceServer interface { + // This operation is depricated by Workflow.schedule() + // Operation is called to schedule pipeline run. + // Operation is synchronous and idempotent. + Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error) + // Operation is called to check the state of the previously scheduled pipeline. + // Operation is synchronous. + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + // Operation is called to check the state of the previously scheduled pipelines. + // Operation is synchronous. + DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) + // Operation is called to get the Pipeline topology. + // Operation is synchronous. + DescribeTopology(context.Context, *DescribeTopologyRequest) (*DescribeTopologyResponse, error) + // Operation is called to abort previously scheduled pipeline. + // Operation is synchronous and idempotent. + Terminate(context.Context, *TerminateRequest) (*TerminateResponse, error) + // Operation is called to get all pipelines which match given search parameters. + // Results are paginated using keyset instead of offset. + // Operation is synchronous. + ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) + // Operation is called to get all pipelines which match given search parameters. + // Operation is synchronous. + List(context.Context, *ListRequest) (*ListResponse, error) + // Operation is called to get one latest pipeline per each queue. + // Operation is synchronous. + ListGrouped(context.Context, *ListGroupedRequest) (*ListGroupedResponse, error) + // Operation is called to get all queues that match search criteria. + // Operation is synchronous. + ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) + // Operation is called to get details of all running or queuing pipelines in + // the given organization. + // Operation is synchronous. + ListActivity(context.Context, *ListActivityRequest) (*ListActivityResponse, error) + // Operation is called to get a list of pipeline requesters. + // Operation is synchronous. + ListRequesters(context.Context, *ListRequestersRequest) (*ListRequestersResponse, error) + // Operations is called to increase execution priority of job, block or pipeline. + // Operation is asynchronous and idempotent. + RunNow(context.Context, *RunNowRequest) (*RunNowResponse, error) + // Operation is called to get project_id for pipeline with given ppl_id + // Operation is synchronous. + GetProjectId(context.Context, *GetProjectIdRequest) (*GetProjectIdResponse, error) + // Operation is called to validate and potentially schedule passed pipeline yaml + // definition. + // Operation is synchronous. + ValidateYaml(context.Context, *ValidateYamlRequest) (*ValidateYamlResponse, error) + // Operation is called to schedule pipeline defined in given yaml file for project, + // repo, branch and commit which are taken from pipeline with given ppl_id. + // Operation is synchronous and idempotent. + ScheduleExtension(context.Context, *ScheduleExtensionRequest) (*ScheduleExtensionResponse, error) + // Delete all data regarding pipeline execution + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + // It will schedule new pipeline based on given one which will only run blocks which + // execution failed in original pipeline. + PartialRebuild(context.Context, *PartialRebuildRequest) (*PartialRebuildResponse, error) + // Operation returns string representing version of the pipeline service. + // Operation is synchronous. + Version(context.Context, *VersionRequest) (*VersionResponse, error) +} + +// UnimplementedPipelineServiceServer should 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 UnimplementedPipelineServiceServer struct{} + +func (UnimplementedPipelineServiceServer) Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Schedule not implemented") +} +func (UnimplementedPipelineServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedPipelineServiceServer) DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeMany not implemented") +} +func (UnimplementedPipelineServiceServer) DescribeTopology(context.Context, *DescribeTopologyRequest) (*DescribeTopologyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeTopology not implemented") +} +func (UnimplementedPipelineServiceServer) Terminate(context.Context, *TerminateRequest) (*TerminateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Terminate not implemented") +} +func (UnimplementedPipelineServiceServer) ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyset not implemented") +} +func (UnimplementedPipelineServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedPipelineServiceServer) ListGrouped(context.Context, *ListGroupedRequest) (*ListGroupedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGrouped not implemented") +} +func (UnimplementedPipelineServiceServer) ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListQueues not implemented") +} +func (UnimplementedPipelineServiceServer) ListActivity(context.Context, *ListActivityRequest) (*ListActivityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListActivity not implemented") +} +func (UnimplementedPipelineServiceServer) ListRequesters(context.Context, *ListRequestersRequest) (*ListRequestersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRequesters not implemented") +} +func (UnimplementedPipelineServiceServer) RunNow(context.Context, *RunNowRequest) (*RunNowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RunNow not implemented") +} +func (UnimplementedPipelineServiceServer) GetProjectId(context.Context, *GetProjectIdRequest) (*GetProjectIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProjectId not implemented") +} +func (UnimplementedPipelineServiceServer) ValidateYaml(context.Context, *ValidateYamlRequest) (*ValidateYamlResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateYaml not implemented") +} +func (UnimplementedPipelineServiceServer) ScheduleExtension(context.Context, *ScheduleExtensionRequest) (*ScheduleExtensionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ScheduleExtension not implemented") +} +func (UnimplementedPipelineServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedPipelineServiceServer) PartialRebuild(context.Context, *PartialRebuildRequest) (*PartialRebuildResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PartialRebuild not implemented") +} +func (UnimplementedPipelineServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") +} +func (UnimplementedPipelineServiceServer) testEmbeddedByValue() {} + +// UnsafePipelineServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PipelineServiceServer will +// result in compilation errors. +type UnsafePipelineServiceServer interface { + mustEmbedUnimplementedPipelineServiceServer() +} + +func RegisterPipelineServiceServer(s grpc.ServiceRegistrar, srv PipelineServiceServer) { + // If the following call pancis, it indicates UnimplementedPipelineServiceServer 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(&PipelineService_ServiceDesc, srv) +} + +func _PipelineService_Schedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).Schedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_Schedule_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).Schedule(ctx, req.(*ScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DescribeMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DescribeMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DescribeMany_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DescribeMany(ctx, req.(*DescribeManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DescribeTopology_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeTopologyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DescribeTopology(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DescribeTopology_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DescribeTopology(ctx, req.(*DescribeTopologyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_Terminate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).Terminate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_Terminate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).Terminate(ctx, req.(*TerminateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListKeyset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeysetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListKeyset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListKeyset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListKeyset(ctx, req.(*ListKeysetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListGrouped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListGrouped(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListGrouped_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListGrouped(ctx, req.(*ListGroupedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListQueuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListQueues_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListQueues(ctx, req.(*ListQueuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActivityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListActivity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListActivity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListActivity(ctx, req.(*ListActivityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListRequesters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequestersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListRequesters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListRequesters_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListRequesters(ctx, req.(*ListRequestersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_RunNow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunNowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).RunNow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_RunNow_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).RunNow(ctx, req.(*RunNowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetProjectId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProjectIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetProjectId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetProjectId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetProjectId(ctx, req.(*GetProjectIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ValidateYaml_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateYamlRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ValidateYaml(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ValidateYaml_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ValidateYaml(ctx, req.(*ValidateYamlRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ScheduleExtension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ScheduleExtensionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ScheduleExtension(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ScheduleExtension_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ScheduleExtension(ctx, req.(*ScheduleExtensionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_PartialRebuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PartialRebuildRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).PartialRebuild(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_PartialRebuild_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).PartialRebuild(ctx, req.(*PartialRebuildRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_Version_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).Version(ctx, req.(*VersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PipelineService_ServiceDesc is the grpc.ServiceDesc for PipelineService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PipelineService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Plumber.PipelineService", + HandlerType: (*PipelineServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Schedule", + Handler: _PipelineService_Schedule_Handler, + }, + { + MethodName: "Describe", + Handler: _PipelineService_Describe_Handler, + }, + { + MethodName: "DescribeMany", + Handler: _PipelineService_DescribeMany_Handler, + }, + { + MethodName: "DescribeTopology", + Handler: _PipelineService_DescribeTopology_Handler, + }, + { + MethodName: "Terminate", + Handler: _PipelineService_Terminate_Handler, + }, + { + MethodName: "ListKeyset", + Handler: _PipelineService_ListKeyset_Handler, + }, + { + MethodName: "List", + Handler: _PipelineService_List_Handler, + }, + { + MethodName: "ListGrouped", + Handler: _PipelineService_ListGrouped_Handler, + }, + { + MethodName: "ListQueues", + Handler: _PipelineService_ListQueues_Handler, + }, + { + MethodName: "ListActivity", + Handler: _PipelineService_ListActivity_Handler, + }, + { + MethodName: "ListRequesters", + Handler: _PipelineService_ListRequesters_Handler, + }, + { + MethodName: "RunNow", + Handler: _PipelineService_RunNow_Handler, + }, + { + MethodName: "GetProjectId", + Handler: _PipelineService_GetProjectId_Handler, + }, + { + MethodName: "ValidateYaml", + Handler: _PipelineService_ValidateYaml_Handler, + }, + { + MethodName: "ScheduleExtension", + Handler: _PipelineService_ScheduleExtension_Handler, + }, + { + MethodName: "Delete", + Handler: _PipelineService_Delete_Handler, + }, + { + MethodName: "PartialRebuild", + Handler: _PipelineService_PartialRebuild_Handler, + }, + { + MethodName: "Version", + Handler: _PipelineService_Version_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plumber.pipeline.proto", +} diff --git a/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow.pb.go b/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow.pb.go new file mode 100644 index 000000000..45d8231e2 --- /dev/null +++ b/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow.pb.go @@ -0,0 +1,4048 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: plumber_w_f.workflow.proto + +package plumber_w_f_workflow + +import ( + status "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TriggeredBy int32 + +const ( + TriggeredBy_HOOK TriggeredBy = 0 + TriggeredBy_SCHEDULE TriggeredBy = 1 + TriggeredBy_API TriggeredBy = 2 + TriggeredBy_MANUAL_RUN TriggeredBy = 3 +) + +// Enum value maps for TriggeredBy. +var ( + TriggeredBy_name = map[int32]string{ + 0: "HOOK", + 1: "SCHEDULE", + 2: "API", + 3: "MANUAL_RUN", + } + TriggeredBy_value = map[string]int32{ + "HOOK": 0, + "SCHEDULE": 1, + "API": 2, + "MANUAL_RUN": 3, + } +) + +func (x TriggeredBy) Enum() *TriggeredBy { + p := new(TriggeredBy) + *p = x + return p +} + +func (x TriggeredBy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TriggeredBy) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[0].Descriptor() +} + +func (TriggeredBy) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[0] +} + +func (x TriggeredBy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TriggeredBy.Descriptor instead. +func (TriggeredBy) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{0} +} + +// Type of git reference for which workflow is initiated. +type GitRefType int32 + +const ( + GitRefType_BRANCH GitRefType = 0 + GitRefType_TAG GitRefType = 1 + GitRefType_PR GitRefType = 2 +) + +// Enum value maps for GitRefType. +var ( + GitRefType_name = map[int32]string{ + 0: "BRANCH", + 1: "TAG", + 2: "PR", + } + GitRefType_value = map[string]int32{ + "BRANCH": 0, + "TAG": 1, + "PR": 2, + } +) + +func (x GitRefType) Enum() *GitRefType { + p := new(GitRefType) + *p = x + return p +} + +func (x GitRefType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GitRefType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[1].Descriptor() +} + +func (GitRefType) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[1] +} + +func (x GitRefType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GitRefType.Descriptor instead. +func (GitRefType) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{1} +} + +type ScheduleRequest_ServiceType int32 + +const ( + ScheduleRequest_GIT_HUB ScheduleRequest_ServiceType = 0 + ScheduleRequest_LOCAL ScheduleRequest_ServiceType = 1 + ScheduleRequest_SNAPSHOT ScheduleRequest_ServiceType = 2 + ScheduleRequest_BITBUCKET ScheduleRequest_ServiceType = 3 + ScheduleRequest_GITLAB ScheduleRequest_ServiceType = 4 + ScheduleRequest_GIT ScheduleRequest_ServiceType = 5 +) + +// Enum value maps for ScheduleRequest_ServiceType. +var ( + ScheduleRequest_ServiceType_name = map[int32]string{ + 0: "GIT_HUB", + 1: "LOCAL", + 2: "SNAPSHOT", + 3: "BITBUCKET", + 4: "GITLAB", + 5: "GIT", + } + ScheduleRequest_ServiceType_value = map[string]int32{ + "GIT_HUB": 0, + "LOCAL": 1, + "SNAPSHOT": 2, + "BITBUCKET": 3, + "GITLAB": 4, + "GIT": 5, + } +) + +func (x ScheduleRequest_ServiceType) Enum() *ScheduleRequest_ServiceType { + p := new(ScheduleRequest_ServiceType) + *p = x + return p +} + +func (x ScheduleRequest_ServiceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScheduleRequest_ServiceType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[2].Descriptor() +} + +func (ScheduleRequest_ServiceType) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[2] +} + +func (x ScheduleRequest_ServiceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ScheduleRequest_ServiceType.Descriptor instead. +func (ScheduleRequest_ServiceType) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{0, 0} +} + +type ListLatestWorkflowsRequest_Order int32 + +const ( + ListLatestWorkflowsRequest_BY_CREATION_TIME_DESC ListLatestWorkflowsRequest_Order = 0 +) + +// Enum value maps for ListLatestWorkflowsRequest_Order. +var ( + ListLatestWorkflowsRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + } + ListLatestWorkflowsRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + } +) + +func (x ListLatestWorkflowsRequest_Order) Enum() *ListLatestWorkflowsRequest_Order { + p := new(ListLatestWorkflowsRequest_Order) + *p = x + return p +} + +func (x ListLatestWorkflowsRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListLatestWorkflowsRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[3].Descriptor() +} + +func (ListLatestWorkflowsRequest_Order) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[3] +} + +func (x ListLatestWorkflowsRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListLatestWorkflowsRequest_Order.Descriptor instead. +func (ListLatestWorkflowsRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{4, 0} +} + +type ListLatestWorkflowsRequest_Direction int32 + +const ( + ListLatestWorkflowsRequest_NEXT ListLatestWorkflowsRequest_Direction = 0 + ListLatestWorkflowsRequest_PREVIOUS ListLatestWorkflowsRequest_Direction = 1 +) + +// Enum value maps for ListLatestWorkflowsRequest_Direction. +var ( + ListLatestWorkflowsRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListLatestWorkflowsRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListLatestWorkflowsRequest_Direction) Enum() *ListLatestWorkflowsRequest_Direction { + p := new(ListLatestWorkflowsRequest_Direction) + *p = x + return p +} + +func (x ListLatestWorkflowsRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListLatestWorkflowsRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[4].Descriptor() +} + +func (ListLatestWorkflowsRequest_Direction) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[4] +} + +func (x ListLatestWorkflowsRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListLatestWorkflowsRequest_Direction.Descriptor instead. +func (ListLatestWorkflowsRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{4, 1} +} + +type ListGroupedKSRequest_Order int32 + +const ( + ListGroupedKSRequest_BY_CREATION_TIME_DESC ListGroupedKSRequest_Order = 0 +) + +// Enum value maps for ListGroupedKSRequest_Order. +var ( + ListGroupedKSRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + } + ListGroupedKSRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + } +) + +func (x ListGroupedKSRequest_Order) Enum() *ListGroupedKSRequest_Order { + p := new(ListGroupedKSRequest_Order) + *p = x + return p +} + +func (x ListGroupedKSRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListGroupedKSRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[5].Descriptor() +} + +func (ListGroupedKSRequest_Order) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[5] +} + +func (x ListGroupedKSRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListGroupedKSRequest_Order.Descriptor instead. +func (ListGroupedKSRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{6, 0} +} + +type ListGroupedKSRequest_Direction int32 + +const ( + ListGroupedKSRequest_NEXT ListGroupedKSRequest_Direction = 0 + ListGroupedKSRequest_PREVIOUS ListGroupedKSRequest_Direction = 1 +) + +// Enum value maps for ListGroupedKSRequest_Direction. +var ( + ListGroupedKSRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListGroupedKSRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListGroupedKSRequest_Direction) Enum() *ListGroupedKSRequest_Direction { + p := new(ListGroupedKSRequest_Direction) + *p = x + return p +} + +func (x ListGroupedKSRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListGroupedKSRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[6].Descriptor() +} + +func (ListGroupedKSRequest_Direction) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[6] +} + +func (x ListGroupedKSRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListGroupedKSRequest_Direction.Descriptor instead. +func (ListGroupedKSRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{6, 1} +} + +type ListGroupedRequest_SourceType int32 + +const ( + ListGroupedRequest_BRANCH ListGroupedRequest_SourceType = 0 + ListGroupedRequest_TAG ListGroupedRequest_SourceType = 1 + ListGroupedRequest_PULL_REQUEST ListGroupedRequest_SourceType = 2 +) + +// Enum value maps for ListGroupedRequest_SourceType. +var ( + ListGroupedRequest_SourceType_name = map[int32]string{ + 0: "BRANCH", + 1: "TAG", + 2: "PULL_REQUEST", + } + ListGroupedRequest_SourceType_value = map[string]int32{ + "BRANCH": 0, + "TAG": 1, + "PULL_REQUEST": 2, + } +) + +func (x ListGroupedRequest_SourceType) Enum() *ListGroupedRequest_SourceType { + p := new(ListGroupedRequest_SourceType) + *p = x + return p +} + +func (x ListGroupedRequest_SourceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListGroupedRequest_SourceType) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[7].Descriptor() +} + +func (ListGroupedRequest_SourceType) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[7] +} + +func (x ListGroupedRequest_SourceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListGroupedRequest_SourceType.Descriptor instead. +func (ListGroupedRequest_SourceType) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{8, 0} +} + +type ListKeysetRequest_Order int32 + +const ( + ListKeysetRequest_BY_CREATION_TIME_DESC ListKeysetRequest_Order = 0 +) + +// Enum value maps for ListKeysetRequest_Order. +var ( + ListKeysetRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + } + ListKeysetRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + } +) + +func (x ListKeysetRequest_Order) Enum() *ListKeysetRequest_Order { + p := new(ListKeysetRequest_Order) + *p = x + return p +} + +func (x ListKeysetRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListKeysetRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[8].Descriptor() +} + +func (ListKeysetRequest_Order) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[8] +} + +func (x ListKeysetRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListKeysetRequest_Order.Descriptor instead. +func (ListKeysetRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{12, 0} +} + +type ListKeysetRequest_Direction int32 + +const ( + ListKeysetRequest_NEXT ListKeysetRequest_Direction = 0 + ListKeysetRequest_PREVIOUS ListKeysetRequest_Direction = 1 +) + +// Enum value maps for ListKeysetRequest_Direction. +var ( + ListKeysetRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListKeysetRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListKeysetRequest_Direction) Enum() *ListKeysetRequest_Direction { + p := new(ListKeysetRequest_Direction) + *p = x + return p +} + +func (x ListKeysetRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListKeysetRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_plumber_w_f_workflow_proto_enumTypes[9].Descriptor() +} + +func (ListKeysetRequest_Direction) Type() protoreflect.EnumType { + return &file_plumber_w_f_workflow_proto_enumTypes[9] +} + +func (x ListKeysetRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListKeysetRequest_Direction.Descriptor instead. +func (ListKeysetRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{12, 1} +} + +// Schedule call request +// +// This operation depricates Pipeline.schedule() +// +// Arguments: +// - service = [required] Repo host provider (GitHub etc.) +// - repo = [required] Data about repository +// - project_id = [required] Id of project on Semaphore +// - branch_id = [required] UUID of project's branch on Semaphore +// - hook_id = [required] Originally generated by repo-host. +// Ties the schedule-request to repo post-commit hook. +// Plumber has to pass it on, otherwise not used. +// - request_token = [required] unique string, see Idempotency +// - snapshot_id = [required if service == SANPSHOT] Snapshot id +// - definition_file = [optional] Full path to file containing pipeline definition. +// - requester_id = [optional] The user who initiated workflow +// - organization_id = [required] The organization for which to schedule workflow. +// - label = [required] Branch name, PR number, tag value or other value +// used for listing/grouping of similar workflows +// - triggered_by = [required] Event that triggered workflow (hook, schedule, API call..) +// - scheduler_task_id = [optional] Task ID passed by periodic scheduler. If present the +// initial pipeline will start initialization in conceived state. +// - env_vars = [optional] A list of values that will be available as environment +// variables in the all jobs of the initial pipeline in the workflow. +// - start_in_conceived_state = [optional] If true, subset of request parms is required and +// the initial pipeline will start initialization in conceived +// state where it will obrtain the hook related data. +// - git_reference = [optional] The full git reference on which the workflow should be started. +// It is used when hook data is missing (when wf was started via API or a task). +// Examples: refs/heads/master, refs/tags/v1.2.3, refs/pull/123 +// +// Preconditions: +// - request_token has to be unique for every workflow, see Idempotency +// - service field has valid value +// If start_in_conceived_state is false and scheduler_task_id is empty string: +// - all repo fields have valid values +// - hook_id value is previously generated by repo-host or hooks_processor +// - branch_id field has valid value +// +// otherwise: +// - only branch_name in repo map has to have valid value +// - the rest will be filled by plumber in conceived state +// +// Postconditions: +// - ResponseCode +// - OK => +// - Workflow with request_token is created or was previously created. +// - If workflow is created => pipeline with the same request_token is also scheduled. +// - wf_id is returned either way. +// - otherwise => +// - Pipeline with request_token is NOT scheduled. Error is returned. +// +// Idempotency: +// - When schedule request is received, request_token is checked first. +// If workflow with the same request_token is already created: +// - OK and previously generated wf_id are returned, +// without creating new workflow. +// - Other parameters are not checked; they are assumed to be the same. +type ScheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Service ScheduleRequest_ServiceType `protobuf:"varint,2,opt,name=service,proto3,enum=InternalApi.PlumberWF.ScheduleRequest_ServiceType" json:"service,omitempty"` + Repo *ScheduleRequest_Repo `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` + ProjectId string `protobuf:"bytes,6,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchId string `protobuf:"bytes,7,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + HookId string `protobuf:"bytes,8,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + RequestToken string `protobuf:"bytes,9,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + SnapshotId string `protobuf:"bytes,10,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + DefinitionFile string `protobuf:"bytes,11,opt,name=definition_file,json=definitionFile,proto3" json:"definition_file,omitempty"` + RequesterId string `protobuf:"bytes,12,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + OrganizationId string `protobuf:"bytes,13,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Label string `protobuf:"bytes,14,opt,name=label,proto3" json:"label,omitempty"` + TriggeredBy TriggeredBy `protobuf:"varint,15,opt,name=triggered_by,json=triggeredBy,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"triggered_by,omitempty"` + SchedulerTaskId string `protobuf:"bytes,16,opt,name=scheduler_task_id,json=schedulerTaskId,proto3" json:"scheduler_task_id,omitempty"` + EnvVars []*ScheduleRequest_EnvVar `protobuf:"bytes,17,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` + StartInConceivedState bool `protobuf:"varint,18,opt,name=start_in_conceived_state,json=startInConceivedState,proto3" json:"start_in_conceived_state,omitempty"` + GitReference string `protobuf:"bytes,19,opt,name=git_reference,json=gitReference,proto3" json:"git_reference,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest) Reset() { + *x = ScheduleRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest) ProtoMessage() {} + +func (x *ScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest.ProtoReflect.Descriptor instead. +func (*ScheduleRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{0} +} + +func (x *ScheduleRequest) GetService() ScheduleRequest_ServiceType { + if x != nil { + return x.Service + } + return ScheduleRequest_GIT_HUB +} + +func (x *ScheduleRequest) GetRepo() *ScheduleRequest_Repo { + if x != nil { + return x.Repo + } + return nil +} + +func (x *ScheduleRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ScheduleRequest) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *ScheduleRequest) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *ScheduleRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +func (x *ScheduleRequest) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *ScheduleRequest) GetDefinitionFile() string { + if x != nil { + return x.DefinitionFile + } + return "" +} + +func (x *ScheduleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ScheduleRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ScheduleRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ScheduleRequest) GetTriggeredBy() TriggeredBy { + if x != nil { + return x.TriggeredBy + } + return TriggeredBy_HOOK +} + +func (x *ScheduleRequest) GetSchedulerTaskId() string { + if x != nil { + return x.SchedulerTaskId + } + return "" +} + +func (x *ScheduleRequest) GetEnvVars() []*ScheduleRequest_EnvVar { + if x != nil { + return x.EnvVars + } + return nil +} + +func (x *ScheduleRequest) GetStartInConceivedState() bool { + if x != nil { + return x.StartInConceivedState + } + return false +} + +func (x *ScheduleRequest) GetGitReference() string { + if x != nil { + return x.GitReference + } + return "" +} + +// Schedule call response +// +// Response: +// - status = [required] contains google.rpc.Code: +// OK = Workflow exists and is available for Describe call. +// INVALID_ARGUMENT = Workflow request is rejected because of +// malformed request. +// - wf_id = [required if OK] workflow id +// - ppl_id = [required if OK] id of initial pipeline in workflow +type ScheduleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,2,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + PplId string `protobuf:"bytes,4,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleResponse) Reset() { + *x = ScheduleResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleResponse) ProtoMessage() {} + +func (x *ScheduleResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleResponse.ProtoReflect.Descriptor instead. +func (*ScheduleResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{1} +} + +func (x *ScheduleResponse) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *ScheduleResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ScheduleResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +// GetPath call request +// +// Synchronous operation. +// Returns the path = list of sequential pipeliens. +// +// - If only wf_id is provided => +// Returns path containing newest (chronologically latest) pipeline as +// the last element and coresponding first pipeline as first element of the path. +// - If first_ppl_id is provided => +// Returns path with first_ppl_id as first pipeline in the path and +// the newest pipeline in first_ppl_id subtree as last pipeline the path. +// - If last_ppl_id is provided => +// Returns path containing last_ppl_id pipeline as the last element and +// coresponding first pipeline as first element of the path. +// - If both first_ppl_id and last_ppl_id are provided => +// Returns path connecting first_ppl_id and last_ppl_id pipelines as the first +// and the last elements in the path. +// +// Arguments: +// - wf_id = [optional] Workflow id. Needed only of other two are not specified. +// - first_ppl_id = [optional] First pipeline in returned sequence. +// - last_ppl_id = [optional] Last pipeline in returned sequence. +// +// Preconditions: +// - If wf_id is provided => Workflow with first_ppl_id wf_id exists. +// - If first_ppl_id is provided => Pipeline with first_ppl_id exists. +// - If last_ppl_id is provided => Pipeline with last_ppl_id exists. +// - If more than one argument is provided => they all belong to the same workflow. +// - If both first_ppl_id and last_ppl_id are provided => last_ppl_id pipeline +// must belong to the first_ppl_id subtree. +// +// Note: +// 'first_ppl_id subtree' is subtree containing first_ppl_id pipeline as its root. +// +// Postconditions: +// +// Idempotency: +type GetPathRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + FirstPplId string `protobuf:"bytes,2,opt,name=first_ppl_id,json=firstPplId,proto3" json:"first_ppl_id,omitempty"` + LastPplId string `protobuf:"bytes,3,opt,name=last_ppl_id,json=lastPplId,proto3" json:"last_ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPathRequest) Reset() { + *x = GetPathRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPathRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPathRequest) ProtoMessage() {} + +func (x *GetPathRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPathRequest.ProtoReflect.Descriptor instead. +func (*GetPathRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{2} +} + +func (x *GetPathRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *GetPathRequest) GetFirstPplId() string { + if x != nil { + return x.FirstPplId + } + return "" +} + +func (x *GetPathRequest) GetLastPplId() string { + if x != nil { + return x.LastPplId + } + return "" +} + +// GetPath call response +// +// Response: +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// FAILED_PRECONDITION = see Preconditions section in request. +// - wf_id = [required] Workflow id to which pipeline from the request belongs to. +// - wf_created_at = [required] Workflow creation time. +// - path = [required, list] Selected pipelines belonging to the workflow, +// with their switches and partial-rebuild-peers. +type GetPathResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,2,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + WfCreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=wf_created_at,json=wfCreatedAt,proto3" json:"wf_created_at,omitempty"` + Path []*GetPathResponse_PathElement `protobuf:"bytes,4,rep,name=path,proto3" json:"path,omitempty"` + Status *status.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPathResponse) Reset() { + *x = GetPathResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPathResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPathResponse) ProtoMessage() {} + +func (x *GetPathResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPathResponse.ProtoReflect.Descriptor instead. +func (*GetPathResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPathResponse) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *GetPathResponse) GetWfCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.WfCreatedAt + } + return nil +} + +func (x *GetPathResponse) GetPath() []*GetPathResponse_PathElement { + if x != nil { + return x.Path + } + return nil +} + +func (x *GetPathResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// ListLatestWorkflows call request +// +// Synchronous operation. +// Returns paginated details of one latest workflow per each branch/tag/pull request +// +// Arguments: +// - order = [required] Sorting order direction +// - page_size = [optional, default = 30] Number of workflows per page in response. +// - page_token = [required] Starting point for listing, tokens for next and previous +// page are returned in response. If you are fetching first +// page leave it empty and set direction to NEXT +// - direction = [required] Listing direction. Use NEXT with value of 'next_page_token' +// from ListLatestWorkflows response as 'page_token' to fetch next page +// of results, or use PREVIOUS with value of 'previous_page_token' +// as 'page_token' to fetch the previous page. +// - project_id = [required] ID of project which workflows should be returned. +// - requester_id = [optional] The ID of user who triggered workflow. +// - git_ref_types = [optional] Takes all distinct git refs for chosen git ref types +// and returns one latest workflow for each of them +// +// Preconditions: +// +// Postconditions: +// - gRPC status: OK => Response contains valid data in other fields. +// - gRPC status: INVALID_ARGUMENT => Workflow list request is rejected because of +// malformed request. The error message contains +// a description +// - gRPC status: RESOURCE_EXHAUSTED => Too many requests, server is overloaded, try later. +// +// Idempotency: +type ListLatestWorkflowsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Order ListLatestWorkflowsRequest_Order `protobuf:"varint,1,opt,name=order,proto3,enum=InternalApi.PlumberWF.ListLatestWorkflowsRequest_Order" json:"order,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Direction ListLatestWorkflowsRequest_Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=InternalApi.PlumberWF.ListLatestWorkflowsRequest_Direction" json:"direction,omitempty"` + ProjectId string `protobuf:"bytes,5,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + RequesterId string `protobuf:"bytes,6,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,7,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.PlumberWF.GitRefType" json:"git_ref_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLatestWorkflowsRequest) Reset() { + *x = ListLatestWorkflowsRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLatestWorkflowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLatestWorkflowsRequest) ProtoMessage() {} + +func (x *ListLatestWorkflowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLatestWorkflowsRequest.ProtoReflect.Descriptor instead. +func (*ListLatestWorkflowsRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{4} +} + +func (x *ListLatestWorkflowsRequest) GetOrder() ListLatestWorkflowsRequest_Order { + if x != nil { + return x.Order + } + return ListLatestWorkflowsRequest_BY_CREATION_TIME_DESC +} + +func (x *ListLatestWorkflowsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListLatestWorkflowsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListLatestWorkflowsRequest) GetDirection() ListLatestWorkflowsRequest_Direction { + if x != nil { + return x.Direction + } + return ListLatestWorkflowsRequest_NEXT +} + +func (x *ListLatestWorkflowsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListLatestWorkflowsRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ListLatestWorkflowsRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +// ListLatestWorkflows call response +// +// Response: +// - workflows = [required] Workflows which match search params in request +// - next_page_token = [required] Token which should be passed in request +// to fetch the next page of workflows +// - previous_page_token = [required] Token which should be passed in request +// to fetch the previous page of workflows +type ListLatestWorkflowsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workflows []*WorkflowDetails `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,3,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLatestWorkflowsResponse) Reset() { + *x = ListLatestWorkflowsResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLatestWorkflowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLatestWorkflowsResponse) ProtoMessage() {} + +func (x *ListLatestWorkflowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLatestWorkflowsResponse.ProtoReflect.Descriptor instead. +func (*ListLatestWorkflowsResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{5} +} + +func (x *ListLatestWorkflowsResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListLatestWorkflowsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListLatestWorkflowsResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +// ListGroupedKS call request +// +// Synchronous operation. +// Returns paginated details of one latest workflow for each branch/tag/pull request +// +// Arguments: +// - order = [required] Sorting order direction +// - page_size = [optional, default = 30] Number of workflows per page in response. +// - page_token = [required] Starting point for listing, tokens for next and previous +// page are returned in response. If you are fetching first +// page leave it empty and set direction to NEXT +// - direction = [required] Listing direction. Use NEXT with value of 'next_page_token' +// from ListGroupedKS response as 'page_token' to fetch next page +// of results, or use PREVIOUS with value of 'previous_page_token' +// as 'page_token' to fetch the previous page. +// - project_id = [required] ID of project which workflows should be returned. +// - requester_id = [optional] The ID of user who triggered workflow. +// - git_ref_types = [optional] Takes all distinct git refs for chosen git ref types +// and returns one latest workflow for each of them +// +// Preconditions: +// +// Postconditions: +// - gRPC status: OK => Response contains valid data in other fields. +// - gRPC status: INVALID_ARGUMENT => Workflow list request is rejected because of +// malformed request. The error message contains +// a description +// - gRPC status: RESOURCE_EXHAUSTED => Too many requests, server is overloaded, try later. +// +// Idempotency: +type ListGroupedKSRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Order ListGroupedKSRequest_Order `protobuf:"varint,1,opt,name=order,proto3,enum=InternalApi.PlumberWF.ListGroupedKSRequest_Order" json:"order,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Direction ListGroupedKSRequest_Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=InternalApi.PlumberWF.ListGroupedKSRequest_Direction" json:"direction,omitempty"` + ProjectId string `protobuf:"bytes,5,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + RequesterId string `protobuf:"bytes,6,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,7,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.PlumberWF.GitRefType" json:"git_ref_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedKSRequest) Reset() { + *x = ListGroupedKSRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedKSRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedKSRequest) ProtoMessage() {} + +func (x *ListGroupedKSRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedKSRequest.ProtoReflect.Descriptor instead. +func (*ListGroupedKSRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{6} +} + +func (x *ListGroupedKSRequest) GetOrder() ListGroupedKSRequest_Order { + if x != nil { + return x.Order + } + return ListGroupedKSRequest_BY_CREATION_TIME_DESC +} + +func (x *ListGroupedKSRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupedKSRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListGroupedKSRequest) GetDirection() ListGroupedKSRequest_Direction { + if x != nil { + return x.Direction + } + return ListGroupedKSRequest_NEXT +} + +func (x *ListGroupedKSRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListGroupedKSRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ListGroupedKSRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +// ListGroupedKS call response +// +// Response: +// - workflows = [required] Workflows which match search params in request +// - next_page_token = [required] Token which should be passed in request +// to fetch the next page of workflows +// - previous_page_token = [required] Token which should be passed in request +// to fetch the previous page of workflows +type ListGroupedKSResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workflows []*WorkflowDetails `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,3,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedKSResponse) Reset() { + *x = ListGroupedKSResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedKSResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedKSResponse) ProtoMessage() {} + +func (x *ListGroupedKSResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedKSResponse.ProtoReflect.Descriptor instead. +func (*ListGroupedKSResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{7} +} + +func (x *ListGroupedKSResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListGroupedKSResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListGroupedKSResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +// ListGrouped call request +// +// Synchronous operation. +// Returns paginated details of one latest workflow for each branch/tag/pull request +// +// Arguments: +// - page = [optional, default = 1] Serial number of wanted page with List call result. +// - page_size = [optional, default = 30] Number of workflows per page of List call result. +// - project_id = [required] ID of project which workflows should be returned. +// +// # DEPRECATED - instead use: git_ref_types list with one element +// +// - grouped_by = [optional] Group workflows by their source type +// +// - git_ref_types = [optional] Takes all distinct git refs for chosen git ref types +// and returns one latest workflow for each of them +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListGroupedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + GroupedBy ListGroupedRequest_SourceType `protobuf:"varint,4,opt,name=grouped_by,json=groupedBy,proto3,enum=InternalApi.PlumberWF.ListGroupedRequest_SourceType" json:"grouped_by,omitempty"` // DEPRECATED + GitRefTypes []GitRefType `protobuf:"varint,5,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.PlumberWF.GitRefType" json:"git_ref_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedRequest) Reset() { + *x = ListGroupedRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedRequest) ProtoMessage() {} + +func (x *ListGroupedRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedRequest.ProtoReflect.Descriptor instead. +func (*ListGroupedRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{8} +} + +func (x *ListGroupedRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListGroupedRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupedRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListGroupedRequest) GetGroupedBy() ListGroupedRequest_SourceType { + if x != nil { + return x.GroupedBy + } + return ListGroupedRequest_BRANCH +} + +func (x *ListGroupedRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +// ListGrouped call response +// +// Response: +// - workflows = [required] Workflows which match search params in ListGroupedRequest +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// INVALID_ARGUMENT = Workflow list request is rejected because of +// malformed request. +// - page_number = [required] Serial number of returned page with workflow search results +// - page_size = [required] Number of workflows per page +// - total_entries = [required] Total number of workflows for given project and branch +// - total_pages = [required] Total number of pages with workflow search results +type ListGroupedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Workflows []*WorkflowDetails `protobuf:"bytes,2,rep,name=workflows,proto3" json:"workflows,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListGroupedResponse) Reset() { + *x = ListGroupedResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListGroupedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupedResponse) ProtoMessage() {} + +func (x *ListGroupedResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupedResponse.ProtoReflect.Descriptor instead. +func (*ListGroupedResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{9} +} + +func (x *ListGroupedResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListGroupedResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListGroupedResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListGroupedResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupedResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListGroupedResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// List call request - DEPRECATED +// +// Synchronous operation. +// Returns paginated details of all workflows which mach given search parameters +// +// Arguments: +// - page = [optional, default = 1] Serial number of wanted page with List call result. +// - page_size = [optional, default = 30] Number of workflows per page of List call result. +// - project_id = [required, optional if organization_id is given] ID of project which workflows should be returned. +// +// # DEPRECATED - instead use: label + git_ref_types = [BRANCH] +// +// - branch_name = [optional] Name of branch which workflows should be returned. +// +// - requester_id = [optional] The ID of user who triggered workflow. +// - organization_id = [required, optional if project_id is given] The ID of an organization which workflow belongs to. +// - project_ids = [optional if organization_id or project_id are given, otherwise required] The IDs of projects for which to list workflows. +// - created_before = [optional] Return only workflows created before this timestamp +// - created_after = [optional] Return only workflows created after this timestamp +// - label = [optional] Return only workflows with given label +// (label is branch/tag name, PR number, snapshot generated label etc.) +// - git_ref_types = [optional] Return only workflows which originated from one of given git refs +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` // DEPRECATED + RequesterId string `protobuf:"bytes,5,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + OrganizationId string `protobuf:"bytes,6,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ProjectIds []string `protobuf:"bytes,7,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` + CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"` + Label string `protobuf:"bytes,10,opt,name=label,proto3" json:"label,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,11,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.PlumberWF.GitRefType" json:"git_ref_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{10} +} + +func (x *ListRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListRequest) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *ListRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ListRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListRequest) GetProjectIds() []string { + if x != nil { + return x.ProjectIds + } + return nil +} + +func (x *ListRequest) GetCreatedBefore() *timestamppb.Timestamp { + if x != nil { + return x.CreatedBefore + } + return nil +} + +func (x *ListRequest) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +func (x *ListRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ListRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +// List call response +// +// Response: +// - workflows = [required] Workflows which match search params in ListRequest +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// INVALID_ARGUMENT = Workflow list request is rejected because of +// malformed request. +// - page_number = [required] Serial number of returned page with workflow search results +// - page_size = [required] Number of workflows per page +// - total_entries = [required] Total number of workflows for given project and branch +// - total_pages = [required] Total number of pages with workflow search results +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Workflows []*WorkflowDetails `protobuf:"bytes,2,rep,name=workflows,proto3" json:"workflows,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{11} +} + +func (x *ListResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// ListKeyset call request +// +// Synchronous operation. +// Returns paginated details of all workflows which mach given search parameters +// +// Arguments: +// +// - page_size = [optional, default = 30] Number of workflows per page of List call result. +// - page_token = [required] Starting point for listing, tokens for next and previous +// page are returned in response. If you are fetching first +// page leave it empty and set direction to NEXT +// - order = [required] Sorting order direction +// - organization_id = [required, optional if project_id is given] The ID of an organization which workflow belongs to. +// - project_id = [required, optional if organization_id is given] ID of project which workflows should be returned. +// - requester_id = [optional] The ID of user who triggered workflow. +// - project_ids = [optional if organization_id or project_id are given, otherwise required] +// The IDs of projects for which to list workflows. +// - created_before = [optional] Return only workflows created before this timestamp +// - created_after = [optional] Return only workflows created after this timestamp +// - label = [optional] Return only workflows with given label +// (label is branch/tag name, PR number, snapshot generated label etc.) +// - git_ref_types = [optional] Return only workflows which originated from one of given git refs +// - direction = [required] Listing direction. Use NEXT with value of 'next_page_token' +// from ListKeyset response as 'page_token' to fetch next page +// of results, or use PREVIOUS with value of 'previous_page_token' +// as 'page_token' to fetch the previous page. +// - triggerers = [optional] Return only workflows with `triggered_by` value that is included in this list. +// If empty list is given all workflows will be returned for backwards compatibility. +// - branch_name = [optional] Return only workflows for single branch_name. +// - requester_ids = [optional] The IDs of users who triggered workflow. +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListKeysetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Order ListKeysetRequest_Order `protobuf:"varint,3,opt,name=order,proto3,enum=InternalApi.PlumberWF.ListKeysetRequest_Order" json:"order,omitempty"` + OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ProjectId string `protobuf:"bytes,5,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + RequesterId string `protobuf:"bytes,6,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + ProjectIds []string `protobuf:"bytes,7,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` + CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"` + Label string `protobuf:"bytes,10,opt,name=label,proto3" json:"label,omitempty"` + GitRefTypes []GitRefType `protobuf:"varint,11,rep,packed,name=git_ref_types,json=gitRefTypes,proto3,enum=InternalApi.PlumberWF.GitRefType" json:"git_ref_types,omitempty"` + Direction ListKeysetRequest_Direction `protobuf:"varint,12,opt,name=direction,proto3,enum=InternalApi.PlumberWF.ListKeysetRequest_Direction" json:"direction,omitempty"` + Triggerers []TriggeredBy `protobuf:"varint,13,rep,packed,name=triggerers,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"triggerers,omitempty"` + BranchName string `protobuf:"bytes,14,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + RequesterIds []string `protobuf:"bytes,15,rep,name=requester_ids,json=requesterIds,proto3" json:"requester_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetRequest) Reset() { + *x = ListKeysetRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetRequest) ProtoMessage() {} + +func (x *ListKeysetRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetRequest.ProtoReflect.Descriptor instead. +func (*ListKeysetRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{12} +} + +func (x *ListKeysetRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListKeysetRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListKeysetRequest) GetOrder() ListKeysetRequest_Order { + if x != nil { + return x.Order + } + return ListKeysetRequest_BY_CREATION_TIME_DESC +} + +func (x *ListKeysetRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListKeysetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListKeysetRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *ListKeysetRequest) GetProjectIds() []string { + if x != nil { + return x.ProjectIds + } + return nil +} + +func (x *ListKeysetRequest) GetCreatedBefore() *timestamppb.Timestamp { + if x != nil { + return x.CreatedBefore + } + return nil +} + +func (x *ListKeysetRequest) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +func (x *ListKeysetRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ListKeysetRequest) GetGitRefTypes() []GitRefType { + if x != nil { + return x.GitRefTypes + } + return nil +} + +func (x *ListKeysetRequest) GetDirection() ListKeysetRequest_Direction { + if x != nil { + return x.Direction + } + return ListKeysetRequest_NEXT +} + +func (x *ListKeysetRequest) GetTriggerers() []TriggeredBy { + if x != nil { + return x.Triggerers + } + return nil +} + +func (x *ListKeysetRequest) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *ListKeysetRequest) GetRequesterIds() []string { + if x != nil { + return x.RequesterIds + } + return nil +} + +// ListKeyset call response +// +// Response: +// - workflows = [required] Workflows which match search params in ListRequest +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// INVALID_ARGUMENT = Workflow list request is rejected because +// of malformed request. +// - next_page_token = [required] Token which should be passed in ListKeysetRequest +// to fetch the next page of workflows +// - previous_page_token = [required] Token which should be passed in ListKeysetRequest +// to fetch the previous page of workflows +type ListKeysetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Workflows []*WorkflowDetails `protobuf:"bytes,2,rep,name=workflows,proto3" json:"workflows,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,4,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetResponse) Reset() { + *x = ListKeysetResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetResponse) ProtoMessage() {} + +func (x *ListKeysetResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetResponse.ProtoReflect.Descriptor instead. +func (*ListKeysetResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{13} +} + +func (x *ListKeysetResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListKeysetResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListKeysetResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListKeysetResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +// Workflow entity details +// +// - wf_id = [required] Unique Workflow identifier +// - initial_ppl_id = [required] Unique identifier of intitial pipeline in workflow +// - project_id = [required] Id of project to which given workflow belongs +// - hook_id = [required] Received in schedule request +// - requester_id = [required] The user who initiated workflow +// - branch_id = [required] Received in schedule request +// - branch_name = [required] Name of git branch for which workflow was scheduled +// - commit_sha = [required] Git commit sha for which workflow was scheduled +// - created_at = [required] Timestamp when workflow schedule request was recorded +// - triggered_by = [required] Event that triggered workflow (hook, schedule, API call..) +// - rerun_of = [optional] Id of the workflow from which this workflow was rerun. +// It is empty ("") if if the workflow is the original (first) run. +// +// -repository_id = [optional] The ID of the repository from which workflow was initialized +// +// Only available if related hook was processed by hooks-receiver/processor +// +// -organization_id = [required] Id of the organization to which given workflow belongs. +type WorkflowDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + InitialPplId string `protobuf:"bytes,2,opt,name=initial_ppl_id,json=initialPplId,proto3" json:"initial_ppl_id,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HookId string `protobuf:"bytes,4,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + RequesterId string `protobuf:"bytes,5,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + BranchId string `protobuf:"bytes,6,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + BranchName string `protobuf:"bytes,7,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + CommitSha string `protobuf:"bytes,8,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + TriggeredBy TriggeredBy `protobuf:"varint,10,opt,name=triggered_by,json=triggeredBy,proto3,enum=InternalApi.PlumberWF.TriggeredBy" json:"triggered_by,omitempty"` + RerunOf string `protobuf:"bytes,11,opt,name=rerun_of,json=rerunOf,proto3" json:"rerun_of,omitempty"` + RepositoryId string `protobuf:"bytes,12,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` + OrganizationId string `protobuf:"bytes,13,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowDetails) Reset() { + *x = WorkflowDetails{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowDetails) ProtoMessage() {} + +func (x *WorkflowDetails) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowDetails.ProtoReflect.Descriptor instead. +func (*WorkflowDetails) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{14} +} + +func (x *WorkflowDetails) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *WorkflowDetails) GetInitialPplId() string { + if x != nil { + return x.InitialPplId + } + return "" +} + +func (x *WorkflowDetails) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *WorkflowDetails) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *WorkflowDetails) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *WorkflowDetails) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *WorkflowDetails) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *WorkflowDetails) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +func (x *WorkflowDetails) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *WorkflowDetails) GetTriggeredBy() TriggeredBy { + if x != nil { + return x.TriggeredBy + } + return TriggeredBy_HOOK +} + +func (x *WorkflowDetails) GetRerunOf() string { + if x != nil { + return x.RerunOf + } + return "" +} + +func (x *WorkflowDetails) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +func (x *WorkflowDetails) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +// Describe call request +// +// Synchronous operation. +// Returns details of workflow with given wf_id. +// +// Arguments: +// - wf_id = [required] Workflow to describe. +// +// Preconditions: +// - Workflow with wf_id was previously scheduled. +// +// Postconditions: +// +// Idempotency: +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{15} +} + +func (x *DescribeRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +// Describe call response +// +// Response: +// - workflow = [required] Workflow's description. +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +// FAILED_PRECONDITION = Workflow with given wf_id was not found. +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Workflow *WorkflowDetails `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{16} +} + +func (x *DescribeResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeResponse) GetWorkflow() *WorkflowDetails { + if x != nil { + return x.Workflow + } + return nil +} + +// DescribeMany call request +// +// Synchronous operation. +// Returns details of workflows with given wf_ids. +// +// Arguments: +// - wf_ids = [required] Workflows to describe. +// +// Preconditions: +// +// Postconditions: +// - If any of the listed workflows doesn't exist, it is not returned in response. +// +// Idempotency: +type DescribeManyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfIds []string `protobuf:"bytes,1,rep,name=wf_ids,json=wfIds,proto3" json:"wf_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyRequest) Reset() { + *x = DescribeManyRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyRequest) ProtoMessage() {} + +func (x *DescribeManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyRequest.ProtoReflect.Descriptor instead. +func (*DescribeManyRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{17} +} + +func (x *DescribeManyRequest) GetWfIds() []string { + if x != nil { + return x.WfIds + } + return nil +} + +// DescribeMany call response +// +// Response: +// - workflows = [required] Workflows' descriptions. +// - response_status = [required] contains ResponseCode: +// OK = Response contains valid data in other fields +type DescribeManyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Workflows []*WorkflowDetails `protobuf:"bytes,2,rep,name=workflows,proto3" json:"workflows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyResponse) Reset() { + *x = DescribeManyResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyResponse) ProtoMessage() {} + +func (x *DescribeManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyResponse.ProtoReflect.Descriptor instead. +func (*DescribeManyResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{18} +} + +func (x *DescribeManyResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeManyResponse) GetWorkflows() []*WorkflowDetails { + if x != nil { + return x.Workflows + } + return nil +} + +// Terminate call request +// +// When this request is received, all pipelines in state other than done +// receive 'stop' termination request +// +// Arguments: +// - wf_id = [required] Workflow to terminate. +// - requester_id = [required] The user who requested termination. +// +// Preconditions: +// - Workflow with wf_id exists. +// +// Postconditions: +// All pipelines in state other than done received 'stop' termination request. +// +// Idempotency: +type TerminateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + WfId string `protobuf:"bytes,3,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateRequest) Reset() { + *x = TerminateRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateRequest) ProtoMessage() {} + +func (x *TerminateRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateRequest.ProtoReflect.Descriptor instead. +func (*TerminateRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{19} +} + +func (x *TerminateRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *TerminateRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +// Terminate call response +// +// Response: +// - status = [required] contains google.rpc.Code: +// OK = Workflow exists. Request propagated to pipelines. +// FAILED_PRECONDITION = Workflow with given wf_id was not found. +type TerminateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateResponse) Reset() { + *x = TerminateResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateResponse) ProtoMessage() {} + +func (x *TerminateResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateResponse.ProtoReflect.Descriptor instead. +func (*TerminateResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{20} +} + +func (x *TerminateResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// ListLabels call request +// +// Synchronous operation. +// Returns paginated details of all labels in given project +// +// Arguments: +// - page = [optional, default = 1] Serial number of wanted page with ListLabels call result. +// - page_size = [optional, default = 30] Number of labels per page of ListLabels call result. +// - project_id = [required] Id of project whose labels should be returned. +// +// Preconditions: +// +// Postconditions: +// +// Idempotency: +type ListLabelsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLabelsRequest) Reset() { + *x = ListLabelsRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLabelsRequest) ProtoMessage() {} + +func (x *ListLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLabelsRequest.ProtoReflect.Descriptor instead. +func (*ListLabelsRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{21} +} + +func (x *ListLabelsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListLabelsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListLabelsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// ListLabels call response +// +// Response: +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// INVALID_ARGUMENT = Request is rejected because requested +// project_id does not exist. +// - labels = [required] list of labels +// - page_number = [required] Serial number of returned page with label search results +// - page_size = [required] Number of label per page +// - total_entries = [required] Total number of label for given project and branch +// - total_pages = [required] Total number of pages with label search results +type ListLabelsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Labels []string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` + PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,5,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,6,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLabelsResponse) Reset() { + *x = ListLabelsResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLabelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLabelsResponse) ProtoMessage() {} + +func (x *ListLabelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLabelsResponse.ProtoReflect.Descriptor instead. +func (*ListLabelsResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{22} +} + +func (x *ListLabelsResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListLabelsResponse) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *ListLabelsResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *ListLabelsResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListLabelsResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *ListLabelsResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// Reschedule call request +// +// Asynchronous operation. +// +// Arguments: +// - wf_id = [required] Workflow to reschedule +// - requester_id = [required] Id of the user who requested calld the operation +// - request_token = [required] Idempotency thing, unique string +// +// Preconditions: +// - wf_id is id of existing workflow +// - requester_id is id of existing user +// +// Postconditions: +// - New workflow is created +// +// Idempotency: +// If request with the same request_token was previously received, +// do not create new workflow, just return ids of the workflow created for the +// previous request +type RescheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + RequestToken string `protobuf:"bytes,3,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RescheduleRequest) Reset() { + *x = RescheduleRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RescheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RescheduleRequest) ProtoMessage() {} + +func (x *RescheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RescheduleRequest.ProtoReflect.Descriptor instead. +func (*RescheduleRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{23} +} + +func (x *RescheduleRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *RescheduleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *RescheduleRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +// GetProjectId call request +// +// Synchronous operation. +// Returns project_id for workflow with given wf_id. +// That project_id can later be used for authorization etc. +// +// Arguments: +// - wf_id = [required] Workflow for which project_id is needed. +// +// Preconditions: +// - Workflow scheduling request for 'wf_id' was accepted. +// +// Postconditions: +// +// Idempotency: +type GetProjectIdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectIdRequest) Reset() { + *x = GetProjectIdRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectIdRequest) ProtoMessage() {} + +func (x *GetProjectIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectIdRequest.ProtoReflect.Descriptor instead. +func (*GetProjectIdRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{24} +} + +func (x *GetProjectIdRequest) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +// GetProjectId call response +// +// Response: +// - project_id = [required] Id of project on Semaphore. +// - status = [required] contains google.rpc.Code: +// OK = Response contains valid data in other fields. +// INVALID_ARGUMENT = Request is rejected because workflow with +// given wf_id does not exist +type GetProjectIdResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectIdResponse) Reset() { + *x = GetProjectIdResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectIdResponse) ProtoMessage() {} + +func (x *GetProjectIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectIdResponse.ProtoReflect.Descriptor instead. +func (*GetProjectIdResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{25} +} + +func (x *GetProjectIdResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *GetProjectIdResponse) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Create call request +// +// Arguments: +// - project_id = [required] Id of project on Semaphore. +// - label = [required] Used to group/organize workflows. +// - hook_id = [required] Originally generated by listener_proxy. +// Ties the create-request to triggering listener. +// - request_token = [required] unique string, see Idempotency +// - definition_key = [optional] Key to blob containing initial pipeline definition. +// - requester_id = [required] The user who created workflow. +// +// Preconditions: +// - hook_id value is previously generated by listener_proxy +// - request_token has to be unique for every workflow, see Idempotency +// +// Postconditions: +// - ResponseCode +// - OK => +// - Workflow with request_token is created or was previously created. +// - If workflow is created => pipeline with the same request_token is also scheduled. +// - wf_id is returned either way. +// - otherwise => +// - Pipeline with request_token is NOT scheduled. Error is returned. +// +// Idempotency: +// - When schedule request is received, request_token is checked first. +// If workflow with the same request_token is already created: +// - OK and previously generated wf_id are returned, +// without creating new workflow. +// - Other parameters are not checked; they are assumed to be the same. +type CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + HookId string `protobuf:"bytes,3,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + RequestToken string `protobuf:"bytes,4,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` + DefinitionFile string `protobuf:"bytes,5,opt,name=definition_file,json=definitionFile,proto3" json:"definition_file,omitempty"` + RequesterId string `protobuf:"bytes,6,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *CreateRequest) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *CreateRequest) GetRequestToken() string { + if x != nil { + return x.RequestToken + } + return "" +} + +func (x *CreateRequest) GetDefinitionFile() string { + if x != nil { + return x.DefinitionFile + } + return "" +} + +func (x *CreateRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +// Create call response +// +// Response: +// - status = [required] contains google.rpc.Code: +// OK = Workflow exists and is available for Describe call. +// INVALID_ARGUMENT = Workflow request is rejected because of +// malformed request. +// - wf_id = [required if OK] workflow id +// - ppl_id = [required if OK] id of initial pipeline in workflow +type CreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + WfId string `protobuf:"bytes,1,opt,name=wf_id,json=wfId,proto3" json:"wf_id,omitempty"` + Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + PplId string `protobuf:"bytes,3,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{27} +} + +func (x *CreateResponse) GetWfId() string { + if x != nil { + return x.WfId + } + return "" +} + +func (x *CreateResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *CreateResponse) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +type ScheduleRequest_Repo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + RepoName string `protobuf:"bytes,2,opt,name=repo_name,json=repoName,proto3" json:"repo_name,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + CommitSha string `protobuf:"bytes,5,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + RepositoryId string `protobuf:"bytes,6,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` // currently required only for bitbucket projects + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest_Repo) Reset() { + *x = ScheduleRequest_Repo{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest_Repo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest_Repo) ProtoMessage() {} + +func (x *ScheduleRequest_Repo) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest_Repo.ProtoReflect.Descriptor instead. +func (*ScheduleRequest_Repo) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ScheduleRequest_Repo) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *ScheduleRequest_Repo) GetRepoName() string { + if x != nil { + return x.RepoName + } + return "" +} + +func (x *ScheduleRequest_Repo) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *ScheduleRequest_Repo) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +func (x *ScheduleRequest_Repo) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +// Environment variables passed to scheduled pipeline +// +// - name = [required] name of the variable +// - value = [required] value of the variable +type ScheduleRequest_EnvVar struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleRequest_EnvVar) Reset() { + *x = ScheduleRequest_EnvVar{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleRequest_EnvVar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleRequest_EnvVar) ProtoMessage() {} + +func (x *ScheduleRequest_EnvVar) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleRequest_EnvVar.ProtoReflect.Descriptor instead. +func (*ScheduleRequest_EnvVar) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ScheduleRequest_EnvVar) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ScheduleRequest_EnvVar) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// PathElement structure +// Contains pipeline identifier and additional data useful for rendering. +// +// Fields: +// - ppl_id = [required] Pipeline id (unique) of the pipeline on the path. +// - switch_id = [optional if pipeline has promotions] Switch id (unique). +// - rebuild_partition = [required, list] The pipelines in the workflow can be +// partitioned in n non-overlapping subsets, +// each containing pipelines partially rebuilt from each other. +// This field contains chronologically ordered list of pipeline ids, +// from subset containing ppl_id pipeline. +type GetPathResponse_PathElement struct { + state protoimpl.MessageState `protogen:"open.v1"` + PplId string `protobuf:"bytes,1,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + SwitchId string `protobuf:"bytes,2,opt,name=switch_id,json=switchId,proto3" json:"switch_id,omitempty"` + RebuildPartition []string `protobuf:"bytes,3,rep,name=rebuild_partition,json=rebuildPartition,proto3" json:"rebuild_partition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPathResponse_PathElement) Reset() { + *x = GetPathResponse_PathElement{} + mi := &file_plumber_w_f_workflow_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPathResponse_PathElement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPathResponse_PathElement) ProtoMessage() {} + +func (x *GetPathResponse_PathElement) ProtoReflect() protoreflect.Message { + mi := &file_plumber_w_f_workflow_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPathResponse_PathElement.ProtoReflect.Descriptor instead. +func (*GetPathResponse_PathElement) Descriptor() ([]byte, []int) { + return file_plumber_w_f_workflow_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *GetPathResponse_PathElement) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *GetPathResponse_PathElement) GetSwitchId() string { + if x != nil { + return x.SwitchId + } + return "" +} + +func (x *GetPathResponse_PathElement) GetRebuildPartition() []string { + if x != nil { + return x.RebuildPartition + } + return nil +} + +var File_plumber_w_f_workflow_proto protoreflect.FileDescriptor + +var file_plumber_w_f_workflow_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x5f, 0x66, 0x2e, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x57, 0x46, 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, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x8f, 0x08, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x04, 0x72, 0x65, + 0x70, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x45, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, + 0x42, 0x79, 0x52, 0x0b, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, + 0x2a, 0x0a, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x08, 0x65, + 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x07, 0x65, 0x6e, + 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, + 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x69, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x1a, 0x9e, 0x01, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x49, 0x64, 0x1a, 0x32, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x57, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x49, 0x54, 0x5f, 0x48, + 0x55, 0x42, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x0d, 0x0a, + 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, + 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x49, 0x54, 0x10, + 0x05, 0x22, 0x6b, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x22, 0x67, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x70, + 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x50, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, + 0x73, 0x74, 0x50, 0x70, 0x6c, 0x49, 0x64, 0x22, 0xcb, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x77, + 0x66, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, + 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x66, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 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, 0x0b, 0x77, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x46, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x6e, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x03, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x59, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0d, + 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x69, 0x74, 0x52, + 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x15, + 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x22, 0x23, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x22, 0xbb, 0x01, 0x0a, + 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc2, 0x03, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, 0x53, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x53, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, + 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x45, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, + 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x52, 0x65, + 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x15, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x22, 0x23, 0x0a, 0x09, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x22, + 0xb5, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, + 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x57, 0x46, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb5, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x53, + 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x65, + 0x64, 0x42, 0x79, 0x12, 0x45, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x67, + 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x0a, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, + 0x43, 0x48, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x22, + 0x8c, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0xcc, + 0x03, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x0e, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, + 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, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, + 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x18, 0x09, 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, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x45, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, + 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x67, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x85, 0x02, + 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0xa7, 0x06, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x44, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 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, 0x0d, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x0d, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x09, 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, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x12, 0x45, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x67, + 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0a, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x65, 0x64, 0x42, 0x79, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x72, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x22, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x15, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x22, 0x23, 0x0a, 0x09, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x22, + 0xdf, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xef, 0x03, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x70, 0x6c, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, + 0x46, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x52, 0x0b, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, + 0x72, 0x75, 0x6e, 0x5f, 0x6f, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x72, 0x75, 0x6e, 0x4f, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x10, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, + 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x22, 0x2c, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x77, 0x66, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x77, 0x66, 0x49, 0x64, 0x73, 0x22, + 0x89, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x54, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0xdd, + 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0x70, + 0x0a, 0x11, 0x52, 0x65, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x2a, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x22, 0xce, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x22, 0x69, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x77, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x77, 0x66, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x2a, 0x3e, 0x0a, 0x0b, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x48, + 0x4f, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, + 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, + 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x03, 0x2a, 0x29, 0x0a, 0x0a, + 0x47, 0x69, 0x74, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, + 0x41, 0x4e, 0x43, 0x48, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x01, 0x12, + 0x06, 0x0a, 0x02, 0x50, 0x52, 0x10, 0x02, 0x32, 0xf6, 0x0a, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x08, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, + 0x74, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x65, 0x64, 0x12, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, 0x53, 0x12, 0x2b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, + 0x64, 0x4b, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x4b, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, + 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x12, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0c, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, + 0x61, 0x6e, 0x79, 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x09, + 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, + 0x46, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0a, + 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5f, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x28, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x52, 0x65, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x67, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x12, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x57, 0x46, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x46, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, + 0x46, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x53, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, + 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x5f, 0x66, 0x2e, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_plumber_w_f_workflow_proto_rawDescOnce sync.Once + file_plumber_w_f_workflow_proto_rawDescData = file_plumber_w_f_workflow_proto_rawDesc +) + +func file_plumber_w_f_workflow_proto_rawDescGZIP() []byte { + file_plumber_w_f_workflow_proto_rawDescOnce.Do(func() { + file_plumber_w_f_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_plumber_w_f_workflow_proto_rawDescData) + }) + return file_plumber_w_f_workflow_proto_rawDescData +} + +var file_plumber_w_f_workflow_proto_enumTypes = make([]protoimpl.EnumInfo, 10) +var file_plumber_w_f_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_plumber_w_f_workflow_proto_goTypes = []any{ + (TriggeredBy)(0), // 0: InternalApi.PlumberWF.TriggeredBy + (GitRefType)(0), // 1: InternalApi.PlumberWF.GitRefType + (ScheduleRequest_ServiceType)(0), // 2: InternalApi.PlumberWF.ScheduleRequest.ServiceType + (ListLatestWorkflowsRequest_Order)(0), // 3: InternalApi.PlumberWF.ListLatestWorkflowsRequest.Order + (ListLatestWorkflowsRequest_Direction)(0), // 4: InternalApi.PlumberWF.ListLatestWorkflowsRequest.Direction + (ListGroupedKSRequest_Order)(0), // 5: InternalApi.PlumberWF.ListGroupedKSRequest.Order + (ListGroupedKSRequest_Direction)(0), // 6: InternalApi.PlumberWF.ListGroupedKSRequest.Direction + (ListGroupedRequest_SourceType)(0), // 7: InternalApi.PlumberWF.ListGroupedRequest.SourceType + (ListKeysetRequest_Order)(0), // 8: InternalApi.PlumberWF.ListKeysetRequest.Order + (ListKeysetRequest_Direction)(0), // 9: InternalApi.PlumberWF.ListKeysetRequest.Direction + (*ScheduleRequest)(nil), // 10: InternalApi.PlumberWF.ScheduleRequest + (*ScheduleResponse)(nil), // 11: InternalApi.PlumberWF.ScheduleResponse + (*GetPathRequest)(nil), // 12: InternalApi.PlumberWF.GetPathRequest + (*GetPathResponse)(nil), // 13: InternalApi.PlumberWF.GetPathResponse + (*ListLatestWorkflowsRequest)(nil), // 14: InternalApi.PlumberWF.ListLatestWorkflowsRequest + (*ListLatestWorkflowsResponse)(nil), // 15: InternalApi.PlumberWF.ListLatestWorkflowsResponse + (*ListGroupedKSRequest)(nil), // 16: InternalApi.PlumberWF.ListGroupedKSRequest + (*ListGroupedKSResponse)(nil), // 17: InternalApi.PlumberWF.ListGroupedKSResponse + (*ListGroupedRequest)(nil), // 18: InternalApi.PlumberWF.ListGroupedRequest + (*ListGroupedResponse)(nil), // 19: InternalApi.PlumberWF.ListGroupedResponse + (*ListRequest)(nil), // 20: InternalApi.PlumberWF.ListRequest + (*ListResponse)(nil), // 21: InternalApi.PlumberWF.ListResponse + (*ListKeysetRequest)(nil), // 22: InternalApi.PlumberWF.ListKeysetRequest + (*ListKeysetResponse)(nil), // 23: InternalApi.PlumberWF.ListKeysetResponse + (*WorkflowDetails)(nil), // 24: InternalApi.PlumberWF.WorkflowDetails + (*DescribeRequest)(nil), // 25: InternalApi.PlumberWF.DescribeRequest + (*DescribeResponse)(nil), // 26: InternalApi.PlumberWF.DescribeResponse + (*DescribeManyRequest)(nil), // 27: InternalApi.PlumberWF.DescribeManyRequest + (*DescribeManyResponse)(nil), // 28: InternalApi.PlumberWF.DescribeManyResponse + (*TerminateRequest)(nil), // 29: InternalApi.PlumberWF.TerminateRequest + (*TerminateResponse)(nil), // 30: InternalApi.PlumberWF.TerminateResponse + (*ListLabelsRequest)(nil), // 31: InternalApi.PlumberWF.ListLabelsRequest + (*ListLabelsResponse)(nil), // 32: InternalApi.PlumberWF.ListLabelsResponse + (*RescheduleRequest)(nil), // 33: InternalApi.PlumberWF.RescheduleRequest + (*GetProjectIdRequest)(nil), // 34: InternalApi.PlumberWF.GetProjectIdRequest + (*GetProjectIdResponse)(nil), // 35: InternalApi.PlumberWF.GetProjectIdResponse + (*CreateRequest)(nil), // 36: InternalApi.PlumberWF.CreateRequest + (*CreateResponse)(nil), // 37: InternalApi.PlumberWF.CreateResponse + (*ScheduleRequest_Repo)(nil), // 38: InternalApi.PlumberWF.ScheduleRequest.Repo + (*ScheduleRequest_EnvVar)(nil), // 39: InternalApi.PlumberWF.ScheduleRequest.EnvVar + (*GetPathResponse_PathElement)(nil), // 40: InternalApi.PlumberWF.GetPathResponse.PathElement + (*status.Status)(nil), // 41: InternalApi.Status + (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp +} +var file_plumber_w_f_workflow_proto_depIdxs = []int32{ + 2, // 0: InternalApi.PlumberWF.ScheduleRequest.service:type_name -> InternalApi.PlumberWF.ScheduleRequest.ServiceType + 38, // 1: InternalApi.PlumberWF.ScheduleRequest.repo:type_name -> InternalApi.PlumberWF.ScheduleRequest.Repo + 0, // 2: InternalApi.PlumberWF.ScheduleRequest.triggered_by:type_name -> InternalApi.PlumberWF.TriggeredBy + 39, // 3: InternalApi.PlumberWF.ScheduleRequest.env_vars:type_name -> InternalApi.PlumberWF.ScheduleRequest.EnvVar + 41, // 4: InternalApi.PlumberWF.ScheduleResponse.status:type_name -> InternalApi.Status + 42, // 5: InternalApi.PlumberWF.GetPathResponse.wf_created_at:type_name -> google.protobuf.Timestamp + 40, // 6: InternalApi.PlumberWF.GetPathResponse.path:type_name -> InternalApi.PlumberWF.GetPathResponse.PathElement + 41, // 7: InternalApi.PlumberWF.GetPathResponse.status:type_name -> InternalApi.Status + 3, // 8: InternalApi.PlumberWF.ListLatestWorkflowsRequest.order:type_name -> InternalApi.PlumberWF.ListLatestWorkflowsRequest.Order + 4, // 9: InternalApi.PlumberWF.ListLatestWorkflowsRequest.direction:type_name -> InternalApi.PlumberWF.ListLatestWorkflowsRequest.Direction + 1, // 10: InternalApi.PlumberWF.ListLatestWorkflowsRequest.git_ref_types:type_name -> InternalApi.PlumberWF.GitRefType + 24, // 11: InternalApi.PlumberWF.ListLatestWorkflowsResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 5, // 12: InternalApi.PlumberWF.ListGroupedKSRequest.order:type_name -> InternalApi.PlumberWF.ListGroupedKSRequest.Order + 6, // 13: InternalApi.PlumberWF.ListGroupedKSRequest.direction:type_name -> InternalApi.PlumberWF.ListGroupedKSRequest.Direction + 1, // 14: InternalApi.PlumberWF.ListGroupedKSRequest.git_ref_types:type_name -> InternalApi.PlumberWF.GitRefType + 24, // 15: InternalApi.PlumberWF.ListGroupedKSResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 7, // 16: InternalApi.PlumberWF.ListGroupedRequest.grouped_by:type_name -> InternalApi.PlumberWF.ListGroupedRequest.SourceType + 1, // 17: InternalApi.PlumberWF.ListGroupedRequest.git_ref_types:type_name -> InternalApi.PlumberWF.GitRefType + 41, // 18: InternalApi.PlumberWF.ListGroupedResponse.status:type_name -> InternalApi.Status + 24, // 19: InternalApi.PlumberWF.ListGroupedResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 42, // 20: InternalApi.PlumberWF.ListRequest.created_before:type_name -> google.protobuf.Timestamp + 42, // 21: InternalApi.PlumberWF.ListRequest.created_after:type_name -> google.protobuf.Timestamp + 1, // 22: InternalApi.PlumberWF.ListRequest.git_ref_types:type_name -> InternalApi.PlumberWF.GitRefType + 41, // 23: InternalApi.PlumberWF.ListResponse.status:type_name -> InternalApi.Status + 24, // 24: InternalApi.PlumberWF.ListResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 8, // 25: InternalApi.PlumberWF.ListKeysetRequest.order:type_name -> InternalApi.PlumberWF.ListKeysetRequest.Order + 42, // 26: InternalApi.PlumberWF.ListKeysetRequest.created_before:type_name -> google.protobuf.Timestamp + 42, // 27: InternalApi.PlumberWF.ListKeysetRequest.created_after:type_name -> google.protobuf.Timestamp + 1, // 28: InternalApi.PlumberWF.ListKeysetRequest.git_ref_types:type_name -> InternalApi.PlumberWF.GitRefType + 9, // 29: InternalApi.PlumberWF.ListKeysetRequest.direction:type_name -> InternalApi.PlumberWF.ListKeysetRequest.Direction + 0, // 30: InternalApi.PlumberWF.ListKeysetRequest.triggerers:type_name -> InternalApi.PlumberWF.TriggeredBy + 41, // 31: InternalApi.PlumberWF.ListKeysetResponse.status:type_name -> InternalApi.Status + 24, // 32: InternalApi.PlumberWF.ListKeysetResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 42, // 33: InternalApi.PlumberWF.WorkflowDetails.created_at:type_name -> google.protobuf.Timestamp + 0, // 34: InternalApi.PlumberWF.WorkflowDetails.triggered_by:type_name -> InternalApi.PlumberWF.TriggeredBy + 41, // 35: InternalApi.PlumberWF.DescribeResponse.status:type_name -> InternalApi.Status + 24, // 36: InternalApi.PlumberWF.DescribeResponse.workflow:type_name -> InternalApi.PlumberWF.WorkflowDetails + 41, // 37: InternalApi.PlumberWF.DescribeManyResponse.status:type_name -> InternalApi.Status + 24, // 38: InternalApi.PlumberWF.DescribeManyResponse.workflows:type_name -> InternalApi.PlumberWF.WorkflowDetails + 41, // 39: InternalApi.PlumberWF.TerminateResponse.status:type_name -> InternalApi.Status + 41, // 40: InternalApi.PlumberWF.ListLabelsResponse.status:type_name -> InternalApi.Status + 41, // 41: InternalApi.PlumberWF.GetProjectIdResponse.status:type_name -> InternalApi.Status + 41, // 42: InternalApi.PlumberWF.CreateResponse.status:type_name -> InternalApi.Status + 10, // 43: InternalApi.PlumberWF.WorkflowService.Schedule:input_type -> InternalApi.PlumberWF.ScheduleRequest + 12, // 44: InternalApi.PlumberWF.WorkflowService.GetPath:input_type -> InternalApi.PlumberWF.GetPathRequest + 20, // 45: InternalApi.PlumberWF.WorkflowService.List:input_type -> InternalApi.PlumberWF.ListRequest + 22, // 46: InternalApi.PlumberWF.WorkflowService.ListKeyset:input_type -> InternalApi.PlumberWF.ListKeysetRequest + 18, // 47: InternalApi.PlumberWF.WorkflowService.ListGrouped:input_type -> InternalApi.PlumberWF.ListGroupedRequest + 16, // 48: InternalApi.PlumberWF.WorkflowService.ListGroupedKS:input_type -> InternalApi.PlumberWF.ListGroupedKSRequest + 14, // 49: InternalApi.PlumberWF.WorkflowService.ListLatestWorkflows:input_type -> InternalApi.PlumberWF.ListLatestWorkflowsRequest + 25, // 50: InternalApi.PlumberWF.WorkflowService.Describe:input_type -> InternalApi.PlumberWF.DescribeRequest + 27, // 51: InternalApi.PlumberWF.WorkflowService.DescribeMany:input_type -> InternalApi.PlumberWF.DescribeManyRequest + 29, // 52: InternalApi.PlumberWF.WorkflowService.Terminate:input_type -> InternalApi.PlumberWF.TerminateRequest + 31, // 53: InternalApi.PlumberWF.WorkflowService.ListLabels:input_type -> InternalApi.PlumberWF.ListLabelsRequest + 33, // 54: InternalApi.PlumberWF.WorkflowService.Reschedule:input_type -> InternalApi.PlumberWF.RescheduleRequest + 34, // 55: InternalApi.PlumberWF.WorkflowService.GetProjectId:input_type -> InternalApi.PlumberWF.GetProjectIdRequest + 36, // 56: InternalApi.PlumberWF.WorkflowService.Create:input_type -> InternalApi.PlumberWF.CreateRequest + 11, // 57: InternalApi.PlumberWF.WorkflowService.Schedule:output_type -> InternalApi.PlumberWF.ScheduleResponse + 13, // 58: InternalApi.PlumberWF.WorkflowService.GetPath:output_type -> InternalApi.PlumberWF.GetPathResponse + 21, // 59: InternalApi.PlumberWF.WorkflowService.List:output_type -> InternalApi.PlumberWF.ListResponse + 23, // 60: InternalApi.PlumberWF.WorkflowService.ListKeyset:output_type -> InternalApi.PlumberWF.ListKeysetResponse + 19, // 61: InternalApi.PlumberWF.WorkflowService.ListGrouped:output_type -> InternalApi.PlumberWF.ListGroupedResponse + 17, // 62: InternalApi.PlumberWF.WorkflowService.ListGroupedKS:output_type -> InternalApi.PlumberWF.ListGroupedKSResponse + 15, // 63: InternalApi.PlumberWF.WorkflowService.ListLatestWorkflows:output_type -> InternalApi.PlumberWF.ListLatestWorkflowsResponse + 26, // 64: InternalApi.PlumberWF.WorkflowService.Describe:output_type -> InternalApi.PlumberWF.DescribeResponse + 28, // 65: InternalApi.PlumberWF.WorkflowService.DescribeMany:output_type -> InternalApi.PlumberWF.DescribeManyResponse + 30, // 66: InternalApi.PlumberWF.WorkflowService.Terminate:output_type -> InternalApi.PlumberWF.TerminateResponse + 32, // 67: InternalApi.PlumberWF.WorkflowService.ListLabels:output_type -> InternalApi.PlumberWF.ListLabelsResponse + 11, // 68: InternalApi.PlumberWF.WorkflowService.Reschedule:output_type -> InternalApi.PlumberWF.ScheduleResponse + 35, // 69: InternalApi.PlumberWF.WorkflowService.GetProjectId:output_type -> InternalApi.PlumberWF.GetProjectIdResponse + 37, // 70: InternalApi.PlumberWF.WorkflowService.Create:output_type -> InternalApi.PlumberWF.CreateResponse + 57, // [57:71] is the sub-list for method output_type + 43, // [43:57] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name +} + +func init() { file_plumber_w_f_workflow_proto_init() } +func file_plumber_w_f_workflow_proto_init() { + if File_plumber_w_f_workflow_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_plumber_w_f_workflow_proto_rawDesc, + NumEnums: 10, + NumMessages: 31, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plumber_w_f_workflow_proto_goTypes, + DependencyIndexes: file_plumber_w_f_workflow_proto_depIdxs, + EnumInfos: file_plumber_w_f_workflow_proto_enumTypes, + MessageInfos: file_plumber_w_f_workflow_proto_msgTypes, + }.Build() + File_plumber_w_f_workflow_proto = out.File + file_plumber_w_f_workflow_proto_rawDesc = nil + file_plumber_w_f_workflow_proto_goTypes = nil + file_plumber_w_f_workflow_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow_grpc.pb.go b/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow_grpc.pb.go new file mode 100644 index 000000000..02ea3badc --- /dev/null +++ b/mcp_server/pkg/internal_api/plumber_w_f.workflow/plumber_w_f.workflow_grpc.pb.go @@ -0,0 +1,693 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: plumber_w_f.workflow.proto + +package plumber_w_f_workflow + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + WorkflowService_Schedule_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/Schedule" + WorkflowService_GetPath_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/GetPath" + WorkflowService_List_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/List" + WorkflowService_ListKeyset_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/ListKeyset" + WorkflowService_ListGrouped_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/ListGrouped" + WorkflowService_ListGroupedKS_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/ListGroupedKS" + WorkflowService_ListLatestWorkflows_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/ListLatestWorkflows" + WorkflowService_Describe_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/Describe" + WorkflowService_DescribeMany_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/DescribeMany" + WorkflowService_Terminate_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/Terminate" + WorkflowService_ListLabels_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/ListLabels" + WorkflowService_Reschedule_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/Reschedule" + WorkflowService_GetProjectId_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/GetProjectId" + WorkflowService_Create_FullMethodName = "/InternalApi.PlumberWF.WorkflowService/Create" +) + +// WorkflowServiceClient is the client API for WorkflowService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Pipeline service API specification. +type WorkflowServiceClient interface { + // Operation is called to create new workflow and to schedule pipeline run in it. + // Operation is asynchronous and idempotent. + Schedule(ctx context.Context, in *ScheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) + // Operation is called to get the workflow path - list of sequential pipelines. + // Operation is synchronous. + GetPath(ctx context.Context, in *GetPathRequest, opts ...grpc.CallOption) (*GetPathResponse, error) + // DEPRECATED - uses offset based pagination that does not scale + // + // Operation is called to get all workflows which match given search parameters. + // Operation is synchronous. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + // Operation is called to get all workflows which match given search parameters. + // Results are paginated using keyset instead of offset. + // Operation is synchronous. + ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Operation is synchronous. + ListGrouped(ctx context.Context, in *ListGroupedRequest, opts ...grpc.CallOption) (*ListGroupedResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Results are paginated using keyset instead of offset pagination. + // Operation is synchronous. + ListGroupedKS(ctx context.Context, in *ListGroupedKSRequest, opts ...grpc.CallOption) (*ListGroupedKSResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Results are paginated using keyset instead of offset pagination. + // Operation is synchronous. + // + // Note: In contrast with ListGroupedKS, ListLatestWorkflows is optimized for speed. + ListLatestWorkflows(ctx context.Context, in *ListLatestWorkflowsRequest, opts ...grpc.CallOption) (*ListLatestWorkflowsResponse, error) + // Operation is called to get details of previously scheduled workflow. + // Operation is synchronous. + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + // Operation is called to get details of previously scheduled workflows. + // Operation is synchronous. + DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) + // Operation is called to stop all currently active pipelines in the workflow. + // Operation is asynchronous and idempotent. + Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error) + // Operation is called to get all labels in a project. + // Operation is synchronous. + ListLabels(ctx context.Context, in *ListLabelsRequest, opts ...grpc.CallOption) (*ListLabelsResponse, error) + // Operation is called to schedule new workflow based on already existing, + // probably failed workflow. + // Operation is asynchronous and idempotent. + Reschedule(ctx context.Context, in *RescheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) + // Operation is called to get project_id for workflow with given wf_id + // Operation is synchronous. + GetProjectId(ctx context.Context, in *GetProjectIdRequest, opts ...grpc.CallOption) (*GetProjectIdResponse, error) + // This is early stage prototype. + // This call is intended to replace Schedule. It creates workflow. + // This operation is called by listener_proxy. + // Operation is asynchronous and idempotent. + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) +} + +type workflowServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkflowServiceClient(cc grpc.ClientConnInterface) WorkflowServiceClient { + return &workflowServiceClient{cc} +} + +func (c *workflowServiceClient) Schedule(ctx context.Context, in *ScheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ScheduleResponse) + err := c.cc.Invoke(ctx, WorkflowService_Schedule_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) GetPath(ctx context.Context, in *GetPathRequest, opts ...grpc.CallOption) (*GetPathResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPathResponse) + err := c.cc.Invoke(ctx, WorkflowService_GetPath_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, WorkflowService_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListKeysetResponse) + err := c.cc.Invoke(ctx, WorkflowService_ListKeyset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListGrouped(ctx context.Context, in *ListGroupedRequest, opts ...grpc.CallOption) (*ListGroupedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListGroupedResponse) + err := c.cc.Invoke(ctx, WorkflowService_ListGrouped_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListGroupedKS(ctx context.Context, in *ListGroupedKSRequest, opts ...grpc.CallOption) (*ListGroupedKSResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListGroupedKSResponse) + err := c.cc.Invoke(ctx, WorkflowService_ListGroupedKS_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListLatestWorkflows(ctx context.Context, in *ListLatestWorkflowsRequest, opts ...grpc.CallOption) (*ListLatestWorkflowsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListLatestWorkflowsResponse) + err := c.cc.Invoke(ctx, WorkflowService_ListLatestWorkflows_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, WorkflowService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeManyResponse) + err := c.cc.Invoke(ctx, WorkflowService_DescribeMany_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TerminateResponse) + err := c.cc.Invoke(ctx, WorkflowService_Terminate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListLabels(ctx context.Context, in *ListLabelsRequest, opts ...grpc.CallOption) (*ListLabelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListLabelsResponse) + err := c.cc.Invoke(ctx, WorkflowService_ListLabels_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) Reschedule(ctx context.Context, in *RescheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ScheduleResponse) + err := c.cc.Invoke(ctx, WorkflowService_Reschedule_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) GetProjectId(ctx context.Context, in *GetProjectIdRequest, opts ...grpc.CallOption) (*GetProjectIdResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProjectIdResponse) + err := c.cc.Invoke(ctx, WorkflowService_GetProjectId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateResponse) + err := c.cc.Invoke(ctx, WorkflowService_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkflowServiceServer is the server API for WorkflowService service. +// All implementations should embed UnimplementedWorkflowServiceServer +// for forward compatibility. +// +// Pipeline service API specification. +type WorkflowServiceServer interface { + // Operation is called to create new workflow and to schedule pipeline run in it. + // Operation is asynchronous and idempotent. + Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error) + // Operation is called to get the workflow path - list of sequential pipelines. + // Operation is synchronous. + GetPath(context.Context, *GetPathRequest) (*GetPathResponse, error) + // DEPRECATED - uses offset based pagination that does not scale + // + // Operation is called to get all workflows which match given search parameters. + // Operation is synchronous. + List(context.Context, *ListRequest) (*ListResponse, error) + // Operation is called to get all workflows which match given search parameters. + // Results are paginated using keyset instead of offset. + // Operation is synchronous. + ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Operation is synchronous. + ListGrouped(context.Context, *ListGroupedRequest) (*ListGroupedResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Results are paginated using keyset instead of offset pagination. + // Operation is synchronous. + ListGroupedKS(context.Context, *ListGroupedKSRequest) (*ListGroupedKSResponse, error) + // Operation is called to get one latest workflow per branch/tag/pull request. + // Results are paginated using keyset instead of offset pagination. + // Operation is synchronous. + // + // Note: In contrast with ListGroupedKS, ListLatestWorkflows is optimized for speed. + ListLatestWorkflows(context.Context, *ListLatestWorkflowsRequest) (*ListLatestWorkflowsResponse, error) + // Operation is called to get details of previously scheduled workflow. + // Operation is synchronous. + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + // Operation is called to get details of previously scheduled workflows. + // Operation is synchronous. + DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) + // Operation is called to stop all currently active pipelines in the workflow. + // Operation is asynchronous and idempotent. + Terminate(context.Context, *TerminateRequest) (*TerminateResponse, error) + // Operation is called to get all labels in a project. + // Operation is synchronous. + ListLabels(context.Context, *ListLabelsRequest) (*ListLabelsResponse, error) + // Operation is called to schedule new workflow based on already existing, + // probably failed workflow. + // Operation is asynchronous and idempotent. + Reschedule(context.Context, *RescheduleRequest) (*ScheduleResponse, error) + // Operation is called to get project_id for workflow with given wf_id + // Operation is synchronous. + GetProjectId(context.Context, *GetProjectIdRequest) (*GetProjectIdResponse, error) + // This is early stage prototype. + // This call is intended to replace Schedule. It creates workflow. + // This operation is called by listener_proxy. + // Operation is asynchronous and idempotent. + Create(context.Context, *CreateRequest) (*CreateResponse, error) +} + +// UnimplementedWorkflowServiceServer should 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 UnimplementedWorkflowServiceServer struct{} + +func (UnimplementedWorkflowServiceServer) Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Schedule not implemented") +} +func (UnimplementedWorkflowServiceServer) GetPath(context.Context, *GetPathRequest) (*GetPathResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPath not implemented") +} +func (UnimplementedWorkflowServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedWorkflowServiceServer) ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyset not implemented") +} +func (UnimplementedWorkflowServiceServer) ListGrouped(context.Context, *ListGroupedRequest) (*ListGroupedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGrouped not implemented") +} +func (UnimplementedWorkflowServiceServer) ListGroupedKS(context.Context, *ListGroupedKSRequest) (*ListGroupedKSResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGroupedKS not implemented") +} +func (UnimplementedWorkflowServiceServer) ListLatestWorkflows(context.Context, *ListLatestWorkflowsRequest) (*ListLatestWorkflowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLatestWorkflows not implemented") +} +func (UnimplementedWorkflowServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedWorkflowServiceServer) DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeMany not implemented") +} +func (UnimplementedWorkflowServiceServer) Terminate(context.Context, *TerminateRequest) (*TerminateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Terminate not implemented") +} +func (UnimplementedWorkflowServiceServer) ListLabels(context.Context, *ListLabelsRequest) (*ListLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLabels not implemented") +} +func (UnimplementedWorkflowServiceServer) Reschedule(context.Context, *RescheduleRequest) (*ScheduleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Reschedule not implemented") +} +func (UnimplementedWorkflowServiceServer) GetProjectId(context.Context, *GetProjectIdRequest) (*GetProjectIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProjectId not implemented") +} +func (UnimplementedWorkflowServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedWorkflowServiceServer) testEmbeddedByValue() {} + +// UnsafeWorkflowServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkflowServiceServer will +// result in compilation errors. +type UnsafeWorkflowServiceServer interface { + mustEmbedUnimplementedWorkflowServiceServer() +} + +func RegisterWorkflowServiceServer(s grpc.ServiceRegistrar, srv WorkflowServiceServer) { + // If the following call pancis, it indicates UnimplementedWorkflowServiceServer 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(&WorkflowService_ServiceDesc, srv) +} + +func _WorkflowService_Schedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).Schedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_Schedule_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).Schedule(ctx, req.(*ScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_GetPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPathRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_GetPath_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetPath(ctx, req.(*GetPathRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListKeyset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeysetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListKeyset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_ListKeyset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListKeyset(ctx, req.(*ListKeysetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListGrouped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListGrouped(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_ListGrouped_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListGrouped(ctx, req.(*ListGroupedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListGroupedKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupedKSRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListGroupedKS(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_ListGroupedKS_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListGroupedKS(ctx, req.(*ListGroupedKSRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListLatestWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLatestWorkflowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListLatestWorkflows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_ListLatestWorkflows_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListLatestWorkflows(ctx, req.(*ListLatestWorkflowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_DescribeMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).DescribeMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_DescribeMany_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).DescribeMany(ctx, req.(*DescribeManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_Terminate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).Terminate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_Terminate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).Terminate(ctx, req.(*TerminateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_ListLabels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListLabels(ctx, req.(*ListLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_Reschedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RescheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).Reschedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_Reschedule_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).Reschedule(ctx, req.(*RescheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_GetProjectId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProjectIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetProjectId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_GetProjectId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetProjectId(ctx, req.(*GetProjectIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WorkflowService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// WorkflowService_ServiceDesc is the grpc.ServiceDesc for WorkflowService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var WorkflowService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.PlumberWF.WorkflowService", + HandlerType: (*WorkflowServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Schedule", + Handler: _WorkflowService_Schedule_Handler, + }, + { + MethodName: "GetPath", + Handler: _WorkflowService_GetPath_Handler, + }, + { + MethodName: "List", + Handler: _WorkflowService_List_Handler, + }, + { + MethodName: "ListKeyset", + Handler: _WorkflowService_ListKeyset_Handler, + }, + { + MethodName: "ListGrouped", + Handler: _WorkflowService_ListGrouped_Handler, + }, + { + MethodName: "ListGroupedKS", + Handler: _WorkflowService_ListGroupedKS_Handler, + }, + { + MethodName: "ListLatestWorkflows", + Handler: _WorkflowService_ListLatestWorkflows_Handler, + }, + { + MethodName: "Describe", + Handler: _WorkflowService_Describe_Handler, + }, + { + MethodName: "DescribeMany", + Handler: _WorkflowService_DescribeMany_Handler, + }, + { + MethodName: "Terminate", + Handler: _WorkflowService_Terminate_Handler, + }, + { + MethodName: "ListLabels", + Handler: _WorkflowService_ListLabels_Handler, + }, + { + MethodName: "Reschedule", + Handler: _WorkflowService_Reschedule_Handler, + }, + { + MethodName: "GetProjectId", + Handler: _WorkflowService_GetProjectId_Handler, + }, + { + MethodName: "Create", + Handler: _WorkflowService_Create_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plumber_w_f.workflow.proto", +} diff --git a/mcp_server/pkg/internal_api/projecthub/projecthub.pb.go b/mcp_server/pkg/internal_api/projecthub/projecthub.pb.go new file mode 100644 index 000000000..77e4e5d1a --- /dev/null +++ b/mcp_server/pkg/internal_api/projecthub/projecthub.pb.go @@ -0,0 +1,5703 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: projecthub.proto + +package projecthub + +import ( + repository_integrator "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + user "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ResponseMeta_Code int32 + +const ( + ResponseMeta_OK ResponseMeta_Code = 0 + ResponseMeta_NOT_FOUND ResponseMeta_Code = 2 + ResponseMeta_FAILED_PRECONDITION ResponseMeta_Code = 3 +) + +// Enum value maps for ResponseMeta_Code. +var ( + ResponseMeta_Code_name = map[int32]string{ + 0: "OK", + 2: "NOT_FOUND", + 3: "FAILED_PRECONDITION", + } + ResponseMeta_Code_value = map[string]int32{ + "OK": 0, + "NOT_FOUND": 2, + "FAILED_PRECONDITION": 3, + } +) + +func (x ResponseMeta_Code) Enum() *ResponseMeta_Code { + p := new(ResponseMeta_Code) + *p = x + return p +} + +func (x ResponseMeta_Code) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResponseMeta_Code) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[0].Descriptor() +} + +func (ResponseMeta_Code) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[0] +} + +func (x ResponseMeta_Code) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResponseMeta_Code.Descriptor instead. +func (ResponseMeta_Code) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{1, 0} +} + +type Project_Spec_Visibility int32 + +const ( + Project_Spec_PRIVATE Project_Spec_Visibility = 0 + Project_Spec_PUBLIC Project_Spec_Visibility = 1 +) + +// Enum value maps for Project_Spec_Visibility. +var ( + Project_Spec_Visibility_name = map[int32]string{ + 0: "PRIVATE", + 1: "PUBLIC", + } + Project_Spec_Visibility_value = map[string]int32{ + "PRIVATE": 0, + "PUBLIC": 1, + } +) + +func (x Project_Spec_Visibility) Enum() *Project_Spec_Visibility { + p := new(Project_Spec_Visibility) + *p = x + return p +} + +func (x Project_Spec_Visibility) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_Visibility) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[1].Descriptor() +} + +func (Project_Spec_Visibility) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[1] +} + +func (x Project_Spec_Visibility) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_Visibility.Descriptor instead. +func (Project_Spec_Visibility) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0} +} + +type Project_Spec_PermissionType int32 + +const ( + Project_Spec_EMPTY Project_Spec_PermissionType = 0 + Project_Spec_DEFAULT_BRANCH Project_Spec_PermissionType = 1 + Project_Spec_NON_DEFAULT_BRANCH Project_Spec_PermissionType = 2 + Project_Spec_PULL_REQUEST Project_Spec_PermissionType = 3 + Project_Spec_FORKED_PULL_REQUEST Project_Spec_PermissionType = 4 + Project_Spec_TAG Project_Spec_PermissionType = 5 +) + +// Enum value maps for Project_Spec_PermissionType. +var ( + Project_Spec_PermissionType_name = map[int32]string{ + 0: "EMPTY", + 1: "DEFAULT_BRANCH", + 2: "NON_DEFAULT_BRANCH", + 3: "PULL_REQUEST", + 4: "FORKED_PULL_REQUEST", + 5: "TAG", + } + Project_Spec_PermissionType_value = map[string]int32{ + "EMPTY": 0, + "DEFAULT_BRANCH": 1, + "NON_DEFAULT_BRANCH": 2, + "PULL_REQUEST": 3, + "FORKED_PULL_REQUEST": 4, + "TAG": 5, + } +) + +func (x Project_Spec_PermissionType) Enum() *Project_Spec_PermissionType { + p := new(Project_Spec_PermissionType) + *p = x + return p +} + +func (x Project_Spec_PermissionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_PermissionType) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[2].Descriptor() +} + +func (Project_Spec_PermissionType) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[2] +} + +func (x Project_Spec_PermissionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_PermissionType.Descriptor instead. +func (Project_Spec_PermissionType) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 1} +} + +type Project_Spec_Repository_RunType int32 + +const ( + Project_Spec_Repository_BRANCHES Project_Spec_Repository_RunType = 0 + Project_Spec_Repository_TAGS Project_Spec_Repository_RunType = 1 + Project_Spec_Repository_PULL_REQUESTS Project_Spec_Repository_RunType = 2 + Project_Spec_Repository_FORKED_PULL_REQUESTS Project_Spec_Repository_RunType = 3 + Project_Spec_Repository_DRAFT_PULL_REQUESTS Project_Spec_Repository_RunType = 4 +) + +// Enum value maps for Project_Spec_Repository_RunType. +var ( + Project_Spec_Repository_RunType_name = map[int32]string{ + 0: "BRANCHES", + 1: "TAGS", + 2: "PULL_REQUESTS", + 3: "FORKED_PULL_REQUESTS", + 4: "DRAFT_PULL_REQUESTS", + } + Project_Spec_Repository_RunType_value = map[string]int32{ + "BRANCHES": 0, + "TAGS": 1, + "PULL_REQUESTS": 2, + "FORKED_PULL_REQUESTS": 3, + "DRAFT_PULL_REQUESTS": 4, + } +) + +func (x Project_Spec_Repository_RunType) Enum() *Project_Spec_Repository_RunType { + p := new(Project_Spec_Repository_RunType) + *p = x + return p +} + +func (x Project_Spec_Repository_RunType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_Repository_RunType) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[3].Descriptor() +} + +func (Project_Spec_Repository_RunType) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[3] +} + +func (x Project_Spec_Repository_RunType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_Repository_RunType.Descriptor instead. +func (Project_Spec_Repository_RunType) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 0} +} + +type Project_Spec_Repository_Status_PipelineFile_Level int32 + +const ( + Project_Spec_Repository_Status_PipelineFile_BLOCK Project_Spec_Repository_Status_PipelineFile_Level = 0 + Project_Spec_Repository_Status_PipelineFile_PIPELINE Project_Spec_Repository_Status_PipelineFile_Level = 1 +) + +// Enum value maps for Project_Spec_Repository_Status_PipelineFile_Level. +var ( + Project_Spec_Repository_Status_PipelineFile_Level_name = map[int32]string{ + 0: "BLOCK", + 1: "PIPELINE", + } + Project_Spec_Repository_Status_PipelineFile_Level_value = map[string]int32{ + "BLOCK": 0, + "PIPELINE": 1, + } +) + +func (x Project_Spec_Repository_Status_PipelineFile_Level) Enum() *Project_Spec_Repository_Status_PipelineFile_Level { + p := new(Project_Spec_Repository_Status_PipelineFile_Level) + *p = x + return p +} + +func (x Project_Spec_Repository_Status_PipelineFile_Level) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_Repository_Status_PipelineFile_Level) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[4].Descriptor() +} + +func (Project_Spec_Repository_Status_PipelineFile_Level) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[4] +} + +func (x Project_Spec_Repository_Status_PipelineFile_Level) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_Repository_Status_PipelineFile_Level.Descriptor instead. +func (Project_Spec_Repository_Status_PipelineFile_Level) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 1, 0, 0} +} + +type Project_Spec_Scheduler_Status int32 + +const ( + Project_Spec_Scheduler_STATUS_UNSPECIFIED Project_Spec_Scheduler_Status = 0 + Project_Spec_Scheduler_STATUS_INACTIVE Project_Spec_Scheduler_Status = 1 + Project_Spec_Scheduler_STATUS_ACTIVE Project_Spec_Scheduler_Status = 2 +) + +// Enum value maps for Project_Spec_Scheduler_Status. +var ( + Project_Spec_Scheduler_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_INACTIVE", + 2: "STATUS_ACTIVE", + } + Project_Spec_Scheduler_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_INACTIVE": 1, + "STATUS_ACTIVE": 2, + } +) + +func (x Project_Spec_Scheduler_Status) Enum() *Project_Spec_Scheduler_Status { + p := new(Project_Spec_Scheduler_Status) + *p = x + return p +} + +func (x Project_Spec_Scheduler_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_Scheduler_Status) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[5].Descriptor() +} + +func (Project_Spec_Scheduler_Status) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[5] +} + +func (x Project_Spec_Scheduler_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_Scheduler_Status.Descriptor instead. +func (Project_Spec_Scheduler_Status) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 1, 0} +} + +type Project_Spec_Task_Status int32 + +const ( + Project_Spec_Task_STATUS_UNSPECIFIED Project_Spec_Task_Status = 0 + Project_Spec_Task_STATUS_INACTIVE Project_Spec_Task_Status = 1 + Project_Spec_Task_STATUS_ACTIVE Project_Spec_Task_Status = 2 +) + +// Enum value maps for Project_Spec_Task_Status. +var ( + Project_Spec_Task_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_INACTIVE", + 2: "STATUS_ACTIVE", + } + Project_Spec_Task_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_INACTIVE": 1, + "STATUS_ACTIVE": 2, + } +) + +func (x Project_Spec_Task_Status) Enum() *Project_Spec_Task_Status { + p := new(Project_Spec_Task_Status) + *p = x + return p +} + +func (x Project_Spec_Task_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Spec_Task_Status) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[6].Descriptor() +} + +func (Project_Spec_Task_Status) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[6] +} + +func (x Project_Spec_Task_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Spec_Task_Status.Descriptor instead. +func (Project_Spec_Task_Status) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 2, 0} +} + +type Project_Status_State int32 + +const ( + Project_Status_INITIALIZING Project_Status_State = 0 + Project_Status_READY Project_Status_State = 1 + Project_Status_ERROR Project_Status_State = 2 + Project_Status_ONBOARDING Project_Status_State = 3 +) + +// Enum value maps for Project_Status_State. +var ( + Project_Status_State_name = map[int32]string{ + 0: "INITIALIZING", + 1: "READY", + 2: "ERROR", + 3: "ONBOARDING", + } + Project_Status_State_value = map[string]int32{ + "INITIALIZING": 0, + "READY": 1, + "ERROR": 2, + "ONBOARDING": 3, + } +) + +func (x Project_Status_State) Enum() *Project_Status_State { + p := new(Project_Status_State) + *p = x + return p +} + +func (x Project_Status_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Project_Status_State) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[7].Descriptor() +} + +func (Project_Status_State) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[7] +} + +func (x Project_Status_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Project_Status_State.Descriptor instead. +func (Project_Status_State) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 0} +} + +type ListKeysetRequest_Direction int32 + +const ( + ListKeysetRequest_NEXT ListKeysetRequest_Direction = 0 + ListKeysetRequest_PREVIOUS ListKeysetRequest_Direction = 1 +) + +// Enum value maps for ListKeysetRequest_Direction. +var ( + ListKeysetRequest_Direction_name = map[int32]string{ + 0: "NEXT", + 1: "PREVIOUS", + } + ListKeysetRequest_Direction_value = map[string]int32{ + "NEXT": 0, + "PREVIOUS": 1, + } +) + +func (x ListKeysetRequest_Direction) Enum() *ListKeysetRequest_Direction { + p := new(ListKeysetRequest_Direction) + *p = x + return p +} + +func (x ListKeysetRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListKeysetRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_projecthub_proto_enumTypes[8].Descriptor() +} + +func (ListKeysetRequest_Direction) Type() protoreflect.EnumType { + return &file_projecthub_proto_enumTypes[8] +} + +func (x ListKeysetRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListKeysetRequest_Direction.Descriptor instead. +func (ListKeysetRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{7, 0} +} + +type RequestMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + ReqId string `protobuf:"bytes,3,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"` + OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + UserId string `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestMeta) Reset() { + *x = RequestMeta{} + mi := &file_projecthub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestMeta) ProtoMessage() {} + +func (x *RequestMeta) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestMeta.ProtoReflect.Descriptor instead. +func (*RequestMeta) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{0} +} + +func (x *RequestMeta) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RequestMeta) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RequestMeta) GetReqId() string { + if x != nil { + return x.ReqId + } + return "" +} + +func (x *RequestMeta) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RequestMeta) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type ResponseMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + ReqId string `protobuf:"bytes,3,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"` + OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + UserId string `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Status *ResponseMeta_Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseMeta) Reset() { + *x = ResponseMeta{} + mi := &file_projecthub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMeta) ProtoMessage() {} + +func (x *ResponseMeta) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMeta.ProtoReflect.Descriptor instead. +func (*ResponseMeta) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{1} +} + +func (x *ResponseMeta) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *ResponseMeta) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ResponseMeta) GetReqId() string { + if x != nil { + return x.ReqId + } + return "" +} + +func (x *ResponseMeta) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ResponseMeta) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ResponseMeta) GetStatus() *ResponseMeta_Status { + if x != nil { + return x.Status + } + return nil +} + +type PaginationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaginationRequest) Reset() { + *x = PaginationRequest{} + mi := &file_projecthub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaginationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaginationRequest) ProtoMessage() {} + +func (x *PaginationRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead. +func (*PaginationRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{2} +} + +func (x *PaginationRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *PaginationRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type PaginationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNumber int32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + TotalEntries int32 `protobuf:"varint,3,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"` + TotalPages int32 `protobuf:"varint,4,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaginationResponse) Reset() { + *x = PaginationResponse{} + mi := &file_projecthub_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaginationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaginationResponse) ProtoMessage() {} + +func (x *PaginationResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaginationResponse.ProtoReflect.Descriptor instead. +func (*PaginationResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{3} +} + +func (x *PaginationResponse) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *PaginationResponse) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PaginationResponse) GetTotalEntries() int32 { + if x != nil { + return x.TotalEntries + } + return 0 +} + +func (x *PaginationResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +type Project struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Project_Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *Project_Spec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *Project_Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project) Reset() { + *x = Project{} + mi := &file_projecthub_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project) ProtoMessage() {} + +func (x *Project) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project.ProtoReflect.Descriptor instead. +func (*Project) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4} +} + +func (x *Project) GetMetadata() *Project_Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Project) GetSpec() *Project_Spec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Project) GetStatus() *Project_Status { + if x != nil { + return x.Status + } + return nil +} + +// List call request +// +// - metadata = [required] Request metadata +// - owner_id = [optional] Project Owner ID +// - repo_url = [optional] Repository URL +// - soft_deleted = [optional] Return soft deleted projects? Default is false. +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Pagination *PaginationRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + OwnerId string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + RepoUrl string `protobuf:"bytes,4,opt,name=repo_url,json=repoUrl,proto3" json:"repo_url,omitempty"` + SoftDeleted bool `protobuf:"varint,5,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_projecthub_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{5} +} + +func (x *ListRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ListRequest) GetPagination() *PaginationRequest { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *ListRequest) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *ListRequest) GetRepoUrl() string { + if x != nil { + return x.RepoUrl + } + return "" +} + +func (x *ListRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Pagination *PaginationResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Projects []*Project `protobuf:"bytes,3,rep,name=projects,proto3" json:"projects,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_projecthub_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{6} +} + +func (x *ListResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ListResponse) GetPagination() *PaginationResponse { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *ListResponse) GetProjects() []*Project { + if x != nil { + return x.Projects + } + return nil +} + +type ListKeysetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Direction ListKeysetRequest_Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=InternalApi.Projecthub.ListKeysetRequest_Direction" json:"direction,omitempty"` + OwnerId string `protobuf:"bytes,5,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + RepoUrl string `protobuf:"bytes,6,opt,name=repo_url,json=repoUrl,proto3" json:"repo_url,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetRequest) Reset() { + *x = ListKeysetRequest{} + mi := &file_projecthub_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetRequest) ProtoMessage() {} + +func (x *ListKeysetRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetRequest.ProtoReflect.Descriptor instead. +func (*ListKeysetRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{7} +} + +func (x *ListKeysetRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ListKeysetRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListKeysetRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListKeysetRequest) GetDirection() ListKeysetRequest_Direction { + if x != nil { + return x.Direction + } + return ListKeysetRequest_NEXT +} + +func (x *ListKeysetRequest) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *ListKeysetRequest) GetRepoUrl() string { + if x != nil { + return x.RepoUrl + } + return "" +} + +func (x *ListKeysetRequest) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +type ListKeysetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Projects []*Project `protobuf:"bytes,2,rep,name=projects,proto3" json:"projects,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PreviousPageToken string `protobuf:"bytes,4,opt,name=previous_page_token,json=previousPageToken,proto3" json:"previous_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListKeysetResponse) Reset() { + *x = ListKeysetResponse{} + mi := &file_projecthub_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListKeysetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeysetResponse) ProtoMessage() {} + +func (x *ListKeysetResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeysetResponse.ProtoReflect.Descriptor instead. +func (*ListKeysetResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{8} +} + +func (x *ListKeysetResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ListKeysetResponse) GetProjects() []*Project { + if x != nil { + return x.Projects + } + return nil +} + +func (x *ListKeysetResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListKeysetResponse) GetPreviousPageToken() string { + if x != nil { + return x.PreviousPageToken + } + return "" +} + +// Describe call request +// +// - metadata = [required] Request metadata +// - id = [required if no name] Project ID +// - name = [required if no id] Project name +// - detailed = [optional] Return schedulers spec? Default if false. +// - soft_deleted = [optional] Return soft deleted projects? Default is false. +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Detailed bool `protobuf:"varint,4,opt,name=detailed,proto3" json:"detailed,omitempty"` + SoftDeleted bool `protobuf:"varint,5,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_projecthub_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{9} +} + +func (x *DescribeRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DescribeRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DescribeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DescribeRequest) GetDetailed() bool { + if x != nil { + return x.Detailed + } + return false +} + +func (x *DescribeRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_projecthub_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{10} +} + +func (x *DescribeResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DescribeResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +// DescribeMany call request +// +// - metadata = [required] Request metadata +// - ids = [required] List of project IDs +// - soft_deleted = [optional] Return soft deleted projects? Default is false. +type DescribeManyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` + SoftDeleted bool `protobuf:"varint,3,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyRequest) Reset() { + *x = DescribeManyRequest{} + mi := &file_projecthub_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyRequest) ProtoMessage() {} + +func (x *DescribeManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyRequest.ProtoReflect.Descriptor instead. +func (*DescribeManyRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{11} +} + +func (x *DescribeManyRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DescribeManyRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *DescribeManyRequest) GetSoftDeleted() bool { + if x != nil { + return x.SoftDeleted + } + return false +} + +type DescribeManyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Projects []*Project `protobuf:"bytes,2,rep,name=projects,proto3" json:"projects,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyResponse) Reset() { + *x = DescribeManyResponse{} + mi := &file_projecthub_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyResponse) ProtoMessage() {} + +func (x *DescribeManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyResponse.ProtoReflect.Descriptor instead. +func (*DescribeManyResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{12} +} + +func (x *DescribeManyResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DescribeManyResponse) GetProjects() []*Project { + if x != nil { + return x.Projects + } + return nil +} + +type CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + SkipOnboarding bool `protobuf:"varint,3,opt,name=skip_onboarding,json=skipOnboarding,proto3" json:"skip_onboarding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + mi := &file_projecthub_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{13} +} + +func (x *CreateRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateRequest) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +func (x *CreateRequest) GetSkipOnboarding() bool { + if x != nil { + return x.SkipOnboarding + } + return false +} + +type CreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + mi := &file_projecthub_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{14} +} + +func (x *CreateResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +type UpdateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + OmitSchedulersAndTasks bool `protobuf:"varint,3,opt,name=omit_schedulers_and_tasks,json=omitSchedulersAndTasks,proto3" json:"omit_schedulers_and_tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateRequest) Reset() { + *x = UpdateRequest{} + mi := &file_projecthub_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRequest) ProtoMessage() {} + +func (x *UpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. +func (*UpdateRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{15} +} + +func (x *UpdateRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateRequest) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +func (x *UpdateRequest) GetOmitSchedulersAndTasks() bool { + if x != nil { + return x.OmitSchedulersAndTasks + } + return false +} + +type UpdateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResponse) Reset() { + *x = UpdateResponse{} + mi := &file_projecthub_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResponse) ProtoMessage() {} + +func (x *UpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. +func (*UpdateResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +type DestroyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DestroyRequest) Reset() { + *x = DestroyRequest{} + mi := &file_projecthub_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DestroyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestroyRequest) ProtoMessage() {} + +func (x *DestroyRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestroyRequest.ProtoReflect.Descriptor instead. +func (*DestroyRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{17} +} + +func (x *DestroyRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DestroyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DestroyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type DestroyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DestroyResponse) Reset() { + *x = DestroyResponse{} + mi := &file_projecthub_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DestroyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestroyResponse) ProtoMessage() {} + +func (x *DestroyResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestroyResponse.ProtoReflect.Descriptor instead. +func (*DestroyResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{18} +} + +func (x *DestroyResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +type RestoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RestoreRequest) Reset() { + *x = RestoreRequest{} + mi := &file_projecthub_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RestoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreRequest) ProtoMessage() {} + +func (x *RestoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreRequest.ProtoReflect.Descriptor instead. +func (*RestoreRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{19} +} + +func (x *RestoreRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RestoreRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RestoreResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RestoreResponse) Reset() { + *x = RestoreResponse{} + mi := &file_projecthub_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RestoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreResponse) ProtoMessage() {} + +func (x *RestoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreResponse.ProtoReflect.Descriptor instead. +func (*RestoreResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{20} +} + +func (x *RestoreResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +// Users call request +// +// - id = [required] project uuid. +type UsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UsersRequest) Reset() { + *x = UsersRequest{} + mi := &file_projecthub_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UsersRequest) ProtoMessage() {} + +func (x *UsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UsersRequest.ProtoReflect.Descriptor instead. +func (*UsersRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{21} +} + +func (x *UsersRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UsersRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Users call response +// +// - id = [required] project uuid. +type UsersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Users []*user.User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UsersResponse) Reset() { + *x = UsersResponse{} + mi := &file_projecthub_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UsersResponse) ProtoMessage() {} + +func (x *UsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UsersResponse.ProtoReflect.Descriptor instead. +func (*UsersResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{22} +} + +func (x *UsersResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UsersResponse) GetUsers() []*user.User { + if x != nil { + return x.Users + } + return nil +} + +// CheckDeployKey call request +// +// - id = [required] project uuid. +type CheckDeployKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckDeployKeyRequest) Reset() { + *x = CheckDeployKeyRequest{} + mi := &file_projecthub_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckDeployKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckDeployKeyRequest) ProtoMessage() {} + +func (x *CheckDeployKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckDeployKeyRequest.ProtoReflect.Descriptor instead. +func (*CheckDeployKeyRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{23} +} + +func (x *CheckDeployKeyRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CheckDeployKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// CheckDeployKey call response +type CheckDeployKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + DeployKey *CheckDeployKeyResponse_DeployKey `protobuf:"bytes,2,opt,name=deploy_key,json=deployKey,proto3" json:"deploy_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckDeployKeyResponse) Reset() { + *x = CheckDeployKeyResponse{} + mi := &file_projecthub_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckDeployKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckDeployKeyResponse) ProtoMessage() {} + +func (x *CheckDeployKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckDeployKeyResponse.ProtoReflect.Descriptor instead. +func (*CheckDeployKeyResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{24} +} + +func (x *CheckDeployKeyResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CheckDeployKeyResponse) GetDeployKey() *CheckDeployKeyResponse_DeployKey { + if x != nil { + return x.DeployKey + } + return nil +} + +// RegenerateDeployKey call request +// +// - id = [required] project uuid. +type RegenerateDeployKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateDeployKeyRequest) Reset() { + *x = RegenerateDeployKeyRequest{} + mi := &file_projecthub_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateDeployKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateDeployKeyRequest) ProtoMessage() {} + +func (x *RegenerateDeployKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateDeployKeyRequest.ProtoReflect.Descriptor instead. +func (*RegenerateDeployKeyRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{25} +} + +func (x *RegenerateDeployKeyRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateDeployKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// RegenerateDeployKey call response +type RegenerateDeployKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + DeployKey *RegenerateDeployKeyResponse_DeployKey `protobuf:"bytes,2,opt,name=deploy_key,json=deployKey,proto3" json:"deploy_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateDeployKeyResponse) Reset() { + *x = RegenerateDeployKeyResponse{} + mi := &file_projecthub_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateDeployKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateDeployKeyResponse) ProtoMessage() {} + +func (x *RegenerateDeployKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateDeployKeyResponse.ProtoReflect.Descriptor instead. +func (*RegenerateDeployKeyResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{26} +} + +func (x *RegenerateDeployKeyResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateDeployKeyResponse) GetDeployKey() *RegenerateDeployKeyResponse_DeployKey { + if x != nil { + return x.DeployKey + } + return nil +} + +// CheckWebhook call request +// +// - id = [required] project uuid. +type CheckWebhookRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckWebhookRequest) Reset() { + *x = CheckWebhookRequest{} + mi := &file_projecthub_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckWebhookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckWebhookRequest) ProtoMessage() {} + +func (x *CheckWebhookRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckWebhookRequest.ProtoReflect.Descriptor instead. +func (*CheckWebhookRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{27} +} + +func (x *CheckWebhookRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CheckWebhookRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// CheckWebhook call response +type CheckWebhookResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Webhook *Webhook `protobuf:"bytes,2,opt,name=webhook,proto3" json:"webhook,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckWebhookResponse) Reset() { + *x = CheckWebhookResponse{} + mi := &file_projecthub_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckWebhookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckWebhookResponse) ProtoMessage() {} + +func (x *CheckWebhookResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckWebhookResponse.ProtoReflect.Descriptor instead. +func (*CheckWebhookResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{28} +} + +func (x *CheckWebhookResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CheckWebhookResponse) GetWebhook() *Webhook { + if x != nil { + return x.Webhook + } + return nil +} + +// RegenerateWebhook call request +// +// - id = [required] project uuid. +type RegenerateWebhookRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateWebhookRequest) Reset() { + *x = RegenerateWebhookRequest{} + mi := &file_projecthub_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateWebhookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateWebhookRequest) ProtoMessage() {} + +func (x *RegenerateWebhookRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateWebhookRequest.ProtoReflect.Descriptor instead. +func (*RegenerateWebhookRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{29} +} + +func (x *RegenerateWebhookRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateWebhookRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// RegenerateWebhook call response +type RegenerateWebhookResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Webhook *Webhook `protobuf:"bytes,2,opt,name=webhook,proto3" json:"webhook,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateWebhookResponse) Reset() { + *x = RegenerateWebhookResponse{} + mi := &file_projecthub_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateWebhookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateWebhookResponse) ProtoMessage() {} + +func (x *RegenerateWebhookResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateWebhookResponse.ProtoReflect.Descriptor instead. +func (*RegenerateWebhookResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{30} +} + +func (x *RegenerateWebhookResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateWebhookResponse) GetWebhook() *Webhook { + if x != nil { + return x.Webhook + } + return nil +} + +type Webhook struct { + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Webhook) Reset() { + *x = Webhook{} + mi := &file_projecthub_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Webhook) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Webhook) ProtoMessage() {} + +func (x *Webhook) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Webhook.ProtoReflect.Descriptor instead. +func (*Webhook) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{31} +} + +func (x *Webhook) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// ChangeProjectOwner call request +// +// - id = [required] project uuid. +// - user_id = [required] new project owner uuid. +type ChangeProjectOwnerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeProjectOwnerRequest) Reset() { + *x = ChangeProjectOwnerRequest{} + mi := &file_projecthub_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeProjectOwnerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeProjectOwnerRequest) ProtoMessage() {} + +func (x *ChangeProjectOwnerRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeProjectOwnerRequest.ProtoReflect.Descriptor instead. +func (*ChangeProjectOwnerRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{32} +} + +func (x *ChangeProjectOwnerRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ChangeProjectOwnerRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangeProjectOwnerRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// ChangeProjectOwner call response +type ChangeProjectOwnerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeProjectOwnerResponse) Reset() { + *x = ChangeProjectOwnerResponse{} + mi := &file_projecthub_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeProjectOwnerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeProjectOwnerResponse) ProtoMessage() {} + +func (x *ChangeProjectOwnerResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeProjectOwnerResponse.ProtoReflect.Descriptor instead. +func (*ChangeProjectOwnerResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{33} +} + +func (x *ChangeProjectOwnerResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +// ForkAndCreate call request +type ForkAndCreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ForkAndCreateRequest) Reset() { + *x = ForkAndCreateRequest{} + mi := &file_projecthub_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForkAndCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForkAndCreateRequest) ProtoMessage() {} + +func (x *ForkAndCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForkAndCreateRequest.ProtoReflect.Descriptor instead. +func (*ForkAndCreateRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{34} +} + +func (x *ForkAndCreateRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ForkAndCreateRequest) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +// ForkAndCreate call response +type ForkAndCreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Project *Project `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ForkAndCreateResponse) Reset() { + *x = ForkAndCreateResponse{} + mi := &file_projecthub_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForkAndCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForkAndCreateResponse) ProtoMessage() {} + +func (x *ForkAndCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForkAndCreateResponse.ProtoReflect.Descriptor instead. +func (*ForkAndCreateResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{35} +} + +func (x *ForkAndCreateResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ForkAndCreateResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +// GithubAppSwitch call request +// +// - id = [required] project uuid. +type GithubAppSwitchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GithubAppSwitchRequest) Reset() { + *x = GithubAppSwitchRequest{} + mi := &file_projecthub_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GithubAppSwitchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GithubAppSwitchRequest) ProtoMessage() {} + +func (x *GithubAppSwitchRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GithubAppSwitchRequest.ProtoReflect.Descriptor instead. +func (*GithubAppSwitchRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{36} +} + +func (x *GithubAppSwitchRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GithubAppSwitchRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// GithubAppSwitch call response +type GithubAppSwitchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GithubAppSwitchResponse) Reset() { + *x = GithubAppSwitchResponse{} + mi := &file_projecthub_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GithubAppSwitchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GithubAppSwitchResponse) ProtoMessage() {} + +func (x *GithubAppSwitchResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GithubAppSwitchResponse.ProtoReflect.Descriptor instead. +func (*GithubAppSwitchResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{37} +} + +func (x *GithubAppSwitchResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +// FinishOnboarding call request +// +// - id = [required] project uuid. +type FinishOnboardingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishOnboardingRequest) Reset() { + *x = FinishOnboardingRequest{} + mi := &file_projecthub_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishOnboardingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishOnboardingRequest) ProtoMessage() {} + +func (x *FinishOnboardingRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishOnboardingRequest.ProtoReflect.Descriptor instead. +func (*FinishOnboardingRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{38} +} + +func (x *FinishOnboardingRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *FinishOnboardingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// FinishOnboarding call response +type FinishOnboardingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishOnboardingResponse) Reset() { + *x = FinishOnboardingResponse{} + mi := &file_projecthub_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishOnboardingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishOnboardingResponse) ProtoMessage() {} + +func (x *FinishOnboardingResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishOnboardingResponse.ProtoReflect.Descriptor instead. +func (*FinishOnboardingResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{39} +} + +func (x *FinishOnboardingResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +// RegenerateWebhook call request +// +// - id = [required] project uuid. +type RegenerateWebhookSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *RequestMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateWebhookSecretRequest) Reset() { + *x = RegenerateWebhookSecretRequest{} + mi := &file_projecthub_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateWebhookSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateWebhookSecretRequest) ProtoMessage() {} + +func (x *RegenerateWebhookSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateWebhookSecretRequest.ProtoReflect.Descriptor instead. +func (*RegenerateWebhookSecretRequest) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{40} +} + +func (x *RegenerateWebhookSecretRequest) GetMetadata() *RequestMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateWebhookSecretRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// RegenerateWebhook call response +// +// - secret = [required] new secret token for a project +type RegenerateWebhookSecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateWebhookSecretResponse) Reset() { + *x = RegenerateWebhookSecretResponse{} + mi := &file_projecthub_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateWebhookSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateWebhookSecretResponse) ProtoMessage() {} + +func (x *RegenerateWebhookSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateWebhookSecretResponse.ProtoReflect.Descriptor instead. +func (*RegenerateWebhookSecretResponse) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{41} +} + +func (x *RegenerateWebhookSecretResponse) GetMetadata() *ResponseMeta { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RegenerateWebhookSecretResponse) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +// Published with routing key: 'created'. +// All fields are required. +type ProjectCreated struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectCreated) Reset() { + *x = ProjectCreated{} + mi := &file_projecthub_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectCreated) ProtoMessage() {} + +func (x *ProjectCreated) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectCreated.ProtoReflect.Descriptor instead. +func (*ProjectCreated) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{42} +} + +func (x *ProjectCreated) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectCreated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *ProjectCreated) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Published with routing key: 'deleted'. +// All fields are required. +type ProjectDeleted struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectDeleted) Reset() { + *x = ProjectDeleted{} + mi := &file_projecthub_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectDeleted) ProtoMessage() {} + +func (x *ProjectDeleted) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectDeleted.ProtoReflect.Descriptor instead. +func (*ProjectDeleted) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{43} +} + +func (x *ProjectDeleted) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectDeleted) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *ProjectDeleted) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Published with routing key: 'restored'. +// All fields are required. +type ProjectRestored struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectRestored) Reset() { + *x = ProjectRestored{} + mi := &file_projecthub_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectRestored) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectRestored) ProtoMessage() {} + +func (x *ProjectRestored) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectRestored.ProtoReflect.Descriptor instead. +func (*ProjectRestored) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{44} +} + +func (x *ProjectRestored) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectRestored) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *ProjectRestored) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Published with routing key: 'updated'. +// All fields are required. +type ProjectUpdated struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectUpdated) Reset() { + *x = ProjectUpdated{} + mi := &file_projecthub_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectUpdated) ProtoMessage() {} + +func (x *ProjectUpdated) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectUpdated.ProtoReflect.Descriptor instead. +func (*ProjectUpdated) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{45} +} + +func (x *ProjectUpdated) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectUpdated) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ProjectUpdated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'collabortors_changed'. +// All fields are required. +type CollaboratorsChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CollaboratorsChanged) Reset() { + *x = CollaboratorsChanged{} + mi := &file_projecthub_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CollaboratorsChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CollaboratorsChanged) ProtoMessage() {} + +func (x *CollaboratorsChanged) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CollaboratorsChanged.ProtoReflect.Descriptor instead. +func (*CollaboratorsChanged) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{46} +} + +func (x *CollaboratorsChanged) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CollaboratorsChanged) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type ResponseMeta_Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code ResponseMeta_Code `protobuf:"varint,1,opt,name=code,proto3,enum=InternalApi.Projecthub.ResponseMeta_Code" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseMeta_Status) Reset() { + *x = ResponseMeta_Status{} + mi := &file_projecthub_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseMeta_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMeta_Status) ProtoMessage() {} + +func (x *ResponseMeta_Status) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMeta_Status.ProtoReflect.Descriptor instead. +func (*ResponseMeta_Status) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *ResponseMeta_Status) GetCode() ResponseMeta_Code { + if x != nil { + return x.Code + } + return ResponseMeta_OK +} + +func (x *ResponseMeta_Status) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type Project_Metadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + OwnerId string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Metadata) Reset() { + *x = Project_Metadata{} + mi := &file_projecthub_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Metadata) ProtoMessage() {} + +func (x *Project_Metadata) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Metadata.ProtoReflect.Descriptor instead. +func (*Project_Metadata) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Project_Metadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project_Metadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Project_Metadata) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *Project_Metadata) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Project_Metadata) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Project_Metadata) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// Spec +// - repository = [required] Data about repository +// - schedulers = [optional, default = []] List of scheluders +// - private = [optional, default = true, deprecated] Private project will be visible only for members of an organization. +// - public = [optional, default = false, deprecated] Public project will be visible for everyone, even anonymous users. +// - visibility = [optional, default = PRIVATE] Public project will be visible for everyone, even anonymous users. +// - custom_permissions = [required if restricted organization] True if project do not follow organization defaults for debug/attach permissions. +// - debug_permissions = [required if restricted organization] List of types for which debug sessions are allowed. Used only if custom_permissions is set to true. +// - attach_permissions = [required if restricted organization] List of types for which attached sessions are allowed. Used only if custom_permissions is set to true. +type Project_Spec struct { + state protoimpl.MessageState `protogen:"open.v1"` + Repository *Project_Spec_Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + Schedulers []*Project_Spec_Scheduler `protobuf:"bytes,2,rep,name=schedulers,proto3" json:"schedulers,omitempty"` + Private bool `protobuf:"varint,3,opt,name=private,proto3" json:"private,omitempty"` + Public bool `protobuf:"varint,4,opt,name=public,proto3" json:"public,omitempty"` + Visibility Project_Spec_Visibility `protobuf:"varint,5,opt,name=visibility,proto3,enum=InternalApi.Projecthub.Project_Spec_Visibility" json:"visibility,omitempty"` + DebugPermissions []Project_Spec_PermissionType `protobuf:"varint,6,rep,packed,name=debug_permissions,json=debugPermissions,proto3,enum=InternalApi.Projecthub.Project_Spec_PermissionType" json:"debug_permissions,omitempty"` + AttachPermissions []Project_Spec_PermissionType `protobuf:"varint,7,rep,packed,name=attach_permissions,json=attachPermissions,proto3,enum=InternalApi.Projecthub.Project_Spec_PermissionType" json:"attach_permissions,omitempty"` + CustomPermissions bool `protobuf:"varint,8,opt,name=custom_permissions,json=customPermissions,proto3" json:"custom_permissions,omitempty"` + ArtifactStoreId string `protobuf:"bytes,9,opt,name=artifact_store_id,json=artifactStoreId,proto3" json:"artifact_store_id,omitempty"` + CacheId string `protobuf:"bytes,10,opt,name=cache_id,json=cacheId,proto3" json:"cache_id,omitempty"` + DockerRegistryId string `protobuf:"bytes,11,opt,name=docker_registry_id,json=dockerRegistryId,proto3" json:"docker_registry_id,omitempty"` + Tasks []*Project_Spec_Task `protobuf:"bytes,12,rep,name=tasks,proto3" json:"tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec) Reset() { + *x = Project_Spec{} + mi := &file_projecthub_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec) ProtoMessage() {} + +func (x *Project_Spec) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec.ProtoReflect.Descriptor instead. +func (*Project_Spec) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *Project_Spec) GetRepository() *Project_Spec_Repository { + if x != nil { + return x.Repository + } + return nil +} + +func (x *Project_Spec) GetSchedulers() []*Project_Spec_Scheduler { + if x != nil { + return x.Schedulers + } + return nil +} + +func (x *Project_Spec) GetPrivate() bool { + if x != nil { + return x.Private + } + return false +} + +func (x *Project_Spec) GetPublic() bool { + if x != nil { + return x.Public + } + return false +} + +func (x *Project_Spec) GetVisibility() Project_Spec_Visibility { + if x != nil { + return x.Visibility + } + return Project_Spec_PRIVATE +} + +func (x *Project_Spec) GetDebugPermissions() []Project_Spec_PermissionType { + if x != nil { + return x.DebugPermissions + } + return nil +} + +func (x *Project_Spec) GetAttachPermissions() []Project_Spec_PermissionType { + if x != nil { + return x.AttachPermissions + } + return nil +} + +func (x *Project_Spec) GetCustomPermissions() bool { + if x != nil { + return x.CustomPermissions + } + return false +} + +func (x *Project_Spec) GetArtifactStoreId() string { + if x != nil { + return x.ArtifactStoreId + } + return "" +} + +func (x *Project_Spec) GetCacheId() string { + if x != nil { + return x.CacheId + } + return "" +} + +func (x *Project_Spec) GetDockerRegistryId() string { + if x != nil { + return x.DockerRegistryId + } + return "" +} + +func (x *Project_Spec) GetTasks() []*Project_Spec_Task { + if x != nil { + return x.Tasks + } + return nil +} + +type Project_Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + StateReason string `protobuf:"bytes,2,opt,name=state_reason,json=stateReason,proto3" json:"state_reason,omitempty"` + Cache *Project_Status_Cache `protobuf:"bytes,3,opt,name=cache,proto3" json:"cache,omitempty"` + ArtifactStore *Project_Status_ArtifactStore `protobuf:"bytes,4,opt,name=artifact_store,json=artifactStore,proto3" json:"artifact_store,omitempty"` + Repository *Project_Status_Repository `protobuf:"bytes,5,opt,name=repository,proto3" json:"repository,omitempty"` + Analysis *Project_Status_Analysis `protobuf:"bytes,6,opt,name=analysis,proto3" json:"analysis,omitempty"` + // indicates if creator's permissions have been setup in RBAC + Permissions *Project_Status_Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status) Reset() { + *x = Project_Status{} + mi := &file_projecthub_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status) ProtoMessage() {} + +func (x *Project_Status) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status.ProtoReflect.Descriptor instead. +func (*Project_Status) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2} +} + +func (x *Project_Status) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +func (x *Project_Status) GetStateReason() string { + if x != nil { + return x.StateReason + } + return "" +} + +func (x *Project_Status) GetCache() *Project_Status_Cache { + if x != nil { + return x.Cache + } + return nil +} + +func (x *Project_Status) GetArtifactStore() *Project_Status_ArtifactStore { + if x != nil { + return x.ArtifactStore + } + return nil +} + +func (x *Project_Status) GetRepository() *Project_Status_Repository { + if x != nil { + return x.Repository + } + return nil +} + +func (x *Project_Status) GetAnalysis() *Project_Status_Analysis { + if x != nil { + return x.Analysis + } + return nil +} + +func (x *Project_Status) GetPermissions() *Project_Status_Permissions { + if x != nil { + return x.Permissions + } + return nil +} + +type Project_Spec_Repository struct { + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + RunOn []Project_Spec_Repository_RunType `protobuf:"varint,4,rep,packed,name=run_on,json=runOn,proto3,enum=InternalApi.Projecthub.Project_Spec_Repository_RunType" json:"run_on,omitempty"` + ForkedPullRequests *Project_Spec_Repository_ForkedPullRequests `protobuf:"bytes,5,opt,name=forked_pull_requests,json=forkedPullRequests,proto3" json:"forked_pull_requests,omitempty"` + // Types that are valid to be assigned to RunPresent: + // + // *Project_Spec_Repository_Run + RunPresent isProject_Spec_Repository_RunPresent `protobuf_oneof:"run_present"` + // [optional] Which pipeline file to run when a hook is received. Default: .semaphore/semaphore.yml + PipelineFile string `protobuf:"bytes,7,opt,name=pipeline_file,json=pipelineFile,proto3" json:"pipeline_file,omitempty"` + // [optional] Which pipelines should report statuses on repository. Default: None + Status *Project_Spec_Repository_Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + // [optional] Which branches and tags should be build. Default: None + Whitelist *Project_Spec_Repository_Whitelist `protobuf:"bytes,9,opt,name=whitelist,proto3" json:"whitelist,omitempty"` + // [required, readonly] Visibility status of a repository. + Public bool `protobuf:"varint,10,opt,name=public,proto3" json:"public,omitempty"` + // [required, readonly] Integration Type of a repository. + IntegrationType repository_integrator.IntegrationType `protobuf:"varint,11,opt,name=integration_type,json=integrationType,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"integration_type,omitempty"` + // [required, readonly] Connection status between Semaphore and repository. + Connected bool `protobuf:"varint,12,opt,name=connected,proto3" json:"connected,omitempty"` + Id string `protobuf:"bytes,13,opt,name=id,proto3" json:"id,omitempty"` + // [required, readonly] Default branch on repository + DefaultBranch string `protobuf:"bytes,14,opt,name=default_branch,json=defaultBranch,proto3" json:"default_branch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Repository) Reset() { + *x = Project_Spec_Repository{} + mi := &file_projecthub_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Repository) ProtoMessage() {} + +func (x *Project_Spec_Repository) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Repository.ProtoReflect.Descriptor instead. +func (*Project_Spec_Repository) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0} +} + +func (x *Project_Spec_Repository) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Project_Spec_Repository) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project_Spec_Repository) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Project_Spec_Repository) GetRunOn() []Project_Spec_Repository_RunType { + if x != nil { + return x.RunOn + } + return nil +} + +func (x *Project_Spec_Repository) GetForkedPullRequests() *Project_Spec_Repository_ForkedPullRequests { + if x != nil { + return x.ForkedPullRequests + } + return nil +} + +func (x *Project_Spec_Repository) GetRunPresent() isProject_Spec_Repository_RunPresent { + if x != nil { + return x.RunPresent + } + return nil +} + +func (x *Project_Spec_Repository) GetRun() bool { + if x != nil { + if x, ok := x.RunPresent.(*Project_Spec_Repository_Run); ok { + return x.Run + } + } + return false +} + +func (x *Project_Spec_Repository) GetPipelineFile() string { + if x != nil { + return x.PipelineFile + } + return "" +} + +func (x *Project_Spec_Repository) GetStatus() *Project_Spec_Repository_Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *Project_Spec_Repository) GetWhitelist() *Project_Spec_Repository_Whitelist { + if x != nil { + return x.Whitelist + } + return nil +} + +func (x *Project_Spec_Repository) GetPublic() bool { + if x != nil { + return x.Public + } + return false +} + +func (x *Project_Spec_Repository) GetIntegrationType() repository_integrator.IntegrationType { + if x != nil { + return x.IntegrationType + } + return repository_integrator.IntegrationType(0) +} + +func (x *Project_Spec_Repository) GetConnected() bool { + if x != nil { + return x.Connected + } + return false +} + +func (x *Project_Spec_Repository) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Project_Spec_Repository) GetDefaultBranch() string { + if x != nil { + return x.DefaultBranch + } + return "" +} + +type isProject_Spec_Repository_RunPresent interface { + isProject_Spec_Repository_RunPresent() +} + +type Project_Spec_Repository_Run struct { + Run bool `protobuf:"varint,6,opt,name=run,proto3,oneof"` +} + +func (*Project_Spec_Repository_Run) isProject_Spec_Repository_RunPresent() {} + +type Project_Spec_Scheduler struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Branch string `protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"` + At string `protobuf:"bytes,4,opt,name=at,proto3" json:"at,omitempty"` + PipelineFile string `protobuf:"bytes,5,opt,name=pipeline_file,json=pipelineFile,proto3" json:"pipeline_file,omitempty"` + Status Project_Spec_Scheduler_Status `protobuf:"varint,6,opt,name=status,proto3,enum=InternalApi.Projecthub.Project_Spec_Scheduler_Status" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Scheduler) Reset() { + *x = Project_Spec_Scheduler{} + mi := &file_projecthub_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Scheduler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Scheduler) ProtoMessage() {} + +func (x *Project_Spec_Scheduler) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Scheduler.ProtoReflect.Descriptor instead. +func (*Project_Spec_Scheduler) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 1} +} + +func (x *Project_Spec_Scheduler) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Project_Spec_Scheduler) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project_Spec_Scheduler) GetBranch() string { + if x != nil { + return x.Branch + } + return "" +} + +func (x *Project_Spec_Scheduler) GetAt() string { + if x != nil { + return x.At + } + return "" +} + +func (x *Project_Spec_Scheduler) GetPipelineFile() string { + if x != nil { + return x.PipelineFile + } + return "" +} + +func (x *Project_Spec_Scheduler) GetStatus() Project_Spec_Scheduler_Status { + if x != nil { + return x.Status + } + return Project_Spec_Scheduler_STATUS_UNSPECIFIED +} + +type Project_Spec_Task struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Branch string `protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"` + At string `protobuf:"bytes,4,opt,name=at,proto3" json:"at,omitempty"` + PipelineFile string `protobuf:"bytes,5,opt,name=pipeline_file,json=pipelineFile,proto3" json:"pipeline_file,omitempty"` + Status Project_Spec_Task_Status `protobuf:"varint,6,opt,name=status,proto3,enum=InternalApi.Projecthub.Project_Spec_Task_Status" json:"status,omitempty"` + Recurring bool `protobuf:"varint,7,opt,name=recurring,proto3" json:"recurring,omitempty"` + Parameters []*Project_Spec_Task_Parameter `protobuf:"bytes,8,rep,name=parameters,proto3" json:"parameters,omitempty"` + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Task) Reset() { + *x = Project_Spec_Task{} + mi := &file_projecthub_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Task) ProtoMessage() {} + +func (x *Project_Spec_Task) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Task.ProtoReflect.Descriptor instead. +func (*Project_Spec_Task) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 2} +} + +func (x *Project_Spec_Task) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Project_Spec_Task) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project_Spec_Task) GetBranch() string { + if x != nil { + return x.Branch + } + return "" +} + +func (x *Project_Spec_Task) GetAt() string { + if x != nil { + return x.At + } + return "" +} + +func (x *Project_Spec_Task) GetPipelineFile() string { + if x != nil { + return x.PipelineFile + } + return "" +} + +func (x *Project_Spec_Task) GetStatus() Project_Spec_Task_Status { + if x != nil { + return x.Status + } + return Project_Spec_Task_STATUS_UNSPECIFIED +} + +func (x *Project_Spec_Task) GetRecurring() bool { + if x != nil { + return x.Recurring + } + return false +} + +func (x *Project_Spec_Task) GetParameters() []*Project_Spec_Task_Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Project_Spec_Task) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// ForkedPullRequests +// +// # Contains options regarding forked Pull Requests +// +// - allowed_secrets = [optional, default = []] list of secrets that can be exported. Empty list means that no secret will be exported. +// - allowed_contributors = [optional, default = []] list of contributors that can create workflows from forked PRs. Empty list means that everyone can. +type Project_Spec_Repository_ForkedPullRequests struct { + state protoimpl.MessageState `protogen:"open.v1"` + AllowedSecrets []string `protobuf:"bytes,1,rep,name=allowed_secrets,json=allowedSecrets,proto3" json:"allowed_secrets,omitempty"` + AllowedContributors []string `protobuf:"bytes,2,rep,name=allowed_contributors,json=allowedContributors,proto3" json:"allowed_contributors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Repository_ForkedPullRequests) Reset() { + *x = Project_Spec_Repository_ForkedPullRequests{} + mi := &file_projecthub_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Repository_ForkedPullRequests) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Repository_ForkedPullRequests) ProtoMessage() {} + +func (x *Project_Spec_Repository_ForkedPullRequests) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Repository_ForkedPullRequests.ProtoReflect.Descriptor instead. +func (*Project_Spec_Repository_ForkedPullRequests) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 0} +} + +func (x *Project_Spec_Repository_ForkedPullRequests) GetAllowedSecrets() []string { + if x != nil { + return x.AllowedSecrets + } + return nil +} + +func (x *Project_Spec_Repository_ForkedPullRequests) GetAllowedContributors() []string { + if x != nil { + return x.AllowedContributors + } + return nil +} + +type Project_Spec_Repository_Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + PipelineFiles []*Project_Spec_Repository_Status_PipelineFile `protobuf:"bytes,1,rep,name=pipeline_files,json=pipelineFiles,proto3" json:"pipeline_files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Repository_Status) Reset() { + *x = Project_Spec_Repository_Status{} + mi := &file_projecthub_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Repository_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Repository_Status) ProtoMessage() {} + +func (x *Project_Spec_Repository_Status) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Repository_Status.ProtoReflect.Descriptor instead. +func (*Project_Spec_Repository_Status) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 1} +} + +func (x *Project_Spec_Repository_Status) GetPipelineFiles() []*Project_Spec_Repository_Status_PipelineFile { + if x != nil { + return x.PipelineFiles + } + return nil +} + +// - branches = [optional, default = []] list of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. +// - tags = [optional, default = []] list of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. +type Project_Spec_Repository_Whitelist struct { + state protoimpl.MessageState `protogen:"open.v1"` + Branches []string `protobuf:"bytes,1,rep,name=branches,proto3" json:"branches,omitempty"` + Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Repository_Whitelist) Reset() { + *x = Project_Spec_Repository_Whitelist{} + mi := &file_projecthub_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Repository_Whitelist) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Repository_Whitelist) ProtoMessage() {} + +func (x *Project_Spec_Repository_Whitelist) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Repository_Whitelist.ProtoReflect.Descriptor instead. +func (*Project_Spec_Repository_Whitelist) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 2} +} + +func (x *Project_Spec_Repository_Whitelist) GetBranches() []string { + if x != nil { + return x.Branches + } + return nil +} + +func (x *Project_Spec_Repository_Whitelist) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +// PipelineFile +// +// - path = [required] path to pipeline file +// - level = [required] on what level status should be created. One for pipeline or one for each block. +type Project_Spec_Repository_Status_PipelineFile struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Level Project_Spec_Repository_Status_PipelineFile_Level `protobuf:"varint,2,opt,name=level,proto3,enum=InternalApi.Projecthub.Project_Spec_Repository_Status_PipelineFile_Level" json:"level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Repository_Status_PipelineFile) Reset() { + *x = Project_Spec_Repository_Status_PipelineFile{} + mi := &file_projecthub_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Repository_Status_PipelineFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Repository_Status_PipelineFile) ProtoMessage() {} + +func (x *Project_Spec_Repository_Status_PipelineFile) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Repository_Status_PipelineFile.ProtoReflect.Descriptor instead. +func (*Project_Spec_Repository_Status_PipelineFile) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 0, 1, 0} +} + +func (x *Project_Spec_Repository_Status_PipelineFile) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *Project_Spec_Repository_Status_PipelineFile) GetLevel() Project_Spec_Repository_Status_PipelineFile_Level { + if x != nil { + return x.Level + } + return Project_Spec_Repository_Status_PipelineFile_BLOCK +} + +type Project_Spec_Task_Parameter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Options []string `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Spec_Task_Parameter) Reset() { + *x = Project_Spec_Task_Parameter{} + mi := &file_projecthub_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Spec_Task_Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Spec_Task_Parameter) ProtoMessage() {} + +func (x *Project_Spec_Task_Parameter) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Spec_Task_Parameter.ProtoReflect.Descriptor instead. +func (*Project_Spec_Task_Parameter) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 1, 2, 0} +} + +func (x *Project_Spec_Task_Parameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project_Spec_Task_Parameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *Project_Spec_Task_Parameter) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Project_Spec_Task_Parameter) GetDefaultValue() string { + if x != nil { + return x.DefaultValue + } + return "" +} + +func (x *Project_Spec_Task_Parameter) GetOptions() []string { + if x != nil { + return x.Options + } + return nil +} + +type Project_Status_Cache struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status_Cache) Reset() { + *x = Project_Status_Cache{} + mi := &file_projecthub_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status_Cache) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status_Cache) ProtoMessage() {} + +func (x *Project_Status_Cache) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status_Cache.ProtoReflect.Descriptor instead. +func (*Project_Status_Cache) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 0} +} + +func (x *Project_Status_Cache) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +type Project_Status_ArtifactStore struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status_ArtifactStore) Reset() { + *x = Project_Status_ArtifactStore{} + mi := &file_projecthub_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status_ArtifactStore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status_ArtifactStore) ProtoMessage() {} + +func (x *Project_Status_ArtifactStore) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status_ArtifactStore.ProtoReflect.Descriptor instead. +func (*Project_Status_ArtifactStore) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 1} +} + +func (x *Project_Status_ArtifactStore) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +type Project_Status_Repository struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status_Repository) Reset() { + *x = Project_Status_Repository{} + mi := &file_projecthub_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status_Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status_Repository) ProtoMessage() {} + +func (x *Project_Status_Repository) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status_Repository.ProtoReflect.Descriptor instead. +func (*Project_Status_Repository) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 2} +} + +func (x *Project_Status_Repository) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +type Project_Status_Analysis struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status_Analysis) Reset() { + *x = Project_Status_Analysis{} + mi := &file_projecthub_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status_Analysis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status_Analysis) ProtoMessage() {} + +func (x *Project_Status_Analysis) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status_Analysis.ProtoReflect.Descriptor instead. +func (*Project_Status_Analysis) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 3} +} + +func (x *Project_Status_Analysis) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +type Project_Status_Permissions struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Project_Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Projecthub.Project_Status_State" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project_Status_Permissions) Reset() { + *x = Project_Status_Permissions{} + mi := &file_projecthub_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project_Status_Permissions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project_Status_Permissions) ProtoMessage() {} + +func (x *Project_Status_Permissions) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project_Status_Permissions.ProtoReflect.Descriptor instead. +func (*Project_Status_Permissions) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{4, 2, 4} +} + +func (x *Project_Status_Permissions) GetState() Project_Status_State { + if x != nil { + return x.State + } + return Project_Status_INITIALIZING +} + +type CheckDeployKeyResponse_DeployKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckDeployKeyResponse_DeployKey) Reset() { + *x = CheckDeployKeyResponse_DeployKey{} + mi := &file_projecthub_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckDeployKeyResponse_DeployKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckDeployKeyResponse_DeployKey) ProtoMessage() {} + +func (x *CheckDeployKeyResponse_DeployKey) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckDeployKeyResponse_DeployKey.ProtoReflect.Descriptor instead. +func (*CheckDeployKeyResponse_DeployKey) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{24, 0} +} + +func (x *CheckDeployKeyResponse_DeployKey) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CheckDeployKeyResponse_DeployKey) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +func (x *CheckDeployKeyResponse_DeployKey) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *CheckDeployKeyResponse_DeployKey) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +type RegenerateDeployKeyResponse_DeployKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateDeployKeyResponse_DeployKey) Reset() { + *x = RegenerateDeployKeyResponse_DeployKey{} + mi := &file_projecthub_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateDeployKeyResponse_DeployKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateDeployKeyResponse_DeployKey) ProtoMessage() {} + +func (x *RegenerateDeployKeyResponse_DeployKey) ProtoReflect() protoreflect.Message { + mi := &file_projecthub_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateDeployKeyResponse_DeployKey.ProtoReflect.Descriptor instead. +func (*RegenerateDeployKeyResponse_DeployKey) Descriptor() ([]byte, []int) { + return file_projecthub_proto_rawDescGZIP(), []int{26, 0} +} + +func (x *RegenerateDeployKeyResponse_DeployKey) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *RegenerateDeployKeyResponse_DeployKey) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +func (x *RegenerateDeployKeyResponse_DeployKey) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *RegenerateDeployKeyResponse_DeployKey) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +var File_projecthub_proto protoreflect.FileDescriptor + +var file_projecthub_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x22, 0x89, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x65, 0x71, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x71, 0x49, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x22, 0xea, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x71, 0x49, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x43, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x1a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x36, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, + 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, + 0x4e, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, + 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x44, 0x0a, + 0x11, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x22, 0xc4, + 0x22, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x38, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0xbd, 0x01, 0x0a, 0x08, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xd7, 0x17, 0x0a, 0x04, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x4f, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x4f, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, + 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x60, 0x0a, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x64, 0x65, 0x62, 0x75, 0x67, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a, 0x12, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, + 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x3f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x1a, 0x81, 0x0a, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, + 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x37, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, + 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, + 0x75, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x4f, 0x6e, 0x12, 0x74, 0x0a, + 0x14, 0x66, 0x6f, 0x72, 0x6b, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x46, 0x6f, 0x72, + 0x6b, 0x65, 0x64, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, + 0x12, 0x66, 0x6f, 0x72, 0x6b, 0x65, 0x64, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x4e, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, + 0x65, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, 0x09, + 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x09, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x5c, 0x0a, + 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x1a, 0x70, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x6b, 0x65, 0x64, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, + 0x31, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, + 0x72, 0x73, 0x1a, 0x9c, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x6a, 0x0a, + 0x0e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0xa5, 0x01, 0x0a, 0x0c, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x5f, + 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, + 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, + 0x6c, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, + 0x20, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, + 0x01, 0x1a, 0x3b, 0x0a, 0x09, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x67, + 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x52, 0x41, + 0x4e, 0x43, 0x48, 0x45, 0x53, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x41, 0x47, 0x53, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, + 0x54, 0x53, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x4f, 0x52, 0x4b, 0x45, 0x44, 0x5f, 0x50, + 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x53, 0x10, 0x03, 0x12, 0x17, + 0x0a, 0x13, 0x44, 0x52, 0x41, 0x46, 0x54, 0x5f, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x53, 0x10, 0x04, 0x42, 0x0d, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x5f, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x1a, 0x95, 0x02, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x74, + 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x48, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0xbf, + 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x53, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x9c, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x48, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, + 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, + 0x22, 0x25, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x0b, + 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, + 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x22, 0x7b, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, + 0x54, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, + 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4e, 0x4f, 0x4e, 0x5f, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x02, + 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, + 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x4f, 0x52, 0x4b, 0x45, 0x44, 0x5f, 0x50, 0x55, 0x4c, + 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x54, + 0x41, 0x47, 0x10, 0x05, 0x1a, 0xde, 0x07, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x42, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x5b, 0x0a, 0x0e, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x08, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x08, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x54, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4b, 0x0a, + 0x05, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x53, 0x0a, 0x0d, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, + 0x50, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x42, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x1a, 0x4e, 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x42, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x1a, 0x51, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x42, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x22, 0x3f, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, + 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x4e, 0x42, 0x4f, 0x41, 0x52, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x22, 0xf2, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x72, 0x65, 0x70, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, + 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xff, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x65, 0x74, 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, 0x23, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x55, + 0x72, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x18, 0x07, 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, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, + 0x74, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, + 0x45, 0x56, 0x49, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, + 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 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, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 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, 0x23, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x8f, + 0x01, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x8b, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, + 0x79, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x95, + 0x01, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, + 0x75, 0x62, 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, 0x08, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6f, 0x6e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, + 0x6b, 0x69, 0x70, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x8d, 0x01, + 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xc6, 0x01, + 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x19, 0x6f, + 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x61, + 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, + 0x6f, 0x6d, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x41, 0x6e, + 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x75, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, + 0x79, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, + 0x0f, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x61, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5f, 0x0a, 0x0c, 0x55, 0x73, + 0x65, 0x72, 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, 0x23, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7f, 0x0a, 0x0d, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, + 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x68, 0x0a, 0x15, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd3, 0x02, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x57, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, + 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x1a, 0x9d, 0x01, 0x0a, + 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x6d, 0x0a, 0x1a, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x4b, 0x65, 0x79, 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, 0x23, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xdd, 0x02, 0x0a, 0x1b, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5c, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, + 0x52, 0x09, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x1a, 0x9d, 0x01, 0x0a, 0x09, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x66, 0x0a, 0x13, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, + 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x6b, 0x0a, 0x18, 0x52, 0x65, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x22, 0x1b, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x85, + 0x01, 0x0a, 0x19, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 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, 0x23, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x1a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x92, 0x01, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6b, 0x41, + 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x15, + 0x46, 0x6f, 0x72, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x69, 0x0a, 0x16, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x53, + 0x77, 0x69, 0x74, 0x63, 0x68, 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, 0x23, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5b, 0x0a, + 0x17, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6a, 0x0a, 0x17, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5c, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x71, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 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, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7b, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x80, + 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0x6f, 0x0a, 0x14, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x32, 0x8b, 0x0f, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x12, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, + 0x08, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0c, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x2b, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, + 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x12, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x57, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x07, 0x44, 0x65, 0x73, + 0x74, 0x72, 0x6f, 0x79, 0x12, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x44, 0x65, + 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x12, + 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8a, 0x01, + 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x36, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x37, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x12, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x12, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x0d, 0x46, 0x6f, 0x72, 0x6b, 0x41, + 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x46, 0x6f, 0x72, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x0f, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, + 0x70, 0x70, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x10, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x4f, 0x6e, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, + 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x68, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_projecthub_proto_rawDescOnce sync.Once + file_projecthub_proto_rawDescData = file_projecthub_proto_rawDesc +) + +func file_projecthub_proto_rawDescGZIP() []byte { + file_projecthub_proto_rawDescOnce.Do(func() { + file_projecthub_proto_rawDescData = protoimpl.X.CompressGZIP(file_projecthub_proto_rawDescData) + }) + return file_projecthub_proto_rawDescData +} + +var file_projecthub_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_projecthub_proto_msgTypes = make([]protoimpl.MessageInfo, 66) +var file_projecthub_proto_goTypes = []any{ + (ResponseMeta_Code)(0), // 0: InternalApi.Projecthub.ResponseMeta.Code + (Project_Spec_Visibility)(0), // 1: InternalApi.Projecthub.Project.Spec.Visibility + (Project_Spec_PermissionType)(0), // 2: InternalApi.Projecthub.Project.Spec.PermissionType + (Project_Spec_Repository_RunType)(0), // 3: InternalApi.Projecthub.Project.Spec.Repository.RunType + (Project_Spec_Repository_Status_PipelineFile_Level)(0), // 4: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.Level + (Project_Spec_Scheduler_Status)(0), // 5: InternalApi.Projecthub.Project.Spec.Scheduler.Status + (Project_Spec_Task_Status)(0), // 6: InternalApi.Projecthub.Project.Spec.Task.Status + (Project_Status_State)(0), // 7: InternalApi.Projecthub.Project.Status.State + (ListKeysetRequest_Direction)(0), // 8: InternalApi.Projecthub.ListKeysetRequest.Direction + (*RequestMeta)(nil), // 9: InternalApi.Projecthub.RequestMeta + (*ResponseMeta)(nil), // 10: InternalApi.Projecthub.ResponseMeta + (*PaginationRequest)(nil), // 11: InternalApi.Projecthub.PaginationRequest + (*PaginationResponse)(nil), // 12: InternalApi.Projecthub.PaginationResponse + (*Project)(nil), // 13: InternalApi.Projecthub.Project + (*ListRequest)(nil), // 14: InternalApi.Projecthub.ListRequest + (*ListResponse)(nil), // 15: InternalApi.Projecthub.ListResponse + (*ListKeysetRequest)(nil), // 16: InternalApi.Projecthub.ListKeysetRequest + (*ListKeysetResponse)(nil), // 17: InternalApi.Projecthub.ListKeysetResponse + (*DescribeRequest)(nil), // 18: InternalApi.Projecthub.DescribeRequest + (*DescribeResponse)(nil), // 19: InternalApi.Projecthub.DescribeResponse + (*DescribeManyRequest)(nil), // 20: InternalApi.Projecthub.DescribeManyRequest + (*DescribeManyResponse)(nil), // 21: InternalApi.Projecthub.DescribeManyResponse + (*CreateRequest)(nil), // 22: InternalApi.Projecthub.CreateRequest + (*CreateResponse)(nil), // 23: InternalApi.Projecthub.CreateResponse + (*UpdateRequest)(nil), // 24: InternalApi.Projecthub.UpdateRequest + (*UpdateResponse)(nil), // 25: InternalApi.Projecthub.UpdateResponse + (*DestroyRequest)(nil), // 26: InternalApi.Projecthub.DestroyRequest + (*DestroyResponse)(nil), // 27: InternalApi.Projecthub.DestroyResponse + (*RestoreRequest)(nil), // 28: InternalApi.Projecthub.RestoreRequest + (*RestoreResponse)(nil), // 29: InternalApi.Projecthub.RestoreResponse + (*UsersRequest)(nil), // 30: InternalApi.Projecthub.UsersRequest + (*UsersResponse)(nil), // 31: InternalApi.Projecthub.UsersResponse + (*CheckDeployKeyRequest)(nil), // 32: InternalApi.Projecthub.CheckDeployKeyRequest + (*CheckDeployKeyResponse)(nil), // 33: InternalApi.Projecthub.CheckDeployKeyResponse + (*RegenerateDeployKeyRequest)(nil), // 34: InternalApi.Projecthub.RegenerateDeployKeyRequest + (*RegenerateDeployKeyResponse)(nil), // 35: InternalApi.Projecthub.RegenerateDeployKeyResponse + (*CheckWebhookRequest)(nil), // 36: InternalApi.Projecthub.CheckWebhookRequest + (*CheckWebhookResponse)(nil), // 37: InternalApi.Projecthub.CheckWebhookResponse + (*RegenerateWebhookRequest)(nil), // 38: InternalApi.Projecthub.RegenerateWebhookRequest + (*RegenerateWebhookResponse)(nil), // 39: InternalApi.Projecthub.RegenerateWebhookResponse + (*Webhook)(nil), // 40: InternalApi.Projecthub.Webhook + (*ChangeProjectOwnerRequest)(nil), // 41: InternalApi.Projecthub.ChangeProjectOwnerRequest + (*ChangeProjectOwnerResponse)(nil), // 42: InternalApi.Projecthub.ChangeProjectOwnerResponse + (*ForkAndCreateRequest)(nil), // 43: InternalApi.Projecthub.ForkAndCreateRequest + (*ForkAndCreateResponse)(nil), // 44: InternalApi.Projecthub.ForkAndCreateResponse + (*GithubAppSwitchRequest)(nil), // 45: InternalApi.Projecthub.GithubAppSwitchRequest + (*GithubAppSwitchResponse)(nil), // 46: InternalApi.Projecthub.GithubAppSwitchResponse + (*FinishOnboardingRequest)(nil), // 47: InternalApi.Projecthub.FinishOnboardingRequest + (*FinishOnboardingResponse)(nil), // 48: InternalApi.Projecthub.FinishOnboardingResponse + (*RegenerateWebhookSecretRequest)(nil), // 49: InternalApi.Projecthub.RegenerateWebhookSecretRequest + (*RegenerateWebhookSecretResponse)(nil), // 50: InternalApi.Projecthub.RegenerateWebhookSecretResponse + (*ProjectCreated)(nil), // 51: InternalApi.Projecthub.ProjectCreated + (*ProjectDeleted)(nil), // 52: InternalApi.Projecthub.ProjectDeleted + (*ProjectRestored)(nil), // 53: InternalApi.Projecthub.ProjectRestored + (*ProjectUpdated)(nil), // 54: InternalApi.Projecthub.ProjectUpdated + (*CollaboratorsChanged)(nil), // 55: InternalApi.Projecthub.CollaboratorsChanged + (*ResponseMeta_Status)(nil), // 56: InternalApi.Projecthub.ResponseMeta.Status + (*Project_Metadata)(nil), // 57: InternalApi.Projecthub.Project.Metadata + (*Project_Spec)(nil), // 58: InternalApi.Projecthub.Project.Spec + (*Project_Status)(nil), // 59: InternalApi.Projecthub.Project.Status + (*Project_Spec_Repository)(nil), // 60: InternalApi.Projecthub.Project.Spec.Repository + (*Project_Spec_Scheduler)(nil), // 61: InternalApi.Projecthub.Project.Spec.Scheduler + (*Project_Spec_Task)(nil), // 62: InternalApi.Projecthub.Project.Spec.Task + (*Project_Spec_Repository_ForkedPullRequests)(nil), // 63: InternalApi.Projecthub.Project.Spec.Repository.ForkedPullRequests + (*Project_Spec_Repository_Status)(nil), // 64: InternalApi.Projecthub.Project.Spec.Repository.Status + (*Project_Spec_Repository_Whitelist)(nil), // 65: InternalApi.Projecthub.Project.Spec.Repository.Whitelist + (*Project_Spec_Repository_Status_PipelineFile)(nil), // 66: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile + (*Project_Spec_Task_Parameter)(nil), // 67: InternalApi.Projecthub.Project.Spec.Task.Parameter + (*Project_Status_Cache)(nil), // 68: InternalApi.Projecthub.Project.Status.Cache + (*Project_Status_ArtifactStore)(nil), // 69: InternalApi.Projecthub.Project.Status.ArtifactStore + (*Project_Status_Repository)(nil), // 70: InternalApi.Projecthub.Project.Status.Repository + (*Project_Status_Analysis)(nil), // 71: InternalApi.Projecthub.Project.Status.Analysis + (*Project_Status_Permissions)(nil), // 72: InternalApi.Projecthub.Project.Status.Permissions + (*CheckDeployKeyResponse_DeployKey)(nil), // 73: InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey + (*RegenerateDeployKeyResponse_DeployKey)(nil), // 74: InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey + (*timestamppb.Timestamp)(nil), // 75: google.protobuf.Timestamp + (*user.User)(nil), // 76: InternalApi.User.User + (repository_integrator.IntegrationType)(0), // 77: InternalApi.RepositoryIntegrator.IntegrationType +} +var file_projecthub_proto_depIdxs = []int32{ + 56, // 0: InternalApi.Projecthub.ResponseMeta.status:type_name -> InternalApi.Projecthub.ResponseMeta.Status + 57, // 1: InternalApi.Projecthub.Project.metadata:type_name -> InternalApi.Projecthub.Project.Metadata + 58, // 2: InternalApi.Projecthub.Project.spec:type_name -> InternalApi.Projecthub.Project.Spec + 59, // 3: InternalApi.Projecthub.Project.status:type_name -> InternalApi.Projecthub.Project.Status + 9, // 4: InternalApi.Projecthub.ListRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 11, // 5: InternalApi.Projecthub.ListRequest.pagination:type_name -> InternalApi.Projecthub.PaginationRequest + 10, // 6: InternalApi.Projecthub.ListResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 12, // 7: InternalApi.Projecthub.ListResponse.pagination:type_name -> InternalApi.Projecthub.PaginationResponse + 13, // 8: InternalApi.Projecthub.ListResponse.projects:type_name -> InternalApi.Projecthub.Project + 9, // 9: InternalApi.Projecthub.ListKeysetRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 8, // 10: InternalApi.Projecthub.ListKeysetRequest.direction:type_name -> InternalApi.Projecthub.ListKeysetRequest.Direction + 75, // 11: InternalApi.Projecthub.ListKeysetRequest.created_after:type_name -> google.protobuf.Timestamp + 10, // 12: InternalApi.Projecthub.ListKeysetResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 13: InternalApi.Projecthub.ListKeysetResponse.projects:type_name -> InternalApi.Projecthub.Project + 9, // 14: InternalApi.Projecthub.DescribeRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 15: InternalApi.Projecthub.DescribeResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 16: InternalApi.Projecthub.DescribeResponse.project:type_name -> InternalApi.Projecthub.Project + 9, // 17: InternalApi.Projecthub.DescribeManyRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 18: InternalApi.Projecthub.DescribeManyResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 19: InternalApi.Projecthub.DescribeManyResponse.projects:type_name -> InternalApi.Projecthub.Project + 9, // 20: InternalApi.Projecthub.CreateRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 13, // 21: InternalApi.Projecthub.CreateRequest.project:type_name -> InternalApi.Projecthub.Project + 10, // 22: InternalApi.Projecthub.CreateResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 23: InternalApi.Projecthub.CreateResponse.project:type_name -> InternalApi.Projecthub.Project + 9, // 24: InternalApi.Projecthub.UpdateRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 13, // 25: InternalApi.Projecthub.UpdateRequest.project:type_name -> InternalApi.Projecthub.Project + 10, // 26: InternalApi.Projecthub.UpdateResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 27: InternalApi.Projecthub.UpdateResponse.project:type_name -> InternalApi.Projecthub.Project + 9, // 28: InternalApi.Projecthub.DestroyRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 29: InternalApi.Projecthub.DestroyResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 9, // 30: InternalApi.Projecthub.RestoreRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 31: InternalApi.Projecthub.RestoreResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 9, // 32: InternalApi.Projecthub.UsersRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 33: InternalApi.Projecthub.UsersResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 76, // 34: InternalApi.Projecthub.UsersResponse.users:type_name -> InternalApi.User.User + 9, // 35: InternalApi.Projecthub.CheckDeployKeyRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 36: InternalApi.Projecthub.CheckDeployKeyResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 73, // 37: InternalApi.Projecthub.CheckDeployKeyResponse.deploy_key:type_name -> InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey + 9, // 38: InternalApi.Projecthub.RegenerateDeployKeyRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 39: InternalApi.Projecthub.RegenerateDeployKeyResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 74, // 40: InternalApi.Projecthub.RegenerateDeployKeyResponse.deploy_key:type_name -> InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey + 9, // 41: InternalApi.Projecthub.CheckWebhookRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 42: InternalApi.Projecthub.CheckWebhookResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 40, // 43: InternalApi.Projecthub.CheckWebhookResponse.webhook:type_name -> InternalApi.Projecthub.Webhook + 9, // 44: InternalApi.Projecthub.RegenerateWebhookRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 45: InternalApi.Projecthub.RegenerateWebhookResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 40, // 46: InternalApi.Projecthub.RegenerateWebhookResponse.webhook:type_name -> InternalApi.Projecthub.Webhook + 9, // 47: InternalApi.Projecthub.ChangeProjectOwnerRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 48: InternalApi.Projecthub.ChangeProjectOwnerResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 9, // 49: InternalApi.Projecthub.ForkAndCreateRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 13, // 50: InternalApi.Projecthub.ForkAndCreateRequest.project:type_name -> InternalApi.Projecthub.Project + 10, // 51: InternalApi.Projecthub.ForkAndCreateResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 13, // 52: InternalApi.Projecthub.ForkAndCreateResponse.project:type_name -> InternalApi.Projecthub.Project + 9, // 53: InternalApi.Projecthub.GithubAppSwitchRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 54: InternalApi.Projecthub.GithubAppSwitchResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 9, // 55: InternalApi.Projecthub.FinishOnboardingRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 56: InternalApi.Projecthub.FinishOnboardingResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 9, // 57: InternalApi.Projecthub.RegenerateWebhookSecretRequest.metadata:type_name -> InternalApi.Projecthub.RequestMeta + 10, // 58: InternalApi.Projecthub.RegenerateWebhookSecretResponse.metadata:type_name -> InternalApi.Projecthub.ResponseMeta + 75, // 59: InternalApi.Projecthub.ProjectCreated.timestamp:type_name -> google.protobuf.Timestamp + 75, // 60: InternalApi.Projecthub.ProjectDeleted.timestamp:type_name -> google.protobuf.Timestamp + 75, // 61: InternalApi.Projecthub.ProjectRestored.timestamp:type_name -> google.protobuf.Timestamp + 75, // 62: InternalApi.Projecthub.ProjectUpdated.timestamp:type_name -> google.protobuf.Timestamp + 75, // 63: InternalApi.Projecthub.CollaboratorsChanged.timestamp:type_name -> google.protobuf.Timestamp + 0, // 64: InternalApi.Projecthub.ResponseMeta.Status.code:type_name -> InternalApi.Projecthub.ResponseMeta.Code + 75, // 65: InternalApi.Projecthub.Project.Metadata.created_at:type_name -> google.protobuf.Timestamp + 60, // 66: InternalApi.Projecthub.Project.Spec.repository:type_name -> InternalApi.Projecthub.Project.Spec.Repository + 61, // 67: InternalApi.Projecthub.Project.Spec.schedulers:type_name -> InternalApi.Projecthub.Project.Spec.Scheduler + 1, // 68: InternalApi.Projecthub.Project.Spec.visibility:type_name -> InternalApi.Projecthub.Project.Spec.Visibility + 2, // 69: InternalApi.Projecthub.Project.Spec.debug_permissions:type_name -> InternalApi.Projecthub.Project.Spec.PermissionType + 2, // 70: InternalApi.Projecthub.Project.Spec.attach_permissions:type_name -> InternalApi.Projecthub.Project.Spec.PermissionType + 62, // 71: InternalApi.Projecthub.Project.Spec.tasks:type_name -> InternalApi.Projecthub.Project.Spec.Task + 7, // 72: InternalApi.Projecthub.Project.Status.state:type_name -> InternalApi.Projecthub.Project.Status.State + 68, // 73: InternalApi.Projecthub.Project.Status.cache:type_name -> InternalApi.Projecthub.Project.Status.Cache + 69, // 74: InternalApi.Projecthub.Project.Status.artifact_store:type_name -> InternalApi.Projecthub.Project.Status.ArtifactStore + 70, // 75: InternalApi.Projecthub.Project.Status.repository:type_name -> InternalApi.Projecthub.Project.Status.Repository + 71, // 76: InternalApi.Projecthub.Project.Status.analysis:type_name -> InternalApi.Projecthub.Project.Status.Analysis + 72, // 77: InternalApi.Projecthub.Project.Status.permissions:type_name -> InternalApi.Projecthub.Project.Status.Permissions + 3, // 78: InternalApi.Projecthub.Project.Spec.Repository.run_on:type_name -> InternalApi.Projecthub.Project.Spec.Repository.RunType + 63, // 79: InternalApi.Projecthub.Project.Spec.Repository.forked_pull_requests:type_name -> InternalApi.Projecthub.Project.Spec.Repository.ForkedPullRequests + 64, // 80: InternalApi.Projecthub.Project.Spec.Repository.status:type_name -> InternalApi.Projecthub.Project.Spec.Repository.Status + 65, // 81: InternalApi.Projecthub.Project.Spec.Repository.whitelist:type_name -> InternalApi.Projecthub.Project.Spec.Repository.Whitelist + 77, // 82: InternalApi.Projecthub.Project.Spec.Repository.integration_type:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 5, // 83: InternalApi.Projecthub.Project.Spec.Scheduler.status:type_name -> InternalApi.Projecthub.Project.Spec.Scheduler.Status + 6, // 84: InternalApi.Projecthub.Project.Spec.Task.status:type_name -> InternalApi.Projecthub.Project.Spec.Task.Status + 67, // 85: InternalApi.Projecthub.Project.Spec.Task.parameters:type_name -> InternalApi.Projecthub.Project.Spec.Task.Parameter + 66, // 86: InternalApi.Projecthub.Project.Spec.Repository.Status.pipeline_files:type_name -> InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile + 4, // 87: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.level:type_name -> InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.Level + 7, // 88: InternalApi.Projecthub.Project.Status.Cache.state:type_name -> InternalApi.Projecthub.Project.Status.State + 7, // 89: InternalApi.Projecthub.Project.Status.ArtifactStore.state:type_name -> InternalApi.Projecthub.Project.Status.State + 7, // 90: InternalApi.Projecthub.Project.Status.Repository.state:type_name -> InternalApi.Projecthub.Project.Status.State + 7, // 91: InternalApi.Projecthub.Project.Status.Analysis.state:type_name -> InternalApi.Projecthub.Project.Status.State + 7, // 92: InternalApi.Projecthub.Project.Status.Permissions.state:type_name -> InternalApi.Projecthub.Project.Status.State + 75, // 93: InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey.created_at:type_name -> google.protobuf.Timestamp + 75, // 94: InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey.created_at:type_name -> google.protobuf.Timestamp + 14, // 95: InternalApi.Projecthub.ProjectService.List:input_type -> InternalApi.Projecthub.ListRequest + 16, // 96: InternalApi.Projecthub.ProjectService.ListKeyset:input_type -> InternalApi.Projecthub.ListKeysetRequest + 18, // 97: InternalApi.Projecthub.ProjectService.Describe:input_type -> InternalApi.Projecthub.DescribeRequest + 20, // 98: InternalApi.Projecthub.ProjectService.DescribeMany:input_type -> InternalApi.Projecthub.DescribeManyRequest + 22, // 99: InternalApi.Projecthub.ProjectService.Create:input_type -> InternalApi.Projecthub.CreateRequest + 24, // 100: InternalApi.Projecthub.ProjectService.Update:input_type -> InternalApi.Projecthub.UpdateRequest + 26, // 101: InternalApi.Projecthub.ProjectService.Destroy:input_type -> InternalApi.Projecthub.DestroyRequest + 28, // 102: InternalApi.Projecthub.ProjectService.Restore:input_type -> InternalApi.Projecthub.RestoreRequest + 30, // 103: InternalApi.Projecthub.ProjectService.Users:input_type -> InternalApi.Projecthub.UsersRequest + 32, // 104: InternalApi.Projecthub.ProjectService.CheckDeployKey:input_type -> InternalApi.Projecthub.CheckDeployKeyRequest + 34, // 105: InternalApi.Projecthub.ProjectService.RegenerateDeployKey:input_type -> InternalApi.Projecthub.RegenerateDeployKeyRequest + 36, // 106: InternalApi.Projecthub.ProjectService.CheckWebhook:input_type -> InternalApi.Projecthub.CheckWebhookRequest + 38, // 107: InternalApi.Projecthub.ProjectService.RegenerateWebhook:input_type -> InternalApi.Projecthub.RegenerateWebhookRequest + 49, // 108: InternalApi.Projecthub.ProjectService.RegenerateWebhookSecret:input_type -> InternalApi.Projecthub.RegenerateWebhookSecretRequest + 41, // 109: InternalApi.Projecthub.ProjectService.ChangeProjectOwner:input_type -> InternalApi.Projecthub.ChangeProjectOwnerRequest + 43, // 110: InternalApi.Projecthub.ProjectService.ForkAndCreate:input_type -> InternalApi.Projecthub.ForkAndCreateRequest + 45, // 111: InternalApi.Projecthub.ProjectService.GithubAppSwitch:input_type -> InternalApi.Projecthub.GithubAppSwitchRequest + 47, // 112: InternalApi.Projecthub.ProjectService.FinishOnboarding:input_type -> InternalApi.Projecthub.FinishOnboardingRequest + 15, // 113: InternalApi.Projecthub.ProjectService.List:output_type -> InternalApi.Projecthub.ListResponse + 17, // 114: InternalApi.Projecthub.ProjectService.ListKeyset:output_type -> InternalApi.Projecthub.ListKeysetResponse + 19, // 115: InternalApi.Projecthub.ProjectService.Describe:output_type -> InternalApi.Projecthub.DescribeResponse + 21, // 116: InternalApi.Projecthub.ProjectService.DescribeMany:output_type -> InternalApi.Projecthub.DescribeManyResponse + 23, // 117: InternalApi.Projecthub.ProjectService.Create:output_type -> InternalApi.Projecthub.CreateResponse + 25, // 118: InternalApi.Projecthub.ProjectService.Update:output_type -> InternalApi.Projecthub.UpdateResponse + 27, // 119: InternalApi.Projecthub.ProjectService.Destroy:output_type -> InternalApi.Projecthub.DestroyResponse + 29, // 120: InternalApi.Projecthub.ProjectService.Restore:output_type -> InternalApi.Projecthub.RestoreResponse + 31, // 121: InternalApi.Projecthub.ProjectService.Users:output_type -> InternalApi.Projecthub.UsersResponse + 33, // 122: InternalApi.Projecthub.ProjectService.CheckDeployKey:output_type -> InternalApi.Projecthub.CheckDeployKeyResponse + 35, // 123: InternalApi.Projecthub.ProjectService.RegenerateDeployKey:output_type -> InternalApi.Projecthub.RegenerateDeployKeyResponse + 37, // 124: InternalApi.Projecthub.ProjectService.CheckWebhook:output_type -> InternalApi.Projecthub.CheckWebhookResponse + 39, // 125: InternalApi.Projecthub.ProjectService.RegenerateWebhook:output_type -> InternalApi.Projecthub.RegenerateWebhookResponse + 50, // 126: InternalApi.Projecthub.ProjectService.RegenerateWebhookSecret:output_type -> InternalApi.Projecthub.RegenerateWebhookSecretResponse + 42, // 127: InternalApi.Projecthub.ProjectService.ChangeProjectOwner:output_type -> InternalApi.Projecthub.ChangeProjectOwnerResponse + 44, // 128: InternalApi.Projecthub.ProjectService.ForkAndCreate:output_type -> InternalApi.Projecthub.ForkAndCreateResponse + 46, // 129: InternalApi.Projecthub.ProjectService.GithubAppSwitch:output_type -> InternalApi.Projecthub.GithubAppSwitchResponse + 48, // 130: InternalApi.Projecthub.ProjectService.FinishOnboarding:output_type -> InternalApi.Projecthub.FinishOnboardingResponse + 113, // [113:131] is the sub-list for method output_type + 95, // [95:113] is the sub-list for method input_type + 95, // [95:95] is the sub-list for extension type_name + 95, // [95:95] is the sub-list for extension extendee + 0, // [0:95] is the sub-list for field type_name +} + +func init() { file_projecthub_proto_init() } +func file_projecthub_proto_init() { + if File_projecthub_proto != nil { + return + } + file_projecthub_proto_msgTypes[51].OneofWrappers = []any{ + (*Project_Spec_Repository_Run)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_projecthub_proto_rawDesc, + NumEnums: 9, + NumMessages: 66, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_projecthub_proto_goTypes, + DependencyIndexes: file_projecthub_proto_depIdxs, + EnumInfos: file_projecthub_proto_enumTypes, + MessageInfos: file_projecthub_proto_msgTypes, + }.Build() + File_projecthub_proto = out.File + file_projecthub_proto_rawDesc = nil + file_projecthub_proto_goTypes = nil + file_projecthub_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/projecthub/projecthub_grpc.pb.go b/mcp_server/pkg/internal_api/projecthub/projecthub_grpc.pb.go new file mode 100644 index 000000000..364944469 --- /dev/null +++ b/mcp_server/pkg/internal_api/projecthub/projecthub_grpc.pb.go @@ -0,0 +1,807 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: projecthub.proto + +package projecthub + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ProjectService_List_FullMethodName = "/InternalApi.Projecthub.ProjectService/List" // #nosec G101 -- gRPC method name, not credential + ProjectService_ListKeyset_FullMethodName = "/InternalApi.Projecthub.ProjectService/ListKeyset" // #nosec G101 -- gRPC method name, not credential + ProjectService_Describe_FullMethodName = "/InternalApi.Projecthub.ProjectService/Describe" // #nosec G101 -- gRPC method name, not credential + ProjectService_DescribeMany_FullMethodName = "/InternalApi.Projecthub.ProjectService/DescribeMany" // #nosec G101 -- gRPC method name, not credential + ProjectService_Create_FullMethodName = "/InternalApi.Projecthub.ProjectService/Create" // #nosec G101 -- gRPC method name, not credential + ProjectService_Update_FullMethodName = "/InternalApi.Projecthub.ProjectService/Update" // #nosec G101 -- gRPC method name, not credential + ProjectService_Destroy_FullMethodName = "/InternalApi.Projecthub.ProjectService/Destroy" // #nosec G101 -- gRPC method name, not credential + ProjectService_Restore_FullMethodName = "/InternalApi.Projecthub.ProjectService/Restore" // #nosec G101 -- gRPC method name, not credential + ProjectService_Users_FullMethodName = "/InternalApi.Projecthub.ProjectService/Users" // #nosec G101 -- gRPC method name, not credential + ProjectService_CheckDeployKey_FullMethodName = "/InternalApi.Projecthub.ProjectService/CheckDeployKey" // #nosec G101 -- gRPC method name, not credential + ProjectService_RegenerateDeployKey_FullMethodName = "/InternalApi.Projecthub.ProjectService/RegenerateDeployKey" // #nosec G101 -- gRPC method name, not credential + ProjectService_CheckWebhook_FullMethodName = "/InternalApi.Projecthub.ProjectService/CheckWebhook" // #nosec G101 -- gRPC method name, not credential + ProjectService_RegenerateWebhook_FullMethodName = "/InternalApi.Projecthub.ProjectService/RegenerateWebhook" // #nosec G101 -- gRPC method name, not credential + ProjectService_RegenerateWebhookSecret_FullMethodName = "/InternalApi.Projecthub.ProjectService/RegenerateWebhookSecret" // #nosec G101 -- gRPC method name, not credential + ProjectService_ChangeProjectOwner_FullMethodName = "/InternalApi.Projecthub.ProjectService/ChangeProjectOwner" // #nosec G101 -- gRPC method name, not credential + ProjectService_ForkAndCreate_FullMethodName = "/InternalApi.Projecthub.ProjectService/ForkAndCreate" // #nosec G101 -- gRPC method name, not credential + ProjectService_GithubAppSwitch_FullMethodName = "/InternalApi.Projecthub.ProjectService/GithubAppSwitch" // #nosec G101 -- gRPC method name, not credential + ProjectService_FinishOnboarding_FullMethodName = "/InternalApi.Projecthub.ProjectService/FinishOnboarding" // #nosec G101 -- gRPC method name, not credential +) + +// ProjectServiceClient is the client API for ProjectService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ProjectServiceClient interface { + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) + Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) + Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) + // Operation is called to list Semaphore users on the project. + // Operation is synchronous. + Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*UsersResponse, error) + // Operation is called to check the status of a deploy key. + // Operation is synchronous. + CheckDeployKey(ctx context.Context, in *CheckDeployKeyRequest, opts ...grpc.CallOption) (*CheckDeployKeyResponse, error) + // Operation is called to regenerate a deploy key. + // Operation is synchronous. + RegenerateDeployKey(ctx context.Context, in *RegenerateDeployKeyRequest, opts ...grpc.CallOption) (*RegenerateDeployKeyResponse, error) + // Operation is called to check the status of a webhook. + // Operation is synchronous. + CheckWebhook(ctx context.Context, in *CheckWebhookRequest, opts ...grpc.CallOption) (*CheckWebhookResponse, error) + // Operation is called to regenerate a webhook. + // Operation is synchronous. + RegenerateWebhook(ctx context.Context, in *RegenerateWebhookRequest, opts ...grpc.CallOption) (*RegenerateWebhookResponse, error) + // Operation is called to regenerate a webhook secret token. + // Operation is synchronous. + // Operation is only available for git agnostic projects. + RegenerateWebhookSecret(ctx context.Context, in *RegenerateWebhookSecretRequest, opts ...grpc.CallOption) (*RegenerateWebhookSecretResponse, error) + // Operation is called to change a project owner within the same organization. + // Operation is synchronous. + ChangeProjectOwner(ctx context.Context, in *ChangeProjectOwnerRequest, opts ...grpc.CallOption) (*ChangeProjectOwnerResponse, error) + // Operation is called to fork and then add repository + // Operation is synchronous. + ForkAndCreate(ctx context.Context, in *ForkAndCreateRequest, opts ...grpc.CallOption) (*ForkAndCreateResponse, error) + // Operation is called to switch project from github_oauth_token to github_app integration + // Operation is synchronous. + GithubAppSwitch(ctx context.Context, in *GithubAppSwitchRequest, opts ...grpc.CallOption) (*GithubAppSwitchResponse, error) + // Operation is called to transition project from onboarding to ready state. + // Operation is synchronous. + FinishOnboarding(ctx context.Context, in *FinishOnboardingRequest, opts ...grpc.CallOption) (*FinishOnboardingResponse, error) +} + +type projectServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProjectServiceClient(cc grpc.ClientConnInterface) ProjectServiceClient { + return &projectServiceClient{cc} +} + +func (c *projectServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, ProjectService_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) ListKeyset(ctx context.Context, in *ListKeysetRequest, opts ...grpc.CallOption) (*ListKeysetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListKeysetResponse) + err := c.cc.Invoke(ctx, ProjectService_ListKeyset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, ProjectService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeManyResponse) + err := c.cc.Invoke(ctx, ProjectService_DescribeMany_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateResponse) + err := c.cc.Invoke(ctx, ProjectService_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateResponse) + err := c.cc.Invoke(ctx, ProjectService_Update_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DestroyResponse) + err := c.cc.Invoke(ctx, ProjectService_Destroy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RestoreResponse) + err := c.cc.Invoke(ctx, ProjectService_Restore_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*UsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UsersResponse) + err := c.cc.Invoke(ctx, ProjectService_Users_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) CheckDeployKey(ctx context.Context, in *CheckDeployKeyRequest, opts ...grpc.CallOption) (*CheckDeployKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckDeployKeyResponse) + err := c.cc.Invoke(ctx, ProjectService_CheckDeployKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) RegenerateDeployKey(ctx context.Context, in *RegenerateDeployKeyRequest, opts ...grpc.CallOption) (*RegenerateDeployKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegenerateDeployKeyResponse) + err := c.cc.Invoke(ctx, ProjectService_RegenerateDeployKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) CheckWebhook(ctx context.Context, in *CheckWebhookRequest, opts ...grpc.CallOption) (*CheckWebhookResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckWebhookResponse) + err := c.cc.Invoke(ctx, ProjectService_CheckWebhook_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) RegenerateWebhook(ctx context.Context, in *RegenerateWebhookRequest, opts ...grpc.CallOption) (*RegenerateWebhookResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegenerateWebhookResponse) + err := c.cc.Invoke(ctx, ProjectService_RegenerateWebhook_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) RegenerateWebhookSecret(ctx context.Context, in *RegenerateWebhookSecretRequest, opts ...grpc.CallOption) (*RegenerateWebhookSecretResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegenerateWebhookSecretResponse) + err := c.cc.Invoke(ctx, ProjectService_RegenerateWebhookSecret_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) ChangeProjectOwner(ctx context.Context, in *ChangeProjectOwnerRequest, opts ...grpc.CallOption) (*ChangeProjectOwnerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ChangeProjectOwnerResponse) + err := c.cc.Invoke(ctx, ProjectService_ChangeProjectOwner_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) ForkAndCreate(ctx context.Context, in *ForkAndCreateRequest, opts ...grpc.CallOption) (*ForkAndCreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ForkAndCreateResponse) + err := c.cc.Invoke(ctx, ProjectService_ForkAndCreate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) GithubAppSwitch(ctx context.Context, in *GithubAppSwitchRequest, opts ...grpc.CallOption) (*GithubAppSwitchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GithubAppSwitchResponse) + err := c.cc.Invoke(ctx, ProjectService_GithubAppSwitch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) FinishOnboarding(ctx context.Context, in *FinishOnboardingRequest, opts ...grpc.CallOption) (*FinishOnboardingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FinishOnboardingResponse) + err := c.cc.Invoke(ctx, ProjectService_FinishOnboarding_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProjectServiceServer is the server API for ProjectService service. +// All implementations should embed UnimplementedProjectServiceServer +// for forward compatibility. +type ProjectServiceServer interface { + List(context.Context, *ListRequest) (*ListResponse, error) + ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) + Create(context.Context, *CreateRequest) (*CreateResponse, error) + Update(context.Context, *UpdateRequest) (*UpdateResponse, error) + Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) + Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) + // Operation is called to list Semaphore users on the project. + // Operation is synchronous. + Users(context.Context, *UsersRequest) (*UsersResponse, error) + // Operation is called to check the status of a deploy key. + // Operation is synchronous. + CheckDeployKey(context.Context, *CheckDeployKeyRequest) (*CheckDeployKeyResponse, error) + // Operation is called to regenerate a deploy key. + // Operation is synchronous. + RegenerateDeployKey(context.Context, *RegenerateDeployKeyRequest) (*RegenerateDeployKeyResponse, error) + // Operation is called to check the status of a webhook. + // Operation is synchronous. + CheckWebhook(context.Context, *CheckWebhookRequest) (*CheckWebhookResponse, error) + // Operation is called to regenerate a webhook. + // Operation is synchronous. + RegenerateWebhook(context.Context, *RegenerateWebhookRequest) (*RegenerateWebhookResponse, error) + // Operation is called to regenerate a webhook secret token. + // Operation is synchronous. + // Operation is only available for git agnostic projects. + RegenerateWebhookSecret(context.Context, *RegenerateWebhookSecretRequest) (*RegenerateWebhookSecretResponse, error) + // Operation is called to change a project owner within the same organization. + // Operation is synchronous. + ChangeProjectOwner(context.Context, *ChangeProjectOwnerRequest) (*ChangeProjectOwnerResponse, error) + // Operation is called to fork and then add repository + // Operation is synchronous. + ForkAndCreate(context.Context, *ForkAndCreateRequest) (*ForkAndCreateResponse, error) + // Operation is called to switch project from github_oauth_token to github_app integration + // Operation is synchronous. + GithubAppSwitch(context.Context, *GithubAppSwitchRequest) (*GithubAppSwitchResponse, error) + // Operation is called to transition project from onboarding to ready state. + // Operation is synchronous. + FinishOnboarding(context.Context, *FinishOnboardingRequest) (*FinishOnboardingResponse, error) +} + +// UnimplementedProjectServiceServer should 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 UnimplementedProjectServiceServer struct{} + +func (UnimplementedProjectServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedProjectServiceServer) ListKeyset(context.Context, *ListKeysetRequest) (*ListKeysetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyset not implemented") +} +func (UnimplementedProjectServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedProjectServiceServer) DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeMany not implemented") +} +func (UnimplementedProjectServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedProjectServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedProjectServiceServer) Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Destroy not implemented") +} +func (UnimplementedProjectServiceServer) Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented") +} +func (UnimplementedProjectServiceServer) Users(context.Context, *UsersRequest) (*UsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Users not implemented") +} +func (UnimplementedProjectServiceServer) CheckDeployKey(context.Context, *CheckDeployKeyRequest) (*CheckDeployKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckDeployKey not implemented") +} +func (UnimplementedProjectServiceServer) RegenerateDeployKey(context.Context, *RegenerateDeployKeyRequest) (*RegenerateDeployKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegenerateDeployKey not implemented") +} +func (UnimplementedProjectServiceServer) CheckWebhook(context.Context, *CheckWebhookRequest) (*CheckWebhookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckWebhook not implemented") +} +func (UnimplementedProjectServiceServer) RegenerateWebhook(context.Context, *RegenerateWebhookRequest) (*RegenerateWebhookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegenerateWebhook not implemented") +} +func (UnimplementedProjectServiceServer) RegenerateWebhookSecret(context.Context, *RegenerateWebhookSecretRequest) (*RegenerateWebhookSecretResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegenerateWebhookSecret not implemented") +} +func (UnimplementedProjectServiceServer) ChangeProjectOwner(context.Context, *ChangeProjectOwnerRequest) (*ChangeProjectOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeProjectOwner not implemented") +} +func (UnimplementedProjectServiceServer) ForkAndCreate(context.Context, *ForkAndCreateRequest) (*ForkAndCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ForkAndCreate not implemented") +} +func (UnimplementedProjectServiceServer) GithubAppSwitch(context.Context, *GithubAppSwitchRequest) (*GithubAppSwitchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GithubAppSwitch not implemented") +} +func (UnimplementedProjectServiceServer) FinishOnboarding(context.Context, *FinishOnboardingRequest) (*FinishOnboardingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinishOnboarding not implemented") +} +func (UnimplementedProjectServiceServer) testEmbeddedByValue() {} + +// UnsafeProjectServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProjectServiceServer will +// result in compilation errors. +type UnsafeProjectServiceServer interface { + mustEmbedUnimplementedProjectServiceServer() +} + +func RegisterProjectServiceServer(s grpc.ServiceRegistrar, srv ProjectServiceServer) { + // If the following call pancis, it indicates UnimplementedProjectServiceServer 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(&ProjectService_ServiceDesc, srv) +} + +func _ProjectService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_ListKeyset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeysetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).ListKeyset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_ListKeyset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).ListKeyset(ctx, req.(*ListKeysetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_DescribeMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).DescribeMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_DescribeMany_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).DescribeMany(ctx, req.(*DescribeManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Update(ctx, req.(*UpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Destroy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Destroy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Destroy(ctx, req.(*DestroyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Restore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Restore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Restore(ctx, req.(*RestoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_Users_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Users(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Users_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Users(ctx, req.(*UsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_CheckDeployKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckDeployKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).CheckDeployKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_CheckDeployKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).CheckDeployKey(ctx, req.(*CheckDeployKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_RegenerateDeployKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegenerateDeployKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).RegenerateDeployKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_RegenerateDeployKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).RegenerateDeployKey(ctx, req.(*RegenerateDeployKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_CheckWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckWebhookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).CheckWebhook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_CheckWebhook_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).CheckWebhook(ctx, req.(*CheckWebhookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_RegenerateWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegenerateWebhookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).RegenerateWebhook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_RegenerateWebhook_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).RegenerateWebhook(ctx, req.(*RegenerateWebhookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_RegenerateWebhookSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegenerateWebhookSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).RegenerateWebhookSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_RegenerateWebhookSecret_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).RegenerateWebhookSecret(ctx, req.(*RegenerateWebhookSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_ChangeProjectOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeProjectOwnerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).ChangeProjectOwner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_ChangeProjectOwner_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).ChangeProjectOwner(ctx, req.(*ChangeProjectOwnerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_ForkAndCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ForkAndCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).ForkAndCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_ForkAndCreate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).ForkAndCreate(ctx, req.(*ForkAndCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_GithubAppSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GithubAppSwitchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).GithubAppSwitch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_GithubAppSwitch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).GithubAppSwitch(ctx, req.(*GithubAppSwitchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_FinishOnboarding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinishOnboardingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).FinishOnboarding(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_FinishOnboarding_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).FinishOnboarding(ctx, req.(*FinishOnboardingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProjectService_ServiceDesc is the grpc.ServiceDesc for ProjectService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProjectService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Projecthub.ProjectService", + HandlerType: (*ProjectServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _ProjectService_List_Handler, + }, + { + MethodName: "ListKeyset", + Handler: _ProjectService_ListKeyset_Handler, + }, + { + MethodName: "Describe", + Handler: _ProjectService_Describe_Handler, + }, + { + MethodName: "DescribeMany", + Handler: _ProjectService_DescribeMany_Handler, + }, + { + MethodName: "Create", + Handler: _ProjectService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _ProjectService_Update_Handler, + }, + { + MethodName: "Destroy", + Handler: _ProjectService_Destroy_Handler, + }, + { + MethodName: "Restore", + Handler: _ProjectService_Restore_Handler, + }, + { + MethodName: "Users", + Handler: _ProjectService_Users_Handler, + }, + { + MethodName: "CheckDeployKey", + Handler: _ProjectService_CheckDeployKey_Handler, + }, + { + MethodName: "RegenerateDeployKey", + Handler: _ProjectService_RegenerateDeployKey_Handler, + }, + { + MethodName: "CheckWebhook", + Handler: _ProjectService_CheckWebhook_Handler, + }, + { + MethodName: "RegenerateWebhook", + Handler: _ProjectService_RegenerateWebhook_Handler, + }, + { + MethodName: "RegenerateWebhookSecret", + Handler: _ProjectService_RegenerateWebhookSecret_Handler, + }, + { + MethodName: "ChangeProjectOwner", + Handler: _ProjectService_ChangeProjectOwner_Handler, + }, + { + MethodName: "ForkAndCreate", + Handler: _ProjectService_ForkAndCreate_Handler, + }, + { + MethodName: "GithubAppSwitch", + Handler: _ProjectService_GithubAppSwitch_Handler, + }, + { + MethodName: "FinishOnboarding", + Handler: _ProjectService_FinishOnboarding_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "projecthub.proto", +} diff --git a/mcp_server/pkg/internal_api/rbac/rbac.pb.go b/mcp_server/pkg/internal_api/rbac/rbac.pb.go new file mode 100644 index 000000000..4fb3be7c7 --- /dev/null +++ b/mcp_server/pkg/internal_api/rbac/rbac.pb.go @@ -0,0 +1,2941 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: rbac.proto + +package rbac + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubjectType int32 + +const ( + SubjectType_USER SubjectType = 0 + SubjectType_GROUP SubjectType = 1 + SubjectType_SERVICE_ACCOUNT SubjectType = 2 +) + +// Enum value maps for SubjectType. +var ( + SubjectType_name = map[int32]string{ + 0: "USER", + 1: "GROUP", + 2: "SERVICE_ACCOUNT", + } + SubjectType_value = map[string]int32{ + "USER": 0, + "GROUP": 1, + "SERVICE_ACCOUNT": 2, + } +) + +func (x SubjectType) Enum() *SubjectType { + p := new(SubjectType) + *p = x + return p +} + +func (x SubjectType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubjectType) Descriptor() protoreflect.EnumDescriptor { + return file_rbac_proto_enumTypes[0].Descriptor() +} + +func (SubjectType) Type() protoreflect.EnumType { + return &file_rbac_proto_enumTypes[0] +} + +func (x SubjectType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubjectType.Descriptor instead. +func (SubjectType) EnumDescriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{0} +} + +type Scope int32 + +const ( + Scope_SCOPE_UNSPECIFIED Scope = 0 + Scope_SCOPE_ORG Scope = 1 + Scope_SCOPE_PROJECT Scope = 2 +) + +// Enum value maps for Scope. +var ( + Scope_name = map[int32]string{ + 0: "SCOPE_UNSPECIFIED", + 1: "SCOPE_ORG", + 2: "SCOPE_PROJECT", + } + Scope_value = map[string]int32{ + "SCOPE_UNSPECIFIED": 0, + "SCOPE_ORG": 1, + "SCOPE_PROJECT": 2, + } +) + +func (x Scope) Enum() *Scope { + p := new(Scope) + *p = x + return p +} + +func (x Scope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scope) Descriptor() protoreflect.EnumDescriptor { + return file_rbac_proto_enumTypes[1].Descriptor() +} + +func (Scope) Type() protoreflect.EnumType { + return &file_rbac_proto_enumTypes[1] +} + +func (x Scope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Scope.Descriptor instead. +func (Scope) EnumDescriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{1} +} + +type RoleBindingSource int32 + +const ( + RoleBindingSource_ROLE_BINDING_SOURCE_UNSPECIFIED RoleBindingSource = 0 + RoleBindingSource_ROLE_BINDING_SOURCE_MANUALLY RoleBindingSource = 1 + RoleBindingSource_ROLE_BINDING_SOURCE_GITHUB RoleBindingSource = 2 + RoleBindingSource_ROLE_BINDING_SOURCE_BITBUCKET RoleBindingSource = 3 + RoleBindingSource_ROLE_BINDING_SOURCE_GITLAB RoleBindingSource = 4 + RoleBindingSource_ROLE_BINDING_SOURCE_SCIM RoleBindingSource = 5 + RoleBindingSource_ROLE_BINDING_SOURCE_INHERITED_FROM_ORG_ROLE RoleBindingSource = 6 + RoleBindingSource_ROLE_BINDING_SOURCE_SAML_JIT RoleBindingSource = 7 +) + +// Enum value maps for RoleBindingSource. +var ( + RoleBindingSource_name = map[int32]string{ + 0: "ROLE_BINDING_SOURCE_UNSPECIFIED", + 1: "ROLE_BINDING_SOURCE_MANUALLY", + 2: "ROLE_BINDING_SOURCE_GITHUB", + 3: "ROLE_BINDING_SOURCE_BITBUCKET", + 4: "ROLE_BINDING_SOURCE_GITLAB", + 5: "ROLE_BINDING_SOURCE_SCIM", + 6: "ROLE_BINDING_SOURCE_INHERITED_FROM_ORG_ROLE", + 7: "ROLE_BINDING_SOURCE_SAML_JIT", + } + RoleBindingSource_value = map[string]int32{ + "ROLE_BINDING_SOURCE_UNSPECIFIED": 0, + "ROLE_BINDING_SOURCE_MANUALLY": 1, + "ROLE_BINDING_SOURCE_GITHUB": 2, + "ROLE_BINDING_SOURCE_BITBUCKET": 3, + "ROLE_BINDING_SOURCE_GITLAB": 4, + "ROLE_BINDING_SOURCE_SCIM": 5, + "ROLE_BINDING_SOURCE_INHERITED_FROM_ORG_ROLE": 6, + "ROLE_BINDING_SOURCE_SAML_JIT": 7, + } +) + +func (x RoleBindingSource) Enum() *RoleBindingSource { + p := new(RoleBindingSource) + *p = x + return p +} + +func (x RoleBindingSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RoleBindingSource) Descriptor() protoreflect.EnumDescriptor { + return file_rbac_proto_enumTypes[2].Descriptor() +} + +func (RoleBindingSource) Type() protoreflect.EnumType { + return &file_rbac_proto_enumTypes[2] +} + +func (x RoleBindingSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RoleBindingSource.Descriptor instead. +func (RoleBindingSource) EnumDescriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{2} +} + +// Request for listing all permissions user has within an organization or project +// +// Arguments: +// user_id = [required] User for whom you are checking permissions +// org_id = [required] Org for which permissions apply +// project_id = [optional] Project for which permissions apply, +// +// if they are project_scoped +type ListUserPermissionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListUserPermissionsRequest) Reset() { + *x = ListUserPermissionsRequest{} + mi := &file_rbac_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListUserPermissionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserPermissionsRequest) ProtoMessage() {} + +func (x *ListUserPermissionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserPermissionsRequest.ProtoReflect.Descriptor instead. +func (*ListUserPermissionsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{0} +} + +func (x *ListUserPermissionsRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListUserPermissionsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListUserPermissionsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Response for listing user's permissions +// +// First 3 fields are copies from the request +// permissions = list of permissions user has within the org/project +// +// Status INVALID_ARGUMENT will be raised if some of the parameters in the +// request are missing or arent valid uuids. +type ListUserPermissionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListUserPermissionsResponse) Reset() { + *x = ListUserPermissionsResponse{} + mi := &file_rbac_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListUserPermissionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserPermissionsResponse) ProtoMessage() {} + +func (x *ListUserPermissionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserPermissionsResponse.ProtoReflect.Descriptor instead. +func (*ListUserPermissionsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{1} +} + +func (x *ListUserPermissionsResponse) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListUserPermissionsResponse) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListUserPermissionsResponse) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListUserPermissionsResponse) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +// Request for listing existing permissions +// +// Arguments: +// scope = [optional] Defines which permissions should be listed. If the scope +// +// is unspecified, both organization and project permissions are listed. +type ListExistingPermissionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scope Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=InternalApi.RBAC.Scope" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListExistingPermissionsRequest) Reset() { + *x = ListExistingPermissionsRequest{} + mi := &file_rbac_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListExistingPermissionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExistingPermissionsRequest) ProtoMessage() {} + +func (x *ListExistingPermissionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExistingPermissionsRequest.ProtoReflect.Descriptor instead. +func (*ListExistingPermissionsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{2} +} + +func (x *ListExistingPermissionsRequest) GetScope() Scope { + if x != nil { + return x.Scope + } + return Scope_SCOPE_UNSPECIFIED +} + +type ListExistingPermissionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListExistingPermissionsResponse) Reset() { + *x = ListExistingPermissionsResponse{} + mi := &file_rbac_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListExistingPermissionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExistingPermissionsResponse) ProtoMessage() {} + +func (x *ListExistingPermissionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExistingPermissionsResponse.ProtoReflect.Descriptor instead. +func (*ListExistingPermissionsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{3} +} + +func (x *ListExistingPermissionsResponse) GetPermissions() []*Permission { + if x != nil { + return x.Permissions + } + return nil +} + +// Request for assigning a role to a subject. +// Once assigned, the role will be markeed as `manually_assigned` +// +// Arguments: +// RoleAssignment message which encapsulates: +// - role_id = [required] Id of the role that is to be assigned to a subject +// - subject = [required] To whom you want to assign the role. +// Can be a Group or a User +// - org_id = [required] Id of the organization within which this role +// assignment applies. (User A is an Admin of the org B) +// - project_id = [optional] Id of the project within which this role assignment +// applies. (User A is a Contributor to the project B). This field +// should be omitted if an organization-level role is being assigned. +// Vice-versa, if a project-level role is being assigned, this field is required. +// +// - requester_id = [required] Id of the user who is initiating role assignment +// +// Precondition: +// - All given entities (role, subject, org, and project) must already exist +// in the system. +// - Role must be public (org_id for that role is nil_uuid) or belong to the +// org that is passed in the 'org_id' parameter. +// - If a project-level role is being assigned, project_id must be given, and that +// project must belong to the organization passed in the 'org_id' parameter. +// - Requester must have valid permissions to assign the role. +// +// Postcondition: +// - If the request is valid, SubjectRoleBinding is created. +// +// Idempotency: +// - If the same role is assigned multiple times to the same subject (within the +// context of same org/project), new SubjectRoleBinding will overwrite the old one. +// Nothing will change except the time of role assignment. +type AssignRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleAssignment *RoleAssignment `protobuf:"bytes,1,opt,name=role_assignment,json=roleAssignment,proto3" json:"role_assignment,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssignRoleRequest) Reset() { + *x = AssignRoleRequest{} + mi := &file_rbac_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssignRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignRoleRequest) ProtoMessage() {} + +func (x *AssignRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignRoleRequest.ProtoReflect.Descriptor instead. +func (*AssignRoleRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{4} +} + +func (x *AssignRoleRequest) GetRoleAssignment() *RoleAssignment { + if x != nil { + return x.RoleAssignment + } + return nil +} + +func (x *AssignRoleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +// Response to AssignRole endpoint +// +// Status OK will be raised if assignment was successful +// Status INVALID_ARGUMENT will be raise if some of the parameters in the +// request are missing or arent valid format +// Status FAILED_PRECONDITION will be raised if preconditions listed above +// AssignRoleRequest arent met +type AssignRoleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssignRoleResponse) Reset() { + *x = AssignRoleResponse{} + mi := &file_rbac_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssignRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignRoleResponse) ProtoMessage() {} + +func (x *AssignRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignRoleResponse.ProtoReflect.Descriptor instead. +func (*AssignRoleResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{5} +} + +// Request for retracting an assigned role from a given subject (user or group) +// This endpoint serves for retracting roles that have been manually assigned ( +// through the AssignRole endpoint). If the user has a role assigned through SCIM +// or Git sync, it can not be removed using this endpoint. +// +// Arguments: +// RoleAssignment message which encapsulates: +// - role_id = [optional] Although the RoleAssignment message contains role_id field, +// it is redundant for this endpoint, since there can only be one role +// manually assigned to a user. And, since this endpoint is used to retract +// manually assigned roles, we know which role to retract without the id +// being passed. +// - subject = [required] Subject from whom the role is retracted +// Can be a Group or a User +// - org_id = [required] Id of the organization. +// - project_id = [optional] Id of the project from which role assignment is being +// retracted. Needed only if role has project_scope. +// +// - requester_id = [required] Id of the user who is initiating role retraction +type RetractRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleAssignment *RoleAssignment `protobuf:"bytes,1,opt,name=role_assignment,json=roleAssignment,proto3" json:"role_assignment,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetractRoleRequest) Reset() { + *x = RetractRoleRequest{} + mi := &file_rbac_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetractRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetractRoleRequest) ProtoMessage() {} + +func (x *RetractRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetractRoleRequest.ProtoReflect.Descriptor instead. +func (*RetractRoleRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{6} +} + +func (x *RetractRoleRequest) GetRoleAssignment() *RoleAssignment { + if x != nil { + return x.RoleAssignment + } + return nil +} + +func (x *RetractRoleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +// Response from RetractRole endpoint +// +// Grpc Status OK will be raised whether role was retracted or that role assignment +// didnt exist at all in the first place. +// Status INVALID_ARGUMENT will be raised if some of the parameters in the +// request are missing or arent valid format. +type RetractRoleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetractRoleResponse) Reset() { + *x = RetractRoleResponse{} + mi := &file_rbac_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetractRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetractRoleResponse) ProtoMessage() {} + +func (x *RetractRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetractRoleResponse.ProtoReflect.Descriptor instead. +func (*RetractRoleResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{7} +} + +// Request for checking if a subject (or list of subjects) have certain role assignments +// +// Arguments: +// List of RoleAssignments. Same rules apply as specified for AssignRoleRequest +// +// Preconditions: / +// +// Postconditions: / +// +// This request does not alter any data. +type SubjectsHaveRolesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleAssignments []*RoleAssignment `protobuf:"bytes,1,rep,name=role_assignments,json=roleAssignments,proto3" json:"role_assignments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubjectsHaveRolesRequest) Reset() { + *x = SubjectsHaveRolesRequest{} + mi := &file_rbac_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubjectsHaveRolesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectsHaveRolesRequest) ProtoMessage() {} + +func (x *SubjectsHaveRolesRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectsHaveRolesRequest.ProtoReflect.Descriptor instead. +func (*SubjectsHaveRolesRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{8} +} + +func (x *SubjectsHaveRolesRequest) GetRoleAssignments() []*RoleAssignment { + if x != nil { + return x.RoleAssignments + } + return nil +} + +// Response to the 'SubjectsHaveRole' endpoint +// +// Each RoleAssignment object in the 'SubjectsHaveRequest' is paired with boolean +// indicating whether that RoleAssignment exists or not. +type SubjectsHaveRolesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + HasRoles []*SubjectsHaveRolesResponse_HasRole `protobuf:"bytes,1,rep,name=has_roles,json=hasRoles,proto3" json:"has_roles,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubjectsHaveRolesResponse) Reset() { + *x = SubjectsHaveRolesResponse{} + mi := &file_rbac_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubjectsHaveRolesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectsHaveRolesResponse) ProtoMessage() {} + +func (x *SubjectsHaveRolesResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectsHaveRolesResponse.ProtoReflect.Descriptor instead. +func (*SubjectsHaveRolesResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{9} +} + +func (x *SubjectsHaveRolesResponse) GetHasRoles() []*SubjectsHaveRolesResponse_HasRole { + if x != nil { + return x.HasRoles + } + return nil +} + +// Request for listing roles +// +// Arguments: +// org_id = [optional] Fetching roles available to specified organization ( +// +// including both default and custom roles). +// If this is omitted, default roles (roles that dont belong to any +// specific org) are raised. +// +// scope = [optional] Fetching only roles that apply to this scope (Only +// +// organization-level roles or only project_level roles). If this is +// omitted, all the roles are raised, regardless of their scope. +// +// Precondition: +// - Arguments need to be valid version 4 uuids. +// +// Postcondition: / +// +// This request does not alter any data. +type ListRolesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Scope Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=InternalApi.RBAC.Scope" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRolesRequest) Reset() { + *x = ListRolesRequest{} + mi := &file_rbac_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRolesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRolesRequest) ProtoMessage() {} + +func (x *ListRolesRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRolesRequest.ProtoReflect.Descriptor instead. +func (*ListRolesRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{10} +} + +func (x *ListRolesRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListRolesRequest) GetScope() Scope { + if x != nil { + return x.Scope + } + return Scope_SCOPE_UNSPECIFIED +} + +type ListRolesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRolesResponse) Reset() { + *x = ListRolesResponse{} + mi := &file_rbac_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRolesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRolesResponse) ProtoMessage() {} + +func (x *ListRolesResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRolesResponse.ProtoReflect.Descriptor instead. +func (*ListRolesResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{11} +} + +func (x *ListRolesResponse) GetRoles() []*Role { + if x != nil { + return x.Roles + } + return nil +} + +// Request for describing a roles +// +// Arguments: +// org_id = [required] Organization ID +// role_id = [required] Role ID +// +// Precondition: +// - Arguments need to be valid version 4 uuids. +// +// Postcondition: / +// +// This request does not alter any data. +type DescribeRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRoleRequest) Reset() { + *x = DescribeRoleRequest{} + mi := &file_rbac_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRoleRequest) ProtoMessage() {} + +func (x *DescribeRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRoleRequest.ProtoReflect.Descriptor instead. +func (*DescribeRoleRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{12} +} + +func (x *DescribeRoleRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DescribeRoleRequest) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +type DescribeRoleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRoleResponse) Reset() { + *x = DescribeRoleResponse{} + mi := &file_rbac_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRoleResponse) ProtoMessage() {} + +func (x *DescribeRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRoleResponse.ProtoReflect.Descriptor instead. +func (*DescribeRoleResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{13} +} + +func (x *DescribeRoleResponse) GetRole() *Role { + if x != nil { + return x.Role + } + return nil +} + +// Request for modifying a role +// +// Arguments: +// role = [required] Role object that is being modified +// requester_id = [required] Id of the user who is initiating role modification +// +// Preconditions: +// - If role does not exist, a new role will be created. +// - Requester must have valid permissions to modify the role. +// +// Postconditions: +// - If the request is valid, the role is modified. +type ModifyRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyRoleRequest) Reset() { + *x = ModifyRoleRequest{} + mi := &file_rbac_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyRoleRequest) ProtoMessage() {} + +func (x *ModifyRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyRoleRequest.ProtoReflect.Descriptor instead. +func (*ModifyRoleRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{14} +} + +func (x *ModifyRoleRequest) GetRole() *Role { + if x != nil { + return x.Role + } + return nil +} + +func (x *ModifyRoleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +type ModifyRoleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModifyRoleResponse) Reset() { + *x = ModifyRoleResponse{} + mi := &file_rbac_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModifyRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyRoleResponse) ProtoMessage() {} + +func (x *ModifyRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyRoleResponse.ProtoReflect.Descriptor instead. +func (*ModifyRoleResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{15} +} + +func (x *ModifyRoleResponse) GetRole() *Role { + if x != nil { + return x.Role + } + return nil +} + +// Request for deleting a role +// +// Arguments: +// org_id = [required] Organization ID +// role_id = [required] Role ID +// requester_id = [required] Id of the user who is initiating role removal +// +// Preconditions: +// - If role does not exist, nothing will happen. +// - If role is assigned to any entity, removing will fail. +// FAILED_PRECONDITION error will be raised and transmitted to the client. +// +// Postconditions: +// - If the request is valid, the role is removed. +type DestroyRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + RequesterId string `protobuf:"bytes,3,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DestroyRoleRequest) Reset() { + *x = DestroyRoleRequest{} + mi := &file_rbac_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DestroyRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestroyRoleRequest) ProtoMessage() {} + +func (x *DestroyRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestroyRoleRequest.ProtoReflect.Descriptor instead. +func (*DestroyRoleRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{16} +} + +func (x *DestroyRoleRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DestroyRoleRequest) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +func (x *DestroyRoleRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +type DestroyRoleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DestroyRoleResponse) Reset() { + *x = DestroyRoleResponse{} + mi := &file_rbac_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DestroyRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestroyRoleResponse) ProtoMessage() {} + +func (x *DestroyRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestroyRoleResponse.ProtoReflect.Descriptor instead. +func (*DestroyRoleResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{17} +} + +func (x *DestroyRoleResponse) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +// This message is user for fetching both org members and project members +// +// NOTE: Here "members" refer to users who have any role witihin given organization +// or project, not sepcifically role named "member" +// +// Arguments: +// org_id = [required] Id of organization whos members you want to fetch. If +// +// you are fetching project members, then this is the org who owns that +// project. +// +// project_id = [optional] Id of project whos members you are fetching. Not needed +// +// if you are fetching organizational members. +// +// member_name_contains +// +// = [optional] Used for name-based filtering. If this parameter is +// omitted, the filter won't be applied. +// +// member_has_role +// +// = [optional] Used for role-based filtering. If we want to fetch all the +// members who have the Admin role, Admin role id should be passed via this +// parameter. If this parameter is omitted, the filter won't be applied. +// +// page = [optional] This endpoint returns a paginated list of members. +// +// If this parameter is omitted, the default page number (1) and page +// size (20) are assumed. +// +// Preconditions: +// - Arguments need to be valid version 4 uuids. +// - If org or project with given id's dont exist, empty list will be returned +// +// / Postcondition: / +// +// This request does not alter any data. +type ListMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + MemberNameContains string `protobuf:"bytes,3,opt,name=member_name_contains,json=memberNameContains,proto3" json:"member_name_contains,omitempty"` + Page *ListMembersRequest_Page `protobuf:"bytes,4,opt,name=page,proto3" json:"page,omitempty"` + MemberHasRole string `protobuf:"bytes,5,opt,name=member_has_role,json=memberHasRole,proto3" json:"member_has_role,omitempty"` + MemberType SubjectType `protobuf:"varint,6,opt,name=member_type,json=memberType,proto3,enum=InternalApi.RBAC.SubjectType" json:"member_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersRequest) Reset() { + *x = ListMembersRequest{} + mi := &file_rbac_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest) ProtoMessage() {} + +func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. +func (*ListMembersRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{18} +} + +func (x *ListMembersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListMembersRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListMembersRequest) GetMemberNameContains() string { + if x != nil { + return x.MemberNameContains + } + return "" +} + +func (x *ListMembersRequest) GetPage() *ListMembersRequest_Page { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListMembersRequest) GetMemberHasRole() string { + if x != nil { + return x.MemberHasRole + } + return "" +} + +func (x *ListMembersRequest) GetMemberType() SubjectType { + if x != nil { + return x.MemberType + } + return SubjectType_USER +} + +// Response message for fetching org and project members +// +// Containes list of Semaphore users with roles those users have witihn the given +// organization or project, as well as when/how the roles were assigned to them. +// +// total_pages = Since this endpoint returns paginated data, it also provides +// +// the number of total pages for the same filter and pagination +// parameters. +type ListMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*ListMembersResponse_Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + TotalPages int32 `protobuf:"varint,2,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersResponse) Reset() { + *x = ListMembersResponse{} + mi := &file_rbac_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse) ProtoMessage() {} + +func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. +func (*ListMembersResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{19} +} + +func (x *ListMembersResponse) GetMembers() []*ListMembersResponse_Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *ListMembersResponse) GetTotalPages() int32 { + if x != nil { + return x.TotalPages + } + return 0 +} + +// Request for counting all organization members (Users who have any +// role within the given org) +// Arguments: +// org_id = [required] Id of organization whos members you want to count. +// +// Preconditions: +// - Arguments need to be valid version 4 uuids. +// - Status NOT_FOUND will be raised if org with given id doesn't exist +// +// Postcondition: / +// +// This request does not alter any data. +type CountMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountMembersRequest) Reset() { + *x = CountMembersRequest{} + mi := &file_rbac_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountMembersRequest) ProtoMessage() {} + +func (x *CountMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountMembersRequest.ProtoReflect.Descriptor instead. +func (*CountMembersRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{20} +} + +func (x *CountMembersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Response message for counting all organization members (Users who have any +// role within the given org). +// +// Contains the count of all users with roles those users have within the given +// organization. +// +// members = Number of members in the given organization. +type CountMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members int32 `protobuf:"varint,1,opt,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountMembersResponse) Reset() { + *x = CountMembersResponse{} + mi := &file_rbac_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountMembersResponse) ProtoMessage() {} + +func (x *CountMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountMembersResponse.ProtoReflect.Descriptor instead. +func (*CountMembersResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{21} +} + +func (x *CountMembersResponse) GetMembers() int32 { + if x != nil { + return x.Members + } + return 0 +} + +type SubjectRoleBinding struct { + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Source RoleBindingSource `protobuf:"varint,2,opt,name=source,proto3,enum=InternalApi.RBAC.RoleBindingSource" json:"source,omitempty"` + RoleAssignedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=role_assigned_at,json=roleAssignedAt,proto3" json:"role_assigned_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubjectRoleBinding) Reset() { + *x = SubjectRoleBinding{} + mi := &file_rbac_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubjectRoleBinding) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectRoleBinding) ProtoMessage() {} + +func (x *SubjectRoleBinding) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectRoleBinding.ProtoReflect.Descriptor instead. +func (*SubjectRoleBinding) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{22} +} + +func (x *SubjectRoleBinding) GetRole() *Role { + if x != nil { + return x.Role + } + return nil +} + +func (x *SubjectRoleBinding) GetSource() RoleBindingSource { + if x != nil { + return x.Source + } + return RoleBindingSource_ROLE_BINDING_SOURCE_UNSPECIFIED +} + +func (x *SubjectRoleBinding) GetRoleAssignedAt() *timestamppb.Timestamp { + if x != nil { + return x.RoleAssignedAt + } + return nil +} + +type ListAccessibleOrgsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccessibleOrgsRequest) Reset() { + *x = ListAccessibleOrgsRequest{} + mi := &file_rbac_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccessibleOrgsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessibleOrgsRequest) ProtoMessage() {} + +func (x *ListAccessibleOrgsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessibleOrgsRequest.ProtoReflect.Descriptor instead. +func (*ListAccessibleOrgsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{23} +} + +func (x *ListAccessibleOrgsRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type ListAccessibleOrgsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgIds []string `protobuf:"bytes,1,rep,name=org_ids,json=orgIds,proto3" json:"org_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccessibleOrgsResponse) Reset() { + *x = ListAccessibleOrgsResponse{} + mi := &file_rbac_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccessibleOrgsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessibleOrgsResponse) ProtoMessage() {} + +func (x *ListAccessibleOrgsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessibleOrgsResponse.ProtoReflect.Descriptor instead. +func (*ListAccessibleOrgsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{24} +} + +func (x *ListAccessibleOrgsResponse) GetOrgIds() []string { + if x != nil { + return x.OrgIds + } + return nil +} + +type ListAccessibleProjectsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccessibleProjectsRequest) Reset() { + *x = ListAccessibleProjectsRequest{} + mi := &file_rbac_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccessibleProjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessibleProjectsRequest) ProtoMessage() {} + +func (x *ListAccessibleProjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessibleProjectsRequest.ProtoReflect.Descriptor instead. +func (*ListAccessibleProjectsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{25} +} + +func (x *ListAccessibleProjectsRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListAccessibleProjectsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListAccessibleProjectsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectIds []string `protobuf:"bytes,1,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccessibleProjectsResponse) Reset() { + *x = ListAccessibleProjectsResponse{} + mi := &file_rbac_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccessibleProjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessibleProjectsResponse) ProtoMessage() {} + +func (x *ListAccessibleProjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessibleProjectsResponse.ProtoReflect.Descriptor instead. +func (*ListAccessibleProjectsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{26} +} + +func (x *ListAccessibleProjectsResponse) GetProjectIds() []string { + if x != nil { + return x.ProjectIds + } + return nil +} + +type RoleAssignment struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RoleAssignment) Reset() { + *x = RoleAssignment{} + mi := &file_rbac_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RoleAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoleAssignment) ProtoMessage() {} + +func (x *RoleAssignment) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoleAssignment.ProtoReflect.Descriptor instead. +func (*RoleAssignment) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{27} +} + +func (x *RoleAssignment) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +func (x *RoleAssignment) GetSubject() *Subject { + if x != nil { + return x.Subject + } + return nil +} + +func (x *RoleAssignment) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RoleAssignment) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type Subject struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubjectType SubjectType `protobuf:"varint,1,opt,name=subject_type,json=subjectType,proto3,enum=InternalApi.RBAC.SubjectType" json:"subject_type,omitempty"` + SubjectId string `protobuf:"bytes,2,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Subject) Reset() { + *x = Subject{} + mi := &file_rbac_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Subject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subject) ProtoMessage() {} + +func (x *Subject) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subject.ProtoReflect.Descriptor instead. +func (*Subject) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{28} +} + +func (x *Subject) GetSubjectType() SubjectType { + if x != nil { + return x.SubjectType + } + return SubjectType_USER +} + +func (x *Subject) GetSubjectId() string { + if x != nil { + return x.SubjectId + } + return "" +} + +func (x *Subject) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +// Refresh call request +// +// Arguments: +// - org_id = [required] Id of the organization that needs to be refreshed +type RefreshCollaboratorsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshCollaboratorsRequest) Reset() { + *x = RefreshCollaboratorsRequest{} + mi := &file_rbac_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshCollaboratorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshCollaboratorsRequest) ProtoMessage() {} + +func (x *RefreshCollaboratorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshCollaboratorsRequest.ProtoReflect.Descriptor instead. +func (*RefreshCollaboratorsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{29} +} + +func (x *RefreshCollaboratorsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Refresh call response +type RefreshCollaboratorsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshCollaboratorsResponse) Reset() { + *x = RefreshCollaboratorsResponse{} + mi := &file_rbac_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshCollaboratorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshCollaboratorsResponse) ProtoMessage() {} + +func (x *RefreshCollaboratorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshCollaboratorsResponse.ProtoReflect.Descriptor instead. +func (*RefreshCollaboratorsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{30} +} + +// scope = Defines if this is an organization or project-level role +// rbac_permissions = List of permissions DIRECTLY assigned to the role +// inherited_role = If this role inherits some other roles, they will be listed here +// maps_to = This field applies only to organization-level roles. If +// +// the organizatio role grants a project-level role for all +// of the projects within the organization, that role will be listed in this field. +// +// readonly = If this is set to true, the role is immutable and cannot be modified +type Role struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Scope Scope `protobuf:"varint,4,opt,name=scope,proto3,enum=InternalApi.RBAC.Scope" json:"scope,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // permissions field is deprecated + Permissions []string `protobuf:"bytes,6,rep,name=permissions,proto3" json:"permissions,omitempty"` + RbacPermissions []*Permission `protobuf:"bytes,7,rep,name=rbac_permissions,json=rbacPermissions,proto3" json:"rbac_permissions,omitempty"` + InheritedRole *Role `protobuf:"bytes,8,opt,name=inherited_role,json=inheritedRole,proto3" json:"inherited_role,omitempty"` + MapsTo *Role `protobuf:"bytes,9,opt,name=maps_to,json=mapsTo,proto3" json:"maps_to,omitempty"` + Readonly bool `protobuf:"varint,10,opt,name=readonly,proto3" json:"readonly,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Role) Reset() { + *x = Role{} + mi := &file_rbac_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Role) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Role) ProtoMessage() {} + +func (x *Role) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Role.ProtoReflect.Descriptor instead. +func (*Role) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{31} +} + +func (x *Role) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Role) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Role) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Role) GetScope() Scope { + if x != nil { + return x.Scope + } + return Scope_SCOPE_UNSPECIFIED +} + +func (x *Role) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Role) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +func (x *Role) GetRbacPermissions() []*Permission { + if x != nil { + return x.RbacPermissions + } + return nil +} + +func (x *Role) GetInheritedRole() *Role { + if x != nil { + return x.InheritedRole + } + return nil +} + +func (x *Role) GetMapsTo() *Role { + if x != nil { + return x.MapsTo + } + return nil +} + +func (x *Role) GetReadonly() bool { + if x != nil { + return x.Readonly + } + return false +} + +type Permission struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Scope Scope `protobuf:"varint,4,opt,name=scope,proto3,enum=InternalApi.RBAC.Scope" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Permission) Reset() { + *x = Permission{} + mi := &file_rbac_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Permission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Permission) ProtoMessage() {} + +func (x *Permission) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Permission.ProtoReflect.Descriptor instead. +func (*Permission) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{32} +} + +func (x *Permission) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Permission) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Permission) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Permission) GetScope() Scope { + if x != nil { + return x.Scope + } + return Scope_SCOPE_UNSPECIFIED +} + +type ListSubjectsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + SubjectIds []string `protobuf:"bytes,2,rep,name=subject_ids,json=subjectIds,proto3" json:"subject_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSubjectsRequest) Reset() { + *x = ListSubjectsRequest{} + mi := &file_rbac_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSubjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectsRequest) ProtoMessage() {} + +func (x *ListSubjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectsRequest.ProtoReflect.Descriptor instead. +func (*ListSubjectsRequest) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{33} +} + +func (x *ListSubjectsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListSubjectsRequest) GetSubjectIds() []string { + if x != nil { + return x.SubjectIds + } + return nil +} + +type ListSubjectsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSubjectsResponse) Reset() { + *x = ListSubjectsResponse{} + mi := &file_rbac_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSubjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectsResponse) ProtoMessage() {} + +func (x *ListSubjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectsResponse.ProtoReflect.Descriptor instead. +func (*ListSubjectsResponse) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{34} +} + +func (x *ListSubjectsResponse) GetSubjects() []*Subject { + if x != nil { + return x.Subjects + } + return nil +} + +type SubjectsHaveRolesResponse_HasRole struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoleAssignment *RoleAssignment `protobuf:"bytes,1,opt,name=role_assignment,json=roleAssignment,proto3" json:"role_assignment,omitempty"` + HasRole bool `protobuf:"varint,2,opt,name=has_role,json=hasRole,proto3" json:"has_role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubjectsHaveRolesResponse_HasRole) Reset() { + *x = SubjectsHaveRolesResponse_HasRole{} + mi := &file_rbac_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubjectsHaveRolesResponse_HasRole) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectsHaveRolesResponse_HasRole) ProtoMessage() {} + +func (x *SubjectsHaveRolesResponse_HasRole) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectsHaveRolesResponse_HasRole.ProtoReflect.Descriptor instead. +func (*SubjectsHaveRolesResponse_HasRole) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *SubjectsHaveRolesResponse_HasRole) GetRoleAssignment() *RoleAssignment { + if x != nil { + return x.RoleAssignment + } + return nil +} + +func (x *SubjectsHaveRolesResponse_HasRole) GetHasRole() bool { + if x != nil { + return x.HasRole + } + return false +} + +type ListMembersRequest_Page struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNo int32 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersRequest_Page) Reset() { + *x = ListMembersRequest_Page{} + mi := &file_rbac_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersRequest_Page) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest_Page) ProtoMessage() {} + +func (x *ListMembersRequest_Page) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersRequest_Page.ProtoReflect.Descriptor instead. +func (*ListMembersRequest_Page) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *ListMembersRequest_Page) GetPageNo() int32 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *ListMembersRequest_Page) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type ListMembersResponse_Member struct { + state protoimpl.MessageState `protogen:"open.v1"` + Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + SubjectRoleBindings []*SubjectRoleBinding `protobuf:"bytes,3,rep,name=subject_role_bindings,json=subjectRoleBindings,proto3" json:"subject_role_bindings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersResponse_Member) Reset() { + *x = ListMembersResponse_Member{} + mi := &file_rbac_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersResponse_Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse_Member) ProtoMessage() {} + +func (x *ListMembersResponse_Member) ProtoReflect() protoreflect.Message { + mi := &file_rbac_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersResponse_Member.ProtoReflect.Descriptor instead. +func (*ListMembersResponse_Member) Descriptor() ([]byte, []int) { + return file_rbac_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *ListMembersResponse_Member) GetSubject() *Subject { + if x != nil { + return x.Subject + } + return nil +} + +func (x *ListMembersResponse_Member) GetSubjectRoleBindings() []*SubjectRoleBinding { + if x != nil { + return x.SubjectRoleBindings + } + return nil +} + +var File_rbac_proto protoreflect.FileDescriptor + +var file_rbac_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 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, 0x22, + 0x6b, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x8e, 0x01, 0x0a, + 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4f, 0x0a, + 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2d, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, + 0x43, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x61, + 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, + 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x12, + 0x52, 0x65, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x49, 0x0a, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, + 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0xde, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, + 0x61, 0x73, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x08, 0x68, 0x61, 0x73, 0x52, 0x6f, 0x6c, 0x65, 0x73, + 0x1a, 0x6f, 0x0a, 0x07, 0x48, 0x61, 0x73, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x72, + 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x6f, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x52, 0x6f, 0x6c, + 0x65, 0x22, 0x58, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x41, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2c, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x45, + 0x0a, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x62, 0x0a, 0x11, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x40, 0x0a, + 0x12, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, + 0x67, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x74, + 0x72, 0x6f, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xe1, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x61, 0x73, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x3e, + 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3c, + 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x98, 0x02, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x97, 0x01, + 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x58, 0x0a, + 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x62, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x2c, 0x0a, 0x13, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2a, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x5f, + 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 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, 0x0e, 0x72, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x22, 0x34, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4f, + 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x73, 0x22, 0x4f, 0x0a, 0x1d, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x1e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x22, 0x94, + 0x01, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x03, 0x0a, 0x04, + 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, + 0x2d, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, + 0x43, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x10, 0x72, 0x62, 0x61, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x72, 0x62, 0x61, 0x63, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x0e, 0x69, + 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0d, 0x69, 0x6e, 0x68, + 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x61, + 0x70, 0x73, 0x5f, 0x74, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x73, 0x54, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, + 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x22, 0x81, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x22, 0x4d, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2a, 0x37, 0x0a, 0x0b, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x10, 0x02, 0x2a, 0x40, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, + 0x43, 0x54, 0x10, 0x02, 0x2a, 0xae, 0x02, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x4f, + 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x20, 0x0a, 0x1c, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x4c, 0x59, 0x10, + 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, + 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, + 0x45, 0x54, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x49, 0x54, 0x4c, + 0x41, 0x42, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, + 0x10, 0x05, 0x12, 0x2f, 0x0a, 0x2b, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x48, 0x45, 0x52, 0x49, + 0x54, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4f, 0x52, 0x47, 0x5f, 0x52, 0x4f, 0x4c, + 0x45, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x5f, + 0x4a, 0x49, 0x54, 0x10, 0x07, 0x32, 0x86, 0x0c, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x72, + 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7e, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, + 0x12, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x52, + 0x65, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x52, 0x65, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x48, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x73, 0x12, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0a, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x73, 0x74, + 0x72, 0x6f, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, + 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x25, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x12, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4f, 0x72, 0x67, 0x73, + 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, + 0x6c, 0x65, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4f, + 0x72, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x61, + 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, + 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, + 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x43, + 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, + 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x72, + 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_rbac_proto_rawDescOnce sync.Once + file_rbac_proto_rawDescData = file_rbac_proto_rawDesc +) + +func file_rbac_proto_rawDescGZIP() []byte { + file_rbac_proto_rawDescOnce.Do(func() { + file_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_rbac_proto_rawDescData) + }) + return file_rbac_proto_rawDescData +} + +var file_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_rbac_proto_goTypes = []any{ + (SubjectType)(0), // 0: InternalApi.RBAC.SubjectType + (Scope)(0), // 1: InternalApi.RBAC.Scope + (RoleBindingSource)(0), // 2: InternalApi.RBAC.RoleBindingSource + (*ListUserPermissionsRequest)(nil), // 3: InternalApi.RBAC.ListUserPermissionsRequest + (*ListUserPermissionsResponse)(nil), // 4: InternalApi.RBAC.ListUserPermissionsResponse + (*ListExistingPermissionsRequest)(nil), // 5: InternalApi.RBAC.ListExistingPermissionsRequest + (*ListExistingPermissionsResponse)(nil), // 6: InternalApi.RBAC.ListExistingPermissionsResponse + (*AssignRoleRequest)(nil), // 7: InternalApi.RBAC.AssignRoleRequest + (*AssignRoleResponse)(nil), // 8: InternalApi.RBAC.AssignRoleResponse + (*RetractRoleRequest)(nil), // 9: InternalApi.RBAC.RetractRoleRequest + (*RetractRoleResponse)(nil), // 10: InternalApi.RBAC.RetractRoleResponse + (*SubjectsHaveRolesRequest)(nil), // 11: InternalApi.RBAC.SubjectsHaveRolesRequest + (*SubjectsHaveRolesResponse)(nil), // 12: InternalApi.RBAC.SubjectsHaveRolesResponse + (*ListRolesRequest)(nil), // 13: InternalApi.RBAC.ListRolesRequest + (*ListRolesResponse)(nil), // 14: InternalApi.RBAC.ListRolesResponse + (*DescribeRoleRequest)(nil), // 15: InternalApi.RBAC.DescribeRoleRequest + (*DescribeRoleResponse)(nil), // 16: InternalApi.RBAC.DescribeRoleResponse + (*ModifyRoleRequest)(nil), // 17: InternalApi.RBAC.ModifyRoleRequest + (*ModifyRoleResponse)(nil), // 18: InternalApi.RBAC.ModifyRoleResponse + (*DestroyRoleRequest)(nil), // 19: InternalApi.RBAC.DestroyRoleRequest + (*DestroyRoleResponse)(nil), // 20: InternalApi.RBAC.DestroyRoleResponse + (*ListMembersRequest)(nil), // 21: InternalApi.RBAC.ListMembersRequest + (*ListMembersResponse)(nil), // 22: InternalApi.RBAC.ListMembersResponse + (*CountMembersRequest)(nil), // 23: InternalApi.RBAC.CountMembersRequest + (*CountMembersResponse)(nil), // 24: InternalApi.RBAC.CountMembersResponse + (*SubjectRoleBinding)(nil), // 25: InternalApi.RBAC.SubjectRoleBinding + (*ListAccessibleOrgsRequest)(nil), // 26: InternalApi.RBAC.ListAccessibleOrgsRequest + (*ListAccessibleOrgsResponse)(nil), // 27: InternalApi.RBAC.ListAccessibleOrgsResponse + (*ListAccessibleProjectsRequest)(nil), // 28: InternalApi.RBAC.ListAccessibleProjectsRequest + (*ListAccessibleProjectsResponse)(nil), // 29: InternalApi.RBAC.ListAccessibleProjectsResponse + (*RoleAssignment)(nil), // 30: InternalApi.RBAC.RoleAssignment + (*Subject)(nil), // 31: InternalApi.RBAC.Subject + (*RefreshCollaboratorsRequest)(nil), // 32: InternalApi.RBAC.RefreshCollaboratorsRequest + (*RefreshCollaboratorsResponse)(nil), // 33: InternalApi.RBAC.RefreshCollaboratorsResponse + (*Role)(nil), // 34: InternalApi.RBAC.Role + (*Permission)(nil), // 35: InternalApi.RBAC.Permission + (*ListSubjectsRequest)(nil), // 36: InternalApi.RBAC.ListSubjectsRequest + (*ListSubjectsResponse)(nil), // 37: InternalApi.RBAC.ListSubjectsResponse + (*SubjectsHaveRolesResponse_HasRole)(nil), // 38: InternalApi.RBAC.SubjectsHaveRolesResponse.HasRole + (*ListMembersRequest_Page)(nil), // 39: InternalApi.RBAC.ListMembersRequest.Page + (*ListMembersResponse_Member)(nil), // 40: InternalApi.RBAC.ListMembersResponse.Member + (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp +} +var file_rbac_proto_depIdxs = []int32{ + 1, // 0: InternalApi.RBAC.ListExistingPermissionsRequest.scope:type_name -> InternalApi.RBAC.Scope + 35, // 1: InternalApi.RBAC.ListExistingPermissionsResponse.permissions:type_name -> InternalApi.RBAC.Permission + 30, // 2: InternalApi.RBAC.AssignRoleRequest.role_assignment:type_name -> InternalApi.RBAC.RoleAssignment + 30, // 3: InternalApi.RBAC.RetractRoleRequest.role_assignment:type_name -> InternalApi.RBAC.RoleAssignment + 30, // 4: InternalApi.RBAC.SubjectsHaveRolesRequest.role_assignments:type_name -> InternalApi.RBAC.RoleAssignment + 38, // 5: InternalApi.RBAC.SubjectsHaveRolesResponse.has_roles:type_name -> InternalApi.RBAC.SubjectsHaveRolesResponse.HasRole + 1, // 6: InternalApi.RBAC.ListRolesRequest.scope:type_name -> InternalApi.RBAC.Scope + 34, // 7: InternalApi.RBAC.ListRolesResponse.roles:type_name -> InternalApi.RBAC.Role + 34, // 8: InternalApi.RBAC.DescribeRoleResponse.role:type_name -> InternalApi.RBAC.Role + 34, // 9: InternalApi.RBAC.ModifyRoleRequest.role:type_name -> InternalApi.RBAC.Role + 34, // 10: InternalApi.RBAC.ModifyRoleResponse.role:type_name -> InternalApi.RBAC.Role + 39, // 11: InternalApi.RBAC.ListMembersRequest.page:type_name -> InternalApi.RBAC.ListMembersRequest.Page + 0, // 12: InternalApi.RBAC.ListMembersRequest.member_type:type_name -> InternalApi.RBAC.SubjectType + 40, // 13: InternalApi.RBAC.ListMembersResponse.members:type_name -> InternalApi.RBAC.ListMembersResponse.Member + 34, // 14: InternalApi.RBAC.SubjectRoleBinding.role:type_name -> InternalApi.RBAC.Role + 2, // 15: InternalApi.RBAC.SubjectRoleBinding.source:type_name -> InternalApi.RBAC.RoleBindingSource + 41, // 16: InternalApi.RBAC.SubjectRoleBinding.role_assigned_at:type_name -> google.protobuf.Timestamp + 31, // 17: InternalApi.RBAC.RoleAssignment.subject:type_name -> InternalApi.RBAC.Subject + 0, // 18: InternalApi.RBAC.Subject.subject_type:type_name -> InternalApi.RBAC.SubjectType + 1, // 19: InternalApi.RBAC.Role.scope:type_name -> InternalApi.RBAC.Scope + 35, // 20: InternalApi.RBAC.Role.rbac_permissions:type_name -> InternalApi.RBAC.Permission + 34, // 21: InternalApi.RBAC.Role.inherited_role:type_name -> InternalApi.RBAC.Role + 34, // 22: InternalApi.RBAC.Role.maps_to:type_name -> InternalApi.RBAC.Role + 1, // 23: InternalApi.RBAC.Permission.scope:type_name -> InternalApi.RBAC.Scope + 31, // 24: InternalApi.RBAC.ListSubjectsResponse.subjects:type_name -> InternalApi.RBAC.Subject + 30, // 25: InternalApi.RBAC.SubjectsHaveRolesResponse.HasRole.role_assignment:type_name -> InternalApi.RBAC.RoleAssignment + 31, // 26: InternalApi.RBAC.ListMembersResponse.Member.subject:type_name -> InternalApi.RBAC.Subject + 25, // 27: InternalApi.RBAC.ListMembersResponse.Member.subject_role_bindings:type_name -> InternalApi.RBAC.SubjectRoleBinding + 3, // 28: InternalApi.RBAC.RBAC.ListUserPermissions:input_type -> InternalApi.RBAC.ListUserPermissionsRequest + 5, // 29: InternalApi.RBAC.RBAC.ListExistingPermissions:input_type -> InternalApi.RBAC.ListExistingPermissionsRequest + 7, // 30: InternalApi.RBAC.RBAC.AssignRole:input_type -> InternalApi.RBAC.AssignRoleRequest + 9, // 31: InternalApi.RBAC.RBAC.RetractRole:input_type -> InternalApi.RBAC.RetractRoleRequest + 11, // 32: InternalApi.RBAC.RBAC.SubjectsHaveRoles:input_type -> InternalApi.RBAC.SubjectsHaveRolesRequest + 13, // 33: InternalApi.RBAC.RBAC.ListRoles:input_type -> InternalApi.RBAC.ListRolesRequest + 15, // 34: InternalApi.RBAC.RBAC.DescribeRole:input_type -> InternalApi.RBAC.DescribeRoleRequest + 17, // 35: InternalApi.RBAC.RBAC.ModifyRole:input_type -> InternalApi.RBAC.ModifyRoleRequest + 19, // 36: InternalApi.RBAC.RBAC.DestroyRole:input_type -> InternalApi.RBAC.DestroyRoleRequest + 21, // 37: InternalApi.RBAC.RBAC.ListMembers:input_type -> InternalApi.RBAC.ListMembersRequest + 23, // 38: InternalApi.RBAC.RBAC.CountMembers:input_type -> InternalApi.RBAC.CountMembersRequest + 26, // 39: InternalApi.RBAC.RBAC.ListAccessibleOrgs:input_type -> InternalApi.RBAC.ListAccessibleOrgsRequest + 28, // 40: InternalApi.RBAC.RBAC.ListAccessibleProjects:input_type -> InternalApi.RBAC.ListAccessibleProjectsRequest + 32, // 41: InternalApi.RBAC.RBAC.RefreshCollaborators:input_type -> InternalApi.RBAC.RefreshCollaboratorsRequest + 36, // 42: InternalApi.RBAC.RBAC.ListSubjects:input_type -> InternalApi.RBAC.ListSubjectsRequest + 4, // 43: InternalApi.RBAC.RBAC.ListUserPermissions:output_type -> InternalApi.RBAC.ListUserPermissionsResponse + 6, // 44: InternalApi.RBAC.RBAC.ListExistingPermissions:output_type -> InternalApi.RBAC.ListExistingPermissionsResponse + 8, // 45: InternalApi.RBAC.RBAC.AssignRole:output_type -> InternalApi.RBAC.AssignRoleResponse + 10, // 46: InternalApi.RBAC.RBAC.RetractRole:output_type -> InternalApi.RBAC.RetractRoleResponse + 12, // 47: InternalApi.RBAC.RBAC.SubjectsHaveRoles:output_type -> InternalApi.RBAC.SubjectsHaveRolesResponse + 14, // 48: InternalApi.RBAC.RBAC.ListRoles:output_type -> InternalApi.RBAC.ListRolesResponse + 16, // 49: InternalApi.RBAC.RBAC.DescribeRole:output_type -> InternalApi.RBAC.DescribeRoleResponse + 18, // 50: InternalApi.RBAC.RBAC.ModifyRole:output_type -> InternalApi.RBAC.ModifyRoleResponse + 20, // 51: InternalApi.RBAC.RBAC.DestroyRole:output_type -> InternalApi.RBAC.DestroyRoleResponse + 22, // 52: InternalApi.RBAC.RBAC.ListMembers:output_type -> InternalApi.RBAC.ListMembersResponse + 24, // 53: InternalApi.RBAC.RBAC.CountMembers:output_type -> InternalApi.RBAC.CountMembersResponse + 27, // 54: InternalApi.RBAC.RBAC.ListAccessibleOrgs:output_type -> InternalApi.RBAC.ListAccessibleOrgsResponse + 29, // 55: InternalApi.RBAC.RBAC.ListAccessibleProjects:output_type -> InternalApi.RBAC.ListAccessibleProjectsResponse + 33, // 56: InternalApi.RBAC.RBAC.RefreshCollaborators:output_type -> InternalApi.RBAC.RefreshCollaboratorsResponse + 37, // 57: InternalApi.RBAC.RBAC.ListSubjects:output_type -> InternalApi.RBAC.ListSubjectsResponse + 43, // [43:58] is the sub-list for method output_type + 28, // [28:43] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_rbac_proto_init() } +func file_rbac_proto_init() { + if File_rbac_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_rbac_proto_rawDesc, + NumEnums: 3, + NumMessages: 38, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_rbac_proto_goTypes, + DependencyIndexes: file_rbac_proto_depIdxs, + EnumInfos: file_rbac_proto_enumTypes, + MessageInfos: file_rbac_proto_msgTypes, + }.Build() + File_rbac_proto = out.File + file_rbac_proto_rawDesc = nil + file_rbac_proto_goTypes = nil + file_rbac_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/rbac/rbac_grpc.pb.go b/mcp_server/pkg/internal_api/rbac/rbac_grpc.pb.go new file mode 100644 index 000000000..3a5476d00 --- /dev/null +++ b/mcp_server/pkg/internal_api/rbac/rbac_grpc.pb.go @@ -0,0 +1,737 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: rbac.proto + +package rbac + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RBAC_ListUserPermissions_FullMethodName = "/InternalApi.RBAC.RBAC/ListUserPermissions" + RBAC_ListExistingPermissions_FullMethodName = "/InternalApi.RBAC.RBAC/ListExistingPermissions" + RBAC_AssignRole_FullMethodName = "/InternalApi.RBAC.RBAC/AssignRole" + RBAC_RetractRole_FullMethodName = "/InternalApi.RBAC.RBAC/RetractRole" + RBAC_SubjectsHaveRoles_FullMethodName = "/InternalApi.RBAC.RBAC/SubjectsHaveRoles" + RBAC_ListRoles_FullMethodName = "/InternalApi.RBAC.RBAC/ListRoles" + RBAC_DescribeRole_FullMethodName = "/InternalApi.RBAC.RBAC/DescribeRole" + RBAC_ModifyRole_FullMethodName = "/InternalApi.RBAC.RBAC/ModifyRole" + RBAC_DestroyRole_FullMethodName = "/InternalApi.RBAC.RBAC/DestroyRole" + RBAC_ListMembers_FullMethodName = "/InternalApi.RBAC.RBAC/ListMembers" + RBAC_CountMembers_FullMethodName = "/InternalApi.RBAC.RBAC/CountMembers" + RBAC_ListAccessibleOrgs_FullMethodName = "/InternalApi.RBAC.RBAC/ListAccessibleOrgs" + RBAC_ListAccessibleProjects_FullMethodName = "/InternalApi.RBAC.RBAC/ListAccessibleProjects" + RBAC_RefreshCollaborators_FullMethodName = "/InternalApi.RBAC.RBAC/RefreshCollaborators" + RBAC_ListSubjects_FullMethodName = "/InternalApi.RBAC.RBAC/ListSubjects" +) + +// RBACClient is the client API for RBAC service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Role and permissions management service for semaphoreci +type RBACClient interface { + // Endpoint for checking user permissions + // Operation is synchronous and idempotent. + ListUserPermissions(ctx context.Context, in *ListUserPermissionsRequest, opts ...grpc.CallOption) (*ListUserPermissionsResponse, error) + // Endpoint for listing all existing rbac permissions + // Operation is synchronous and idempotent. + ListExistingPermissions(ctx context.Context, in *ListExistingPermissionsRequest, opts ...grpc.CallOption) (*ListExistingPermissionsResponse, error) + // Endpoint for assigning a Role to a Subject (User or Group). + // Operation is synchronous and idempotent. + AssignRole(ctx context.Context, in *AssignRoleRequest, opts ...grpc.CallOption) (*AssignRoleResponse, error) + // Endpoint for retracting a Role assigned to a Subject (User or Group). + // This endpoint should be used only for retracting roles that were assigned manually. + // Operation is synchronous and idempotent. + RetractRole(ctx context.Context, in *RetractRoleRequest, opts ...grpc.CallOption) (*RetractRoleResponse, error) + // Endpoint for checking whether Subject(s) have specific Roles assigned + // to them. + // Operation is synchronous and idempotent. + SubjectsHaveRoles(ctx context.Context, in *SubjectsHaveRolesRequest, opts ...grpc.CallOption) (*SubjectsHaveRolesResponse, error) + // Endpoint for fetching roles. + // It can be userd to fetch public or custom roles belonging to a specific organization. + // It can be also used to fetch only org_level roles or project_level roles, + // depending on data sent in ListRolesRequest + // Operation is synchronous and idempotent. + ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) + // Endpoint for describing one specific Role + // Operation is synchronous and idempotent. + DescribeRole(ctx context.Context, in *DescribeRoleRequest, opts ...grpc.CallOption) (*DescribeRoleResponse, error) + // Endpoint for modifying a Role + // Operation is synchronous and idempotent. + ModifyRole(ctx context.Context, in *ModifyRoleRequest, opts ...grpc.CallOption) (*ModifyRoleResponse, error) + // Endpoint for deleting a Role + // Operation is synchronous and idempotent. + DestroyRole(ctx context.Context, in *DestroyRoleRequest, opts ...grpc.CallOption) (*DestroyRoleResponse, error) + // Endpoint for fetching all organization or project members (Users who have any + // role within the given org/project) + // Operation is synchronous and idempotent. + ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) + // Endpoint for counting all organization members (Users who have any + // role within the given org) + // Operation is synchronous and idempotent. + CountMembers(ctx context.Context, in *CountMembersRequest, opts ...grpc.CallOption) (*CountMembersResponse, error) + // Endpoint for fetching ids of all organization a given user has access to. + // User is assumed to have access to an organization if they have any role assigned + // to them within that organization. + // Operation is synchronous and idempotent. + ListAccessibleOrgs(ctx context.Context, in *ListAccessibleOrgsRequest, opts ...grpc.CallOption) (*ListAccessibleOrgsResponse, error) + // Endpoint for fetching ids of all projects a given user has access to within + // given organization. + // to them within that organization. + // Operation is synchronous and idempotent. + ListAccessibleProjects(ctx context.Context, in *ListAccessibleProjectsRequest, opts ...grpc.CallOption) (*ListAccessibleProjectsResponse, error) + // Queues refreshing the resources (Collaborators and Projects) from a given Organization. + // The list of collaborators is refreshed based on the Projects that are added to the Organization. + // The operation is asynchronous. + RefreshCollaborators(ctx context.Context, in *RefreshCollaboratorsRequest, opts ...grpc.CallOption) (*RefreshCollaboratorsResponse, error) + // Fetches information about given subjects + ListSubjects(ctx context.Context, in *ListSubjectsRequest, opts ...grpc.CallOption) (*ListSubjectsResponse, error) +} + +type rBACClient struct { + cc grpc.ClientConnInterface +} + +func NewRBACClient(cc grpc.ClientConnInterface) RBACClient { + return &rBACClient{cc} +} + +func (c *rBACClient) ListUserPermissions(ctx context.Context, in *ListUserPermissionsRequest, opts ...grpc.CallOption) (*ListUserPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListUserPermissionsResponse) + err := c.cc.Invoke(ctx, RBAC_ListUserPermissions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListExistingPermissions(ctx context.Context, in *ListExistingPermissionsRequest, opts ...grpc.CallOption) (*ListExistingPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExistingPermissionsResponse) + err := c.cc.Invoke(ctx, RBAC_ListExistingPermissions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) AssignRole(ctx context.Context, in *AssignRoleRequest, opts ...grpc.CallOption) (*AssignRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AssignRoleResponse) + err := c.cc.Invoke(ctx, RBAC_AssignRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) RetractRole(ctx context.Context, in *RetractRoleRequest, opts ...grpc.CallOption) (*RetractRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RetractRoleResponse) + err := c.cc.Invoke(ctx, RBAC_RetractRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) SubjectsHaveRoles(ctx context.Context, in *SubjectsHaveRolesRequest, opts ...grpc.CallOption) (*SubjectsHaveRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SubjectsHaveRolesResponse) + err := c.cc.Invoke(ctx, RBAC_SubjectsHaveRoles_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRolesResponse) + err := c.cc.Invoke(ctx, RBAC_ListRoles_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) DescribeRole(ctx context.Context, in *DescribeRoleRequest, opts ...grpc.CallOption) (*DescribeRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeRoleResponse) + err := c.cc.Invoke(ctx, RBAC_DescribeRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ModifyRole(ctx context.Context, in *ModifyRoleRequest, opts ...grpc.CallOption) (*ModifyRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ModifyRoleResponse) + err := c.cc.Invoke(ctx, RBAC_ModifyRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) DestroyRole(ctx context.Context, in *DestroyRoleRequest, opts ...grpc.CallOption) (*DestroyRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DestroyRoleResponse) + err := c.cc.Invoke(ctx, RBAC_DestroyRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListMembersResponse) + err := c.cc.Invoke(ctx, RBAC_ListMembers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) CountMembers(ctx context.Context, in *CountMembersRequest, opts ...grpc.CallOption) (*CountMembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CountMembersResponse) + err := c.cc.Invoke(ctx, RBAC_CountMembers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListAccessibleOrgs(ctx context.Context, in *ListAccessibleOrgsRequest, opts ...grpc.CallOption) (*ListAccessibleOrgsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAccessibleOrgsResponse) + err := c.cc.Invoke(ctx, RBAC_ListAccessibleOrgs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListAccessibleProjects(ctx context.Context, in *ListAccessibleProjectsRequest, opts ...grpc.CallOption) (*ListAccessibleProjectsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAccessibleProjectsResponse) + err := c.cc.Invoke(ctx, RBAC_ListAccessibleProjects_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) RefreshCollaborators(ctx context.Context, in *RefreshCollaboratorsRequest, opts ...grpc.CallOption) (*RefreshCollaboratorsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RefreshCollaboratorsResponse) + err := c.cc.Invoke(ctx, RBAC_RefreshCollaborators_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rBACClient) ListSubjects(ctx context.Context, in *ListSubjectsRequest, opts ...grpc.CallOption) (*ListSubjectsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListSubjectsResponse) + err := c.cc.Invoke(ctx, RBAC_ListSubjects_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RBACServer is the server API for RBAC service. +// All implementations should embed UnimplementedRBACServer +// for forward compatibility. +// +// Role and permissions management service for semaphoreci +type RBACServer interface { + // Endpoint for checking user permissions + // Operation is synchronous and idempotent. + ListUserPermissions(context.Context, *ListUserPermissionsRequest) (*ListUserPermissionsResponse, error) + // Endpoint for listing all existing rbac permissions + // Operation is synchronous and idempotent. + ListExistingPermissions(context.Context, *ListExistingPermissionsRequest) (*ListExistingPermissionsResponse, error) + // Endpoint for assigning a Role to a Subject (User or Group). + // Operation is synchronous and idempotent. + AssignRole(context.Context, *AssignRoleRequest) (*AssignRoleResponse, error) + // Endpoint for retracting a Role assigned to a Subject (User or Group). + // This endpoint should be used only for retracting roles that were assigned manually. + // Operation is synchronous and idempotent. + RetractRole(context.Context, *RetractRoleRequest) (*RetractRoleResponse, error) + // Endpoint for checking whether Subject(s) have specific Roles assigned + // to them. + // Operation is synchronous and idempotent. + SubjectsHaveRoles(context.Context, *SubjectsHaveRolesRequest) (*SubjectsHaveRolesResponse, error) + // Endpoint for fetching roles. + // It can be userd to fetch public or custom roles belonging to a specific organization. + // It can be also used to fetch only org_level roles or project_level roles, + // depending on data sent in ListRolesRequest + // Operation is synchronous and idempotent. + ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) + // Endpoint for describing one specific Role + // Operation is synchronous and idempotent. + DescribeRole(context.Context, *DescribeRoleRequest) (*DescribeRoleResponse, error) + // Endpoint for modifying a Role + // Operation is synchronous and idempotent. + ModifyRole(context.Context, *ModifyRoleRequest) (*ModifyRoleResponse, error) + // Endpoint for deleting a Role + // Operation is synchronous and idempotent. + DestroyRole(context.Context, *DestroyRoleRequest) (*DestroyRoleResponse, error) + // Endpoint for fetching all organization or project members (Users who have any + // role within the given org/project) + // Operation is synchronous and idempotent. + ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) + // Endpoint for counting all organization members (Users who have any + // role within the given org) + // Operation is synchronous and idempotent. + CountMembers(context.Context, *CountMembersRequest) (*CountMembersResponse, error) + // Endpoint for fetching ids of all organization a given user has access to. + // User is assumed to have access to an organization if they have any role assigned + // to them within that organization. + // Operation is synchronous and idempotent. + ListAccessibleOrgs(context.Context, *ListAccessibleOrgsRequest) (*ListAccessibleOrgsResponse, error) + // Endpoint for fetching ids of all projects a given user has access to within + // given organization. + // to them within that organization. + // Operation is synchronous and idempotent. + ListAccessibleProjects(context.Context, *ListAccessibleProjectsRequest) (*ListAccessibleProjectsResponse, error) + // Queues refreshing the resources (Collaborators and Projects) from a given Organization. + // The list of collaborators is refreshed based on the Projects that are added to the Organization. + // The operation is asynchronous. + RefreshCollaborators(context.Context, *RefreshCollaboratorsRequest) (*RefreshCollaboratorsResponse, error) + // Fetches information about given subjects + ListSubjects(context.Context, *ListSubjectsRequest) (*ListSubjectsResponse, error) +} + +// UnimplementedRBACServer should 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 UnimplementedRBACServer struct{} + +func (UnimplementedRBACServer) ListUserPermissions(context.Context, *ListUserPermissionsRequest) (*ListUserPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUserPermissions not implemented") +} +func (UnimplementedRBACServer) ListExistingPermissions(context.Context, *ListExistingPermissionsRequest) (*ListExistingPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExistingPermissions not implemented") +} +func (UnimplementedRBACServer) AssignRole(context.Context, *AssignRoleRequest) (*AssignRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssignRole not implemented") +} +func (UnimplementedRBACServer) RetractRole(context.Context, *RetractRoleRequest) (*RetractRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RetractRole not implemented") +} +func (UnimplementedRBACServer) SubjectsHaveRoles(context.Context, *SubjectsHaveRolesRequest) (*SubjectsHaveRolesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubjectsHaveRoles not implemented") +} +func (UnimplementedRBACServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented") +} +func (UnimplementedRBACServer) DescribeRole(context.Context, *DescribeRoleRequest) (*DescribeRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeRole not implemented") +} +func (UnimplementedRBACServer) ModifyRole(context.Context, *ModifyRoleRequest) (*ModifyRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModifyRole not implemented") +} +func (UnimplementedRBACServer) DestroyRole(context.Context, *DestroyRoleRequest) (*DestroyRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DestroyRole not implemented") +} +func (UnimplementedRBACServer) ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMembers not implemented") +} +func (UnimplementedRBACServer) CountMembers(context.Context, *CountMembersRequest) (*CountMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountMembers not implemented") +} +func (UnimplementedRBACServer) ListAccessibleOrgs(context.Context, *ListAccessibleOrgsRequest) (*ListAccessibleOrgsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccessibleOrgs not implemented") +} +func (UnimplementedRBACServer) ListAccessibleProjects(context.Context, *ListAccessibleProjectsRequest) (*ListAccessibleProjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccessibleProjects not implemented") +} +func (UnimplementedRBACServer) RefreshCollaborators(context.Context, *RefreshCollaboratorsRequest) (*RefreshCollaboratorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefreshCollaborators not implemented") +} +func (UnimplementedRBACServer) ListSubjects(context.Context, *ListSubjectsRequest) (*ListSubjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSubjects not implemented") +} +func (UnimplementedRBACServer) testEmbeddedByValue() {} + +// UnsafeRBACServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RBACServer will +// result in compilation errors. +type UnsafeRBACServer interface { + mustEmbedUnimplementedRBACServer() +} + +func RegisterRBACServer(s grpc.ServiceRegistrar, srv RBACServer) { + // If the following call pancis, it indicates UnimplementedRBACServer 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(&RBAC_ServiceDesc, srv) +} + +func _RBAC_ListUserPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUserPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListUserPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListUserPermissions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListUserPermissions(ctx, req.(*ListUserPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListExistingPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExistingPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListExistingPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListExistingPermissions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListExistingPermissions(ctx, req.(*ListExistingPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_AssignRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssignRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).AssignRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_AssignRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).AssignRole(ctx, req.(*AssignRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_RetractRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetractRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).RetractRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_RetractRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).RetractRole(ctx, req.(*RetractRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_SubjectsHaveRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubjectsHaveRolesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).SubjectsHaveRoles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_SubjectsHaveRoles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).SubjectsHaveRoles(ctx, req.(*SubjectsHaveRolesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRolesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListRoles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListRoles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListRoles(ctx, req.(*ListRolesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_DescribeRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).DescribeRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_DescribeRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).DescribeRole(ctx, req.(*DescribeRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ModifyRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ModifyRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ModifyRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ModifyRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ModifyRole(ctx, req.(*ModifyRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_DestroyRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).DestroyRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_DestroyRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).DestroyRole(ctx, req.(*DestroyRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListMembers(ctx, req.(*ListMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_CountMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).CountMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_CountMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).CountMembers(ctx, req.(*CountMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListAccessibleOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccessibleOrgsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListAccessibleOrgs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListAccessibleOrgs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListAccessibleOrgs(ctx, req.(*ListAccessibleOrgsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListAccessibleProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccessibleProjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListAccessibleProjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListAccessibleProjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListAccessibleProjects(ctx, req.(*ListAccessibleProjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_RefreshCollaborators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefreshCollaboratorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).RefreshCollaborators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_RefreshCollaborators_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).RefreshCollaborators(ctx, req.(*RefreshCollaboratorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RBAC_ListSubjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RBACServer).ListSubjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RBAC_ListSubjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RBACServer).ListSubjects(ctx, req.(*ListSubjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RBAC_ServiceDesc is the grpc.ServiceDesc for RBAC service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RBAC_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.RBAC.RBAC", + HandlerType: (*RBACServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListUserPermissions", + Handler: _RBAC_ListUserPermissions_Handler, + }, + { + MethodName: "ListExistingPermissions", + Handler: _RBAC_ListExistingPermissions_Handler, + }, + { + MethodName: "AssignRole", + Handler: _RBAC_AssignRole_Handler, + }, + { + MethodName: "RetractRole", + Handler: _RBAC_RetractRole_Handler, + }, + { + MethodName: "SubjectsHaveRoles", + Handler: _RBAC_SubjectsHaveRoles_Handler, + }, + { + MethodName: "ListRoles", + Handler: _RBAC_ListRoles_Handler, + }, + { + MethodName: "DescribeRole", + Handler: _RBAC_DescribeRole_Handler, + }, + { + MethodName: "ModifyRole", + Handler: _RBAC_ModifyRole_Handler, + }, + { + MethodName: "DestroyRole", + Handler: _RBAC_DestroyRole_Handler, + }, + { + MethodName: "ListMembers", + Handler: _RBAC_ListMembers_Handler, + }, + { + MethodName: "CountMembers", + Handler: _RBAC_CountMembers_Handler, + }, + { + MethodName: "ListAccessibleOrgs", + Handler: _RBAC_ListAccessibleOrgs_Handler, + }, + { + MethodName: "ListAccessibleProjects", + Handler: _RBAC_ListAccessibleProjects_Handler, + }, + { + MethodName: "RefreshCollaborators", + Handler: _RBAC_RefreshCollaborators_Handler, + }, + { + MethodName: "ListSubjects", + Handler: _RBAC_ListSubjects_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "rbac.proto", +} diff --git a/mcp_server/pkg/internal_api/repository_integrator/repository_integrator.pb.go b/mcp_server/pkg/internal_api/repository_integrator/repository_integrator.pb.go new file mode 100644 index 000000000..6bced92c4 --- /dev/null +++ b/mcp_server/pkg/internal_api/repository_integrator/repository_integrator.pb.go @@ -0,0 +1,1168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: repository_integrator.proto + +package repository_integrator + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type IntegrationType int32 + +const ( + IntegrationType_GITHUB_OAUTH_TOKEN IntegrationType = 0 + IntegrationType_GITHUB_APP IntegrationType = 1 + IntegrationType_BITBUCKET IntegrationType = 2 + IntegrationType_GITLAB IntegrationType = 3 + IntegrationType_GIT IntegrationType = 4 +) + +// Enum value maps for IntegrationType. +var ( + IntegrationType_name = map[int32]string{ + 0: "GITHUB_OAUTH_TOKEN", + 1: "GITHUB_APP", + 2: "BITBUCKET", + 3: "GITLAB", + 4: "GIT", + } + IntegrationType_value = map[string]int32{ + "GITHUB_OAUTH_TOKEN": 0, + "GITHUB_APP": 1, + "BITBUCKET": 2, + "GITLAB": 3, + "GIT": 4, + } +) + +func (x IntegrationType) Enum() *IntegrationType { + p := new(IntegrationType) + *p = x + return p +} + +func (x IntegrationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IntegrationType) Descriptor() protoreflect.EnumDescriptor { + return file_repository_integrator_proto_enumTypes[0].Descriptor() +} + +func (IntegrationType) Type() protoreflect.EnumType { + return &file_repository_integrator_proto_enumTypes[0] +} + +func (x IntegrationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IntegrationType.Descriptor instead. +func (IntegrationType) EnumDescriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{0} +} + +type IntegrationScope int32 + +const ( + IntegrationScope_FULL_CONNECTION IntegrationScope = 0 + IntegrationScope_ONLY_PUBLIC IntegrationScope = 1 + IntegrationScope_NO_CONNECTION IntegrationScope = 2 +) + +// Enum value maps for IntegrationScope. +var ( + IntegrationScope_name = map[int32]string{ + 0: "FULL_CONNECTION", + 1: "ONLY_PUBLIC", + 2: "NO_CONNECTION", + } + IntegrationScope_value = map[string]int32{ + "FULL_CONNECTION": 0, + "ONLY_PUBLIC": 1, + "NO_CONNECTION": 2, + } +) + +func (x IntegrationScope) Enum() *IntegrationScope { + p := new(IntegrationScope) + *p = x + return p +} + +func (x IntegrationScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IntegrationScope) Descriptor() protoreflect.EnumDescriptor { + return file_repository_integrator_proto_enumTypes[1].Descriptor() +} + +func (IntegrationScope) Type() protoreflect.EnumType { + return &file_repository_integrator_proto_enumTypes[1] +} + +func (x IntegrationScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IntegrationScope.Descriptor instead. +func (IntegrationScope) EnumDescriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{1} +} + +// Get Token call request +// +// - user_id = [required if integration_type == GIT_HUB_OAUTH_TOKEN] UUID of the user. +// - repository_slug = [required if integration_type == GIT_HUB_APP] name of an repository. +// - integration_type = [required if project_id is nil] type of an integration. +// - project_id = [required if integration_type is nil] +type GetTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + RepositorySlug string `protobuf:"bytes,2,opt,name=repository_slug,json=repositorySlug,proto3" json:"repository_slug,omitempty"` + IntegrationType IntegrationType `protobuf:"varint,3,opt,name=integration_type,json=integrationType,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"integration_type,omitempty"` + ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTokenRequest) Reset() { + *x = GetTokenRequest{} + mi := &file_repository_integrator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTokenRequest) ProtoMessage() {} + +func (x *GetTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTokenRequest.ProtoReflect.Descriptor instead. +func (*GetTokenRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTokenRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetTokenRequest) GetRepositorySlug() string { + if x != nil { + return x.RepositorySlug + } + return "" +} + +func (x *GetTokenRequest) GetIntegrationType() IntegrationType { + if x != nil { + return x.IntegrationType + } + return IntegrationType_GITHUB_OAUTH_TOKEN +} + +func (x *GetTokenRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Get Token call response +// +// - token = [required] token for integration. +// - expired_at = [optional] exporation date of a token. +type GetTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTokenResponse) Reset() { + *x = GetTokenResponse{} + mi := &file_repository_integrator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTokenResponse) ProtoMessage() {} + +func (x *GetTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTokenResponse.ProtoReflect.Descriptor instead. +func (*GetTokenResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{1} +} + +func (x *GetTokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *GetTokenResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +// Check Token call request +// +// - project_id = [required] UUID of the project +type CheckTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckTokenRequest) Reset() { + *x = CheckTokenRequest{} + mi := &file_repository_integrator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckTokenRequest) ProtoMessage() {} + +func (x *CheckTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckTokenRequest.ProtoReflect.Descriptor instead. +func (*CheckTokenRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{2} +} + +func (x *CheckTokenRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Check Token call response +// +// - valid = [required] state of a token. +// - integration_scope = [required] scope of a connection +type CheckTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + IntegrationScope IntegrationScope `protobuf:"varint,2,opt,name=integration_scope,json=integrationScope,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationScope" json:"integration_scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckTokenResponse) Reset() { + *x = CheckTokenResponse{} + mi := &file_repository_integrator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckTokenResponse) ProtoMessage() {} + +func (x *CheckTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckTokenResponse.ProtoReflect.Descriptor instead. +func (*CheckTokenResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{3} +} + +func (x *CheckTokenResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +func (x *CheckTokenResponse) GetIntegrationScope() IntegrationScope { + if x != nil { + return x.IntegrationScope + } + return IntegrationScope_FULL_CONNECTION +} + +// PreheatFileCache call request +// +// - project_id = [required] UUID of the project +// - path = [required] Path of a file in a repo +// - ref = [optional] The name of the commit/branch/tag. +// Default: the repository’s default branch. +type PreheatFileCacheRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreheatFileCacheRequest) Reset() { + *x = PreheatFileCacheRequest{} + mi := &file_repository_integrator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreheatFileCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreheatFileCacheRequest) ProtoMessage() {} + +func (x *PreheatFileCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreheatFileCacheRequest.ProtoReflect.Descriptor instead. +func (*PreheatFileCacheRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{4} +} + +func (x *PreheatFileCacheRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *PreheatFileCacheRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *PreheatFileCacheRequest) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +// Get File call request +// +// - project_id = [required] UUID of the project +// - path = [required] Path of a file in a repo +// - ref = [optional] The name of the commit/branch/tag. +// Default: the repository’s default branch. +type GetFileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFileRequest) Reset() { + *x = GetFileRequest{} + mi := &file_repository_integrator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileRequest) ProtoMessage() {} + +func (x *GetFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead. +func (*GetFileRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{5} +} + +func (x *GetFileRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *GetFileRequest) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +// Get File call response +// +// - content = [required] base64 encoded content of a file. +type GetFileResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFileResponse) Reset() { + *x = GetFileResponse{} + mi := &file_repository_integrator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileResponse) ProtoMessage() {} + +func (x *GetFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileResponse.ProtoReflect.Descriptor instead. +func (*GetFileResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{6} +} + +func (x *GetFileResponse) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +// GithubInstallationInfo call request +// +// - project_id = [required] UUID of the project +type GithubInstallationInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GithubInstallationInfoRequest) Reset() { + *x = GithubInstallationInfoRequest{} + mi := &file_repository_integrator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GithubInstallationInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GithubInstallationInfoRequest) ProtoMessage() {} + +func (x *GithubInstallationInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GithubInstallationInfoRequest.ProtoReflect.Descriptor instead. +func (*GithubInstallationInfoRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{7} +} + +func (x *GithubInstallationInfoRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// GithubInstallationInfo call response +// +// - installation_id = [optional] id of an github app installation, if present +// - application_url = [required] URL to github app +// - installation_url = [optional] URL to github app installation, if present +type GithubInstallationInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + InstallationId int64 `protobuf:"varint,1,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + ApplicationUrl string `protobuf:"bytes,2,opt,name=application_url,json=applicationUrl,proto3" json:"application_url,omitempty"` + InstallationUrl string `protobuf:"bytes,3,opt,name=installation_url,json=installationUrl,proto3" json:"installation_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GithubInstallationInfoResponse) Reset() { + *x = GithubInstallationInfoResponse{} + mi := &file_repository_integrator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GithubInstallationInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GithubInstallationInfoResponse) ProtoMessage() {} + +func (x *GithubInstallationInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GithubInstallationInfoResponse.ProtoReflect.Descriptor instead. +func (*GithubInstallationInfoResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{8} +} + +func (x *GithubInstallationInfoResponse) GetInstallationId() int64 { + if x != nil { + return x.InstallationId + } + return 0 +} + +func (x *GithubInstallationInfoResponse) GetApplicationUrl() string { + if x != nil { + return x.ApplicationUrl + } + return "" +} + +func (x *GithubInstallationInfoResponse) GetInstallationUrl() string { + if x != nil { + return x.InstallationUrl + } + return "" +} + +// InitGithubInstallation call request +// Used by bootstrapper to initialize github app installations +type InitGithubInstallationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InitGithubInstallationRequest) Reset() { + *x = InitGithubInstallationRequest{} + mi := &file_repository_integrator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InitGithubInstallationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitGithubInstallationRequest) ProtoMessage() {} + +func (x *InitGithubInstallationRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitGithubInstallationRequest.ProtoReflect.Descriptor instead. +func (*InitGithubInstallationRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{9} +} + +type InitGithubInstallationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InitGithubInstallationResponse) Reset() { + *x = InitGithubInstallationResponse{} + mi := &file_repository_integrator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InitGithubInstallationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitGithubInstallationResponse) ProtoMessage() {} + +func (x *InitGithubInstallationResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitGithubInstallationResponse.ProtoReflect.Descriptor instead. +func (*InitGithubInstallationResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{10} +} + +// Get Repositories call request +// +// - user_id = [required] UUID of the user. +// - integration_type = [required] type of an integration. +type GetRepositoriesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + IntegrationType IntegrationType `protobuf:"varint,2,opt,name=integration_type,json=integrationType,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"integration_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRepositoriesRequest) Reset() { + *x = GetRepositoriesRequest{} + mi := &file_repository_integrator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRepositoriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoriesRequest) ProtoMessage() {} + +func (x *GetRepositoriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoriesRequest.ProtoReflect.Descriptor instead. +func (*GetRepositoriesRequest) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{11} +} + +func (x *GetRepositoriesRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetRepositoriesRequest) GetIntegrationType() IntegrationType { + if x != nil { + return x.IntegrationType + } + return IntegrationType_GITHUB_OAUTH_TOKEN +} + +// Get Repositories call response +// +// - repositories = [required] List of repositories visable to user. +type GetRepositoriesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRepositoriesResponse) Reset() { + *x = GetRepositoriesResponse{} + mi := &file_repository_integrator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRepositoriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoriesResponse) ProtoMessage() {} + +func (x *GetRepositoriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoriesResponse.ProtoReflect.Descriptor instead. +func (*GetRepositoriesResponse) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{12} +} + +func (x *GetRepositoriesResponse) GetRepositories() []*Repository { + if x != nil { + return x.Repositories + } + return nil +} + +type Repository struct { + state protoimpl.MessageState `protogen:"open.v1"` + Addable bool `protobuf:"varint,1,opt,name=addable,proto3" json:"addable,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + FullName string `protobuf:"bytes,4,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Repository) Reset() { + *x = Repository{} + mi := &file_repository_integrator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository) ProtoMessage() {} + +func (x *Repository) ProtoReflect() protoreflect.Message { + mi := &file_repository_integrator_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository.ProtoReflect.Descriptor instead. +func (*Repository) Descriptor() ([]byte, []int) { + return file_repository_integrator_proto_rawDescGZIP(), []int{13} +} + +func (x *Repository) GetAddable() bool { + if x != nil { + return x.Addable + } + return false +} + +func (x *Repository) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Repository) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *Repository) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Repository) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +var File_repository_integrator_proto protoreflect.FileDescriptor + +var file_repository_integrator_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, + 0x6c, 0x75, 0x67, 0x12, 0x5c, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x22, 0x63, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 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, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x32, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x12, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x5f, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x5e, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x68, 0x65, + 0x61, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22, 0x55, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, + 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22, 0x2b, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x1d, 0x47, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x9d, 0x01, 0x0a, 0x1e, + 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, + 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x1f, 0x0a, 0x1d, 0x49, + 0x6e, 0x69, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x1e, + 0x49, 0x6e, 0x69, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, + 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x6b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8b, 0x01, + 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, + 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x5d, 0x0a, 0x0f, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x12, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x54, + 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, + 0x5f, 0x41, 0x50, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, + 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, + 0x03, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x49, 0x54, 0x10, 0x04, 0x2a, 0x4b, 0x0a, 0x10, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x13, + 0x0a, 0x0f, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, + 0x49, 0x43, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x32, 0xa5, 0x07, 0x0a, 0x1b, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x0a, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x68, 0x65, 0x61, 0x74, 0x46, 0x69, + 0x6c, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x39, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x68, 0x65, + 0x61, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x6e, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x47, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x69, + 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x47, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x38, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x54, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, + 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, + 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_repository_integrator_proto_rawDescOnce sync.Once + file_repository_integrator_proto_rawDescData = file_repository_integrator_proto_rawDesc +) + +func file_repository_integrator_proto_rawDescGZIP() []byte { + file_repository_integrator_proto_rawDescOnce.Do(func() { + file_repository_integrator_proto_rawDescData = protoimpl.X.CompressGZIP(file_repository_integrator_proto_rawDescData) + }) + return file_repository_integrator_proto_rawDescData +} + +var file_repository_integrator_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_repository_integrator_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_repository_integrator_proto_goTypes = []any{ + (IntegrationType)(0), // 0: InternalApi.RepositoryIntegrator.IntegrationType + (IntegrationScope)(0), // 1: InternalApi.RepositoryIntegrator.IntegrationScope + (*GetTokenRequest)(nil), // 2: InternalApi.RepositoryIntegrator.GetTokenRequest + (*GetTokenResponse)(nil), // 3: InternalApi.RepositoryIntegrator.GetTokenResponse + (*CheckTokenRequest)(nil), // 4: InternalApi.RepositoryIntegrator.CheckTokenRequest + (*CheckTokenResponse)(nil), // 5: InternalApi.RepositoryIntegrator.CheckTokenResponse + (*PreheatFileCacheRequest)(nil), // 6: InternalApi.RepositoryIntegrator.PreheatFileCacheRequest + (*GetFileRequest)(nil), // 7: InternalApi.RepositoryIntegrator.GetFileRequest + (*GetFileResponse)(nil), // 8: InternalApi.RepositoryIntegrator.GetFileResponse + (*GithubInstallationInfoRequest)(nil), // 9: InternalApi.RepositoryIntegrator.GithubInstallationInfoRequest + (*GithubInstallationInfoResponse)(nil), // 10: InternalApi.RepositoryIntegrator.GithubInstallationInfoResponse + (*InitGithubInstallationRequest)(nil), // 11: InternalApi.RepositoryIntegrator.InitGithubInstallationRequest + (*InitGithubInstallationResponse)(nil), // 12: InternalApi.RepositoryIntegrator.InitGithubInstallationResponse + (*GetRepositoriesRequest)(nil), // 13: InternalApi.RepositoryIntegrator.GetRepositoriesRequest + (*GetRepositoriesResponse)(nil), // 14: InternalApi.RepositoryIntegrator.GetRepositoriesResponse + (*Repository)(nil), // 15: InternalApi.RepositoryIntegrator.Repository + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 17: google.protobuf.Empty +} +var file_repository_integrator_proto_depIdxs = []int32{ + 0, // 0: InternalApi.RepositoryIntegrator.GetTokenRequest.integration_type:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 16, // 1: InternalApi.RepositoryIntegrator.GetTokenResponse.expires_at:type_name -> google.protobuf.Timestamp + 1, // 2: InternalApi.RepositoryIntegrator.CheckTokenResponse.integration_scope:type_name -> InternalApi.RepositoryIntegrator.IntegrationScope + 0, // 3: InternalApi.RepositoryIntegrator.GetRepositoriesRequest.integration_type:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 15, // 4: InternalApi.RepositoryIntegrator.GetRepositoriesResponse.repositories:type_name -> InternalApi.RepositoryIntegrator.Repository + 2, // 5: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetToken:input_type -> InternalApi.RepositoryIntegrator.GetTokenRequest + 4, // 6: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.CheckToken:input_type -> InternalApi.RepositoryIntegrator.CheckTokenRequest + 6, // 7: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.PreheatFileCache:input_type -> InternalApi.RepositoryIntegrator.PreheatFileCacheRequest + 7, // 8: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetFile:input_type -> InternalApi.RepositoryIntegrator.GetFileRequest + 9, // 9: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GithubInstallationInfo:input_type -> InternalApi.RepositoryIntegrator.GithubInstallationInfoRequest + 11, // 10: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.InitGithubInstallation:input_type -> InternalApi.RepositoryIntegrator.InitGithubInstallationRequest + 13, // 11: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetRepositories:input_type -> InternalApi.RepositoryIntegrator.GetRepositoriesRequest + 3, // 12: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetToken:output_type -> InternalApi.RepositoryIntegrator.GetTokenResponse + 5, // 13: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.CheckToken:output_type -> InternalApi.RepositoryIntegrator.CheckTokenResponse + 17, // 14: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.PreheatFileCache:output_type -> google.protobuf.Empty + 8, // 15: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetFile:output_type -> InternalApi.RepositoryIntegrator.GetFileResponse + 10, // 16: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GithubInstallationInfo:output_type -> InternalApi.RepositoryIntegrator.GithubInstallationInfoResponse + 12, // 17: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.InitGithubInstallation:output_type -> InternalApi.RepositoryIntegrator.InitGithubInstallationResponse + 14, // 18: InternalApi.RepositoryIntegrator.RepositoryIntegratorService.GetRepositories:output_type -> InternalApi.RepositoryIntegrator.GetRepositoriesResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_repository_integrator_proto_init() } +func file_repository_integrator_proto_init() { + if File_repository_integrator_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_repository_integrator_proto_rawDesc, + NumEnums: 2, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_repository_integrator_proto_goTypes, + DependencyIndexes: file_repository_integrator_proto_depIdxs, + EnumInfos: file_repository_integrator_proto_enumTypes, + MessageInfos: file_repository_integrator_proto_msgTypes, + }.Build() + File_repository_integrator_proto = out.File + file_repository_integrator_proto_rawDesc = nil + file_repository_integrator_proto_goTypes = nil + file_repository_integrator_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/repository_integrator/repository_integrator_grpc.pb.go b/mcp_server/pkg/internal_api/repository_integrator/repository_integrator_grpc.pb.go new file mode 100644 index 000000000..926b3bba5 --- /dev/null +++ b/mcp_server/pkg/internal_api/repository_integrator/repository_integrator_grpc.pb.go @@ -0,0 +1,348 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: repository_integrator.proto + +package repository_integrator + +import ( + context "context" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RepositoryIntegratorService_GetToken_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/GetToken" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_CheckToken_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/CheckToken" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_PreheatFileCache_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/PreheatFileCache" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_GetFile_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/GetFile" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_GithubInstallationInfo_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/GithubInstallationInfo" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_InitGithubInstallation_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/InitGithubInstallation" // #nosec G101 -- gRPC method name, not credential + RepositoryIntegratorService_GetRepositories_FullMethodName = "/InternalApi.RepositoryIntegrator.RepositoryIntegratorService/GetRepositories" // #nosec G101 -- gRPC method name, not credential +) + +// RepositoryIntegratorServiceClient is the client API for RepositoryIntegratorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RepositoryIntegratorServiceClient interface { + GetToken(ctx context.Context, in *GetTokenRequest, opts ...grpc.CallOption) (*GetTokenResponse, error) + CheckToken(ctx context.Context, in *CheckTokenRequest, opts ...grpc.CallOption) (*CheckTokenResponse, error) + PreheatFileCache(ctx context.Context, in *PreheatFileCacheRequest, opts ...grpc.CallOption) (*empty.Empty, error) + GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*GetFileResponse, error) + GithubInstallationInfo(ctx context.Context, in *GithubInstallationInfoRequest, opts ...grpc.CallOption) (*GithubInstallationInfoResponse, error) + InitGithubInstallation(ctx context.Context, in *InitGithubInstallationRequest, opts ...grpc.CallOption) (*InitGithubInstallationResponse, error) + GetRepositories(ctx context.Context, in *GetRepositoriesRequest, opts ...grpc.CallOption) (*GetRepositoriesResponse, error) +} + +type repositoryIntegratorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRepositoryIntegratorServiceClient(cc grpc.ClientConnInterface) RepositoryIntegratorServiceClient { + return &repositoryIntegratorServiceClient{cc} +} + +func (c *repositoryIntegratorServiceClient) GetToken(ctx context.Context, in *GetTokenRequest, opts ...grpc.CallOption) (*GetTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTokenResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_GetToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) CheckToken(ctx context.Context, in *CheckTokenRequest, opts ...grpc.CallOption) (*CheckTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckTokenResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_CheckToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) PreheatFileCache(ctx context.Context, in *PreheatFileCacheRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(empty.Empty) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_PreheatFileCache_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*GetFileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetFileResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_GetFile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) GithubInstallationInfo(ctx context.Context, in *GithubInstallationInfoRequest, opts ...grpc.CallOption) (*GithubInstallationInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GithubInstallationInfoResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_GithubInstallationInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) InitGithubInstallation(ctx context.Context, in *InitGithubInstallationRequest, opts ...grpc.CallOption) (*InitGithubInstallationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InitGithubInstallationResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_InitGithubInstallation_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *repositoryIntegratorServiceClient) GetRepositories(ctx context.Context, in *GetRepositoriesRequest, opts ...grpc.CallOption) (*GetRepositoriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRepositoriesResponse) + err := c.cc.Invoke(ctx, RepositoryIntegratorService_GetRepositories_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RepositoryIntegratorServiceServer is the server API for RepositoryIntegratorService service. +// All implementations should embed UnimplementedRepositoryIntegratorServiceServer +// for forward compatibility. +type RepositoryIntegratorServiceServer interface { + GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error) + CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error) + PreheatFileCache(context.Context, *PreheatFileCacheRequest) (*empty.Empty, error) + GetFile(context.Context, *GetFileRequest) (*GetFileResponse, error) + GithubInstallationInfo(context.Context, *GithubInstallationInfoRequest) (*GithubInstallationInfoResponse, error) + InitGithubInstallation(context.Context, *InitGithubInstallationRequest) (*InitGithubInstallationResponse, error) + GetRepositories(context.Context, *GetRepositoriesRequest) (*GetRepositoriesResponse, error) +} + +// UnimplementedRepositoryIntegratorServiceServer should 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 UnimplementedRepositoryIntegratorServiceServer struct{} + +func (UnimplementedRepositoryIntegratorServiceServer) GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetToken not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckToken not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) PreheatFileCache(context.Context, *PreheatFileCacheRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PreheatFileCache not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) GetFile(context.Context, *GetFileRequest) (*GetFileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) GithubInstallationInfo(context.Context, *GithubInstallationInfoRequest) (*GithubInstallationInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GithubInstallationInfo not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) InitGithubInstallation(context.Context, *InitGithubInstallationRequest) (*InitGithubInstallationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitGithubInstallation not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) GetRepositories(context.Context, *GetRepositoriesRequest) (*GetRepositoriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRepositories not implemented") +} +func (UnimplementedRepositoryIntegratorServiceServer) testEmbeddedByValue() {} + +// UnsafeRepositoryIntegratorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RepositoryIntegratorServiceServer will +// result in compilation errors. +type UnsafeRepositoryIntegratorServiceServer interface { + mustEmbedUnimplementedRepositoryIntegratorServiceServer() +} + +func RegisterRepositoryIntegratorServiceServer(s grpc.ServiceRegistrar, srv RepositoryIntegratorServiceServer) { + // If the following call pancis, it indicates UnimplementedRepositoryIntegratorServiceServer 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(&RepositoryIntegratorService_ServiceDesc, srv) +} + +func _RepositoryIntegratorService_GetToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).GetToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_GetToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).GetToken(ctx, req.(*GetTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_CheckToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).CheckToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_CheckToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).CheckToken(ctx, req.(*CheckTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_PreheatFileCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PreheatFileCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).PreheatFileCache(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_PreheatFileCache_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).PreheatFileCache(ctx, req.(*PreheatFileCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).GetFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_GetFile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).GetFile(ctx, req.(*GetFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_GithubInstallationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GithubInstallationInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).GithubInstallationInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_GithubInstallationInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).GithubInstallationInfo(ctx, req.(*GithubInstallationInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_InitGithubInstallation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InitGithubInstallationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).InitGithubInstallation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_InitGithubInstallation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).InitGithubInstallation(ctx, req.(*InitGithubInstallationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RepositoryIntegratorService_GetRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRepositoriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoryIntegratorServiceServer).GetRepositories(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RepositoryIntegratorService_GetRepositories_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoryIntegratorServiceServer).GetRepositories(ctx, req.(*GetRepositoriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RepositoryIntegratorService_ServiceDesc is the grpc.ServiceDesc for RepositoryIntegratorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RepositoryIntegratorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.RepositoryIntegrator.RepositoryIntegratorService", + HandlerType: (*RepositoryIntegratorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetToken", + Handler: _RepositoryIntegratorService_GetToken_Handler, + }, + { + MethodName: "CheckToken", + Handler: _RepositoryIntegratorService_CheckToken_Handler, + }, + { + MethodName: "PreheatFileCache", + Handler: _RepositoryIntegratorService_PreheatFileCache_Handler, + }, + { + MethodName: "GetFile", + Handler: _RepositoryIntegratorService_GetFile_Handler, + }, + { + MethodName: "GithubInstallationInfo", + Handler: _RepositoryIntegratorService_GithubInstallationInfo_Handler, + }, + { + MethodName: "InitGithubInstallation", + Handler: _RepositoryIntegratorService_InitGithubInstallation_Handler, + }, + { + MethodName: "GetRepositories", + Handler: _RepositoryIntegratorService_GetRepositories_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "repository_integrator.proto", +} diff --git a/mcp_server/pkg/internal_api/response_status/response_status.pb.go b/mcp_server/pkg/internal_api/response_status/response_status.pb.go new file mode 100644 index 000000000..13f7c6cf0 --- /dev/null +++ b/mcp_server/pkg/internal_api/response_status/response_status.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: include/internal_api/response_status.proto + +package response_status + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ResponseStatus_Code int32 + +const ( + ResponseStatus_OK ResponseStatus_Code = 0 + ResponseStatus_BAD_PARAM ResponseStatus_Code = 1 +) + +// Enum value maps for ResponseStatus_Code. +var ( + ResponseStatus_Code_name = map[int32]string{ + 0: "OK", + 1: "BAD_PARAM", + } + ResponseStatus_Code_value = map[string]int32{ + "OK": 0, + "BAD_PARAM": 1, + } +) + +func (x ResponseStatus_Code) Enum() *ResponseStatus_Code { + p := new(ResponseStatus_Code) + *p = x + return p +} + +func (x ResponseStatus_Code) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResponseStatus_Code) Descriptor() protoreflect.EnumDescriptor { + return file_include_internal_api_response_status_proto_enumTypes[0].Descriptor() +} + +func (ResponseStatus_Code) Type() protoreflect.EnumType { + return &file_include_internal_api_response_status_proto_enumTypes[0] +} + +func (x ResponseStatus_Code) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResponseStatus_Code.Descriptor instead. +func (ResponseStatus_Code) EnumDescriptor() ([]byte, []int) { + return file_include_internal_api_response_status_proto_rawDescGZIP(), []int{0, 0} +} + +// ResponseStatus of a RPC call. +// +// - code = either OK or BAD_PARAM +// - if resposnse is OK, the response is valid +// - if responnse is BAD_PARAM, the response can't be created, +// the caller should ignore the rest of the fields +// +// - message = The reason why a BAD_PARAM was returned. +// +// Example: +// +// code = BAD_PARAM, +// message = 'Record with id 1212121 does not exists'. +type ResponseStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code ResponseStatus_Code `protobuf:"varint,1,opt,name=code,proto3,enum=InternalApi.ResponseStatus_Code" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseStatus) Reset() { + *x = ResponseStatus{} + mi := &file_include_internal_api_response_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseStatus) ProtoMessage() {} + +func (x *ResponseStatus) ProtoReflect() protoreflect.Message { + mi := &file_include_internal_api_response_status_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseStatus.ProtoReflect.Descriptor instead. +func (*ResponseStatus) Descriptor() ([]byte, []int) { + return file_include_internal_api_response_status_proto_rawDescGZIP(), []int{0} +} + +func (x *ResponseStatus) GetCode() ResponseStatus_Code { + if x != nil { + return x.Code + } + return ResponseStatus_OK +} + +func (x *ResponseStatus) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_include_internal_api_response_status_proto protoreflect.FileDescriptor + +var file_include_internal_api_response_status_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x22, 0x7f, 0x0a, 0x0e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1d, 0x0a, 0x04, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x42, + 0x41, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x10, 0x01, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, + 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, + 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_include_internal_api_response_status_proto_rawDescOnce sync.Once + file_include_internal_api_response_status_proto_rawDescData = file_include_internal_api_response_status_proto_rawDesc +) + +func file_include_internal_api_response_status_proto_rawDescGZIP() []byte { + file_include_internal_api_response_status_proto_rawDescOnce.Do(func() { + file_include_internal_api_response_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_include_internal_api_response_status_proto_rawDescData) + }) + return file_include_internal_api_response_status_proto_rawDescData +} + +var file_include_internal_api_response_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_include_internal_api_response_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_include_internal_api_response_status_proto_goTypes = []any{ + (ResponseStatus_Code)(0), // 0: InternalApi.ResponseStatus.Code + (*ResponseStatus)(nil), // 1: InternalApi.ResponseStatus +} +var file_include_internal_api_response_status_proto_depIdxs = []int32{ + 0, // 0: InternalApi.ResponseStatus.code:type_name -> InternalApi.ResponseStatus.Code + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_include_internal_api_response_status_proto_init() } +func file_include_internal_api_response_status_proto_init() { + if File_include_internal_api_response_status_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_include_internal_api_response_status_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_include_internal_api_response_status_proto_goTypes, + DependencyIndexes: file_include_internal_api_response_status_proto_depIdxs, + EnumInfos: file_include_internal_api_response_status_proto_enumTypes, + MessageInfos: file_include_internal_api_response_status_proto_msgTypes, + }.Build() + File_include_internal_api_response_status_proto = out.File + file_include_internal_api_response_status_proto_rawDesc = nil + file_include_internal_api_response_status_proto_goTypes = nil + file_include_internal_api_response_status_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/server_farm.job/server_farm.job.pb.go b/mcp_server/pkg/internal_api/server_farm.job/server_farm.job.pb.go new file mode 100644 index 000000000..fceb2d6a3 --- /dev/null +++ b/mcp_server/pkg/internal_api/server_farm.job/server_farm.job.pb.go @@ -0,0 +1,3418 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: server_farm.job.proto + +package server_farm_job + +import ( + response_status "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DebugSessionType int32 + +const ( + DebugSessionType_JOB DebugSessionType = 0 + DebugSessionType_PROJECT DebugSessionType = 1 +) + +// Enum value maps for DebugSessionType. +var ( + DebugSessionType_name = map[int32]string{ + 0: "JOB", + 1: "PROJECT", + } + DebugSessionType_value = map[string]int32{ + "JOB": 0, + "PROJECT": 1, + } +) + +func (x DebugSessionType) Enum() *DebugSessionType { + p := new(DebugSessionType) + *p = x + return p +} + +func (x DebugSessionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DebugSessionType) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[0].Descriptor() +} + +func (DebugSessionType) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[0] +} + +func (x DebugSessionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DebugSessionType.Descriptor instead. +func (DebugSessionType) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{0} +} + +type Job_State int32 + +const ( + Job_PENDING Job_State = 0 + Job_ENQUEUED Job_State = 1 + Job_SCHEDULED Job_State = 2 + Job_DISPATCHED Job_State = 5 + Job_STARTED Job_State = 3 + Job_FINISHED Job_State = 4 +) + +// Enum value maps for Job_State. +var ( + Job_State_name = map[int32]string{ + 0: "PENDING", + 1: "ENQUEUED", + 2: "SCHEDULED", + 5: "DISPATCHED", + 3: "STARTED", + 4: "FINISHED", + } + Job_State_value = map[string]int32{ + "PENDING": 0, + "ENQUEUED": 1, + "SCHEDULED": 2, + "DISPATCHED": 5, + "STARTED": 3, + "FINISHED": 4, + } +) + +func (x Job_State) Enum() *Job_State { + p := new(Job_State) + *p = x + return p +} + +func (x Job_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Job_State) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[1].Descriptor() +} + +func (Job_State) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[1] +} + +func (x Job_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Job_State.Descriptor instead. +func (Job_State) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{1, 0} +} + +type Job_Result int32 + +const ( + Job_PASSED Job_Result = 0 + Job_FAILED Job_Result = 1 + Job_STOPPED Job_Result = 2 +) + +// Enum value maps for Job_Result. +var ( + Job_Result_name = map[int32]string{ + 0: "PASSED", + 1: "FAILED", + 2: "STOPPED", + } + Job_Result_value = map[string]int32{ + "PASSED": 0, + "FAILED": 1, + "STOPPED": 2, + } +) + +func (x Job_Result) Enum() *Job_Result { + p := new(Job_Result) + *p = x + return p +} + +func (x Job_Result) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Job_Result) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[2].Descriptor() +} + +func (Job_Result) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[2] +} + +func (x Job_Result) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Job_Result.Descriptor instead. +func (Job_Result) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{1, 1} +} + +type ListRequest_Order int32 + +const ( + ListRequest_BY_FINISH_TIME_ASC ListRequest_Order = 0 + ListRequest_BY_CREATION_TIME_DESC ListRequest_Order = 1 + ListRequest_BY_PRIORITY_DESC ListRequest_Order = 2 +) + +// Enum value maps for ListRequest_Order. +var ( + ListRequest_Order_name = map[int32]string{ + 0: "BY_FINISH_TIME_ASC", + 1: "BY_CREATION_TIME_DESC", + 2: "BY_PRIORITY_DESC", + } + ListRequest_Order_value = map[string]int32{ + "BY_FINISH_TIME_ASC": 0, + "BY_CREATION_TIME_DESC": 1, + "BY_PRIORITY_DESC": 2, + } +) + +func (x ListRequest_Order) Enum() *ListRequest_Order { + p := new(ListRequest_Order) + *p = x + return p +} + +func (x ListRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[3].Descriptor() +} + +func (ListRequest_Order) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[3] +} + +func (x ListRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListRequest_Order.Descriptor instead. +func (ListRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{3, 0} +} + +type ListDebugSessionsRequest_Order int32 + +const ( + ListDebugSessionsRequest_BY_CREATION_TIME_DESC ListDebugSessionsRequest_Order = 0 + ListDebugSessionsRequest_BY_FINISH_TIME_ASC ListDebugSessionsRequest_Order = 1 +) + +// Enum value maps for ListDebugSessionsRequest_Order. +var ( + ListDebugSessionsRequest_Order_name = map[int32]string{ + 0: "BY_CREATION_TIME_DESC", + 1: "BY_FINISH_TIME_ASC", + } + ListDebugSessionsRequest_Order_value = map[string]int32{ + "BY_CREATION_TIME_DESC": 0, + "BY_FINISH_TIME_ASC": 1, + } +) + +func (x ListDebugSessionsRequest_Order) Enum() *ListDebugSessionsRequest_Order { + p := new(ListDebugSessionsRequest_Order) + *p = x + return p +} + +func (x ListDebugSessionsRequest_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListDebugSessionsRequest_Order) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[4].Descriptor() +} + +func (ListDebugSessionsRequest_Order) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[4] +} + +func (x ListDebugSessionsRequest_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListDebugSessionsRequest_Order.Descriptor instead. +func (ListDebugSessionsRequest_Order) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{5, 0} +} + +type TotalExecutionTimeRequest_Interval int32 + +const ( + TotalExecutionTimeRequest_LAST_DAY TotalExecutionTimeRequest_Interval = 0 +) + +// Enum value maps for TotalExecutionTimeRequest_Interval. +var ( + TotalExecutionTimeRequest_Interval_name = map[int32]string{ + 0: "LAST_DAY", + } + TotalExecutionTimeRequest_Interval_value = map[string]int32{ + "LAST_DAY": 0, + } +) + +func (x TotalExecutionTimeRequest_Interval) Enum() *TotalExecutionTimeRequest_Interval { + p := new(TotalExecutionTimeRequest_Interval) + *p = x + return p +} + +func (x TotalExecutionTimeRequest_Interval) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TotalExecutionTimeRequest_Interval) Descriptor() protoreflect.EnumDescriptor { + return file_server_farm_job_proto_enumTypes[5].Descriptor() +} + +func (TotalExecutionTimeRequest_Interval) Type() protoreflect.EnumType { + return &file_server_farm_job_proto_enumTypes[5] +} + +func (x TotalExecutionTimeRequest_Interval) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TotalExecutionTimeRequest_Interval.Descriptor instead. +func (TotalExecutionTimeRequest_Interval) EnumDescriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{12, 0} +} + +// Describe call request +// +// - job_id = [required] UUID of the job. +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_server_farm_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{0} +} + +func (x *DescribeRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +// Job +// +// Response: +// - id = [required] Job UUID. +// - name = [required] Name of the job. +// - state = [required] Job state. +// - result = [required if present] Job execution result. +// - organization_id = [required] UUID of a organization. +// - project_id = [required] UUID of a project. +// - branch_id = [required] UUID of a branch. +// - hook_id = [required] UUID of a hook. +// - ppl_id = [required] UUID of the pipeline. +// - build_server = [required if present] IP or domain of the build server. +// - index = [required] Index of the job in the context of the build. +// +// - priority = [required] The priority of the job +// - is_debug_job = [required] True if job is started as debug session +// - debug_user_id = [optional] Exists if is_debug_job = true; ID of the user who started the session. +// - self_hosted = [required] True if job is running in a self-hosted agent +// - build_req_id = [required] ID from plumber used to tie job to the block +// - agent_name = [required] Name of the self-hosted agent, empty for hosted jobs +// - agent_id = [required] ID of the agent +type Job struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchId string `protobuf:"bytes,3,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + HookId string `protobuf:"bytes,4,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"` + Timeline *Job_Timeline `protobuf:"bytes,5,opt,name=timeline,proto3" json:"timeline,omitempty"` + State Job_State `protobuf:"varint,6,opt,name=state,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"state,omitempty"` + Result Job_Result `protobuf:"varint,7,opt,name=result,proto3,enum=InternalApi.ServerFarm.Job.Job_Result" json:"result,omitempty"` + BuildServerIp string `protobuf:"bytes,8,opt,name=build_server_ip,json=buildServerIp,proto3" json:"build_server_ip,omitempty"` // deprecated in favor of agent_host. They contain the same value. + PplId string `protobuf:"bytes,9,opt,name=ppl_id,json=pplId,proto3" json:"ppl_id,omitempty"` + Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` + Index int32 `protobuf:"varint,11,opt,name=index,proto3" json:"index,omitempty"` + FailureReason string `protobuf:"bytes,12,opt,name=failure_reason,json=failureReason,proto3" json:"failure_reason,omitempty"` + MachineType string `protobuf:"bytes,13,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + MachineOsImage string `protobuf:"bytes,14,opt,name=machine_os_image,json=machineOsImage,proto3" json:"machine_os_image,omitempty"` + AgentHost string `protobuf:"bytes,15,opt,name=agent_host,json=agentHost,proto3" json:"agent_host,omitempty"` + AgentCtrlPort int32 `protobuf:"varint,16,opt,name=agent_ctrl_port,json=agentCtrlPort,proto3" json:"agent_ctrl_port,omitempty"` + AgentSshPort int32 `protobuf:"varint,17,opt,name=agent_ssh_port,json=agentSshPort,proto3" json:"agent_ssh_port,omitempty"` + AgentAuthToken string `protobuf:"bytes,18,opt,name=agent_auth_token,json=agentAuthToken,proto3" json:"agent_auth_token,omitempty"` + Priority int32 `protobuf:"varint,19,opt,name=priority,proto3" json:"priority,omitempty"` + IsDebugJob bool `protobuf:"varint,20,opt,name=is_debug_job,json=isDebugJob,proto3" json:"is_debug_job,omitempty"` + DebugUserId string `protobuf:"bytes,21,opt,name=debug_user_id,json=debugUserId,proto3" json:"debug_user_id,omitempty"` + SelfHosted bool `protobuf:"varint,22,opt,name=self_hosted,json=selfHosted,proto3" json:"self_hosted,omitempty"` + OrganizationId string `protobuf:"bytes,23,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + BuildReqId string `protobuf:"bytes,24,opt,name=build_req_id,json=buildReqId,proto3" json:"build_req_id,omitempty"` + AgentName string `protobuf:"bytes,25,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` + AgentId string `protobuf:"bytes,27,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Job) Reset() { + *x = Job{} + mi := &file_server_farm_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{1} +} + +func (x *Job) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Job) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Job) GetBranchId() string { + if x != nil { + return x.BranchId + } + return "" +} + +func (x *Job) GetHookId() string { + if x != nil { + return x.HookId + } + return "" +} + +func (x *Job) GetTimeline() *Job_Timeline { + if x != nil { + return x.Timeline + } + return nil +} + +func (x *Job) GetState() Job_State { + if x != nil { + return x.State + } + return Job_PENDING +} + +func (x *Job) GetResult() Job_Result { + if x != nil { + return x.Result + } + return Job_PASSED +} + +func (x *Job) GetBuildServerIp() string { + if x != nil { + return x.BuildServerIp + } + return "" +} + +func (x *Job) GetPplId() string { + if x != nil { + return x.PplId + } + return "" +} + +func (x *Job) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Job) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *Job) GetFailureReason() string { + if x != nil { + return x.FailureReason + } + return "" +} + +func (x *Job) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *Job) GetMachineOsImage() string { + if x != nil { + return x.MachineOsImage + } + return "" +} + +func (x *Job) GetAgentHost() string { + if x != nil { + return x.AgentHost + } + return "" +} + +func (x *Job) GetAgentCtrlPort() int32 { + if x != nil { + return x.AgentCtrlPort + } + return 0 +} + +func (x *Job) GetAgentSshPort() int32 { + if x != nil { + return x.AgentSshPort + } + return 0 +} + +func (x *Job) GetAgentAuthToken() string { + if x != nil { + return x.AgentAuthToken + } + return "" +} + +func (x *Job) GetPriority() int32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *Job) GetIsDebugJob() bool { + if x != nil { + return x.IsDebugJob + } + return false +} + +func (x *Job) GetDebugUserId() string { + if x != nil { + return x.DebugUserId + } + return "" +} + +func (x *Job) GetSelfHosted() bool { + if x != nil { + return x.SelfHosted + } + return false +} + +func (x *Job) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Job) GetBuildReqId() string { + if x != nil { + return x.BuildReqId + } + return "" +} + +func (x *Job) GetAgentName() string { + if x != nil { + return x.AgentName + } + return "" +} + +func (x *Job) GetAgentId() string { + if x != nil { + return x.AgentId + } + return "" +} + +// - status = [required] Status of the reponse. +// - job = [required if status is OK] Description of job. +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_server_farm_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{2} +} + +func (x *DescribeResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeResponse) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Size of the pagination window. Allowed values are in the range (0..1000]. + // If you send values outside of this range you will get a BAD_PARAM response. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // If you are fetching for the first time leave this value empty. + // The response will return a page_token, that you should use in the + // next requests. + // + // If the page_token is invalid, you will get a BAD_PARAM. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Sorting order direction. See enum Order. + Order ListRequest_Order `protobuf:"varint,3,opt,name=order,proto3,enum=InternalApi.ServerFarm.Job.ListRequest_Order" json:"order,omitempty"` + // Specify a filter for job states + // + // example: [:STARTED, :FINISHED] returns only jobs that + // + // are started and finished + // + // If you don't specify job state, you will not get any jobs + // back in the response. + JobStates []Job_State `protobuf:"varint,4,rep,packed,name=job_states,json=jobStates,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"job_states,omitempty"` + // Specify the minimim value for the finished_at timestamp. + // The response will list jobs only newer or equal to the + // timestamp provided in this request. + FinishedAtGt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=finished_at_gt,json=finishedAtGt,proto3" json:"finished_at_gt,omitempty"` + FinishedAtGte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=finished_at_gte,json=finishedAtGte,proto3" json:"finished_at_gte,omitempty"` + // [optional] Specify organization which jobs you want to list + OrganizationId string `protobuf:"bytes,7,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + // [required] If true, only debug jobs will be listed + OnlyDebugJobs bool `protobuf:"varint,8,opt,name=only_debug_jobs,json=onlyDebugJobs,proto3" json:"only_debug_jobs,omitempty"` + // [optional] List of IDs of pipelines which jobs should be listed + PplIds []string `protobuf:"bytes,9,rep,name=ppl_ids,json=pplIds,proto3" json:"ppl_ids,omitempty"` + CreatedAtGte *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at_gte,json=createdAtGte,proto3" json:"created_at_gte,omitempty"` + CreatedAtLte *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at_lte,json=createdAtLte,proto3" json:"created_at_lte,omitempty"` + // [optional] List of ids of projects which jobs should be listed + ProjectIds []string `protobuf:"bytes,13,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` + // [optional] List of machine_types which jobs should be listed + MachineTypes []string `protobuf:"bytes,14,rep,name=machine_types,json=machineTypes,proto3" json:"machine_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_server_farm_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{3} +} + +func (x *ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRequest) GetOrder() ListRequest_Order { + if x != nil { + return x.Order + } + return ListRequest_BY_FINISH_TIME_ASC +} + +func (x *ListRequest) GetJobStates() []Job_State { + if x != nil { + return x.JobStates + } + return nil +} + +func (x *ListRequest) GetFinishedAtGt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAtGt + } + return nil +} + +func (x *ListRequest) GetFinishedAtGte() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAtGte + } + return nil +} + +func (x *ListRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListRequest) GetOnlyDebugJobs() bool { + if x != nil { + return x.OnlyDebugJobs + } + return false +} + +func (x *ListRequest) GetPplIds() []string { + if x != nil { + return x.PplIds + } + return nil +} + +func (x *ListRequest) GetCreatedAtGte() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAtGte + } + return nil +} + +func (x *ListRequest) GetCreatedAtLte() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAtLte + } + return nil +} + +func (x *ListRequest) GetProjectIds() []string { + if x != nil { + return x.ProjectIds + } + return nil +} + +func (x *ListRequest) GetMachineTypes() []string { + if x != nil { + return x.MachineTypes + } + return nil +} + +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Jobs []*Job `protobuf:"bytes,2,rep,name=jobs,proto3" json:"jobs,omitempty"` + // Token to fetch the next page of jobs. Pass this in as page_token in + // a ListRequest message to the List rpc. + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_server_farm_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{4} +} + +func (x *ListResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListResponse) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *ListResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type ListDebugSessionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Size of the pagination window. Allowed values are in the range (0..1000]. + // If you send values outside of this range you will get a BAD_PARAM response. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // If you are fetching for the first time leave this value empty. + // The response will return a page_token, that you should use in the + // next requests. + // + // If the page_token is invalid, you will get a BAD_PARAM. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Sorting order direction. See enum Order. + Order ListDebugSessionsRequest_Order `protobuf:"varint,3,opt,name=order,proto3,enum=InternalApi.ServerFarm.Job.ListDebugSessionsRequest_Order" json:"order,omitempty"` + // Specify a filter for debug session states + // + // example: [:STARTED, :FINISHED] returns only debug session that + // + // are started or finished + // + // If you don't specify a debug session state, you will not get any debug sessions + // back in the response. + DebugSessionStates []Job_State `protobuf:"varint,4,rep,packed,name=debug_session_states,json=debugSessionStates,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"debug_session_states,omitempty"` + // Type of debug sessions - whether it is debugging a job or a project + // + // example: [:JOB, :PROJECT] returns both debug sessions for jobs and debug + // sessions for projects + // + // If you don't specify a debug session type, you will not get any debug sessions + // back in the response. + Types []DebugSessionType `protobuf:"varint,5,rep,packed,name=types,proto3,enum=InternalApi.ServerFarm.Job.DebugSessionType" json:"types,omitempty"` + // [optional] Specify organization which debug sessions you want to list + // At least one of the fields with number in range [6, 9] is required. + OrganizationId string `protobuf:"bytes,6,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + // [optional] Specify a project which debug sessions you want to list + // At least one of the fields with number in range [6, 9] is required. + ProjectId string `protobuf:"bytes,7,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // [optional] Specify a job for which debug sessions should be listed + // At least one of the fields with number in range [6, 9] is required. + JobId string `protobuf:"bytes,8,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // [optional] Specify a user which debug sessions you want to list + // At least one of the fields with number in range [6, 9] is required. + DebugUserId string `protobuf:"bytes,9,opt,name=debug_user_id,json=debugUserId,proto3" json:"debug_user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDebugSessionsRequest) Reset() { + *x = ListDebugSessionsRequest{} + mi := &file_server_farm_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDebugSessionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDebugSessionsRequest) ProtoMessage() {} + +func (x *ListDebugSessionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDebugSessionsRequest.ProtoReflect.Descriptor instead. +func (*ListDebugSessionsRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{5} +} + +func (x *ListDebugSessionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDebugSessionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListDebugSessionsRequest) GetOrder() ListDebugSessionsRequest_Order { + if x != nil { + return x.Order + } + return ListDebugSessionsRequest_BY_CREATION_TIME_DESC +} + +func (x *ListDebugSessionsRequest) GetDebugSessionStates() []Job_State { + if x != nil { + return x.DebugSessionStates + } + return nil +} + +func (x *ListDebugSessionsRequest) GetTypes() []DebugSessionType { + if x != nil { + return x.Types + } + return nil +} + +func (x *ListDebugSessionsRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *ListDebugSessionsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListDebugSessionsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *ListDebugSessionsRequest) GetDebugUserId() string { + if x != nil { + return x.DebugUserId + } + return "" +} + +type ListDebugSessionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + DebugSessions []*DebugSession `protobuf:"bytes,2,rep,name=debug_sessions,json=debugSessions,proto3" json:"debug_sessions,omitempty"` + // Token to fetch the next page of jobs. Pass this in as page_token in + // a ListDebugSessionsRequest message to the ListDebugSessions rpc. + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDebugSessionsResponse) Reset() { + *x = ListDebugSessionsResponse{} + mi := &file_server_farm_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDebugSessionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDebugSessionsResponse) ProtoMessage() {} + +func (x *ListDebugSessionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDebugSessionsResponse.ProtoReflect.Descriptor instead. +func (*ListDebugSessionsResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{6} +} + +func (x *ListDebugSessionsResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *ListDebugSessionsResponse) GetDebugSessions() []*DebugSession { + if x != nil { + return x.DebugSessions + } + return nil +} + +func (x *ListDebugSessionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Debug Session +// +// Fields: +// +// - debug_session = [required] Job type field with data about debug session +// - type = [required] Type of debug sessions - whether it is debugging a job or a project +// - debug_user_id = [required] ID of the user who started the debug session. +// - debugged_job = [optional] Exists if type = JOB; Job that is being debugged. +type DebugSession struct { + state protoimpl.MessageState `protogen:"open.v1"` + DebugSession *Job `protobuf:"bytes,1,opt,name=debug_session,json=debugSession,proto3" json:"debug_session,omitempty"` + Type DebugSessionType `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.ServerFarm.Job.DebugSessionType" json:"type,omitempty"` + DebugUserId string `protobuf:"bytes,3,opt,name=debug_user_id,json=debugUserId,proto3" json:"debug_user_id,omitempty"` + DebuggedJob *Job `protobuf:"bytes,4,opt,name=debugged_job,json=debuggedJob,proto3" json:"debugged_job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DebugSession) Reset() { + *x = DebugSession{} + mi := &file_server_farm_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DebugSession) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DebugSession) ProtoMessage() {} + +func (x *DebugSession) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DebugSession.ProtoReflect.Descriptor instead. +func (*DebugSession) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{7} +} + +func (x *DebugSession) GetDebugSession() *Job { + if x != nil { + return x.DebugSession + } + return nil +} + +func (x *DebugSession) GetType() DebugSessionType { + if x != nil { + return x.Type + } + return DebugSessionType_JOB +} + +func (x *DebugSession) GetDebugUserId() string { + if x != nil { + return x.DebugUserId + } + return "" +} + +func (x *DebugSession) GetDebuggedJob() *Job { + if x != nil { + return x.DebuggedJob + } + return nil +} + +type CountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Specify a filter for job states + // + // example: [:STARTED, :FINISHED] counts only jobs that + // + // are started and finished + // + // If you don't specify job state, count will eq 0 in response + JobStates []Job_State `protobuf:"varint,4,rep,packed,name=job_states,json=jobStates,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"job_states,omitempty"` + // Specify the minimim and maximum value for the finished_at timestamp. + // The count will contain jobs between (with this dates) + // timestamps provided in the request. + FinishedAtGte *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=finished_at_gte,json=finishedAtGte,proto3" json:"finished_at_gte,omitempty"` + FinishedAtLte *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at_lte,json=finishedAtLte,proto3" json:"finished_at_lte,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountRequest) Reset() { + *x = CountRequest{} + mi := &file_server_farm_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountRequest) ProtoMessage() {} + +func (x *CountRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountRequest.ProtoReflect.Descriptor instead. +func (*CountRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{8} +} + +func (x *CountRequest) GetJobStates() []Job_State { + if x != nil { + return x.JobStates + } + return nil +} + +func (x *CountRequest) GetFinishedAtGte() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAtGte + } + return nil +} + +func (x *CountRequest) GetFinishedAtLte() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAtLte + } + return nil +} + +type CountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountResponse) Reset() { + *x = CountResponse{} + mi := &file_server_farm_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountResponse) ProtoMessage() {} + +func (x *CountResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountResponse.ProtoReflect.Descriptor instead. +func (*CountResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{9} +} + +func (x *CountResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *CountResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type CountByStateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + AgentType string `protobuf:"bytes,2,opt,name=agent_type,json=agentType,proto3" json:"agent_type,omitempty"` + States []Job_State `protobuf:"varint,3,rep,packed,name=states,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"states,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountByStateRequest) Reset() { + *x = CountByStateRequest{} + mi := &file_server_farm_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountByStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountByStateRequest) ProtoMessage() {} + +func (x *CountByStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountByStateRequest.ProtoReflect.Descriptor instead. +func (*CountByStateRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{10} +} + +func (x *CountByStateRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CountByStateRequest) GetAgentType() string { + if x != nil { + return x.AgentType + } + return "" +} + +func (x *CountByStateRequest) GetStates() []Job_State { + if x != nil { + return x.States + } + return nil +} + +type CountByStateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Counts []*CountByStateResponse_CountByState `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountByStateResponse) Reset() { + *x = CountByStateResponse{} + mi := &file_server_farm_job_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountByStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountByStateResponse) ProtoMessage() {} + +func (x *CountByStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountByStateResponse.ProtoReflect.Descriptor instead. +func (*CountByStateResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{11} +} + +func (x *CountByStateResponse) GetCounts() []*CountByStateResponse_CountByState { + if x != nil { + return x.Counts + } + return nil +} + +// Returns total execution time of all jobs in an org, +// both running and finished. +// +// Useful for introspection and hunting miners. +type TotalExecutionTimeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Interval TotalExecutionTimeRequest_Interval `protobuf:"varint,2,opt,name=interval,proto3,enum=InternalApi.ServerFarm.Job.TotalExecutionTimeRequest_Interval" json:"interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TotalExecutionTimeRequest) Reset() { + *x = TotalExecutionTimeRequest{} + mi := &file_server_farm_job_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TotalExecutionTimeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TotalExecutionTimeRequest) ProtoMessage() {} + +func (x *TotalExecutionTimeRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TotalExecutionTimeRequest.ProtoReflect.Descriptor instead. +func (*TotalExecutionTimeRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{12} +} + +func (x *TotalExecutionTimeRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *TotalExecutionTimeRequest) GetInterval() TotalExecutionTimeRequest_Interval { + if x != nil { + return x.Interval + } + return TotalExecutionTimeRequest_LAST_DAY +} + +type TotalExecutionTimeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalDurationInSecs int64 `protobuf:"varint,1,opt,name=total_duration_in_secs,json=totalDurationInSecs,proto3" json:"total_duration_in_secs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TotalExecutionTimeResponse) Reset() { + *x = TotalExecutionTimeResponse{} + mi := &file_server_farm_job_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TotalExecutionTimeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TotalExecutionTimeResponse) ProtoMessage() {} + +func (x *TotalExecutionTimeResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TotalExecutionTimeResponse.ProtoReflect.Descriptor instead. +func (*TotalExecutionTimeResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{13} +} + +func (x *TotalExecutionTimeResponse) GetTotalDurationInSecs() int64 { + if x != nil { + return x.TotalDurationInSecs + } + return 0 +} + +// Stop call request +// +// - job_id = [required] UUID of the job. +// - requester_id = [required] ID of the user that requested stopping of the job +type StopRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + mi := &file_server_farm_job_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{14} +} + +func (x *StopRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *StopRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +// Stop call response +// +// Response: +// - status = [required] contains ResponseCode: +// OK = Job exists and it will be stopped if possible. +// BAD_PARAM = Job with given job_id was not found. +type StopResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + mi := &file_server_farm_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{15} +} + +func (x *StopResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +type GetAgentPayloadRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAgentPayloadRequest) Reset() { + *x = GetAgentPayloadRequest{} + mi := &file_server_farm_job_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAgentPayloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAgentPayloadRequest) ProtoMessage() {} + +func (x *GetAgentPayloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAgentPayloadRequest.ProtoReflect.Descriptor instead. +func (*GetAgentPayloadRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{16} +} + +func (x *GetAgentPayloadRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +type GetAgentPayloadResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAgentPayloadResponse) Reset() { + *x = GetAgentPayloadResponse{} + mi := &file_server_farm_job_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAgentPayloadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAgentPayloadResponse) ProtoMessage() {} + +func (x *GetAgentPayloadResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAgentPayloadResponse.ProtoReflect.Descriptor instead. +func (*GetAgentPayloadResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{17} +} + +func (x *GetAgentPayloadResponse) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +type CanDebugRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CanDebugRequest) Reset() { + *x = CanDebugRequest{} + mi := &file_server_farm_job_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CanDebugRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CanDebugRequest) ProtoMessage() {} + +func (x *CanDebugRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CanDebugRequest.ProtoReflect.Descriptor instead. +func (*CanDebugRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{18} +} + +func (x *CanDebugRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *CanDebugRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type CanDebugResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CanDebugResponse) Reset() { + *x = CanDebugResponse{} + mi := &file_server_farm_job_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CanDebugResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CanDebugResponse) ProtoMessage() {} + +func (x *CanDebugResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CanDebugResponse.ProtoReflect.Descriptor instead. +func (*CanDebugResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{19} +} + +func (x *CanDebugResponse) GetAllowed() bool { + if x != nil { + return x.Allowed + } + return false +} + +func (x *CanDebugResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type CanAttachRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CanAttachRequest) Reset() { + *x = CanAttachRequest{} + mi := &file_server_farm_job_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CanAttachRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CanAttachRequest) ProtoMessage() {} + +func (x *CanAttachRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CanAttachRequest.ProtoReflect.Descriptor instead. +func (*CanAttachRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{20} +} + +func (x *CanAttachRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *CanAttachRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type CanAttachResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CanAttachResponse) Reset() { + *x = CanAttachResponse{} + mi := &file_server_farm_job_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CanAttachResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CanAttachResponse) ProtoMessage() {} + +func (x *CanAttachResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CanAttachResponse.ProtoReflect.Descriptor instead. +func (*CanAttachResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{21} +} + +func (x *CanAttachResponse) GetAllowed() bool { + if x != nil { + return x.Allowed + } + return false +} + +func (x *CanAttachResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Create job request +// +// - requester_id = [required] ID of the user that requested job to be created +// - organization_id = [required] UUID of the organization +// - project_id = [required] UUID of project +// - branch_name = [optional, default=master] git branch on which the job should start +// - commit_sha = [optional, default=HEAD] git commit SHA on which the job should start +// - job_spec = [required] detailed job specification +type CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequesterId string `protobuf:"bytes,1,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branch_name,json=branchName,proto3" json:"branch_name,omitempty"` + CommitSha string `protobuf:"bytes,5,opt,name=commit_sha,json=commitSha,proto3" json:"commit_sha,omitempty"` + JobSpec *JobSpec `protobuf:"bytes,6,opt,name=job_spec,json=jobSpec,proto3" json:"job_spec,omitempty"` + RestrictedJob bool `protobuf:"varint,7,opt,name=restricted_job,json=restrictedJob,proto3" json:"restricted_job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + mi := &file_server_farm_job_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{22} +} + +func (x *CreateRequest) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *CreateRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *CreateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateRequest) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +func (x *CreateRequest) GetCommitSha() string { + if x != nil { + return x.CommitSha + } + return "" +} + +func (x *CreateRequest) GetJobSpec() *JobSpec { + if x != nil { + return x.JobSpec + } + return nil +} + +func (x *CreateRequest) GetRestrictedJob() bool { + if x != nil { + return x.RestrictedJob + } + return false +} + +// Create job response +// +// Response: +// - status = [required] contains ResponseCode: +// OK = Job was created successfully +// BAD_PARAM = One of the provided parameters is invalid +// - job = [required] The new job that was created based on request +type CreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + mi := &file_server_farm_job_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{23} +} + +func (x *CreateResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *CreateResponse) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +// Job specification detials +// +// - job_name = [required] the name of the job +// - agent = [required] the agent being used to run the job +// - secrets = [optional] list of secrets to be available within the job +// - env_vars = [optional] list of env vars to be available within the job +// - files = [optional] files to inject into the job +// - commands = [required] list of commands that job will execute +// - epilogue_always_commands = [optional] commands to be run after regular ones regardles of execution result +// - epilogue_on_pass_commands = [optional] commands to be run after regular ones only if they passed +// - epilogue_on_fail_commands = [optional] commands to be run after regular ones only if they failed +type JobSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + Agent *JobSpec_Agent `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"` + Secrets []*JobSpec_Secret `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty"` + EnvVars []*JobSpec_EnvVar `protobuf:"bytes,4,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` + Files []*JobSpec_File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"` + Commands []string `protobuf:"bytes,6,rep,name=commands,proto3" json:"commands,omitempty"` + EpilogueAlwaysCommands []string `protobuf:"bytes,7,rep,name=epilogue_always_commands,json=epilogueAlwaysCommands,proto3" json:"epilogue_always_commands,omitempty"` + EpilogueOnPassCommands []string `protobuf:"bytes,8,rep,name=epilogue_on_pass_commands,json=epilogueOnPassCommands,proto3" json:"epilogue_on_pass_commands,omitempty"` + EpilogueOnFailCommands []string `protobuf:"bytes,9,rep,name=epilogue_on_fail_commands,json=epilogueOnFailCommands,proto3" json:"epilogue_on_fail_commands,omitempty"` + Priority int32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` + ExecutionTimeLimit int32 `protobuf:"varint,11,opt,name=execution_time_limit,json=executionTimeLimit,proto3" json:"execution_time_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec) Reset() { + *x = JobSpec{} + mi := &file_server_farm_job_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec) ProtoMessage() {} + +func (x *JobSpec) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec.ProtoReflect.Descriptor instead. +func (*JobSpec) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24} +} + +func (x *JobSpec) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *JobSpec) GetAgent() *JobSpec_Agent { + if x != nil { + return x.Agent + } + return nil +} + +func (x *JobSpec) GetSecrets() []*JobSpec_Secret { + if x != nil { + return x.Secrets + } + return nil +} + +func (x *JobSpec) GetEnvVars() []*JobSpec_EnvVar { + if x != nil { + return x.EnvVars + } + return nil +} + +func (x *JobSpec) GetFiles() []*JobSpec_File { + if x != nil { + return x.Files + } + return nil +} + +func (x *JobSpec) GetCommands() []string { + if x != nil { + return x.Commands + } + return nil +} + +func (x *JobSpec) GetEpilogueAlwaysCommands() []string { + if x != nil { + return x.EpilogueAlwaysCommands + } + return nil +} + +func (x *JobSpec) GetEpilogueOnPassCommands() []string { + if x != nil { + return x.EpilogueOnPassCommands + } + return nil +} + +func (x *JobSpec) GetEpilogueOnFailCommands() []string { + if x != nil { + return x.EpilogueOnFailCommands + } + return nil +} + +func (x *JobSpec) GetPriority() int32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *JobSpec) GetExecutionTimeLimit() int32 { + if x != nil { + return x.ExecutionTimeLimit + } + return 0 +} + +type Job_Timeline struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Timestamp when the job was created. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Timestamp when the job was enqueued in the scheduling + // process. Pending jobs don't have this value set. + EnqueuedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=enqueued_at,json=enqueuedAt,proto3" json:"enqueued_at,omitempty"` + // Timestamp when the job was declared started by the + // job monitor in the scheduler. It can differ from + // execution_started_at that specifies the exect time + // when the job was started on a physical machine. + StartedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // Timestamp when the job was declared finished by the + // job monitoring system in the zebra scheduler. + // This time can be different from the execution_finished_at + // that specifies the unix timestamp when the job execution + // was finished on the physical machine. + // + // The diff is caused by a lag in network communication between + // clusters, or due to queueing in callback processors. + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // Timestamp when the job was started on the machine. + ExecutionStartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=execution_started_at,json=executionStartedAt,proto3" json:"execution_started_at,omitempty"` + // Timestamp when the job was finished on the machine. + ExecutionFinishedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=execution_finished_at,json=executionFinishedAt,proto3" json:"execution_finished_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Job_Timeline) Reset() { + *x = Job_Timeline{} + mi := &file_server_farm_job_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Job_Timeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job_Timeline) ProtoMessage() {} + +func (x *Job_Timeline) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job_Timeline.ProtoReflect.Descriptor instead. +func (*Job_Timeline) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Job_Timeline) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Job_Timeline) GetEnqueuedAt() *timestamppb.Timestamp { + if x != nil { + return x.EnqueuedAt + } + return nil +} + +func (x *Job_Timeline) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *Job_Timeline) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +func (x *Job_Timeline) GetExecutionStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.ExecutionStartedAt + } + return nil +} + +func (x *Job_Timeline) GetExecutionFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.ExecutionFinishedAt + } + return nil +} + +type CountByStateResponse_CountByState struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Job_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.ServerFarm.Job.Job_State" json:"state,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountByStateResponse_CountByState) Reset() { + *x = CountByStateResponse_CountByState{} + mi := &file_server_farm_job_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountByStateResponse_CountByState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountByStateResponse_CountByState) ProtoMessage() {} + +func (x *CountByStateResponse_CountByState) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountByStateResponse_CountByState.ProtoReflect.Descriptor instead. +func (*CountByStateResponse_CountByState) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *CountByStateResponse_CountByState) GetState() Job_State { + if x != nil { + return x.State + } + return Job_PENDING +} + +func (x *CountByStateResponse_CountByState) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type JobSpec_Agent struct { + state protoimpl.MessageState `protogen:"open.v1"` + Machine *JobSpec_Agent_Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` + Containers []*JobSpec_Agent_Container `protobuf:"bytes,2,rep,name=containers,proto3" json:"containers,omitempty"` + ImagePullSecrets []*JobSpec_Agent_ImagePullSecret `protobuf:"bytes,3,rep,name=image_pull_secrets,json=imagePullSecrets,proto3" json:"image_pull_secrets,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_Agent) Reset() { + *x = JobSpec_Agent{} + mi := &file_server_farm_job_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_Agent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_Agent) ProtoMessage() {} + +func (x *JobSpec_Agent) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_Agent.ProtoReflect.Descriptor instead. +func (*JobSpec_Agent) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 0} +} + +func (x *JobSpec_Agent) GetMachine() *JobSpec_Agent_Machine { + if x != nil { + return x.Machine + } + return nil +} + +func (x *JobSpec_Agent) GetContainers() []*JobSpec_Agent_Container { + if x != nil { + return x.Containers + } + return nil +} + +func (x *JobSpec_Agent) GetImagePullSecrets() []*JobSpec_Agent_ImagePullSecret { + if x != nil { + return x.ImagePullSecrets + } + return nil +} + +type JobSpec_Secret struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_Secret) Reset() { + *x = JobSpec_Secret{} + mi := &file_server_farm_job_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_Secret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_Secret) ProtoMessage() {} + +func (x *JobSpec_Secret) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_Secret.ProtoReflect.Descriptor instead. +func (*JobSpec_Secret) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 1} +} + +func (x *JobSpec_Secret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type JobSpec_EnvVar struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_EnvVar) Reset() { + *x = JobSpec_EnvVar{} + mi := &file_server_farm_job_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_EnvVar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_EnvVar) ProtoMessage() {} + +func (x *JobSpec_EnvVar) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_EnvVar.ProtoReflect.Descriptor instead. +func (*JobSpec_EnvVar) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 2} +} + +func (x *JobSpec_EnvVar) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *JobSpec_EnvVar) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type JobSpec_File struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_File) Reset() { + *x = JobSpec_File{} + mi := &file_server_farm_job_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_File) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_File) ProtoMessage() {} + +func (x *JobSpec_File) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_File.ProtoReflect.Descriptor instead. +func (*JobSpec_File) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 3} +} + +func (x *JobSpec_File) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *JobSpec_File) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type JobSpec_Agent_Machine struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + OsImage string `protobuf:"bytes,2,opt,name=os_image,json=osImage,proto3" json:"os_image,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_Agent_Machine) Reset() { + *x = JobSpec_Agent_Machine{} + mi := &file_server_farm_job_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_Agent_Machine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_Agent_Machine) ProtoMessage() {} + +func (x *JobSpec_Agent_Machine) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_Agent_Machine.ProtoReflect.Descriptor instead. +func (*JobSpec_Agent_Machine) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 0, 0} +} + +func (x *JobSpec_Agent_Machine) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *JobSpec_Agent_Machine) GetOsImage() string { + if x != nil { + return x.OsImage + } + return "" +} + +type JobSpec_Agent_Container struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` + EnvVars []*JobSpec_EnvVar `protobuf:"bytes,4,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` + Secrets []*JobSpec_Secret `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_Agent_Container) Reset() { + *x = JobSpec_Agent_Container{} + mi := &file_server_farm_job_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_Agent_Container) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_Agent_Container) ProtoMessage() {} + +func (x *JobSpec_Agent_Container) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_Agent_Container.ProtoReflect.Descriptor instead. +func (*JobSpec_Agent_Container) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 0, 1} +} + +func (x *JobSpec_Agent_Container) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *JobSpec_Agent_Container) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *JobSpec_Agent_Container) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *JobSpec_Agent_Container) GetEnvVars() []*JobSpec_EnvVar { + if x != nil { + return x.EnvVars + } + return nil +} + +func (x *JobSpec_Agent_Container) GetSecrets() []*JobSpec_Secret { + if x != nil { + return x.Secrets + } + return nil +} + +type JobSpec_Agent_ImagePullSecret struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JobSpec_Agent_ImagePullSecret) Reset() { + *x = JobSpec_Agent_ImagePullSecret{} + mi := &file_server_farm_job_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JobSpec_Agent_ImagePullSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec_Agent_ImagePullSecret) ProtoMessage() {} + +func (x *JobSpec_Agent_ImagePullSecret) ProtoReflect() protoreflect.Message { + mi := &file_server_farm_job_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec_Agent_ImagePullSecret.ProtoReflect.Descriptor instead. +func (*JobSpec_Agent_ImagePullSecret) Descriptor() ([]byte, []int) { + return file_server_farm_job_proto_rawDescGZIP(), []int{24, 0, 2} +} + +func (x *JobSpec_Agent_ImagePullSecret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_server_farm_job_proto protoreflect.FileDescriptor + +var file_server_farm_job_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x72, 0x6d, 0x2e, 0x6a, 0x6f, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, + 0x4a, 0x6f, 0x62, 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, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, + 0x49, 0x64, 0x22, 0xd1, 0x0b, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x12, + 0x44, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, + 0x6f, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x69, 0x6d, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, + 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x4a, 0x6f, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x70, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x70, 0x6c, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x66, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6f, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4f, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x0f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x74, + 0x72, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6a, + 0x6f, 0x62, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x4a, 0x6f, 0x62, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x62, + 0x75, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, + 0x65, 0x6c, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x5f, + 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, + 0x65, 0x71, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0x98, + 0x03, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 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, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x6e, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 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, 0x0a, 0x65, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 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, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, + 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, + 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x4c, 0x0a, 0x14, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 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, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x4e, 0x0a, 0x15, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x06, 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, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x5c, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, + 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, + 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4e, + 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x22, 0x2d, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, + 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x22, 0x7a, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x31, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, + 0x6f, 0x62, 0x22, 0xe0, 0x05, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x43, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, + 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, + 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x67, 0x74, 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, 0x0c, 0x66, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x66, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x67, 0x74, 0x65, 0x18, 0x06, + 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, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6e, 0x6c, 0x79, + 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x6f, 0x6e, 0x6c, 0x79, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4a, 0x6f, 0x62, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x70, 0x70, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x70, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x67, 0x74, 0x65, 0x18, 0x0a, 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, 0x0c, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x18, 0x0b, 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, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4c, 0x74, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x12, + 0x42, 0x59, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x41, + 0x53, 0x43, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x01, 0x12, + 0x14, 0x0a, 0x10, 0x42, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x44, + 0x45, 0x53, 0x43, 0x10, 0x02, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x0a, 0x04, 0x6a, + 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, + 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x84, 0x04, 0x0a, 0x18, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x50, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, + 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x12, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x05, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, + 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x15, + 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x59, 0x5f, 0x46, 0x49, + 0x4e, 0x49, 0x53, 0x48, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x22, + 0xc9, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, + 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xfe, 0x01, 0x0a, 0x0c, + 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0d, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x62, + 0x75, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x52, + 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x67, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x22, 0xdc, 0x01, 0x0a, + 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, + 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, + 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x5f, 0x67, 0x74, 0x65, 0x18, 0x01, 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, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x18, 0x02, 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, 0x0d, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x4c, 0x74, 0x65, 0x22, 0x5a, 0x0a, 0x0d, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, + 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, + 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x61, 0x0a, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x19, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x18, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x44, 0x41, 0x59, + 0x10, 0x00, 0x22, 0x51, 0x0a, 0x1a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x53, 0x65, 0x63, 0x73, 0x22, 0x47, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x43, + 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x2f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, + 0x6f, 0x62, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x41, 0x0a, 0x0f, 0x43, 0x61, 0x6e, + 0x44, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x10, + 0x43, 0x61, 0x6e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x43, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61, 0x12, 0x3e, + 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, + 0x62, 0x53, 0x70, 0x65, 0x63, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, + 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x6a, 0x6f, 0x62, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x22, 0x78, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x03, + 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, + 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, + 0xa9, 0x0a, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x12, 0x19, 0x0a, 0x08, 0x6a, + 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, + 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, + 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, + 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x45, 0x0a, + 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, + 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x07, 0x65, 0x6e, 0x76, + 0x56, 0x61, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x12, 0x38, 0x0a, 0x18, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x5f, 0x61, 0x6c, 0x77, + 0x61, 0x79, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x16, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x41, 0x6c, 0x77, 0x61, + 0x79, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x70, + 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x65, + 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x4f, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, + 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, + 0x75, 0x65, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0xd2, + 0x04, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, + 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x07, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, + 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x12, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, + 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x10, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x07, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0xdc, 0x01, + 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x45, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, + 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x07, 0x65, + 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, + 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x25, 0x0a, 0x0f, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x1a, 0x1c, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x1a, 0x32, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x34, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x28, 0x0a, 0x10, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x07, 0x0a, 0x03, 0x4a, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x4f, 0x4a, + 0x45, 0x43, 0x54, 0x10, 0x01, 0x32, 0xb1, 0x09, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, + 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, + 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x04, 0x53, 0x74, + 0x6f, 0x70, 0x12, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x12, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, + 0x2e, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x61, + 0x6e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, + 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x12, 0x2c, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, + 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x61, 0x72, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, + 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, + 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x66, 0x61, 0x72, 0x6d, 0x2e, 0x6a, 0x6f, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_server_farm_job_proto_rawDescOnce sync.Once + file_server_farm_job_proto_rawDescData = file_server_farm_job_proto_rawDesc +) + +func file_server_farm_job_proto_rawDescGZIP() []byte { + file_server_farm_job_proto_rawDescOnce.Do(func() { + file_server_farm_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_server_farm_job_proto_rawDescData) + }) + return file_server_farm_job_proto_rawDescData +} + +var file_server_farm_job_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_server_farm_job_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_server_farm_job_proto_goTypes = []any{ + (DebugSessionType)(0), // 0: InternalApi.ServerFarm.Job.DebugSessionType + (Job_State)(0), // 1: InternalApi.ServerFarm.Job.Job.State + (Job_Result)(0), // 2: InternalApi.ServerFarm.Job.Job.Result + (ListRequest_Order)(0), // 3: InternalApi.ServerFarm.Job.ListRequest.Order + (ListDebugSessionsRequest_Order)(0), // 4: InternalApi.ServerFarm.Job.ListDebugSessionsRequest.Order + (TotalExecutionTimeRequest_Interval)(0), // 5: InternalApi.ServerFarm.Job.TotalExecutionTimeRequest.Interval + (*DescribeRequest)(nil), // 6: InternalApi.ServerFarm.Job.DescribeRequest + (*Job)(nil), // 7: InternalApi.ServerFarm.Job.Job + (*DescribeResponse)(nil), // 8: InternalApi.ServerFarm.Job.DescribeResponse + (*ListRequest)(nil), // 9: InternalApi.ServerFarm.Job.ListRequest + (*ListResponse)(nil), // 10: InternalApi.ServerFarm.Job.ListResponse + (*ListDebugSessionsRequest)(nil), // 11: InternalApi.ServerFarm.Job.ListDebugSessionsRequest + (*ListDebugSessionsResponse)(nil), // 12: InternalApi.ServerFarm.Job.ListDebugSessionsResponse + (*DebugSession)(nil), // 13: InternalApi.ServerFarm.Job.DebugSession + (*CountRequest)(nil), // 14: InternalApi.ServerFarm.Job.CountRequest + (*CountResponse)(nil), // 15: InternalApi.ServerFarm.Job.CountResponse + (*CountByStateRequest)(nil), // 16: InternalApi.ServerFarm.Job.CountByStateRequest + (*CountByStateResponse)(nil), // 17: InternalApi.ServerFarm.Job.CountByStateResponse + (*TotalExecutionTimeRequest)(nil), // 18: InternalApi.ServerFarm.Job.TotalExecutionTimeRequest + (*TotalExecutionTimeResponse)(nil), // 19: InternalApi.ServerFarm.Job.TotalExecutionTimeResponse + (*StopRequest)(nil), // 20: InternalApi.ServerFarm.Job.StopRequest + (*StopResponse)(nil), // 21: InternalApi.ServerFarm.Job.StopResponse + (*GetAgentPayloadRequest)(nil), // 22: InternalApi.ServerFarm.Job.GetAgentPayloadRequest + (*GetAgentPayloadResponse)(nil), // 23: InternalApi.ServerFarm.Job.GetAgentPayloadResponse + (*CanDebugRequest)(nil), // 24: InternalApi.ServerFarm.Job.CanDebugRequest + (*CanDebugResponse)(nil), // 25: InternalApi.ServerFarm.Job.CanDebugResponse + (*CanAttachRequest)(nil), // 26: InternalApi.ServerFarm.Job.CanAttachRequest + (*CanAttachResponse)(nil), // 27: InternalApi.ServerFarm.Job.CanAttachResponse + (*CreateRequest)(nil), // 28: InternalApi.ServerFarm.Job.CreateRequest + (*CreateResponse)(nil), // 29: InternalApi.ServerFarm.Job.CreateResponse + (*JobSpec)(nil), // 30: InternalApi.ServerFarm.Job.JobSpec + (*Job_Timeline)(nil), // 31: InternalApi.ServerFarm.Job.Job.Timeline + (*CountByStateResponse_CountByState)(nil), // 32: InternalApi.ServerFarm.Job.CountByStateResponse.CountByState + (*JobSpec_Agent)(nil), // 33: InternalApi.ServerFarm.Job.JobSpec.Agent + (*JobSpec_Secret)(nil), // 34: InternalApi.ServerFarm.Job.JobSpec.Secret + (*JobSpec_EnvVar)(nil), // 35: InternalApi.ServerFarm.Job.JobSpec.EnvVar + (*JobSpec_File)(nil), // 36: InternalApi.ServerFarm.Job.JobSpec.File + (*JobSpec_Agent_Machine)(nil), // 37: InternalApi.ServerFarm.Job.JobSpec.Agent.Machine + (*JobSpec_Agent_Container)(nil), // 38: InternalApi.ServerFarm.Job.JobSpec.Agent.Container + (*JobSpec_Agent_ImagePullSecret)(nil), // 39: InternalApi.ServerFarm.Job.JobSpec.Agent.ImagePullSecret + (*response_status.ResponseStatus)(nil), // 40: InternalApi.ResponseStatus + (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp +} +var file_server_farm_job_proto_depIdxs = []int32{ + 31, // 0: InternalApi.ServerFarm.Job.Job.timeline:type_name -> InternalApi.ServerFarm.Job.Job.Timeline + 1, // 1: InternalApi.ServerFarm.Job.Job.state:type_name -> InternalApi.ServerFarm.Job.Job.State + 2, // 2: InternalApi.ServerFarm.Job.Job.result:type_name -> InternalApi.ServerFarm.Job.Job.Result + 40, // 3: InternalApi.ServerFarm.Job.DescribeResponse.status:type_name -> InternalApi.ResponseStatus + 7, // 4: InternalApi.ServerFarm.Job.DescribeResponse.job:type_name -> InternalApi.ServerFarm.Job.Job + 3, // 5: InternalApi.ServerFarm.Job.ListRequest.order:type_name -> InternalApi.ServerFarm.Job.ListRequest.Order + 1, // 6: InternalApi.ServerFarm.Job.ListRequest.job_states:type_name -> InternalApi.ServerFarm.Job.Job.State + 41, // 7: InternalApi.ServerFarm.Job.ListRequest.finished_at_gt:type_name -> google.protobuf.Timestamp + 41, // 8: InternalApi.ServerFarm.Job.ListRequest.finished_at_gte:type_name -> google.protobuf.Timestamp + 41, // 9: InternalApi.ServerFarm.Job.ListRequest.created_at_gte:type_name -> google.protobuf.Timestamp + 41, // 10: InternalApi.ServerFarm.Job.ListRequest.created_at_lte:type_name -> google.protobuf.Timestamp + 40, // 11: InternalApi.ServerFarm.Job.ListResponse.status:type_name -> InternalApi.ResponseStatus + 7, // 12: InternalApi.ServerFarm.Job.ListResponse.jobs:type_name -> InternalApi.ServerFarm.Job.Job + 4, // 13: InternalApi.ServerFarm.Job.ListDebugSessionsRequest.order:type_name -> InternalApi.ServerFarm.Job.ListDebugSessionsRequest.Order + 1, // 14: InternalApi.ServerFarm.Job.ListDebugSessionsRequest.debug_session_states:type_name -> InternalApi.ServerFarm.Job.Job.State + 0, // 15: InternalApi.ServerFarm.Job.ListDebugSessionsRequest.types:type_name -> InternalApi.ServerFarm.Job.DebugSessionType + 40, // 16: InternalApi.ServerFarm.Job.ListDebugSessionsResponse.status:type_name -> InternalApi.ResponseStatus + 13, // 17: InternalApi.ServerFarm.Job.ListDebugSessionsResponse.debug_sessions:type_name -> InternalApi.ServerFarm.Job.DebugSession + 7, // 18: InternalApi.ServerFarm.Job.DebugSession.debug_session:type_name -> InternalApi.ServerFarm.Job.Job + 0, // 19: InternalApi.ServerFarm.Job.DebugSession.type:type_name -> InternalApi.ServerFarm.Job.DebugSessionType + 7, // 20: InternalApi.ServerFarm.Job.DebugSession.debugged_job:type_name -> InternalApi.ServerFarm.Job.Job + 1, // 21: InternalApi.ServerFarm.Job.CountRequest.job_states:type_name -> InternalApi.ServerFarm.Job.Job.State + 41, // 22: InternalApi.ServerFarm.Job.CountRequest.finished_at_gte:type_name -> google.protobuf.Timestamp + 41, // 23: InternalApi.ServerFarm.Job.CountRequest.finished_at_lte:type_name -> google.protobuf.Timestamp + 40, // 24: InternalApi.ServerFarm.Job.CountResponse.status:type_name -> InternalApi.ResponseStatus + 1, // 25: InternalApi.ServerFarm.Job.CountByStateRequest.states:type_name -> InternalApi.ServerFarm.Job.Job.State + 32, // 26: InternalApi.ServerFarm.Job.CountByStateResponse.counts:type_name -> InternalApi.ServerFarm.Job.CountByStateResponse.CountByState + 5, // 27: InternalApi.ServerFarm.Job.TotalExecutionTimeRequest.interval:type_name -> InternalApi.ServerFarm.Job.TotalExecutionTimeRequest.Interval + 40, // 28: InternalApi.ServerFarm.Job.StopResponse.status:type_name -> InternalApi.ResponseStatus + 30, // 29: InternalApi.ServerFarm.Job.CreateRequest.job_spec:type_name -> InternalApi.ServerFarm.Job.JobSpec + 40, // 30: InternalApi.ServerFarm.Job.CreateResponse.status:type_name -> InternalApi.ResponseStatus + 7, // 31: InternalApi.ServerFarm.Job.CreateResponse.job:type_name -> InternalApi.ServerFarm.Job.Job + 33, // 32: InternalApi.ServerFarm.Job.JobSpec.agent:type_name -> InternalApi.ServerFarm.Job.JobSpec.Agent + 34, // 33: InternalApi.ServerFarm.Job.JobSpec.secrets:type_name -> InternalApi.ServerFarm.Job.JobSpec.Secret + 35, // 34: InternalApi.ServerFarm.Job.JobSpec.env_vars:type_name -> InternalApi.ServerFarm.Job.JobSpec.EnvVar + 36, // 35: InternalApi.ServerFarm.Job.JobSpec.files:type_name -> InternalApi.ServerFarm.Job.JobSpec.File + 41, // 36: InternalApi.ServerFarm.Job.Job.Timeline.created_at:type_name -> google.protobuf.Timestamp + 41, // 37: InternalApi.ServerFarm.Job.Job.Timeline.enqueued_at:type_name -> google.protobuf.Timestamp + 41, // 38: InternalApi.ServerFarm.Job.Job.Timeline.started_at:type_name -> google.protobuf.Timestamp + 41, // 39: InternalApi.ServerFarm.Job.Job.Timeline.finished_at:type_name -> google.protobuf.Timestamp + 41, // 40: InternalApi.ServerFarm.Job.Job.Timeline.execution_started_at:type_name -> google.protobuf.Timestamp + 41, // 41: InternalApi.ServerFarm.Job.Job.Timeline.execution_finished_at:type_name -> google.protobuf.Timestamp + 1, // 42: InternalApi.ServerFarm.Job.CountByStateResponse.CountByState.state:type_name -> InternalApi.ServerFarm.Job.Job.State + 37, // 43: InternalApi.ServerFarm.Job.JobSpec.Agent.machine:type_name -> InternalApi.ServerFarm.Job.JobSpec.Agent.Machine + 38, // 44: InternalApi.ServerFarm.Job.JobSpec.Agent.containers:type_name -> InternalApi.ServerFarm.Job.JobSpec.Agent.Container + 39, // 45: InternalApi.ServerFarm.Job.JobSpec.Agent.image_pull_secrets:type_name -> InternalApi.ServerFarm.Job.JobSpec.Agent.ImagePullSecret + 35, // 46: InternalApi.ServerFarm.Job.JobSpec.Agent.Container.env_vars:type_name -> InternalApi.ServerFarm.Job.JobSpec.EnvVar + 34, // 47: InternalApi.ServerFarm.Job.JobSpec.Agent.Container.secrets:type_name -> InternalApi.ServerFarm.Job.JobSpec.Secret + 6, // 48: InternalApi.ServerFarm.Job.JobService.Describe:input_type -> InternalApi.ServerFarm.Job.DescribeRequest + 9, // 49: InternalApi.ServerFarm.Job.JobService.List:input_type -> InternalApi.ServerFarm.Job.ListRequest + 11, // 50: InternalApi.ServerFarm.Job.JobService.ListDebugSessions:input_type -> InternalApi.ServerFarm.Job.ListDebugSessionsRequest + 14, // 51: InternalApi.ServerFarm.Job.JobService.Count:input_type -> InternalApi.ServerFarm.Job.CountRequest + 16, // 52: InternalApi.ServerFarm.Job.JobService.CountByState:input_type -> InternalApi.ServerFarm.Job.CountByStateRequest + 20, // 53: InternalApi.ServerFarm.Job.JobService.Stop:input_type -> InternalApi.ServerFarm.Job.StopRequest + 18, // 54: InternalApi.ServerFarm.Job.JobService.TotalExecutionTime:input_type -> InternalApi.ServerFarm.Job.TotalExecutionTimeRequest + 22, // 55: InternalApi.ServerFarm.Job.JobService.GetAgentPayload:input_type -> InternalApi.ServerFarm.Job.GetAgentPayloadRequest + 24, // 56: InternalApi.ServerFarm.Job.JobService.CanDebug:input_type -> InternalApi.ServerFarm.Job.CanDebugRequest + 26, // 57: InternalApi.ServerFarm.Job.JobService.CanAttach:input_type -> InternalApi.ServerFarm.Job.CanAttachRequest + 28, // 58: InternalApi.ServerFarm.Job.JobService.Create:input_type -> InternalApi.ServerFarm.Job.CreateRequest + 8, // 59: InternalApi.ServerFarm.Job.JobService.Describe:output_type -> InternalApi.ServerFarm.Job.DescribeResponse + 10, // 60: InternalApi.ServerFarm.Job.JobService.List:output_type -> InternalApi.ServerFarm.Job.ListResponse + 12, // 61: InternalApi.ServerFarm.Job.JobService.ListDebugSessions:output_type -> InternalApi.ServerFarm.Job.ListDebugSessionsResponse + 15, // 62: InternalApi.ServerFarm.Job.JobService.Count:output_type -> InternalApi.ServerFarm.Job.CountResponse + 17, // 63: InternalApi.ServerFarm.Job.JobService.CountByState:output_type -> InternalApi.ServerFarm.Job.CountByStateResponse + 21, // 64: InternalApi.ServerFarm.Job.JobService.Stop:output_type -> InternalApi.ServerFarm.Job.StopResponse + 19, // 65: InternalApi.ServerFarm.Job.JobService.TotalExecutionTime:output_type -> InternalApi.ServerFarm.Job.TotalExecutionTimeResponse + 23, // 66: InternalApi.ServerFarm.Job.JobService.GetAgentPayload:output_type -> InternalApi.ServerFarm.Job.GetAgentPayloadResponse + 25, // 67: InternalApi.ServerFarm.Job.JobService.CanDebug:output_type -> InternalApi.ServerFarm.Job.CanDebugResponse + 27, // 68: InternalApi.ServerFarm.Job.JobService.CanAttach:output_type -> InternalApi.ServerFarm.Job.CanAttachResponse + 29, // 69: InternalApi.ServerFarm.Job.JobService.Create:output_type -> InternalApi.ServerFarm.Job.CreateResponse + 59, // [59:70] is the sub-list for method output_type + 48, // [48:59] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name +} + +func init() { file_server_farm_job_proto_init() } +func file_server_farm_job_proto_init() { + if File_server_farm_job_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_server_farm_job_proto_rawDesc, + NumEnums: 6, + NumMessages: 34, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_server_farm_job_proto_goTypes, + DependencyIndexes: file_server_farm_job_proto_depIdxs, + EnumInfos: file_server_farm_job_proto_enumTypes, + MessageInfos: file_server_farm_job_proto_msgTypes, + }.Build() + File_server_farm_job_proto = out.File + file_server_farm_job_proto_rawDesc = nil + file_server_farm_job_proto_goTypes = nil + file_server_farm_job_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/server_farm.job/server_farm.job_grpc.pb.go b/mcp_server/pkg/internal_api/server_farm.job/server_farm.job_grpc.pb.go new file mode 100644 index 000000000..ca2d59529 --- /dev/null +++ b/mcp_server/pkg/internal_api/server_farm.job/server_farm.job_grpc.pb.go @@ -0,0 +1,553 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: server_farm.job.proto + +package server_farm_job + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + JobService_Describe_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/Describe" + JobService_List_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/List" + JobService_ListDebugSessions_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/ListDebugSessions" + JobService_Count_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/Count" + JobService_CountByState_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/CountByState" + JobService_Stop_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/Stop" + JobService_TotalExecutionTime_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/TotalExecutionTime" + JobService_GetAgentPayload_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/GetAgentPayload" + JobService_CanDebug_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/CanDebug" + JobService_CanAttach_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/CanAttach" + JobService_Create_FullMethodName = "/InternalApi.ServerFarm.Job.JobService/Create" +) + +// JobServiceClient is the client API for JobService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type JobServiceClient interface { + // Operation is called to describe an existing job. + // Operation is synchronous. + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + // Operation is called to list jobs. + // Operation is synchronous. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + // Operation is called to list debug sessions. + // Operation is synchronous. + ListDebugSessions(ctx context.Context, in *ListDebugSessionsRequest, opts ...grpc.CallOption) (*ListDebugSessionsResponse, error) + // Operation is called to count jobs. + // Operation is synchronous. + Count(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*CountResponse, error) + // Operation is called to count jobs by state + // Operation is synchronous + CountByState(ctx context.Context, in *CountByStateRequest, opts ...grpc.CallOption) (*CountByStateResponse, error) + // Operation is called to stop previously scheduled job. + // Operation is synchronous and idempotent. + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) + // Get total usage in seconds for any particular organizations. + // Where Total Execution Time = sum(duration of all finished jobs) + sum(duration of all running jobs) + // + // Primary use case is to check suspicious activity on newly created organizations. + // For example, bitcoin mining. + TotalExecutionTime(ctx context.Context, in *TotalExecutionTimeRequest, opts ...grpc.CallOption) (*TotalExecutionTimeResponse, error) + // Returns the JSON payload that is given to an Agent to execute a job. + // The JSON payload contains all information necessary to run a job on an Agent. + // + // This call was introduced to support self-hosted agents. + // For hosted jobs, zebra is sending this payload with HTTP POST directly to + // the agent. For self-hosted ones, the agent will fetch this payload from + // Semaphore via HTTP GET. + GetAgentPayload(ctx context.Context, in *GetAgentPayloadRequest, opts ...grpc.CallOption) (*GetAgentPayloadResponse, error) + // Returns information if a user can debug a job. + CanDebug(ctx context.Context, in *CanDebugRequest, opts ...grpc.CallOption) (*CanDebugResponse, error) + // Returns information if a user can attach a job. + CanAttach(ctx context.Context, in *CanAttachRequest, opts ...grpc.CallOption) (*CanAttachResponse, error) + // Create a new job based on the given job spec. + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) +} + +type jobServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient { + return &jobServiceClient{cc} +} + +func (c *jobServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, JobService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, JobService_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) ListDebugSessions(ctx context.Context, in *ListDebugSessionsRequest, opts ...grpc.CallOption) (*ListDebugSessionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDebugSessionsResponse) + err := c.cc.Invoke(ctx, JobService_ListDebugSessions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) Count(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*CountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CountResponse) + err := c.cc.Invoke(ctx, JobService_Count_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) CountByState(ctx context.Context, in *CountByStateRequest, opts ...grpc.CallOption) (*CountByStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CountByStateResponse) + err := c.cc.Invoke(ctx, JobService_CountByState_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StopResponse) + err := c.cc.Invoke(ctx, JobService_Stop_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) TotalExecutionTime(ctx context.Context, in *TotalExecutionTimeRequest, opts ...grpc.CallOption) (*TotalExecutionTimeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TotalExecutionTimeResponse) + err := c.cc.Invoke(ctx, JobService_TotalExecutionTime_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) GetAgentPayload(ctx context.Context, in *GetAgentPayloadRequest, opts ...grpc.CallOption) (*GetAgentPayloadResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAgentPayloadResponse) + err := c.cc.Invoke(ctx, JobService_GetAgentPayload_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) CanDebug(ctx context.Context, in *CanDebugRequest, opts ...grpc.CallOption) (*CanDebugResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CanDebugResponse) + err := c.cc.Invoke(ctx, JobService_CanDebug_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) CanAttach(ctx context.Context, in *CanAttachRequest, opts ...grpc.CallOption) (*CanAttachResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CanAttachResponse) + err := c.cc.Invoke(ctx, JobService_CanAttach_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateResponse) + err := c.cc.Invoke(ctx, JobService_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// JobServiceServer is the server API for JobService service. +// All implementations should embed UnimplementedJobServiceServer +// for forward compatibility. +type JobServiceServer interface { + // Operation is called to describe an existing job. + // Operation is synchronous. + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + // Operation is called to list jobs. + // Operation is synchronous. + List(context.Context, *ListRequest) (*ListResponse, error) + // Operation is called to list debug sessions. + // Operation is synchronous. + ListDebugSessions(context.Context, *ListDebugSessionsRequest) (*ListDebugSessionsResponse, error) + // Operation is called to count jobs. + // Operation is synchronous. + Count(context.Context, *CountRequest) (*CountResponse, error) + // Operation is called to count jobs by state + // Operation is synchronous + CountByState(context.Context, *CountByStateRequest) (*CountByStateResponse, error) + // Operation is called to stop previously scheduled job. + // Operation is synchronous and idempotent. + Stop(context.Context, *StopRequest) (*StopResponse, error) + // Get total usage in seconds for any particular organizations. + // Where Total Execution Time = sum(duration of all finished jobs) + sum(duration of all running jobs) + // + // Primary use case is to check suspicious activity on newly created organizations. + // For example, bitcoin mining. + TotalExecutionTime(context.Context, *TotalExecutionTimeRequest) (*TotalExecutionTimeResponse, error) + // Returns the JSON payload that is given to an Agent to execute a job. + // The JSON payload contains all information necessary to run a job on an Agent. + // + // This call was introduced to support self-hosted agents. + // For hosted jobs, zebra is sending this payload with HTTP POST directly to + // the agent. For self-hosted ones, the agent will fetch this payload from + // Semaphore via HTTP GET. + GetAgentPayload(context.Context, *GetAgentPayloadRequest) (*GetAgentPayloadResponse, error) + // Returns information if a user can debug a job. + CanDebug(context.Context, *CanDebugRequest) (*CanDebugResponse, error) + // Returns information if a user can attach a job. + CanAttach(context.Context, *CanAttachRequest) (*CanAttachResponse, error) + // Create a new job based on the given job spec. + Create(context.Context, *CreateRequest) (*CreateResponse, error) +} + +// UnimplementedJobServiceServer should 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 UnimplementedJobServiceServer struct{} + +func (UnimplementedJobServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedJobServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedJobServiceServer) ListDebugSessions(context.Context, *ListDebugSessionsRequest) (*ListDebugSessionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDebugSessions not implemented") +} +func (UnimplementedJobServiceServer) Count(context.Context, *CountRequest) (*CountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Count not implemented") +} +func (UnimplementedJobServiceServer) CountByState(context.Context, *CountByStateRequest) (*CountByStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountByState not implemented") +} +func (UnimplementedJobServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedJobServiceServer) TotalExecutionTime(context.Context, *TotalExecutionTimeRequest) (*TotalExecutionTimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalExecutionTime not implemented") +} +func (UnimplementedJobServiceServer) GetAgentPayload(context.Context, *GetAgentPayloadRequest) (*GetAgentPayloadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAgentPayload not implemented") +} +func (UnimplementedJobServiceServer) CanDebug(context.Context, *CanDebugRequest) (*CanDebugResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CanDebug not implemented") +} +func (UnimplementedJobServiceServer) CanAttach(context.Context, *CanAttachRequest) (*CanAttachResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CanAttach not implemented") +} +func (UnimplementedJobServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedJobServiceServer) testEmbeddedByValue() {} + +// UnsafeJobServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to JobServiceServer will +// result in compilation errors. +type UnsafeJobServiceServer interface { + mustEmbedUnimplementedJobServiceServer() +} + +func RegisterJobServiceServer(s grpc.ServiceRegistrar, srv JobServiceServer) { + // If the following call pancis, it indicates UnimplementedJobServiceServer 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(&JobService_ServiceDesc, srv) +} + +func _JobService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_ListDebugSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDebugSessionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).ListDebugSessions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_ListDebugSessions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).ListDebugSessions(ctx, req.(*ListDebugSessionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Count(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Count_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Count(ctx, req.(*CountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_CountByState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountByStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).CountByState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_CountByState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).CountByState(ctx, req.(*CountByStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Stop_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_TotalExecutionTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TotalExecutionTimeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).TotalExecutionTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_TotalExecutionTime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).TotalExecutionTime(ctx, req.(*TotalExecutionTimeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_GetAgentPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAgentPayloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).GetAgentPayload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_GetAgentPayload_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).GetAgentPayload(ctx, req.(*GetAgentPayloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_CanDebug_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CanDebugRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).CanDebug(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_CanDebug_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).CanDebug(ctx, req.(*CanDebugRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_CanAttach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CanAttachRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).CanAttach(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_CanAttach_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).CanAttach(ctx, req.(*CanAttachRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// JobService_ServiceDesc is the grpc.ServiceDesc for JobService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var JobService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.ServerFarm.Job.JobService", + HandlerType: (*JobServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Describe", + Handler: _JobService_Describe_Handler, + }, + { + MethodName: "List", + Handler: _JobService_List_Handler, + }, + { + MethodName: "ListDebugSessions", + Handler: _JobService_ListDebugSessions_Handler, + }, + { + MethodName: "Count", + Handler: _JobService_Count_Handler, + }, + { + MethodName: "CountByState", + Handler: _JobService_CountByState_Handler, + }, + { + MethodName: "Stop", + Handler: _JobService_Stop_Handler, + }, + { + MethodName: "TotalExecutionTime", + Handler: _JobService_TotalExecutionTime_Handler, + }, + { + MethodName: "GetAgentPayload", + Handler: _JobService_GetAgentPayload_Handler, + }, + { + MethodName: "CanDebug", + Handler: _JobService_CanDebug_Handler, + }, + { + MethodName: "CanAttach", + Handler: _JobService_CanAttach_Handler, + }, + { + MethodName: "Create", + Handler: _JobService_Create_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "server_farm.job.proto", +} diff --git a/mcp_server/pkg/internal_api/status/status.pb.go b/mcp_server/pkg/internal_api/status/status.pb.go new file mode 100644 index 000000000..52ba71179 --- /dev/null +++ b/mcp_server/pkg/internal_api/status/status.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: include/internal_api/status.proto + +package status + +import ( + code "google.golang.org/genproto/googleapis/rpc/code" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Status of a RPC call. +// +// - code = see google.rpc.Code +// Codes serve to determine result of Request processing and whether +// to interpret the other fields in Response +// - message = developer-facing English message that helps developers +// *understand* and *resolve* the error +// +// Example: +// +// code = NOT_FOUND, +// message = 'Record with id 1212121 not found'. +type Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code code.Code `protobuf:"varint,1,opt,name=code,proto3,enum=google.rpc.Code" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Status) Reset() { + *x = Status{} + mi := &file_include_internal_api_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_include_internal_api_status_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_include_internal_api_status_proto_rawDescGZIP(), []int{0} +} + +func (x *Status) GetCode() code.Code { + if x != nil { + return x.Code + } + return code.Code(0) +} + +func (x *Status) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_include_internal_api_status_proto protoreflect.FileDescriptor + +var file_include_internal_api_status_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, + 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_include_internal_api_status_proto_rawDescOnce sync.Once + file_include_internal_api_status_proto_rawDescData = file_include_internal_api_status_proto_rawDesc +) + +func file_include_internal_api_status_proto_rawDescGZIP() []byte { + file_include_internal_api_status_proto_rawDescOnce.Do(func() { + file_include_internal_api_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_include_internal_api_status_proto_rawDescData) + }) + return file_include_internal_api_status_proto_rawDescData +} + +var file_include_internal_api_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_include_internal_api_status_proto_goTypes = []any{ + (*Status)(nil), // 0: InternalApi.Status + (code.Code)(0), // 1: google.rpc.Code +} +var file_include_internal_api_status_proto_depIdxs = []int32{ + 1, // 0: InternalApi.Status.code:type_name -> google.rpc.Code + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_include_internal_api_status_proto_init() } +func file_include_internal_api_status_proto_init() { + if File_include_internal_api_status_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_include_internal_api_status_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_include_internal_api_status_proto_goTypes, + DependencyIndexes: file_include_internal_api_status_proto_depIdxs, + MessageInfos: file_include_internal_api_status_proto_msgTypes, + }.Build() + File_include_internal_api_status_proto = out.File + file_include_internal_api_status_proto_rawDesc = nil + file_include_internal_api_status_proto_goTypes = nil + file_include_internal_api_status_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/user/user.pb.go b/mcp_server/pkg/internal_api/user/user.pb.go new file mode 100644 index 000000000..5ea2e7e1f --- /dev/null +++ b/mcp_server/pkg/internal_api/user/user.pb.go @@ -0,0 +1,3402 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: user.proto + +package user + +import ( + repository_integrator "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + response_status "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Favorite_Kind int32 + +const ( + Favorite_PROJECT Favorite_Kind = 0 + Favorite_DASHBOARD Favorite_Kind = 1 +) + +// Enum value maps for Favorite_Kind. +var ( + Favorite_Kind_name = map[int32]string{ + 0: "PROJECT", + 1: "DASHBOARD", + } + Favorite_Kind_value = map[string]int32{ + "PROJECT": 0, + "DASHBOARD": 1, + } +) + +func (x Favorite_Kind) Enum() *Favorite_Kind { + p := new(Favorite_Kind) + *p = x + return p +} + +func (x Favorite_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Favorite_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[0].Descriptor() +} + +func (Favorite_Kind) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[0] +} + +func (x Favorite_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Favorite_Kind.Descriptor instead. +func (Favorite_Kind) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{2, 0} +} + +type DescribeResponse_RepoScope int32 + +const ( + DescribeResponse_NONE DescribeResponse_RepoScope = 0 + DescribeResponse_PUBLIC DescribeResponse_RepoScope = 1 + DescribeResponse_PRIVATE DescribeResponse_RepoScope = 2 +) + +// Enum value maps for DescribeResponse_RepoScope. +var ( + DescribeResponse_RepoScope_name = map[int32]string{ + 0: "NONE", + 1: "PUBLIC", + 2: "PRIVATE", + } + DescribeResponse_RepoScope_value = map[string]int32{ + "NONE": 0, + "PUBLIC": 1, + "PRIVATE": 2, + } +) + +func (x DescribeResponse_RepoScope) Enum() *DescribeResponse_RepoScope { + p := new(DescribeResponse_RepoScope) + *p = x + return p +} + +func (x DescribeResponse_RepoScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DescribeResponse_RepoScope) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[1].Descriptor() +} + +func (DescribeResponse_RepoScope) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[1] +} + +func (x DescribeResponse_RepoScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DescribeResponse_RepoScope.Descriptor instead. +func (DescribeResponse_RepoScope) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{6, 0} +} + +type RepositoryProvider_Type int32 + +const ( + RepositoryProvider_GITHUB RepositoryProvider_Type = 0 + RepositoryProvider_BITBUCKET RepositoryProvider_Type = 1 + RepositoryProvider_GITLAB RepositoryProvider_Type = 2 +) + +// Enum value maps for RepositoryProvider_Type. +var ( + RepositoryProvider_Type_name = map[int32]string{ + 0: "GITHUB", + 1: "BITBUCKET", + 2: "GITLAB", + } + RepositoryProvider_Type_value = map[string]int32{ + "GITHUB": 0, + "BITBUCKET": 1, + "GITLAB": 2, + } +) + +func (x RepositoryProvider_Type) Enum() *RepositoryProvider_Type { + p := new(RepositoryProvider_Type) + *p = x + return p +} + +func (x RepositoryProvider_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RepositoryProvider_Type) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[2].Descriptor() +} + +func (RepositoryProvider_Type) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[2] +} + +func (x RepositoryProvider_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RepositoryProvider_Type.Descriptor instead. +func (RepositoryProvider_Type) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{7, 0} +} + +type RepositoryProvider_Scope int32 + +const ( + RepositoryProvider_NONE RepositoryProvider_Scope = 0 + RepositoryProvider_EMAIL RepositoryProvider_Scope = 1 + RepositoryProvider_PUBLIC RepositoryProvider_Scope = 2 + RepositoryProvider_PRIVATE RepositoryProvider_Scope = 3 +) + +// Enum value maps for RepositoryProvider_Scope. +var ( + RepositoryProvider_Scope_name = map[int32]string{ + 0: "NONE", + 1: "EMAIL", + 2: "PUBLIC", + 3: "PRIVATE", + } + RepositoryProvider_Scope_value = map[string]int32{ + "NONE": 0, + "EMAIL": 1, + "PUBLIC": 2, + "PRIVATE": 3, + } +) + +func (x RepositoryProvider_Scope) Enum() *RepositoryProvider_Scope { + p := new(RepositoryProvider_Scope) + *p = x + return p +} + +func (x RepositoryProvider_Scope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RepositoryProvider_Scope) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[3].Descriptor() +} + +func (RepositoryProvider_Scope) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[3] +} + +func (x RepositoryProvider_Scope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RepositoryProvider_Scope.Descriptor instead. +func (RepositoryProvider_Scope) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{7, 1} +} + +type RepositoryScopes_RepositoryScope_Scope int32 + +const ( + RepositoryScopes_RepositoryScope_NONE RepositoryScopes_RepositoryScope_Scope = 0 + RepositoryScopes_RepositoryScope_EMAIL RepositoryScopes_RepositoryScope_Scope = 1 + RepositoryScopes_RepositoryScope_PUBLIC RepositoryScopes_RepositoryScope_Scope = 2 + RepositoryScopes_RepositoryScope_PRIVATE RepositoryScopes_RepositoryScope_Scope = 3 +) + +// Enum value maps for RepositoryScopes_RepositoryScope_Scope. +var ( + RepositoryScopes_RepositoryScope_Scope_name = map[int32]string{ + 0: "NONE", + 1: "EMAIL", + 2: "PUBLIC", + 3: "PRIVATE", + } + RepositoryScopes_RepositoryScope_Scope_value = map[string]int32{ + "NONE": 0, + "EMAIL": 1, + "PUBLIC": 2, + "PRIVATE": 3, + } +) + +func (x RepositoryScopes_RepositoryScope_Scope) Enum() *RepositoryScopes_RepositoryScope_Scope { + p := new(RepositoryScopes_RepositoryScope_Scope) + *p = x + return p +} + +func (x RepositoryScopes_RepositoryScope_Scope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RepositoryScopes_RepositoryScope_Scope) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[4].Descriptor() +} + +func (RepositoryScopes_RepositoryScope_Scope) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[4] +} + +func (x RepositoryScopes_RepositoryScope_Scope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RepositoryScopes_RepositoryScope_Scope.Descriptor instead. +func (RepositoryScopes_RepositoryScope_Scope) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{8, 0, 0} +} + +type User_CreationSource int32 + +const ( + User_NOT_SET User_CreationSource = 0 + User_OKTA User_CreationSource = 1 + User_SERVICE_ACCOUNT User_CreationSource = 2 +) + +// Enum value maps for User_CreationSource. +var ( + User_CreationSource_name = map[int32]string{ + 0: "NOT_SET", + 1: "OKTA", + 2: "SERVICE_ACCOUNT", + } + User_CreationSource_value = map[string]int32{ + "NOT_SET": 0, + "OKTA": 1, + "SERVICE_ACCOUNT": 2, + } +) + +func (x User_CreationSource) Enum() *User_CreationSource { + p := new(User_CreationSource) + *p = x + return p +} + +func (x User_CreationSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (User_CreationSource) Descriptor() protoreflect.EnumDescriptor { + return file_user_proto_enumTypes[5].Descriptor() +} + +func (User_CreationSource) Type() protoreflect.EnumType { + return &file_user_proto_enumTypes[5] +} + +func (x User_CreationSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use User_CreationSource.Descriptor instead. +func (User_CreationSource) EnumDescriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{27, 0} +} + +// ListFavorites call request +// +// - user_id = [required] UUID of the user for which to list favorites. +// - organization_id = [required] UUID of the organization within which to list favorites. +type ListFavoritesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListFavoritesRequest) Reset() { + *x = ListFavoritesRequest{} + mi := &file_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListFavoritesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFavoritesRequest) ProtoMessage() {} + +func (x *ListFavoritesRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFavoritesRequest.ProtoReflect.Descriptor instead. +func (*ListFavoritesRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{0} +} + +func (x *ListFavoritesRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListFavoritesRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +// ListFavorites call response +// - favorites = [required] +type ListFavoritesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Favorites []*Favorite `protobuf:"bytes,1,rep,name=favorites,proto3" json:"favorites,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListFavoritesResponse) Reset() { + *x = ListFavoritesResponse{} + mi := &file_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListFavoritesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFavoritesResponse) ProtoMessage() {} + +func (x *ListFavoritesResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFavoritesResponse.ProtoReflect.Descriptor instead. +func (*ListFavoritesResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{1} +} + +func (x *ListFavoritesResponse) GetFavorites() []*Favorite { + if x != nil { + return x.Favorites + } + return nil +} + +// - user_id = [required] ID of the user +// - organization_id = [required] ID of organization +// - favorite_id = [required] ID of the favorite +// - kind = [required] Kind of the favorite / can be Dashboard or Project +type Favorite struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + FavoriteId string `protobuf:"bytes,3,opt,name=favorite_id,json=favoriteId,proto3" json:"favorite_id,omitempty"` + Kind Favorite_Kind `protobuf:"varint,4,opt,name=kind,proto3,enum=InternalApi.User.Favorite_Kind" json:"kind,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Favorite) Reset() { + *x = Favorite{} + mi := &file_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Favorite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Favorite) ProtoMessage() {} + +func (x *Favorite) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Favorite.ProtoReflect.Descriptor instead. +func (*Favorite) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{2} +} + +func (x *Favorite) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *Favorite) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Favorite) GetFavoriteId() string { + if x != nil { + return x.FavoriteId + } + return "" +} + +func (x *Favorite) GetKind() Favorite_Kind { + if x != nil { + return x.Kind + } + return Favorite_PROJECT +} + +// DescribeMany call request +// +// - user_ids = [required] UUIDs of the users to describe. +type DescribeManyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyRequest) Reset() { + *x = DescribeManyRequest{} + mi := &file_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyRequest) ProtoMessage() {} + +func (x *DescribeManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyRequest.ProtoReflect.Descriptor instead. +func (*DescribeManyRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{3} +} + +func (x *DescribeManyRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +// DescribeMany call response +// +// - users = [required] descriptions of users. +// - status = [required] status of response. +type DescribeManyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` + Status *response_status.ResponseStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeManyResponse) Reset() { + *x = DescribeManyResponse{} + mi := &file_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeManyResponse) ProtoMessage() {} + +func (x *DescribeManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeManyResponse.ProtoReflect.Descriptor instead. +func (*DescribeManyResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{4} +} + +func (x *DescribeManyResponse) GetUsers() []*User { + if x != nil { + return x.Users + } + return nil +} + +func (x *DescribeManyResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +// Describe call request +// +// - user_id = [required] uuid or login of a user in system. +type DescribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeRequest) Reset() { + *x = DescribeRequest{} + mi := &file_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeRequest) ProtoMessage() {} + +func (x *DescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead. +func (*DescribeRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{5} +} + +func (x *DescribeRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// Describe call response +// +// - email = [required] email of a user. +// - created_at = [required] date of creation a user. +// - avatar_url = [required] url to user avatar. +// - user_id = [required] UUID of the user. +// - github_token = [required] GitHub token of a user - use repository_providers instead. +// - github_scope = [deprecated] GitHub access scope - use repository_providers instead. +// - github_uid = [deprecated] GitHub uid of a user - use repository_providers instead. +// - name = [required] User's name used for presentation purposes. +// - github_login = [deprecated] GitHub login of a user - use repository_providers instead. +// - company = [required] The company associated with the user. +// - blocked_at = [required] the timestamp of user blocking +// - repository_scopes = [deprecated] List of repository scopes availabe for user - use repository_providers instead. +// - repository_providers = [required] List of repository providers availabe for user +type DescribeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *response_status.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + AvatarUrl string `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + UserId string `protobuf:"bytes,6,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + GithubToken string `protobuf:"bytes,7,opt,name=github_token,json=githubToken,proto3" json:"github_token,omitempty"` + GithubScope DescribeResponse_RepoScope `protobuf:"varint,12,opt,name=github_scope,json=githubScope,proto3,enum=InternalApi.User.DescribeResponse_RepoScope" json:"github_scope,omitempty"` + GithubUid string `protobuf:"bytes,8,opt,name=github_uid,json=githubUid,proto3" json:"github_uid,omitempty"` + Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` + GithubLogin string `protobuf:"bytes,11,opt,name=github_login,json=githubLogin,proto3" json:"github_login,omitempty"` + Company string `protobuf:"bytes,13,opt,name=company,proto3" json:"company,omitempty"` + BlockedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=blocked_at,json=blockedAt,proto3" json:"blocked_at,omitempty"` + RepositoryScopes *RepositoryScopes `protobuf:"bytes,15,opt,name=repository_scopes,json=repositoryScopes,proto3" json:"repository_scopes,omitempty"` + RepositoryProviders []*RepositoryProvider `protobuf:"bytes,16,rep,name=repository_providers,json=repositoryProviders,proto3" json:"repository_providers,omitempty"` + User *User `protobuf:"bytes,17,opt,name=user,proto3" json:"user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeResponse) Reset() { + *x = DescribeResponse{} + mi := &file_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeResponse) ProtoMessage() {} + +func (x *DescribeResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. +func (*DescribeResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{6} +} + +func (x *DescribeResponse) GetStatus() *response_status.ResponseStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *DescribeResponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *DescribeResponse) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *DescribeResponse) GetAvatarUrl() string { + if x != nil { + return x.AvatarUrl + } + return "" +} + +func (x *DescribeResponse) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *DescribeResponse) GetGithubToken() string { + if x != nil { + return x.GithubToken + } + return "" +} + +func (x *DescribeResponse) GetGithubScope() DescribeResponse_RepoScope { + if x != nil { + return x.GithubScope + } + return DescribeResponse_NONE +} + +func (x *DescribeResponse) GetGithubUid() string { + if x != nil { + return x.GithubUid + } + return "" +} + +func (x *DescribeResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DescribeResponse) GetGithubLogin() string { + if x != nil { + return x.GithubLogin + } + return "" +} + +func (x *DescribeResponse) GetCompany() string { + if x != nil { + return x.Company + } + return "" +} + +func (x *DescribeResponse) GetBlockedAt() *timestamppb.Timestamp { + if x != nil { + return x.BlockedAt + } + return nil +} + +func (x *DescribeResponse) GetRepositoryScopes() *RepositoryScopes { + if x != nil { + return x.RepositoryScopes + } + return nil +} + +func (x *DescribeResponse) GetRepositoryProviders() []*RepositoryProvider { + if x != nil { + return x.RepositoryProviders + } + return nil +} + +func (x *DescribeResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type RepositoryProvider struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type RepositoryProvider_Type `protobuf:"varint,1,opt,name=type,proto3,enum=InternalApi.User.RepositoryProvider_Type" json:"type,omitempty"` + Scope RepositoryProvider_Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=InternalApi.User.RepositoryProvider_Scope" json:"scope,omitempty"` + Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` + Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepositoryProvider) Reset() { + *x = RepositoryProvider{} + mi := &file_user_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepositoryProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryProvider) ProtoMessage() {} + +func (x *RepositoryProvider) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryProvider.ProtoReflect.Descriptor instead. +func (*RepositoryProvider) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{7} +} + +func (x *RepositoryProvider) GetType() RepositoryProvider_Type { + if x != nil { + return x.Type + } + return RepositoryProvider_GITHUB +} + +func (x *RepositoryProvider) GetScope() RepositoryProvider_Scope { + if x != nil { + return x.Scope + } + return RepositoryProvider_NONE +} + +func (x *RepositoryProvider) GetLogin() string { + if x != nil { + return x.Login + } + return "" +} + +func (x *RepositoryProvider) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type RepositoryScopes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Github *RepositoryScopes_RepositoryScope `protobuf:"bytes,1,opt,name=github,proto3" json:"github,omitempty"` + Bitbucket *RepositoryScopes_RepositoryScope `protobuf:"bytes,2,opt,name=bitbucket,proto3" json:"bitbucket,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepositoryScopes) Reset() { + *x = RepositoryScopes{} + mi := &file_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepositoryScopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryScopes) ProtoMessage() {} + +func (x *RepositoryScopes) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryScopes.ProtoReflect.Descriptor instead. +func (*RepositoryScopes) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{8} +} + +func (x *RepositoryScopes) GetGithub() *RepositoryScopes_RepositoryScope { + if x != nil { + return x.Github + } + return nil +} + +func (x *RepositoryScopes) GetBitbucket() *RepositoryScopes_RepositoryScope { + if x != nil { + return x.Bitbucket + } + return nil +} + +// Update call request +// +// - user = [required] The user to be updated. The ID identifies the user, while +// other fileds are to be changed. +type UpdateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateRequest) Reset() { + *x = UpdateRequest{} + mi := &file_user_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRequest) ProtoMessage() {} + +func (x *UpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. +func (*UpdateRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateRequest) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +// Update call response +// +// Response: +// - status = [required] Status of response +// - user = [required] The description of updated user +type UpdateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResponse) Reset() { + *x = UpdateResponse{} + mi := &file_user_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResponse) ProtoMessage() {} + +func (x *UpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. +func (*UpdateResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *UpdateResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +// SearchUsers call request +// +// - query = [required] The query to be used to find the user, for example it could be an email, username or user id. +// - limit = [required] The limit value used to limit the number of users returned. +type SearchUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchUsersRequest) Reset() { + *x = SearchUsersRequest{} + mi := &file_user_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchUsersRequest) ProtoMessage() {} + +func (x *SearchUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchUsersRequest.ProtoReflect.Descriptor instead. +func (*SearchUsersRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{11} +} + +func (x *SearchUsersRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchUsersRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +// SearchUsers call response +// +// Response: +// - user = [Required] The list of users found +type SearchUsersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchUsersResponse) Reset() { + *x = SearchUsersResponse{} + mi := &file_user_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchUsersResponse) ProtoMessage() {} + +func (x *SearchUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchUsersResponse.ProtoReflect.Descriptor instead. +func (*SearchUsersResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{12} +} + +func (x *SearchUsersResponse) GetUsers() []*User { + if x != nil { + return x.Users + } + return nil +} + +// DeleteWithOwnedOrgs call request +// +// - user_id = [required] The id of the user who should be purged +type DeleteWithOwnedOrgsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteWithOwnedOrgsRequest) Reset() { + *x = DeleteWithOwnedOrgsRequest{} + mi := &file_user_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteWithOwnedOrgsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWithOwnedOrgsRequest) ProtoMessage() {} + +func (x *DeleteWithOwnedOrgsRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWithOwnedOrgsRequest.ProtoReflect.Descriptor instead. +func (*DeleteWithOwnedOrgsRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteWithOwnedOrgsRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// Regenerate token call request +// +// - user_id = [required] The id of the user whose token should be regenerated +type RegenerateTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateTokenRequest) Reset() { + *x = RegenerateTokenRequest{} + mi := &file_user_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateTokenRequest) ProtoMessage() {} + +func (x *RegenerateTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateTokenRequest.ProtoReflect.Descriptor instead. +func (*RegenerateTokenRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{14} +} + +func (x *RegenerateTokenRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// Regenerate token call response +// +// Response: +// - status = [required] Status of response +// - user = [required] The description of updated user +type RegenerateTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + ApiToken string `protobuf:"bytes,3,opt,name=api_token,json=apiToken,proto3" json:"api_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegenerateTokenResponse) Reset() { + *x = RegenerateTokenResponse{} + mi := &file_user_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegenerateTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegenerateTokenResponse) ProtoMessage() {} + +func (x *RegenerateTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegenerateTokenResponse.ProtoReflect.Descriptor instead. +func (*RegenerateTokenResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{15} +} + +func (x *RegenerateTokenResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *RegenerateTokenResponse) GetApiToken() string { + if x != nil { + return x.ApiToken + } + return "" +} + +// CheckGithubToken call request +type CheckGithubTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckGithubTokenRequest) Reset() { + *x = CheckGithubTokenRequest{} + mi := &file_user_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckGithubTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckGithubTokenRequest) ProtoMessage() {} + +func (x *CheckGithubTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckGithubTokenRequest.ProtoReflect.Descriptor instead. +func (*CheckGithubTokenRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{16} +} + +func (x *CheckGithubTokenRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// CheckGithubToken call response +// +// Response +// - revoked = [required] Client revoke the token on the github +// - repo = [required] Token has access to private repositories +// - public_repo = [required] Token has access to public repositories +type CheckGithubTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Revoked bool `protobuf:"varint,1,opt,name=revoked,proto3" json:"revoked,omitempty"` + Repo bool `protobuf:"varint,2,opt,name=repo,proto3" json:"repo,omitempty"` + PublicRepo bool `protobuf:"varint,3,opt,name=public_repo,json=publicRepo,proto3" json:"public_repo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckGithubTokenResponse) Reset() { + *x = CheckGithubTokenResponse{} + mi := &file_user_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckGithubTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckGithubTokenResponse) ProtoMessage() {} + +func (x *CheckGithubTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckGithubTokenResponse.ProtoReflect.Descriptor instead. +func (*CheckGithubTokenResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{17} +} + +func (x *CheckGithubTokenResponse) GetRevoked() bool { + if x != nil { + return x.Revoked + } + return false +} + +func (x *CheckGithubTokenResponse) GetRepo() bool { + if x != nil { + return x.Repo + } + return false +} + +func (x *CheckGithubTokenResponse) GetPublicRepo() bool { + if x != nil { + return x.PublicRepo + } + return false +} + +// - user_id = [required] The user id +type BlockAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockAccountRequest) Reset() { + *x = BlockAccountRequest{} + mi := &file_user_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockAccountRequest) ProtoMessage() {} + +func (x *BlockAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockAccountRequest.ProtoReflect.Descriptor instead. +func (*BlockAccountRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{18} +} + +func (x *BlockAccountRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +// - user_id = [required] The user id +type UnblockAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnblockAccountRequest) Reset() { + *x = UnblockAccountRequest{} + mi := &file_user_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnblockAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnblockAccountRequest) ProtoMessage() {} + +func (x *UnblockAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnblockAccountRequest.ProtoReflect.Descriptor instead. +func (*UnblockAccountRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{19} +} + +func (x *UnblockAccountRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetRepositoryTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + IntegrationType repository_integrator.IntegrationType `protobuf:"varint,2,opt,name=integration_type,json=integrationType,proto3,enum=InternalApi.RepositoryIntegrator.IntegrationType" json:"integration_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRepositoryTokenRequest) Reset() { + *x = GetRepositoryTokenRequest{} + mi := &file_user_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRepositoryTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoryTokenRequest) ProtoMessage() {} + +func (x *GetRepositoryTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoryTokenRequest.ProtoReflect.Descriptor instead. +func (*GetRepositoryTokenRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{20} +} + +func (x *GetRepositoryTokenRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetRepositoryTokenRequest) GetIntegrationType() repository_integrator.IntegrationType { + if x != nil { + return x.IntegrationType + } + return repository_integrator.IntegrationType(0) +} + +type GetRepositoryTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRepositoryTokenResponse) Reset() { + *x = GetRepositoryTokenResponse{} + mi := &file_user_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRepositoryTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoryTokenResponse) ProtoMessage() {} + +func (x *GetRepositoryTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoryTokenResponse.ProtoReflect.Descriptor instead. +func (*GetRepositoryTokenResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{21} +} + +func (x *GetRepositoryTokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *GetRepositoryTokenResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type DescribeByRepositoryProviderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Provider *RepositoryProvider `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeByRepositoryProviderRequest) Reset() { + *x = DescribeByRepositoryProviderRequest{} + mi := &file_user_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeByRepositoryProviderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeByRepositoryProviderRequest) ProtoMessage() {} + +func (x *DescribeByRepositoryProviderRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeByRepositoryProviderRequest.ProtoReflect.Descriptor instead. +func (*DescribeByRepositoryProviderRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{22} +} + +func (x *DescribeByRepositoryProviderRequest) GetProvider() *RepositoryProvider { + if x != nil { + return x.Provider + } + return nil +} + +type DescribeByEmailRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeByEmailRequest) Reset() { + *x = DescribeByEmailRequest{} + mi := &file_user_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeByEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeByEmailRequest) ProtoMessage() {} + +func (x *DescribeByEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeByEmailRequest.ProtoReflect.Descriptor instead. +func (*DescribeByEmailRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{23} +} + +func (x *DescribeByEmailRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type RefreshRepositoryProviderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Type RepositoryProvider_Type `protobuf:"varint,2,opt,name=type,proto3,enum=InternalApi.User.RepositoryProvider_Type" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshRepositoryProviderRequest) Reset() { + *x = RefreshRepositoryProviderRequest{} + mi := &file_user_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshRepositoryProviderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshRepositoryProviderRequest) ProtoMessage() {} + +func (x *RefreshRepositoryProviderRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshRepositoryProviderRequest.ProtoReflect.Descriptor instead. +func (*RefreshRepositoryProviderRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{24} +} + +func (x *RefreshRepositoryProviderRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *RefreshRepositoryProviderRequest) GetType() RepositoryProvider_Type { + if x != nil { + return x.Type + } + return RepositoryProvider_GITHUB +} + +type RefreshRepositoryProviderResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + RepositoryProvider *RepositoryProvider `protobuf:"bytes,2,opt,name=repository_provider,json=repositoryProvider,proto3" json:"repository_provider,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshRepositoryProviderResponse) Reset() { + *x = RefreshRepositoryProviderResponse{} + mi := &file_user_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshRepositoryProviderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshRepositoryProviderResponse) ProtoMessage() {} + +func (x *RefreshRepositoryProviderResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshRepositoryProviderResponse.ProtoReflect.Descriptor instead. +func (*RefreshRepositoryProviderResponse) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{25} +} + +func (x *RefreshRepositoryProviderResponse) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *RefreshRepositoryProviderResponse) GetRepositoryProvider() *RepositoryProvider { + if x != nil { + return x.RepositoryProvider + } + return nil +} + +// Create call CreateRequest +// fields +// - email = [required] The user's email address +// - name = [required] The user's display name +// - password = [optional] The user's password +// - repository_providers = [optional] List of repository providers for the user - will be always created with email scope +// - skip_password_change = [optional] The user will not be asked to change the password on the first login. Default is false. +type CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + RepositoryProviders []*RepositoryProvider `protobuf:"bytes,4,rep,name=repository_providers,json=repositoryProviders,proto3" json:"repository_providers,omitempty"` + SkipPasswordChange bool `protobuf:"varint,5,opt,name=skip_password_change,json=skipPasswordChange,proto3" json:"skip_password_change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + mi := &file_user_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *CreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *CreateRequest) GetRepositoryProviders() []*RepositoryProvider { + if x != nil { + return x.RepositoryProviders + } + return nil +} + +func (x *CreateRequest) GetSkipPasswordChange() bool { + if x != nil { + return x.SkipPasswordChange + } + return false +} + +// - id = user UUID +// - avatar_url = Url to user avatar. +// - github_uid = GitHub uid of a user. +// - name = User's name used for presentation purposes. +// - company = The company associated with the user. +// - email = User email. +// - blocked_at = the timestamp of user blocking +// - visited_at = the timestamp of user last visit +// - single_org_user = Is this is a single org user? This is the case for okta users for example. +// - org_id = If single_org_user is true, this is the org_id to which this user belongs. +// - creation_source = not set or okta +// - deactivated = if the account was deactivated +type User struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + GithubUid string `protobuf:"bytes,4,opt,name=github_uid,json=githubUid,proto3" json:"github_uid,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + GithubLogin string `protobuf:"bytes,7,opt,name=github_login,json=githubLogin,proto3" json:"github_login,omitempty"` + Company string `protobuf:"bytes,8,opt,name=company,proto3" json:"company,omitempty"` + Email string `protobuf:"bytes,9,opt,name=email,proto3" json:"email,omitempty"` + BlockedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=blocked_at,json=blockedAt,proto3" json:"blocked_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + RepositoryProviders []*RepositoryProvider `protobuf:"bytes,12,rep,name=repository_providers,json=repositoryProviders,proto3" json:"repository_providers,omitempty"` + VisitedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=visited_at,json=visitedAt,proto3" json:"visited_at,omitempty"` + SingleOrgUser bool `protobuf:"varint,14,opt,name=single_org_user,json=singleOrgUser,proto3" json:"single_org_user,omitempty"` + OrgId string `protobuf:"bytes,15,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + CreationSource User_CreationSource `protobuf:"varint,16,opt,name=creation_source,json=creationSource,proto3,enum=InternalApi.User.User_CreationSource" json:"creation_source,omitempty"` + Deactivated bool `protobuf:"varint,17,opt,name=deactivated,proto3" json:"deactivated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *User) Reset() { + *x = User{} + mi := &file_user_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{27} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetAvatarUrl() string { + if x != nil { + return x.AvatarUrl + } + return "" +} + +func (x *User) GetGithubUid() string { + if x != nil { + return x.GithubUid + } + return "" +} + +func (x *User) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *User) GetGithubLogin() string { + if x != nil { + return x.GithubLogin + } + return "" +} + +func (x *User) GetCompany() string { + if x != nil { + return x.Company + } + return "" +} + +func (x *User) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *User) GetBlockedAt() *timestamppb.Timestamp { + if x != nil { + return x.BlockedAt + } + return nil +} + +func (x *User) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *User) GetRepositoryProviders() []*RepositoryProvider { + if x != nil { + return x.RepositoryProviders + } + return nil +} + +func (x *User) GetVisitedAt() *timestamppb.Timestamp { + if x != nil { + return x.VisitedAt + } + return nil +} + +func (x *User) GetSingleOrgUser() bool { + if x != nil { + return x.SingleOrgUser + } + return false +} + +func (x *User) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *User) GetCreationSource() User_CreationSource { + if x != nil { + return x.CreationSource + } + return User_NOT_SET +} + +func (x *User) GetDeactivated() bool { + if x != nil { + return x.Deactivated + } + return false +} + +// Published with routing key: 'created'. +// All fields are required. +type UserCreated struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Invited bool `protobuf:"varint,3,opt,name=invited,proto3" json:"invited,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserCreated) Reset() { + *x = UserCreated{} + mi := &file_user_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserCreated) ProtoMessage() {} + +func (x *UserCreated) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserCreated.ProtoReflect.Descriptor instead. +func (*UserCreated) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{28} +} + +func (x *UserCreated) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UserCreated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *UserCreated) GetInvited() bool { + if x != nil { + return x.Invited + } + return false +} + +// Published with routing key: 'deleted'. +// All fields are required. +type UserDeleted struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserDeleted) Reset() { + *x = UserDeleted{} + mi := &file_user_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserDeleted) ProtoMessage() {} + +func (x *UserDeleted) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserDeleted.ProtoReflect.Descriptor instead. +func (*UserDeleted) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{29} +} + +func (x *UserDeleted) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UserDeleted) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'updated'. +// All fields are required. +type UserUpdated struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserUpdated) Reset() { + *x = UserUpdated{} + mi := &file_user_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserUpdated) ProtoMessage() {} + +func (x *UserUpdated) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserUpdated.ProtoReflect.Descriptor instead. +func (*UserUpdated) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{30} +} + +func (x *UserUpdated) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UserUpdated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type UserJoinedOrganization struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserJoinedOrganization) Reset() { + *x = UserJoinedOrganization{} + mi := &file_user_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserJoinedOrganization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserJoinedOrganization) ProtoMessage() {} + +func (x *UserJoinedOrganization) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserJoinedOrganization.ProtoReflect.Descriptor instead. +func (*UserJoinedOrganization) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{31} +} + +func (x *UserJoinedOrganization) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UserJoinedOrganization) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UserJoinedOrganization) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type UserLeftOrganization struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserLeftOrganization) Reset() { + *x = UserLeftOrganization{} + mi := &file_user_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserLeftOrganization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLeftOrganization) ProtoMessage() {} + +func (x *UserLeftOrganization) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserLeftOrganization.ProtoReflect.Descriptor instead. +func (*UserLeftOrganization) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{32} +} + +func (x *UserLeftOrganization) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UserLeftOrganization) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UserLeftOrganization) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type MemberInvited struct { + state protoimpl.MessageState `protogen:"open.v1"` + GithubUsername string `protobuf:"bytes,1,opt,name=github_username,json=githubUsername,proto3" json:"github_username,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemberInvited) Reset() { + *x = MemberInvited{} + mi := &file_user_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemberInvited) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberInvited) ProtoMessage() {} + +func (x *MemberInvited) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemberInvited.ProtoReflect.Descriptor instead. +func (*MemberInvited) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{33} +} + +func (x *MemberInvited) GetGithubUsername() string { + if x != nil { + return x.GithubUsername + } + return "" +} + +func (x *MemberInvited) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *MemberInvited) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'active_owner'. +// All fields are required. +// +// We sent this event if user as a org owner create any project in the first day +type ActiveOwner struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActiveOwner) Reset() { + *x = ActiveOwner{} + mi := &file_user_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActiveOwner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActiveOwner) ProtoMessage() {} + +func (x *ActiveOwner) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActiveOwner.ProtoReflect.Descriptor instead. +func (*ActiveOwner) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{34} +} + +func (x *ActiveOwner) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ActiveOwner) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'inactive_owner'. +// All fields are required. +// +// We sent this event if user as a org owner did not create any project in the first day +type InactiveOwner struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InactiveOwner) Reset() { + *x = InactiveOwner{} + mi := &file_user_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InactiveOwner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InactiveOwner) ProtoMessage() {} + +func (x *InactiveOwner) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InactiveOwner.ProtoReflect.Descriptor instead. +func (*InactiveOwner) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{35} +} + +func (x *InactiveOwner) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *InactiveOwner) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'work_email_added'. +// All fields are required. +type WorkEmailAdded struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + OldEmail string `protobuf:"bytes,3,opt,name=old_email,json=oldEmail,proto3" json:"old_email,omitempty"` + NewEmail string `protobuf:"bytes,4,opt,name=new_email,json=newEmail,proto3" json:"new_email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkEmailAdded) Reset() { + *x = WorkEmailAdded{} + mi := &file_user_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkEmailAdded) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkEmailAdded) ProtoMessage() {} + +func (x *WorkEmailAdded) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkEmailAdded.ProtoReflect.Descriptor instead. +func (*WorkEmailAdded) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{36} +} + +func (x *WorkEmailAdded) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *WorkEmailAdded) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *WorkEmailAdded) GetOldEmail() string { + if x != nil { + return x.OldEmail + } + return "" +} + +func (x *WorkEmailAdded) GetNewEmail() string { + if x != nil { + return x.NewEmail + } + return "" +} + +// Published with routing key: 'favorite_created'. +// All fields are required. +type FavoriteCreated struct { + state protoimpl.MessageState `protogen:"open.v1"` + Favorite *Favorite `protobuf:"bytes,1,opt,name=favorite,proto3" json:"favorite,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FavoriteCreated) Reset() { + *x = FavoriteCreated{} + mi := &file_user_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FavoriteCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FavoriteCreated) ProtoMessage() {} + +func (x *FavoriteCreated) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FavoriteCreated.ProtoReflect.Descriptor instead. +func (*FavoriteCreated) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{37} +} + +func (x *FavoriteCreated) GetFavorite() *Favorite { + if x != nil { + return x.Favorite + } + return nil +} + +func (x *FavoriteCreated) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Published with routing key: 'favorite_deleted'. +// All fields are required. +type FavoriteDeleted struct { + state protoimpl.MessageState `protogen:"open.v1"` + Favorite *Favorite `protobuf:"bytes,1,opt,name=favorite,proto3" json:"favorite,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FavoriteDeleted) Reset() { + *x = FavoriteDeleted{} + mi := &file_user_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FavoriteDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FavoriteDeleted) ProtoMessage() {} + +func (x *FavoriteDeleted) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FavoriteDeleted.ProtoReflect.Descriptor instead. +func (*FavoriteDeleted) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{38} +} + +func (x *FavoriteDeleted) GetFavorite() *Favorite { + if x != nil { + return x.Favorite + } + return nil +} + +func (x *FavoriteDeleted) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type RepositoryScopes_RepositoryScope struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scope RepositoryScopes_RepositoryScope_Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=InternalApi.User.RepositoryScopes_RepositoryScope_Scope" json:"scope,omitempty"` + Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` + Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepositoryScopes_RepositoryScope) Reset() { + *x = RepositoryScopes_RepositoryScope{} + mi := &file_user_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepositoryScopes_RepositoryScope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryScopes_RepositoryScope) ProtoMessage() {} + +func (x *RepositoryScopes_RepositoryScope) ProtoReflect() protoreflect.Message { + mi := &file_user_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryScopes_RepositoryScope.ProtoReflect.Descriptor instead. +func (*RepositoryScopes_RepositoryScope) Descriptor() ([]byte, []int) { + return file_user_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *RepositoryScopes_RepositoryScope) GetScope() RepositoryScopes_RepositoryScope_Scope { + if x != nil { + return x.Scope + } + return RepositoryScopes_RepositoryScope_NONE +} + +func (x *RepositoryScopes_RepositoryScope) GetLogin() string { + if x != nil { + return x.Login + } + return "" +} + +func (x *RepositoryScopes_RepositoryScope) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +var File_user_proto protoreflect.FileDescriptor + +var file_user_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 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, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x76, 0x6f, 0x72, + 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, + 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x09, 0x66, 0x61, 0x76, + 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x08, 0x46, 0x61, 0x76, 0x6f, 0x72, + 0x69, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x61, 0x76, 0x6f, + 0x72, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, + 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x22, 0x0a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x41, 0x53, 0x48, 0x42, 0x4f, 0x41, 0x52, 0x44, 0x10, 0x01, 0x22, + 0x30, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x73, 0x22, 0x79, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2a, 0x0a, 0x0f, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xf5, 0x05, 0x0a, 0x10, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, + 0x72, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4f, + 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x6f, 0x67, + 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x12, + 0x39, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 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, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x4f, 0x0a, 0x11, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x14, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x13, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x22, 0x2e, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x08, 0x0a, + 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, + 0x43, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, + 0x22, 0xa3, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x22, 0x2d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, + 0x55, 0x42, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, + 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x02, 0x22, + 0x35, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, + 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x22, 0xf3, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, + 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x12, 0x50, 0x0a, 0x09, 0x62, 0x69, 0x74, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x09, + 0x62, 0x69, 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0xc0, 0x01, 0x0a, 0x0f, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x4e, 0x0a, + 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, + 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x35, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x08, + 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, + 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x22, 0x3b, 0x0a, 0x0d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x0e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x35, 0x0a, 0x1a, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x4f, 0x72, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x22, 0x31, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, + 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x69, 0x0a, 0x18, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x2e, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x15, 0x55, 0x6e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x5c, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6d, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, + 0x18, 0x02, 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, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x67, 0x0a, + 0x23, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x2e, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7a, 0x0a, 0x20, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x21, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x55, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0xe0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x57, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6b, 0x69, + 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x6b, 0x69, 0x70, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xb4, 0x05, 0x0a, 0x04, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, + 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x75, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 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, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x0b, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x57, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 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, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6f, 0x72, + 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x4f, 0x72, 0x67, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6f, + 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, + 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, + 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x4b, 0x54, 0x41, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x10, 0x02, 0x22, 0x7a, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x22, 0x60, + 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x60, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x82, 0x01, 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x65, + 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x65, 0x66, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x55, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x62, 0x0a, 0x0d, 0x49, 0x6e, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x9d, 0x01, 0x0a, + 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x83, 0x01, 0x0a, + 0x0f, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x36, 0x0a, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x08, + 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, + 0x72, 0x69, 0x74, 0x65, 0x52, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xaf, 0x0c, 0x0a, 0x0b, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x12, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x1c, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x0f, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x28, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x5a, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x24, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x25, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, + 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x4f, 0x72, 0x67, 0x73, 0x12, 0x2c, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, + 0x64, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x66, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x12, 0x26, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x76, + 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, + 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, + 0x12, 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x1a, 0x1a, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, + 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, + 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x1a, 0x1a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, + 0x74, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0e, + 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x6f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x84, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x32, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x12, 0x1f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, + 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, + 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_user_proto_rawDescOnce sync.Once + file_user_proto_rawDescData = file_user_proto_rawDesc +) + +func file_user_proto_rawDescGZIP() []byte { + file_user_proto_rawDescOnce.Do(func() { + file_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_proto_rawDescData) + }) + return file_user_proto_rawDescData +} + +var file_user_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_user_proto_goTypes = []any{ + (Favorite_Kind)(0), // 0: InternalApi.User.Favorite.Kind + (DescribeResponse_RepoScope)(0), // 1: InternalApi.User.DescribeResponse.RepoScope + (RepositoryProvider_Type)(0), // 2: InternalApi.User.RepositoryProvider.Type + (RepositoryProvider_Scope)(0), // 3: InternalApi.User.RepositoryProvider.Scope + (RepositoryScopes_RepositoryScope_Scope)(0), // 4: InternalApi.User.RepositoryScopes.RepositoryScope.Scope + (User_CreationSource)(0), // 5: InternalApi.User.User.CreationSource + (*ListFavoritesRequest)(nil), // 6: InternalApi.User.ListFavoritesRequest + (*ListFavoritesResponse)(nil), // 7: InternalApi.User.ListFavoritesResponse + (*Favorite)(nil), // 8: InternalApi.User.Favorite + (*DescribeManyRequest)(nil), // 9: InternalApi.User.DescribeManyRequest + (*DescribeManyResponse)(nil), // 10: InternalApi.User.DescribeManyResponse + (*DescribeRequest)(nil), // 11: InternalApi.User.DescribeRequest + (*DescribeResponse)(nil), // 12: InternalApi.User.DescribeResponse + (*RepositoryProvider)(nil), // 13: InternalApi.User.RepositoryProvider + (*RepositoryScopes)(nil), // 14: InternalApi.User.RepositoryScopes + (*UpdateRequest)(nil), // 15: InternalApi.User.UpdateRequest + (*UpdateResponse)(nil), // 16: InternalApi.User.UpdateResponse + (*SearchUsersRequest)(nil), // 17: InternalApi.User.SearchUsersRequest + (*SearchUsersResponse)(nil), // 18: InternalApi.User.SearchUsersResponse + (*DeleteWithOwnedOrgsRequest)(nil), // 19: InternalApi.User.DeleteWithOwnedOrgsRequest + (*RegenerateTokenRequest)(nil), // 20: InternalApi.User.RegenerateTokenRequest + (*RegenerateTokenResponse)(nil), // 21: InternalApi.User.RegenerateTokenResponse + (*CheckGithubTokenRequest)(nil), // 22: InternalApi.User.CheckGithubTokenRequest + (*CheckGithubTokenResponse)(nil), // 23: InternalApi.User.CheckGithubTokenResponse + (*BlockAccountRequest)(nil), // 24: InternalApi.User.BlockAccountRequest + (*UnblockAccountRequest)(nil), // 25: InternalApi.User.UnblockAccountRequest + (*GetRepositoryTokenRequest)(nil), // 26: InternalApi.User.GetRepositoryTokenRequest + (*GetRepositoryTokenResponse)(nil), // 27: InternalApi.User.GetRepositoryTokenResponse + (*DescribeByRepositoryProviderRequest)(nil), // 28: InternalApi.User.DescribeByRepositoryProviderRequest + (*DescribeByEmailRequest)(nil), // 29: InternalApi.User.DescribeByEmailRequest + (*RefreshRepositoryProviderRequest)(nil), // 30: InternalApi.User.RefreshRepositoryProviderRequest + (*RefreshRepositoryProviderResponse)(nil), // 31: InternalApi.User.RefreshRepositoryProviderResponse + (*CreateRequest)(nil), // 32: InternalApi.User.CreateRequest + (*User)(nil), // 33: InternalApi.User.User + (*UserCreated)(nil), // 34: InternalApi.User.UserCreated + (*UserDeleted)(nil), // 35: InternalApi.User.UserDeleted + (*UserUpdated)(nil), // 36: InternalApi.User.UserUpdated + (*UserJoinedOrganization)(nil), // 37: InternalApi.User.UserJoinedOrganization + (*UserLeftOrganization)(nil), // 38: InternalApi.User.UserLeftOrganization + (*MemberInvited)(nil), // 39: InternalApi.User.MemberInvited + (*ActiveOwner)(nil), // 40: InternalApi.User.ActiveOwner + (*InactiveOwner)(nil), // 41: InternalApi.User.InactiveOwner + (*WorkEmailAdded)(nil), // 42: InternalApi.User.WorkEmailAdded + (*FavoriteCreated)(nil), // 43: InternalApi.User.FavoriteCreated + (*FavoriteDeleted)(nil), // 44: InternalApi.User.FavoriteDeleted + (*RepositoryScopes_RepositoryScope)(nil), // 45: InternalApi.User.RepositoryScopes.RepositoryScope + (*response_status.ResponseStatus)(nil), // 46: InternalApi.ResponseStatus + (*timestamppb.Timestamp)(nil), // 47: google.protobuf.Timestamp + (*status.Status)(nil), // 48: google.rpc.Status + (repository_integrator.IntegrationType)(0), // 49: InternalApi.RepositoryIntegrator.IntegrationType +} +var file_user_proto_depIdxs = []int32{ + 8, // 0: InternalApi.User.ListFavoritesResponse.favorites:type_name -> InternalApi.User.Favorite + 0, // 1: InternalApi.User.Favorite.kind:type_name -> InternalApi.User.Favorite.Kind + 33, // 2: InternalApi.User.DescribeManyResponse.users:type_name -> InternalApi.User.User + 46, // 3: InternalApi.User.DescribeManyResponse.status:type_name -> InternalApi.ResponseStatus + 46, // 4: InternalApi.User.DescribeResponse.status:type_name -> InternalApi.ResponseStatus + 47, // 5: InternalApi.User.DescribeResponse.created_at:type_name -> google.protobuf.Timestamp + 1, // 6: InternalApi.User.DescribeResponse.github_scope:type_name -> InternalApi.User.DescribeResponse.RepoScope + 47, // 7: InternalApi.User.DescribeResponse.blocked_at:type_name -> google.protobuf.Timestamp + 14, // 8: InternalApi.User.DescribeResponse.repository_scopes:type_name -> InternalApi.User.RepositoryScopes + 13, // 9: InternalApi.User.DescribeResponse.repository_providers:type_name -> InternalApi.User.RepositoryProvider + 33, // 10: InternalApi.User.DescribeResponse.user:type_name -> InternalApi.User.User + 2, // 11: InternalApi.User.RepositoryProvider.type:type_name -> InternalApi.User.RepositoryProvider.Type + 3, // 12: InternalApi.User.RepositoryProvider.scope:type_name -> InternalApi.User.RepositoryProvider.Scope + 45, // 13: InternalApi.User.RepositoryScopes.github:type_name -> InternalApi.User.RepositoryScopes.RepositoryScope + 45, // 14: InternalApi.User.RepositoryScopes.bitbucket:type_name -> InternalApi.User.RepositoryScopes.RepositoryScope + 33, // 15: InternalApi.User.UpdateRequest.user:type_name -> InternalApi.User.User + 48, // 16: InternalApi.User.UpdateResponse.status:type_name -> google.rpc.Status + 33, // 17: InternalApi.User.UpdateResponse.user:type_name -> InternalApi.User.User + 33, // 18: InternalApi.User.SearchUsersResponse.users:type_name -> InternalApi.User.User + 48, // 19: InternalApi.User.RegenerateTokenResponse.status:type_name -> google.rpc.Status + 49, // 20: InternalApi.User.GetRepositoryTokenRequest.integration_type:type_name -> InternalApi.RepositoryIntegrator.IntegrationType + 47, // 21: InternalApi.User.GetRepositoryTokenResponse.expires_at:type_name -> google.protobuf.Timestamp + 13, // 22: InternalApi.User.DescribeByRepositoryProviderRequest.provider:type_name -> InternalApi.User.RepositoryProvider + 2, // 23: InternalApi.User.RefreshRepositoryProviderRequest.type:type_name -> InternalApi.User.RepositoryProvider.Type + 13, // 24: InternalApi.User.RefreshRepositoryProviderResponse.repository_provider:type_name -> InternalApi.User.RepositoryProvider + 13, // 25: InternalApi.User.CreateRequest.repository_providers:type_name -> InternalApi.User.RepositoryProvider + 47, // 26: InternalApi.User.User.blocked_at:type_name -> google.protobuf.Timestamp + 47, // 27: InternalApi.User.User.created_at:type_name -> google.protobuf.Timestamp + 13, // 28: InternalApi.User.User.repository_providers:type_name -> InternalApi.User.RepositoryProvider + 47, // 29: InternalApi.User.User.visited_at:type_name -> google.protobuf.Timestamp + 5, // 30: InternalApi.User.User.creation_source:type_name -> InternalApi.User.User.CreationSource + 47, // 31: InternalApi.User.UserCreated.timestamp:type_name -> google.protobuf.Timestamp + 47, // 32: InternalApi.User.UserDeleted.timestamp:type_name -> google.protobuf.Timestamp + 47, // 33: InternalApi.User.UserUpdated.timestamp:type_name -> google.protobuf.Timestamp + 47, // 34: InternalApi.User.UserJoinedOrganization.timestamp:type_name -> google.protobuf.Timestamp + 47, // 35: InternalApi.User.UserLeftOrganization.timestamp:type_name -> google.protobuf.Timestamp + 47, // 36: InternalApi.User.MemberInvited.timestamp:type_name -> google.protobuf.Timestamp + 47, // 37: InternalApi.User.ActiveOwner.timestamp:type_name -> google.protobuf.Timestamp + 47, // 38: InternalApi.User.InactiveOwner.timestamp:type_name -> google.protobuf.Timestamp + 47, // 39: InternalApi.User.WorkEmailAdded.timestamp:type_name -> google.protobuf.Timestamp + 8, // 40: InternalApi.User.FavoriteCreated.favorite:type_name -> InternalApi.User.Favorite + 47, // 41: InternalApi.User.FavoriteCreated.timestamp:type_name -> google.protobuf.Timestamp + 8, // 42: InternalApi.User.FavoriteDeleted.favorite:type_name -> InternalApi.User.Favorite + 47, // 43: InternalApi.User.FavoriteDeleted.timestamp:type_name -> google.protobuf.Timestamp + 4, // 44: InternalApi.User.RepositoryScopes.RepositoryScope.scope:type_name -> InternalApi.User.RepositoryScopes.RepositoryScope.Scope + 11, // 45: InternalApi.User.UserService.Describe:input_type -> InternalApi.User.DescribeRequest + 28, // 46: InternalApi.User.UserService.DescribeByRepositoryProvider:input_type -> InternalApi.User.DescribeByRepositoryProviderRequest + 29, // 47: InternalApi.User.UserService.DescribeByEmail:input_type -> InternalApi.User.DescribeByEmailRequest + 17, // 48: InternalApi.User.UserService.SearchUsers:input_type -> InternalApi.User.SearchUsersRequest + 9, // 49: InternalApi.User.UserService.DescribeMany:input_type -> InternalApi.User.DescribeManyRequest + 15, // 50: InternalApi.User.UserService.Update:input_type -> InternalApi.User.UpdateRequest + 19, // 51: InternalApi.User.UserService.DeleteWithOwnedOrgs:input_type -> InternalApi.User.DeleteWithOwnedOrgsRequest + 20, // 52: InternalApi.User.UserService.RegenerateToken:input_type -> InternalApi.User.RegenerateTokenRequest + 6, // 53: InternalApi.User.UserService.ListFavorites:input_type -> InternalApi.User.ListFavoritesRequest + 8, // 54: InternalApi.User.UserService.CreateFavorite:input_type -> InternalApi.User.Favorite + 8, // 55: InternalApi.User.UserService.DeleteFavorite:input_type -> InternalApi.User.Favorite + 22, // 56: InternalApi.User.UserService.CheckGithubToken:input_type -> InternalApi.User.CheckGithubTokenRequest + 24, // 57: InternalApi.User.UserService.BlockAccount:input_type -> InternalApi.User.BlockAccountRequest + 25, // 58: InternalApi.User.UserService.UnblockAccount:input_type -> InternalApi.User.UnblockAccountRequest + 26, // 59: InternalApi.User.UserService.GetRepositoryToken:input_type -> InternalApi.User.GetRepositoryTokenRequest + 30, // 60: InternalApi.User.UserService.RefreshRepositoryProvider:input_type -> InternalApi.User.RefreshRepositoryProviderRequest + 32, // 61: InternalApi.User.UserService.Create:input_type -> InternalApi.User.CreateRequest + 12, // 62: InternalApi.User.UserService.Describe:output_type -> InternalApi.User.DescribeResponse + 33, // 63: InternalApi.User.UserService.DescribeByRepositoryProvider:output_type -> InternalApi.User.User + 33, // 64: InternalApi.User.UserService.DescribeByEmail:output_type -> InternalApi.User.User + 18, // 65: InternalApi.User.UserService.SearchUsers:output_type -> InternalApi.User.SearchUsersResponse + 10, // 66: InternalApi.User.UserService.DescribeMany:output_type -> InternalApi.User.DescribeManyResponse + 16, // 67: InternalApi.User.UserService.Update:output_type -> InternalApi.User.UpdateResponse + 33, // 68: InternalApi.User.UserService.DeleteWithOwnedOrgs:output_type -> InternalApi.User.User + 21, // 69: InternalApi.User.UserService.RegenerateToken:output_type -> InternalApi.User.RegenerateTokenResponse + 7, // 70: InternalApi.User.UserService.ListFavorites:output_type -> InternalApi.User.ListFavoritesResponse + 8, // 71: InternalApi.User.UserService.CreateFavorite:output_type -> InternalApi.User.Favorite + 8, // 72: InternalApi.User.UserService.DeleteFavorite:output_type -> InternalApi.User.Favorite + 23, // 73: InternalApi.User.UserService.CheckGithubToken:output_type -> InternalApi.User.CheckGithubTokenResponse + 33, // 74: InternalApi.User.UserService.BlockAccount:output_type -> InternalApi.User.User + 33, // 75: InternalApi.User.UserService.UnblockAccount:output_type -> InternalApi.User.User + 27, // 76: InternalApi.User.UserService.GetRepositoryToken:output_type -> InternalApi.User.GetRepositoryTokenResponse + 31, // 77: InternalApi.User.UserService.RefreshRepositoryProvider:output_type -> InternalApi.User.RefreshRepositoryProviderResponse + 33, // 78: InternalApi.User.UserService.Create:output_type -> InternalApi.User.User + 62, // [62:79] is the sub-list for method output_type + 45, // [45:62] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name +} + +func init() { file_user_proto_init() } +func file_user_proto_init() { + if File_user_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_user_proto_rawDesc, + NumEnums: 6, + NumMessages: 40, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_user_proto_goTypes, + DependencyIndexes: file_user_proto_depIdxs, + EnumInfos: file_user_proto_enumTypes, + MessageInfos: file_user_proto_msgTypes, + }.Build() + File_user_proto = out.File + file_user_proto_rawDesc = nil + file_user_proto_goTypes = nil + file_user_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/user/user_grpc.pb.go b/mcp_server/pkg/internal_api/user/user_grpc.pb.go new file mode 100644 index 000000000..668eee38b --- /dev/null +++ b/mcp_server/pkg/internal_api/user/user_grpc.pb.go @@ -0,0 +1,797 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: user.proto + +package user + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + UserService_Describe_FullMethodName = "/InternalApi.User.UserService/Describe" + UserService_DescribeByRepositoryProvider_FullMethodName = "/InternalApi.User.UserService/DescribeByRepositoryProvider" + UserService_DescribeByEmail_FullMethodName = "/InternalApi.User.UserService/DescribeByEmail" + UserService_SearchUsers_FullMethodName = "/InternalApi.User.UserService/SearchUsers" + UserService_DescribeMany_FullMethodName = "/InternalApi.User.UserService/DescribeMany" + UserService_Update_FullMethodName = "/InternalApi.User.UserService/Update" + UserService_DeleteWithOwnedOrgs_FullMethodName = "/InternalApi.User.UserService/DeleteWithOwnedOrgs" + UserService_RegenerateToken_FullMethodName = "/InternalApi.User.UserService/RegenerateToken" + UserService_ListFavorites_FullMethodName = "/InternalApi.User.UserService/ListFavorites" + UserService_CreateFavorite_FullMethodName = "/InternalApi.User.UserService/CreateFavorite" + UserService_DeleteFavorite_FullMethodName = "/InternalApi.User.UserService/DeleteFavorite" + UserService_CheckGithubToken_FullMethodName = "/InternalApi.User.UserService/CheckGithubToken" + UserService_BlockAccount_FullMethodName = "/InternalApi.User.UserService/BlockAccount" + UserService_UnblockAccount_FullMethodName = "/InternalApi.User.UserService/UnblockAccount" + UserService_GetRepositoryToken_FullMethodName = "/InternalApi.User.UserService/GetRepositoryToken" + UserService_RefreshRepositoryProvider_FullMethodName = "/InternalApi.User.UserService/RefreshRepositoryProvider" + UserService_Create_FullMethodName = "/InternalApi.User.UserService/Create" +) + +// UserServiceClient is the client API for UserService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type UserServiceClient interface { + // Operation is called to describe an existing user. + // Operation is synchronous. + Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) + // Operation is called to find and describe an existing user based on repository provider id + // Operation is synchronous. + DescribeByRepositoryProvider(ctx context.Context, in *DescribeByRepositoryProviderRequest, opts ...grpc.CallOption) (*User, error) + // Operation is called to find and describe an existing user based on email address + // Operation is synchronous. + DescribeByEmail(ctx context.Context, in *DescribeByEmailRequest, opts ...grpc.CallOption) (*User, error) + // Operation is called to search for users + // Operation is synchronous. + SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) + // Operation is called to describe many users. + // Operation is synchronous. + DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) + // Operation is called to update an existing user. + // Operation is synchronous. + Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + // Operation is called to delete an existing user and all their owned organizations. + // Operation is synchronous. + DeleteWithOwnedOrgs(ctx context.Context, in *DeleteWithOwnedOrgsRequest, opts ...grpc.CallOption) (*User, error) + // Operation is called to regenerate a token for an existing user. + // Operation is synchronous. + RegenerateToken(ctx context.Context, in *RegenerateTokenRequest, opts ...grpc.CallOption) (*RegenerateTokenResponse, error) + // Operation is called to list favorites for the user. + // Operation is synchronous. + ListFavorites(ctx context.Context, in *ListFavoritesRequest, opts ...grpc.CallOption) (*ListFavoritesResponse, error) + // Operation is called to create favorite record. + // Operation is synchronous. + CreateFavorite(ctx context.Context, in *Favorite, opts ...grpc.CallOption) (*Favorite, error) + // Operation is called to delete the favorite record. + // Operation is synchronous. + DeleteFavorite(ctx context.Context, in *Favorite, opts ...grpc.CallOption) (*Favorite, error) + // Operation is called to check the status of an github token. + // Operation is synchronous. + CheckGithubToken(ctx context.Context, in *CheckGithubTokenRequest, opts ...grpc.CallOption) (*CheckGithubTokenResponse, error) + // Operation is called to block the user based on their auth account. + // Operation is synchronous. + BlockAccount(ctx context.Context, in *BlockAccountRequest, opts ...grpc.CallOption) (*User, error) + // Operation is called to unblock the user based on their auth account. + // Operation is synchronous. + UnblockAccount(ctx context.Context, in *UnblockAccountRequest, opts ...grpc.CallOption) (*User, error) + // Operation is called to fetch a users repository token + // Operation is synchronous. + GetRepositoryToken(ctx context.Context, in *GetRepositoryTokenRequest, opts ...grpc.CallOption) (*GetRepositoryTokenResponse, error) + // Operation is called to check and refresh the status of an repository provider + // for a given user and provider type + // Operation is synchronous. + RefreshRepositoryProvider(ctx context.Context, in *RefreshRepositoryProviderRequest, opts ...grpc.CallOption) (*RefreshRepositoryProviderResponse, error) + // Operation is called create a new user, passing username and name. + // Operation is synchronous. + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*User, error) +} + +type userServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { + return &userServiceClient{cc} +} + +func (c *userServiceClient) Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeResponse) + err := c.cc.Invoke(ctx, UserService_Describe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) DescribeByRepositoryProvider(ctx context.Context, in *DescribeByRepositoryProviderRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_DescribeByRepositoryProvider_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) DescribeByEmail(ctx context.Context, in *DescribeByEmailRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_DescribeByEmail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SearchUsersResponse) + err := c.cc.Invoke(ctx, UserService_SearchUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) DescribeMany(ctx context.Context, in *DescribeManyRequest, opts ...grpc.CallOption) (*DescribeManyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DescribeManyResponse) + err := c.cc.Invoke(ctx, UserService_DescribeMany_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateResponse) + err := c.cc.Invoke(ctx, UserService_Update_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) DeleteWithOwnedOrgs(ctx context.Context, in *DeleteWithOwnedOrgsRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_DeleteWithOwnedOrgs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) RegenerateToken(ctx context.Context, in *RegenerateTokenRequest, opts ...grpc.CallOption) (*RegenerateTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegenerateTokenResponse) + err := c.cc.Invoke(ctx, UserService_RegenerateToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) ListFavorites(ctx context.Context, in *ListFavoritesRequest, opts ...grpc.CallOption) (*ListFavoritesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListFavoritesResponse) + err := c.cc.Invoke(ctx, UserService_ListFavorites_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) CreateFavorite(ctx context.Context, in *Favorite, opts ...grpc.CallOption) (*Favorite, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Favorite) + err := c.cc.Invoke(ctx, UserService_CreateFavorite_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) DeleteFavorite(ctx context.Context, in *Favorite, opts ...grpc.CallOption) (*Favorite, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Favorite) + err := c.cc.Invoke(ctx, UserService_DeleteFavorite_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) CheckGithubToken(ctx context.Context, in *CheckGithubTokenRequest, opts ...grpc.CallOption) (*CheckGithubTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckGithubTokenResponse) + err := c.cc.Invoke(ctx, UserService_CheckGithubToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) BlockAccount(ctx context.Context, in *BlockAccountRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_BlockAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) UnblockAccount(ctx context.Context, in *UnblockAccountRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_UnblockAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) GetRepositoryToken(ctx context.Context, in *GetRepositoryTokenRequest, opts ...grpc.CallOption) (*GetRepositoryTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRepositoryTokenResponse) + err := c.cc.Invoke(ctx, UserService_GetRepositoryToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) RefreshRepositoryProvider(ctx context.Context, in *RefreshRepositoryProviderRequest, opts ...grpc.CallOption) (*RefreshRepositoryProviderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RefreshRepositoryProviderResponse) + err := c.cc.Invoke(ctx, UserService_RefreshRepositoryProvider_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*User, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServiceServer is the server API for UserService service. +// All implementations should embed UnimplementedUserServiceServer +// for forward compatibility. +type UserServiceServer interface { + // Operation is called to describe an existing user. + // Operation is synchronous. + Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) + // Operation is called to find and describe an existing user based on repository provider id + // Operation is synchronous. + DescribeByRepositoryProvider(context.Context, *DescribeByRepositoryProviderRequest) (*User, error) + // Operation is called to find and describe an existing user based on email address + // Operation is synchronous. + DescribeByEmail(context.Context, *DescribeByEmailRequest) (*User, error) + // Operation is called to search for users + // Operation is synchronous. + SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) + // Operation is called to describe many users. + // Operation is synchronous. + DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) + // Operation is called to update an existing user. + // Operation is synchronous. + Update(context.Context, *UpdateRequest) (*UpdateResponse, error) + // Operation is called to delete an existing user and all their owned organizations. + // Operation is synchronous. + DeleteWithOwnedOrgs(context.Context, *DeleteWithOwnedOrgsRequest) (*User, error) + // Operation is called to regenerate a token for an existing user. + // Operation is synchronous. + RegenerateToken(context.Context, *RegenerateTokenRequest) (*RegenerateTokenResponse, error) + // Operation is called to list favorites for the user. + // Operation is synchronous. + ListFavorites(context.Context, *ListFavoritesRequest) (*ListFavoritesResponse, error) + // Operation is called to create favorite record. + // Operation is synchronous. + CreateFavorite(context.Context, *Favorite) (*Favorite, error) + // Operation is called to delete the favorite record. + // Operation is synchronous. + DeleteFavorite(context.Context, *Favorite) (*Favorite, error) + // Operation is called to check the status of an github token. + // Operation is synchronous. + CheckGithubToken(context.Context, *CheckGithubTokenRequest) (*CheckGithubTokenResponse, error) + // Operation is called to block the user based on their auth account. + // Operation is synchronous. + BlockAccount(context.Context, *BlockAccountRequest) (*User, error) + // Operation is called to unblock the user based on their auth account. + // Operation is synchronous. + UnblockAccount(context.Context, *UnblockAccountRequest) (*User, error) + // Operation is called to fetch a users repository token + // Operation is synchronous. + GetRepositoryToken(context.Context, *GetRepositoryTokenRequest) (*GetRepositoryTokenResponse, error) + // Operation is called to check and refresh the status of an repository provider + // for a given user and provider type + // Operation is synchronous. + RefreshRepositoryProvider(context.Context, *RefreshRepositoryProviderRequest) (*RefreshRepositoryProviderResponse, error) + // Operation is called create a new user, passing username and name. + // Operation is synchronous. + Create(context.Context, *CreateRequest) (*User, error) +} + +// UnimplementedUserServiceServer should 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 UnimplementedUserServiceServer struct{} + +func (UnimplementedUserServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") +} +func (UnimplementedUserServiceServer) DescribeByRepositoryProvider(context.Context, *DescribeByRepositoryProviderRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeByRepositoryProvider not implemented") +} +func (UnimplementedUserServiceServer) DescribeByEmail(context.Context, *DescribeByEmailRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeByEmail not implemented") +} +func (UnimplementedUserServiceServer) SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchUsers not implemented") +} +func (UnimplementedUserServiceServer) DescribeMany(context.Context, *DescribeManyRequest) (*DescribeManyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeMany not implemented") +} +func (UnimplementedUserServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedUserServiceServer) DeleteWithOwnedOrgs(context.Context, *DeleteWithOwnedOrgsRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWithOwnedOrgs not implemented") +} +func (UnimplementedUserServiceServer) RegenerateToken(context.Context, *RegenerateTokenRequest) (*RegenerateTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegenerateToken not implemented") +} +func (UnimplementedUserServiceServer) ListFavorites(context.Context, *ListFavoritesRequest) (*ListFavoritesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFavorites not implemented") +} +func (UnimplementedUserServiceServer) CreateFavorite(context.Context, *Favorite) (*Favorite, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateFavorite not implemented") +} +func (UnimplementedUserServiceServer) DeleteFavorite(context.Context, *Favorite) (*Favorite, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteFavorite not implemented") +} +func (UnimplementedUserServiceServer) CheckGithubToken(context.Context, *CheckGithubTokenRequest) (*CheckGithubTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckGithubToken not implemented") +} +func (UnimplementedUserServiceServer) BlockAccount(context.Context, *BlockAccountRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method BlockAccount not implemented") +} +func (UnimplementedUserServiceServer) UnblockAccount(context.Context, *UnblockAccountRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnblockAccount not implemented") +} +func (UnimplementedUserServiceServer) GetRepositoryToken(context.Context, *GetRepositoryTokenRequest) (*GetRepositoryTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRepositoryToken not implemented") +} +func (UnimplementedUserServiceServer) RefreshRepositoryProvider(context.Context, *RefreshRepositoryProviderRequest) (*RefreshRepositoryProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefreshRepositoryProvider not implemented") +} +func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedUserServiceServer) testEmbeddedByValue() {} + +// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserServiceServer will +// result in compilation errors. +type UnsafeUserServiceServer interface { + mustEmbedUnimplementedUserServiceServer() +} + +func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { + // If the following call pancis, it indicates UnimplementedUserServiceServer 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(&UserService_ServiceDesc, srv) +} + +func _UserService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).Describe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_Describe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).Describe(ctx, req.(*DescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_DescribeByRepositoryProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeByRepositoryProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).DescribeByRepositoryProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_DescribeByRepositoryProvider_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).DescribeByRepositoryProvider(ctx, req.(*DescribeByRepositoryProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_DescribeByEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeByEmailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).DescribeByEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_DescribeByEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).DescribeByEmail(ctx, req.(*DescribeByEmailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_SearchUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).SearchUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_SearchUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).SearchUsers(ctx, req.(*SearchUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_DescribeMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).DescribeMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_DescribeMany_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).DescribeMany(ctx, req.(*DescribeManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).Update(ctx, req.(*UpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_DeleteWithOwnedOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteWithOwnedOrgsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).DeleteWithOwnedOrgs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_DeleteWithOwnedOrgs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).DeleteWithOwnedOrgs(ctx, req.(*DeleteWithOwnedOrgsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_RegenerateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegenerateTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).RegenerateToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_RegenerateToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).RegenerateToken(ctx, req.(*RegenerateTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_ListFavorites_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFavoritesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).ListFavorites(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_ListFavorites_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).ListFavorites(ctx, req.(*ListFavoritesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_CreateFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Favorite) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).CreateFavorite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_CreateFavorite_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).CreateFavorite(ctx, req.(*Favorite)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_DeleteFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Favorite) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).DeleteFavorite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_DeleteFavorite_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).DeleteFavorite(ctx, req.(*Favorite)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_CheckGithubToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckGithubTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).CheckGithubToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_CheckGithubToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).CheckGithubToken(ctx, req.(*CheckGithubTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_BlockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).BlockAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_BlockAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).BlockAccount(ctx, req.(*BlockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_UnblockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnblockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).UnblockAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_UnblockAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).UnblockAccount(ctx, req.(*UnblockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_GetRepositoryToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRepositoryTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).GetRepositoryToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_GetRepositoryToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).GetRepositoryToken(ctx, req.(*GetRepositoryTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_RefreshRepositoryProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefreshRepositoryProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).RefreshRepositoryProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_RefreshRepositoryProvider_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).RefreshRepositoryProvider(ctx, req.(*RefreshRepositoryProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.User.UserService", + HandlerType: (*UserServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Describe", + Handler: _UserService_Describe_Handler, + }, + { + MethodName: "DescribeByRepositoryProvider", + Handler: _UserService_DescribeByRepositoryProvider_Handler, + }, + { + MethodName: "DescribeByEmail", + Handler: _UserService_DescribeByEmail_Handler, + }, + { + MethodName: "SearchUsers", + Handler: _UserService_SearchUsers_Handler, + }, + { + MethodName: "DescribeMany", + Handler: _UserService_DescribeMany_Handler, + }, + { + MethodName: "Update", + Handler: _UserService_Update_Handler, + }, + { + MethodName: "DeleteWithOwnedOrgs", + Handler: _UserService_DeleteWithOwnedOrgs_Handler, + }, + { + MethodName: "RegenerateToken", + Handler: _UserService_RegenerateToken_Handler, + }, + { + MethodName: "ListFavorites", + Handler: _UserService_ListFavorites_Handler, + }, + { + MethodName: "CreateFavorite", + Handler: _UserService_CreateFavorite_Handler, + }, + { + MethodName: "DeleteFavorite", + Handler: _UserService_DeleteFavorite_Handler, + }, + { + MethodName: "CheckGithubToken", + Handler: _UserService_CheckGithubToken_Handler, + }, + { + MethodName: "BlockAccount", + Handler: _UserService_BlockAccount_Handler, + }, + { + MethodName: "UnblockAccount", + Handler: _UserService_UnblockAccount_Handler, + }, + { + MethodName: "GetRepositoryToken", + Handler: _UserService_GetRepositoryToken_Handler, + }, + { + MethodName: "RefreshRepositoryProvider", + Handler: _UserService_RefreshRepositoryProvider_Handler, + }, + { + MethodName: "Create", + Handler: _UserService_Create_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "user.proto", +} diff --git a/mcp_server/pkg/internalapi/config.go b/mcp_server/pkg/internalapi/config.go new file mode 100644 index 000000000..2d41a83ed --- /dev/null +++ b/mcp_server/pkg/internalapi/config.go @@ -0,0 +1,161 @@ +package internalapi + +import ( + "fmt" + "os" + "strings" + "time" +) + +const ( + envDialTimeout = "MCP_GRPC_DIAL_TIMEOUT" + envCallTimeout = "MCP_GRPC_CALL_TIMEOUT" +) + +var ( + workflowEndpointEnvs = []string{ + "INTERNAL_API_URL_PLUMBER", + "MCP_WORKFLOW_GRPC_ENDPOINT", + "WF_GRPC_URL", + } + organizationEndpointEnvs = []string{ + "INTERNAL_API_URL_ORGANIZATION", + "MCP_ORGANIZATION_GRPC_ENDPOINT", + } + projectEndpointEnvs = []string{ + "INTERNAL_API_URL_PROJECT", + "MCP_PROJECT_GRPC_ENDPOINT", + } + pipelineEndpointEnvs = []string{ + "INTERNAL_API_URL_PLUMBER", + "MCP_PIPELINE_GRPC_ENDPOINT", + "PPL_GRPC_URL", + } + jobEndpointEnvs = []string{ + "INTERNAL_API_URL_JOB", + "MCP_JOB_GRPC_ENDPOINT", + "JOBS_API_URL", + } + loghubEndpointEnvs = []string{ + "INTERNAL_API_URL_LOGHUB", + "MCP_LOGHUB_GRPC_ENDPOINT", + "LOGHUB_API_URL", + } + loghub2EndpointEnvs = []string{ + "INTERNAL_API_URL_LOGHUB2", + "MCP_LOGHUB2_GRPC_ENDPOINT", + "LOGHUB2_API_URL", + } + userEndpointEnvs = []string{ + "INTERNAL_API_URL_USER", + "MCP_USER_GRPC_ENDPOINT", + } + rbacEndpointEnvs = []string{ + "INTERNAL_API_URL_RBAC", + "MCP_RBAC_GRPC_ENDPOINT", + } +) + +// Config captures the connection settings for talking to internal API services. +type Config struct { + WorkflowEndpoint string + OrganizationEndpoint string + ProjectEndpoint string + PipelineEndpoint string + JobEndpoint string + LoghubEndpoint string + Loghub2Endpoint string + UserEndpoint string + RBACEndpoint string + + DialTimeout time.Duration + CallTimeout time.Duration +} + +// LoadConfig reads configuration from environment variables. +func LoadConfig() (Config, error) { + dialTimeout, err := durationFromEnv(envDialTimeout, 5*time.Second) + if err != nil { + return Config{}, err + } + callTimeout, err := durationFromEnv(envCallTimeout, 15*time.Second) + if err != nil { + return Config{}, err + } + + cfg := Config{ + WorkflowEndpoint: endpointFromEnv(workflowEndpointEnvs...), + OrganizationEndpoint: endpointFromEnv(organizationEndpointEnvs...), + ProjectEndpoint: endpointFromEnv(projectEndpointEnvs...), + PipelineEndpoint: endpointFromEnv(pipelineEndpointEnvs...), + JobEndpoint: endpointFromEnv(jobEndpointEnvs...), + LoghubEndpoint: endpointFromEnv(loghubEndpointEnvs...), + Loghub2Endpoint: endpointFromEnv(loghub2EndpointEnvs...), + UserEndpoint: endpointFromEnv(userEndpointEnvs...), + RBACEndpoint: endpointFromEnv(rbacEndpointEnvs...), + DialTimeout: dialTimeout, + CallTimeout: callTimeout, + } + + if cfg.DialTimeout <= 0 { + return Config{}, fmt.Errorf("invalid gRPC dial timeout: %s", cfg.DialTimeout) + } + if cfg.CallTimeout <= 0 { + return Config{}, fmt.Errorf("invalid gRPC call timeout: %s", cfg.CallTimeout) + } + + return cfg, nil +} + +// Validate ensures mandatory endpoints are configured. +func (c Config) Validate() error { + var missing []string + if c.WorkflowEndpoint == "" { + missing = append(missing, "workflow gRPC endpoint") + } + if c.OrganizationEndpoint == "" { + missing = append(missing, "organization gRPC endpoint") + } + if c.ProjectEndpoint == "" { + missing = append(missing, "project gRPC endpoint") + } + if c.PipelineEndpoint == "" { + missing = append(missing, "pipeline gRPC endpoint") + } + if c.JobEndpoint == "" { + missing = append(missing, "job gRPC endpoint") + } + if c.RBACEndpoint == "" { + missing = append(missing, "rbac gRPC endpoint") + } + + if len(missing) > 0 { + return fmt.Errorf("missing required configuration: %s", strings.Join(missing, ", ")) + } + return nil +} + +func endpointFromEnv(keys ...string) string { + for _, key := range keys { + if key == "" { + continue + } + if v := strings.TrimSpace(os.Getenv(key)); v != "" { + return v + } + } + return "" +} + +func durationFromEnv(key string, def time.Duration) (time.Duration, error) { + raw := strings.TrimSpace(os.Getenv(key)) + if raw == "" { + return def, nil + } + + d, err := time.ParseDuration(raw) + if err != nil { + return 0, fmt.Errorf("invalid duration for %s: %w", key, err) + } + return d, nil +} diff --git a/mcp_server/pkg/internalapi/manager.go b/mcp_server/pkg/internalapi/manager.go new file mode 100644 index 000000000..3aa66b72f --- /dev/null +++ b/mcp_server/pkg/internalapi/manager.go @@ -0,0 +1,236 @@ +package internalapi + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" + loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" + userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" +) + +// Provider exposes access to internal API clients. +type Provider interface { + CallTimeout() time.Duration + Workflow() workflowpb.WorkflowServiceClient + Organizations() orgpb.OrganizationServiceClient + Projects() projecthubpb.ProjectServiceClient + Pipelines() pipelinepb.PipelineServiceClient + Jobs() jobpb.JobServiceClient + Loghub() loghubpb.LoghubClient + Loghub2() loghub2pb.Loghub2Client + Users() userpb.UserServiceClient + RBAC() rbacpb.RBACClient +} + +// Manager owns gRPC connections to internal API services and exposes typed clients. +type Manager struct { + cfg Config + + workflowConn *grpc.ClientConn + organizationConn *grpc.ClientConn + projectConn *grpc.ClientConn + pipelineConn *grpc.ClientConn + jobConn *grpc.ClientConn + loghubConn *grpc.ClientConn + loghub2Conn *grpc.ClientConn + userConn *grpc.ClientConn + rbacConn *grpc.ClientConn + + workflowClient workflowpb.WorkflowServiceClient + organizationClient orgpb.OrganizationServiceClient + projectClient projecthubpb.ProjectServiceClient + pipelineClient pipelinepb.PipelineServiceClient + jobClient jobpb.JobServiceClient + loghubClient loghubpb.LoghubClient + loghub2Client loghub2pb.Loghub2Client + userClient userpb.UserServiceClient + rbacClient rbacpb.RBACClient +} + +// NewManager dials the configured services and returns a ready-to-use manager. +func NewManager(ctx context.Context, cfg Config) (*Manager, error) { + m := &Manager{cfg: cfg} + + dial := func(target string) (*grpc.ClientConn, error) { + if target == "" { + return nil, nil + } + + dialCtx, cancel := context.WithTimeout(ctx, cfg.DialTimeout) + defer cancel() + + conn, err := grpc.DialContext( + dialCtx, + target, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions(grpc.WaitForReady(true)), + grpc.WithBlock(), + ) + if err != nil { + return nil, err + } + return conn, nil + } + + var err error + handleDialError := func(service string, dialErr error) error { + if dialErr == nil { + return nil + } + if closeErr := m.Close(); closeErr != nil { + return fmt.Errorf("connect %s service: %w (cleanup failed: %v)", service, dialErr, closeErr) + } + return fmt.Errorf("connect %s service: %w", service, dialErr) + } + if m.workflowConn, err = dial(cfg.WorkflowEndpoint); err != nil { + return nil, fmt.Errorf("connect workflow service: %w", err) + } + if m.organizationConn, err = dial(cfg.OrganizationEndpoint); err != nil { + return nil, handleDialError("organization", err) + } + if m.projectConn, err = dial(cfg.ProjectEndpoint); err != nil { + return nil, handleDialError("project", err) + } + if m.pipelineConn, err = dial(cfg.PipelineEndpoint); err != nil { + return nil, handleDialError("pipeline", err) + } + if m.jobConn, err = dial(cfg.JobEndpoint); err != nil { + return nil, handleDialError("job", err) + } + if m.loghubConn, err = dial(cfg.LoghubEndpoint); err != nil { + return nil, handleDialError("loghub", err) + } + if m.loghub2Conn, err = dial(cfg.Loghub2Endpoint); err != nil { + return nil, handleDialError("loghub2", err) + } + if m.userConn, err = dial(cfg.UserEndpoint); err != nil { + return nil, handleDialError("user", err) + } + if m.rbacConn, err = dial(cfg.RBACEndpoint); err != nil { + return nil, handleDialError("rbac", err) + } + + if m.workflowConn != nil { + m.workflowClient = workflowpb.NewWorkflowServiceClient(m.workflowConn) + } + if m.organizationConn != nil { + m.organizationClient = orgpb.NewOrganizationServiceClient(m.organizationConn) + } + if m.projectConn != nil { + m.projectClient = projecthubpb.NewProjectServiceClient(m.projectConn) + } + if m.pipelineConn != nil { + m.pipelineClient = pipelinepb.NewPipelineServiceClient(m.pipelineConn) + } + if m.jobConn != nil { + m.jobClient = jobpb.NewJobServiceClient(m.jobConn) + } + if m.loghubConn != nil { + m.loghubClient = loghubpb.NewLoghubClient(m.loghubConn) + } + if m.loghub2Conn != nil { + m.loghub2Client = loghub2pb.NewLoghub2Client(m.loghub2Conn) + } + if m.userConn != nil { + m.userClient = userpb.NewUserServiceClient(m.userConn) + } + if m.rbacConn != nil { + m.rbacClient = rbacpb.NewRBACClient(m.rbacConn) + } + + return m, nil +} + +// Close tears down all gRPC connections owned by the manager. +func (m *Manager) Close() error { + var errs []error + closers := []*grpc.ClientConn{ + m.workflowConn, + m.organizationConn, + m.projectConn, + m.pipelineConn, + m.jobConn, + m.loghubConn, + m.loghub2Conn, + m.userConn, + m.rbacConn, + } + for _, conn := range closers { + if conn == nil { + continue + } + if err := conn.Close(); err != nil { + errs = append(errs, err) + } + } + + if len(errs) == 0 { + return nil + } + return joinErrors(errs) +} + +// CallTimeout returns the timeout applied to outbound RPCs. +func (m *Manager) CallTimeout() time.Duration { + return m.cfg.CallTimeout +} + +func (m *Manager) Workflow() workflowpb.WorkflowServiceClient { + return m.workflowClient +} + +func (m *Manager) Organizations() orgpb.OrganizationServiceClient { + return m.organizationClient +} + +func (m *Manager) Projects() projecthubpb.ProjectServiceClient { + return m.projectClient +} + +func (m *Manager) Pipelines() pipelinepb.PipelineServiceClient { + return m.pipelineClient +} + +func (m *Manager) Jobs() jobpb.JobServiceClient { + return m.jobClient +} + +func (m *Manager) Loghub() loghubpb.LoghubClient { + return m.loghubClient +} + +func (m *Manager) Loghub2() loghub2pb.Loghub2Client { + return m.loghub2Client +} + +func (m *Manager) Users() userpb.UserServiceClient { + return m.userClient +} + +func (m *Manager) RBAC() rbacpb.RBACClient { + return m.rbacClient +} + +func joinErrors(errs []error) error { + if len(errs) == 1 { + return errs[0] + } + + msgs := make([]string, 0, len(errs)) + for _, err := range errs { + msgs = append(msgs, err.Error()) + } + return errors.New(strings.Join(msgs, "; ")) +} diff --git a/mcp_server/pkg/internalapi/mock.go b/mcp_server/pkg/internalapi/mock.go new file mode 100644 index 000000000..9e7c26337 --- /dev/null +++ b/mcp_server/pkg/internalapi/mock.go @@ -0,0 +1,56 @@ +package internalapi + +import ( + "time" + + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" + loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" + userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" +) + +// MockProvider is a lightweight Provider implementation intended for tests. +type MockProvider struct { + WorkflowClient workflowpb.WorkflowServiceClient + OrganizationClient orgpb.OrganizationServiceClient + ProjectClient projecthubpb.ProjectServiceClient + PipelineClient pipelinepb.PipelineServiceClient + JobClient jobpb.JobServiceClient + LoghubClient loghubpb.LoghubClient + Loghub2Client loghub2pb.Loghub2Client + UserClient userpb.UserServiceClient + RBACClient rbacpb.RBACClient + Timeout time.Duration +} + +func (m *MockProvider) CallTimeout() time.Duration { + if m.Timeout == 0 { + return time.Second + } + return m.Timeout +} + +func (m *MockProvider) Workflow() workflowpb.WorkflowServiceClient { return m.WorkflowClient } + +func (m *MockProvider) Organizations() orgpb.OrganizationServiceClient { + return m.OrganizationClient +} + +func (m *MockProvider) Projects() projecthubpb.ProjectServiceClient { return m.ProjectClient } + +func (m *MockProvider) Pipelines() pipelinepb.PipelineServiceClient { return m.PipelineClient } + +func (m *MockProvider) Jobs() jobpb.JobServiceClient { return m.JobClient } + +func (m *MockProvider) Loghub() loghubpb.LoghubClient { return m.LoghubClient } + +func (m *MockProvider) Loghub2() loghub2pb.Loghub2Client { return m.Loghub2Client } + +func (m *MockProvider) Users() userpb.UserServiceClient { return m.UserClient } + +func (m *MockProvider) RBAC() rbacpb.RBACClient { return m.RBACClient } diff --git a/mcp_server/pkg/internalapi/stubs/stubs.go b/mcp_server/pkg/internalapi/stubs/stubs.go new file mode 100644 index 000000000..31c6618db --- /dev/null +++ b/mcp_server/pkg/internalapi/stubs/stubs.go @@ -0,0 +1,312 @@ +package stubs + +import ( + "context" + "fmt" + "strings" + "time" + + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" + loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" + statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" + userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + code "google.golang.org/genproto/googleapis/rpc/code" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// New returns an internalapi.Provider backed by deterministic stub responses useful for local development. +func New() internalapi.Provider { + return &provider{ + timeout: time.Second, + workflows: &workflowStub{}, + organizations: &organizationStub{}, + projects: &projectStub{}, + pipelines: &pipelineStub{}, + jobs: &jobStub{}, + loghub: &loghubStub{}, + loghub2: &loghub2Stub{}, + users: &userStub{}, + rbac: &rbacStub{}, + } +} + +type provider struct { + timeout time.Duration + workflows workflowpb.WorkflowServiceClient + organizations orgpb.OrganizationServiceClient + projects projecthubpb.ProjectServiceClient + pipelines pipelinepb.PipelineServiceClient + jobs jobpb.JobServiceClient + loghub loghubpb.LoghubClient + loghub2 loghub2pb.Loghub2Client + users userpb.UserServiceClient + rbac rbacpb.RBACClient +} + +func (p *provider) CallTimeout() time.Duration { return p.timeout } + +func (p *provider) Workflow() workflowpb.WorkflowServiceClient { return p.workflows } + +func (p *provider) Organizations() orgpb.OrganizationServiceClient { return p.organizations } + +func (p *provider) Projects() projecthubpb.ProjectServiceClient { return p.projects } + +func (p *provider) Pipelines() pipelinepb.PipelineServiceClient { return p.pipelines } + +func (p *provider) Jobs() jobpb.JobServiceClient { return p.jobs } + +func (p *provider) Loghub() loghubpb.LoghubClient { return p.loghub } + +func (p *provider) Loghub2() loghub2pb.Loghub2Client { return p.loghub2 } + +func (p *provider) Users() userpb.UserServiceClient { return p.users } + +func (p *provider) RBAC() rbacpb.RBACClient { return p.rbac } + +// --- workflow stub --- + +type workflowStub struct { + workflowpb.WorkflowServiceClient +} + +func (w *workflowStub) ListKeyset(ctx context.Context, in *workflowpb.ListKeysetRequest, opts ...grpc.CallOption) (*workflowpb.ListKeysetResponse, error) { + return &workflowpb.ListKeysetResponse{ + Status: &statuspb.Status{Code: code.Code_OK}, + Workflows: []*workflowpb.WorkflowDetails{ + { + WfId: "wf-local", + InitialPplId: "ppl-local", + ProjectId: orDefault(in.GetProjectId(), "project-local"), + BranchName: "main", + CommitSha: "abcdef0", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + TriggeredBy: workflowpb.TriggeredBy_MANUAL_RUN, + OrganizationId: "org-local", + }, + }, + NextPageToken: "", + }, nil +} + +// --- pipeline stub --- + +type pipelineStub struct { + pipelinepb.PipelineServiceClient +} + +func (p *pipelineStub) ListKeyset(ctx context.Context, in *pipelinepb.ListKeysetRequest, opts ...grpc.CallOption) (*pipelinepb.ListKeysetResponse, error) { + return &pipelinepb.ListKeysetResponse{ + Pipelines: []*pipelinepb.Pipeline{ + { + PplId: "ppl-local", + Name: "Build", + WfId: orDefault(in.GetWfId(), "wf-local"), + ProjectId: orDefault(in.GetProjectId(), "project-local"), + BranchName: "main", + CommitSha: "abcdef0", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + ResultReason: pipelinepb.Pipeline_TEST, + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + Queue: &pipelinepb.Queue{QueueId: "queue-local", Name: "default", Type: pipelinepb.QueueType_IMPLICIT}, + Triggerer: &pipelinepb.Triggerer{PplTriggeredBy: pipelinepb.TriggeredBy_WORKFLOW}, + }, + }, + }, nil +} + +func (p *pipelineStub) Describe(ctx context.Context, in *pipelinepb.DescribeRequest, opts ...grpc.CallOption) (*pipelinepb.DescribeResponse, error) { + return &pipelinepb.DescribeResponse{ + ResponseStatus: &pipelinepb.ResponseStatus{Code: pipelinepb.ResponseStatus_OK}, + Pipeline: &pipelinepb.Pipeline{ + PplId: orDefault(in.GetPplId(), "ppl-local"), + Name: "Build", + ProjectId: "project-local", + WfId: "wf-local", + }, + Blocks: []*pipelinepb.Block{ + { + BlockId: "block-local", + Name: "Tests", + State: pipelinepb.Block_RUNNING, + Result: pipelinepb.Block_PASSED, + ResultReason: pipelinepb.Block_TEST, + Jobs: []*pipelinepb.Block_Job{{ + Name: "job-local", + JobId: "job-local", + }}, + }, + }, + }, nil +} + +// --- job stub --- + +type jobStub struct { + jobpb.JobServiceClient +} + +func (j *jobStub) Describe(ctx context.Context, in *jobpb.DescribeRequest, opts ...grpc.CallOption) (*jobpb.DescribeResponse, error) { + return &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: orDefault(in.GetJobId(), "job-local"), + Name: "Test job", + PplId: "ppl-local", + ProjectId: "project-local", + OrganizationId: "org-local", + Timeline: &jobpb.Job_Timeline{ + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + }, + }, + }, nil +} + +// --- loghub stub --- + +type loghubStub struct { + loghubpb.LoghubClient +} + +func (l *loghubStub) GetLogEvents(ctx context.Context, in *loghubpb.GetLogEventsRequest, opts ...grpc.CallOption) (*loghubpb.GetLogEventsResponse, error) { + return &loghubpb.GetLogEventsResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Events: []string{"starting job", "running tests", "done"}, + Final: true, + }, nil +} + +// --- loghub2 stub --- + +type loghub2Stub struct { + loghub2pb.Loghub2Client +} + +func (l *loghub2Stub) GenerateToken(ctx context.Context, in *loghub2pb.GenerateTokenRequest, opts ...grpc.CallOption) (*loghub2pb.GenerateTokenResponse, error) { + return &loghub2pb.GenerateTokenResponse{Token: "stub-token", Type: loghub2pb.TokenType_PULL}, nil +} + +// --- rbac stub --- + +type rbacStub struct { + rbacpb.RBACClient + orgIDs []string +} + +func (r *rbacStub) ListAccessibleOrgs(ctx context.Context, in *rbacpb.ListAccessibleOrgsRequest, opts ...grpc.CallOption) (*rbacpb.ListAccessibleOrgsResponse, error) { + ids := r.orgIDs + if len(ids) == 0 { + ids = []string{"org-local"} + } + return &rbacpb.ListAccessibleOrgsResponse{OrgIds: ids}, nil +} + +// --- user stub --- + +type userStub struct { + userpb.UserServiceClient +} + +func (u *userStub) DescribeByRepositoryProvider(ctx context.Context, in *userpb.DescribeByRepositoryProviderRequest, opts ...grpc.CallOption) (*userpb.User, error) { + login := "" + if in != nil && in.GetProvider() != nil { + login = strings.TrimSpace(in.GetProvider().GetLogin()) + } + if login == "" { + login = "stub-user" + } + return &userpb.User{Id: fmt.Sprintf("user-%s", login)}, nil +} + +func orDefault(value, fallback string) string { + if value != "" { + return value + } + return fallback +} + +// --- organization stub --- + +type organizationStub struct { + orgpb.OrganizationServiceClient +} + +func (o *organizationStub) List(ctx context.Context, in *orgpb.ListRequest, opts ...grpc.CallOption) (*orgpb.ListResponse, error) { + return &orgpb.ListResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Organizations: []*orgpb.Organization{ + { + OrgId: "org-local", + Name: "Local Org", + OrgUsername: "local-org", + OwnerId: "user-local", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + Verified: true, + }, + }, + NextPageToken: "", + }, nil +} + +func (o *organizationStub) DescribeMany(ctx context.Context, in *orgpb.DescribeManyRequest, opts ...grpc.CallOption) (*orgpb.DescribeManyResponse, error) { + return &orgpb.DescribeManyResponse{ + Organizations: []*orgpb.Organization{ + { + OrgId: "org-local", + Name: "Local Org", + OrgUsername: "local-org", + OwnerId: "user-local", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + Verified: true, + }, + }, + }, nil +} + +// --- project stub --- + +type projectStub struct { + projecthubpb.ProjectServiceClient +} + +func (p *projectStub) List(ctx context.Context, in *projecthubpb.ListRequest, opts ...grpc.CallOption) (*projecthubpb.ListResponse, error) { + return &projecthubpb.ListResponse{ + Metadata: &projecthubpb.ResponseMeta{ + Status: &projecthubpb.ResponseMeta_Status{Code: projecthubpb.ResponseMeta_OK}, + }, + Pagination: &projecthubpb.PaginationResponse{ + PageNumber: in.GetPagination().GetPage(), + PageSize: in.GetPagination().GetPageSize(), + TotalEntries: 1, + TotalPages: 1, + }, + Projects: []*projecthubpb.Project{ + { + Metadata: &projecthubpb.Project_Metadata{ + Id: "project-local", + Name: "Example Project", + OrgId: "org-local", + OwnerId: "user-local", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + }, + Spec: &projecthubpb.Project_Spec{ + Repository: &projecthubpb.Project_Spec_Repository{ + Url: "https://github.com/example/project", + DefaultBranch: "main", + PipelineFile: ".semaphore/semaphore.yml", + }, + }, + }, + }, + }, nil +} diff --git a/mcp_server/pkg/logging/logging.go b/mcp_server/pkg/logging/logging.go new file mode 100644 index 000000000..967a56056 --- /dev/null +++ b/mcp_server/pkg/logging/logging.go @@ -0,0 +1,61 @@ +package logging + +import ( + "os" + "strings" + + "github.com/mark3labs/mcp-go/util" + "github.com/sirupsen/logrus" +) + +var ( + baseLogger = logrus.New() +) + +func init() { + baseLogger.SetOutput(os.Stdout) + baseLogger.SetFormatter(&logrus.JSONFormatter{ + TimestampFormat: "2006-01-02T15:04:05Z07:00", + }) + + level := strings.TrimSpace(os.Getenv("MCP_SERVER_LOG_LEVEL")) + if level == "" { + level = "info" + } + + parsed, err := logrus.ParseLevel(level) + if err != nil { + baseLogger.SetLevel(logrus.InfoLevel) + baseLogger.WithField("invalidLevel", level). + Warn("unsupported MCP_SERVER_LOG_LEVEL, defaulting to info") + return + } + baseLogger.SetLevel(parsed) +} + +// Logger exposes the configured logrus.Logger instance. +func Logger() *logrus.Logger { + return baseLogger +} + +// ForComponent returns an entry bound to a component field. +func ForComponent(component string) *logrus.Entry { + return baseLogger.WithField("component", component) +} + +type streamableLogger struct { + entry *logrus.Entry +} + +// NewStreamableLogger creates a util.Logger backed by logrus for the streamable HTTP server. +func NewStreamableLogger() util.Logger { + return &streamableLogger{entry: ForComponent("streamable_http")} +} + +func (l *streamableLogger) Infof(format string, v ...any) { + l.entry.Infof(format, v...) +} + +func (l *streamableLogger) Errorf(format string, v ...any) { + l.entry.Errorf(format, v...) +} diff --git a/mcp_server/pkg/tools/internal/shared/markdown.go b/mcp_server/pkg/tools/internal/shared/markdown.go new file mode 100644 index 000000000..d47caa284 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/markdown.go @@ -0,0 +1,132 @@ +package shared + +import ( + "fmt" + "strings" +) + +// MarkdownBuilder helps construct consistent Markdown responses. +type MarkdownBuilder struct { + sb strings.Builder +} + +// NewMarkdownBuilder creates a new Markdown builder. +func NewMarkdownBuilder() *MarkdownBuilder { + return &MarkdownBuilder{} +} + +// H1 adds a level-1 heading. +func (mb *MarkdownBuilder) H1(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("# %s\n\n", text)) + return mb +} + +// H2 adds a level-2 heading. +func (mb *MarkdownBuilder) H2(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("## %s\n\n", text)) + return mb +} + +// H3 adds a level-3 heading. +func (mb *MarkdownBuilder) H3(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("### %s\n\n", text)) + return mb +} + +// Paragraph adds a paragraph of text. +func (mb *MarkdownBuilder) Paragraph(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("%s\n\n", text)) + return mb +} + +// ListItem adds a bullet point. +func (mb *MarkdownBuilder) ListItem(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("- %s\n", text)) + return mb +} + +// KeyValue adds a key-value pair as a bullet point. +func (mb *MarkdownBuilder) KeyValue(key, value string) *MarkdownBuilder { + if value == "" { + return mb + } + mb.sb.WriteString(fmt.Sprintf("- **%s**: %s\n", key, value)) + return mb +} + +// Code adds an inline code snippet. +func (mb *MarkdownBuilder) Code(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("`%s`", text)) + return mb +} + +// Bold adds bold text inline. +func (mb *MarkdownBuilder) Bold(text string) *MarkdownBuilder { + mb.sb.WriteString(fmt.Sprintf("**%s**", text)) + return mb +} + +// Line adds a horizontal rule. +func (mb *MarkdownBuilder) Line() *MarkdownBuilder { + mb.sb.WriteString("---\n\n") + return mb +} + +// Newline adds a blank line. +func (mb *MarkdownBuilder) Newline() *MarkdownBuilder { + mb.sb.WriteString("\n") + return mb +} + +// Raw adds raw content without formatting. +func (mb *MarkdownBuilder) Raw(text string) *MarkdownBuilder { + mb.sb.WriteString(text) + return mb +} + +// String returns the final Markdown content. +func (mb *MarkdownBuilder) String() string { + return mb.sb.String() +} + +// EmptyMessage returns a formatted "no results" message. +func EmptyMessage(entityType string) string { + return fmt.Sprintf("No %s found.\n", entityType) +} + +// PaginationHint returns a formatted pagination hint. +func PaginationHint(cursor, field string) string { + if cursor == "" { + return "" + } + return fmt.Sprintf("\n---\n\n📄 **More results available**. Use `%s=\"%s\"` to fetch the next page.\n", field, cursor) +} + +// StatusIcon returns an appropriate emoji for a status. +func StatusIcon(status string) string { + status = strings.ToLower(status) + switch status { + case "passed", "success", "ok": + return "✅" + case "failed", "failure", "error": + return "❌" + case "running", "in_progress": + return "🔄" + case "stopped", "canceled": + return "⛔" + case "queued", "pending": + return "⏳" + case "warning": + return "⚠️" + default: + return "•" + } +} + +// FormatBoolean returns a user-friendly boolean representation. +func FormatBoolean(value bool, trueText, falseText string) string { + if value { + return trueText + } + return falseText +} diff --git a/mcp_server/pkg/tools/internal/shared/numeric.go b/mcp_server/pkg/tools/internal/shared/numeric.go new file mode 100644 index 000000000..98dd01f44 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/numeric.go @@ -0,0 +1,14 @@ +package shared + +import ( + "fmt" + "math" +) + +// IntToInt32 safely converts an int to int32 ensuring the value is within bounds. +func IntToInt32(value int, fieldName string) (int32, error) { + if value > int(math.MaxInt32) || value < int(math.MinInt32) { + return 0, fmt.Errorf("%s must be between %d and %d", fieldName, math.MinInt32, math.MaxInt32) + } + return int32(value), nil +} diff --git a/mcp_server/pkg/tools/internal/shared/shared.go b/mcp_server/pkg/tools/internal/shared/shared.go new file mode 100644 index 000000000..9eb2a1331 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/shared.go @@ -0,0 +1,63 @@ +package shared + +import ( + "fmt" + "strings" + "time" + + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" + "google.golang.org/genproto/googleapis/rpc/code" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// FormatTimestamp renders a protobuf timestamp as RFC3339. Returns an empty string when nil or zero. +func FormatTimestamp(ts *timestamppb.Timestamp) string { + if ts == nil { + return "" + } + + t := ts.AsTime().UTC().Round(time.Second) + if t.IsZero() { + return "" + } + return t.Format(time.RFC3339) +} + +// CheckStatus validates an InternalApi.Status payload. +func CheckStatus(st *statuspb.Status) error { + if st == nil { + return fmt.Errorf("missing status in response") + } + if st.GetCode() != code.Code_OK { + return fmt.Errorf("request failed: %s", strings.TrimSpace(st.GetMessage())) + } + return nil +} + +// CheckResponseStatus validates an InternalApi.ResponseStatus payload. +func CheckResponseStatus(st *responsepb.ResponseStatus) error { + if st == nil { + return fmt.Errorf("missing response status") + } + if st.GetCode() != responsepb.ResponseStatus_OK { + return fmt.Errorf("request failed: %s", strings.TrimSpace(st.GetMessage())) + } + return nil +} + +// CheckProjectResponseMeta validates a Projecthub ResponseMeta payload. +func CheckProjectResponseMeta(meta *projecthubpb.ResponseMeta) error { + if meta == nil { + return fmt.Errorf("missing response metadata") + } + status := meta.GetStatus() + if status == nil { + return fmt.Errorf("missing status in response metadata") + } + if status.GetCode() != projecthubpb.ResponseMeta_OK { + return fmt.Errorf("request failed: %s", strings.TrimSpace(status.GetMessage())) + } + return nil +} diff --git a/mcp_server/pkg/tools/internal/shared/truncate.go b/mcp_server/pkg/tools/internal/shared/truncate.go new file mode 100644 index 000000000..d5ea2685b --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/truncate.go @@ -0,0 +1,45 @@ +package shared + +import "strings" + +const ( + // MaxResponseChars is the maximum number of characters in any tool response. + MaxResponseChars = 25000 + + // TruncationWarningChars is the threshold at which we warn about truncation. + TruncationWarningChars = 20000 + + // TruncationSuffix is appended to truncated responses. + TruncationSuffix = "\n\n---\n\n⚠️ **Response truncated** - Output exceeded character limit. Use pagination to see more results." +) + +// TruncateResponse ensures a response doesn't exceed maximum character limits. +// It attempts to truncate at a line boundary for cleaner results. +func TruncateResponse(content string, maxChars int) string { + if len(content) <= maxChars { + return content + } + + // Calculate available space after suffix + available := maxChars - len(TruncationSuffix) + if available < 1000 { + available = 1000 // Minimum viable truncation + } + + truncated := content[:available] + + // Try to truncate at a line boundary for cleaner output + if idx := strings.LastIndex(truncated, "\n"); idx > available-1000 { + truncated = truncated[:idx] + } + + return truncated + TruncationSuffix +} + +// TruncateList truncates a slice of items if it would exceed reasonable display limits. +func TruncateList(items []string, maxItems int) ([]string, bool) { + if len(items) <= maxItems { + return items, false + } + return items[:maxItems], true +} diff --git a/mcp_server/pkg/tools/internal/shared/validation.go b/mcp_server/pkg/tools/internal/shared/validation.go new file mode 100644 index 000000000..80beeb2c0 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/validation.go @@ -0,0 +1,53 @@ +package shared + +import ( + "fmt" + "regexp" + "strings" +) + +var ( + uuidPattern = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`) +) + +// ValidateUUID ensures a string is a valid UUID format. +func ValidateUUID(value, fieldName string) error { + value = strings.ToLower(strings.TrimSpace(value)) + if value == "" { + return fmt.Errorf("%s is required", fieldName) + } + if !uuidPattern.MatchString(value) { + return fmt.Errorf("%s must be a valid UUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), got: %s", fieldName, value) + } + return nil +} + +// ValidateEnum ensures a value is one of the allowed options. +func ValidateEnum(value string, allowed []string, fieldName string) error { + value = strings.ToLower(strings.TrimSpace(value)) + if value == "" && len(allowed) > 0 { + return fmt.Errorf("%s must be one of: %v", fieldName, allowed) + } + + for _, v := range allowed { + if value == strings.ToLower(v) { + return nil + } + } + + return fmt.Errorf("%s must be one of %v, got: %s", fieldName, allowed, value) +} + +// NormalizeMode validates and normalizes mode parameter (summary/detailed). +func NormalizeMode(mode string) (string, error) { + mode = strings.ToLower(strings.TrimSpace(mode)) + if mode == "" { + return "summary", nil + } + + if err := ValidateEnum(mode, []string{"summary", "detailed"}, "mode"); err != nil { + return "", err + } + + return mode, nil +} diff --git a/mcp_server/pkg/tools/jobs/describe.go b/mcp_server/pkg/tools/jobs/describe.go new file mode 100644 index 000000000..72db3af05 --- /dev/null +++ b/mcp_server/pkg/tools/jobs/describe.go @@ -0,0 +1,123 @@ +package jobs + +import ( + "context" + "fmt" + "strings" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + describeToolName = "jobs_describe" +) + +func describeFullDescription() string { + return `Describe a Semaphore job by ID. + +Use this tool to answer: +- “What happened to job X?” +- “Which agent ran this job and when?” +- “Was the job a debug session or self-hosted run?” + +Response modes: +- summary (default): high-level status, result, pipeline and project references, debug flags, key timestamps. +- detailed: includes agent metadata, machine specs, hook/branch IDs, and a full timeline of state transitions. + +Examples: +1. Get basic job status: + jobs_describe(job_id="...", organization_id="...") + +2. Get detailed job information with agent metadata: + jobs_describe(job_id="...", organization_id="...", mode="detailed") + +3. Check job result and timestamps: + jobs_describe(job_id="...", organization_id="...", mode="summary") + +Typical workflow: +1. Call jobs_describe(job_id="...") to retrieve status and timelines. +2. If the job failed, call jobs_logs(job_id="...") to stream logs. +3. Use pipelines_list(workflow_id="...") to inspect the broader pipeline context. +` +} + +func newDescribeTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString( + "organization_id", + mcp.Required(), + mcp.Description("Organization UUID context for this job (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Use the ID returned by semaphore_organizations_list."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "job_id", + mcp.Required(), + mcp.Description("Job UUID to describe (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "mode", + mcp.Description("Response detail level. Use 'summary' for a concise view or 'detailed' for agent metadata and full timeline."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +func describeHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError("organization_id is required. Use organizations_list to capture the correct organization ID before describing jobs."), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + jobIDRaw, err := req.RequireString("job_id") + if err != nil { + return mcp.NewToolResultError("job_id is required. Provide the job UUID (e.g., 11111111-2222-3333-4444-555555555555)."), nil + } + + jobID := strings.TrimSpace(jobIDRaw) + if err := shared.ValidateUUID(jobID, "job_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil + } + + job, err := fetchJob(ctx, api, jobID) + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + summary := summarizeJob(job) + if summary.OrganizationID != "" && !strings.EqualFold(summary.OrganizationID, orgID) { + return mcp.NewToolResultError(fmt.Sprintf(`Organization mismatch: job belongs to %s but you provided %s. + +Use the organization_id returned by organizations_list for this workspace.`, summary.OrganizationID, orgID)), nil + } + markdown := formatJobMarkdown(summary, mode) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: summary, + }, nil + } +} diff --git a/mcp_server/pkg/tools/jobs/helpers.go b/mcp_server/pkg/tools/jobs/helpers.go new file mode 100644 index 000000000..9fc0600bb --- /dev/null +++ b/mcp_server/pkg/tools/jobs/helpers.go @@ -0,0 +1,258 @@ +package jobs + +import ( + "context" + "fmt" + "strings" + + "github.com/sirupsen/logrus" + + jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +func fetchJob(ctx context.Context, api internalapi.Provider, jobID string) (*jobpb.Job, error) { + client := api.Jobs() + if client == nil { + return nil, fmt.Errorf("job gRPC endpoint is not configured") + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.Describe(callCtx, &jobpb.DescribeRequest{JobId: jobID}) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "jobs.Describe", + "jobId": jobID, + }). + WithError(err). + Error("gRPC call failed") + return nil, fmt.Errorf("describe job RPC failed: %w", err) + } + + if err := shared.CheckResponseStatus(resp.GetStatus()); err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "jobs.Describe", + "jobId": jobID, + }). + WithError(err). + Warn("describe job returned non-OK status") + return nil, err + } + + job := resp.GetJob() + if job == nil { + return nil, fmt.Errorf("describe job returned no job payload") + } + + return job, nil +} + +func jobStateToString(state jobpb.Job_State) string { + if name, ok := jobpb.Job_State_name[int32(state)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} + +func jobResultToString(result jobpb.Job_Result) string { + if name, ok := jobpb.Job_Result_name[int32(result)]; ok { + return strings.ToLower(name) + } + return "unknown" +} + +type jobSummary struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + PipelineID string `json:"pipelineId,omitempty"` + BuildRequestID string `json:"buildRequestId,omitempty"` + ProjectID string `json:"projectId,omitempty"` + OrganizationID string `json:"organizationId,omitempty"` + BranchID string `json:"branchId,omitempty"` + HookID string `json:"hookId,omitempty"` + State string `json:"state,omitempty"` + Result string `json:"result,omitempty"` + FailureReason string `json:"failureReason,omitempty"` + MachineType string `json:"machineType,omitempty"` + MachineImage string `json:"machineImage,omitempty"` + AgentHost string `json:"agentHost,omitempty"` + AgentName string `json:"agentName,omitempty"` + AgentID string `json:"agentId,omitempty"` + Priority int32 `json:"priority,omitempty"` + IsDebugJob bool `json:"debugJob"` + DebugUserID string `json:"debugUserId,omitempty"` + SelfHosted bool `json:"selfHosted"` + Timeline timelineSummary `json:"timeline"` +} + +type timelineSummary struct { + CreatedAt string `json:"createdAt,omitempty"` + EnqueuedAt string `json:"enqueuedAt,omitempty"` + StartedAt string `json:"startedAt,omitempty"` + FinishedAt string `json:"finishedAt,omitempty"` + ExecutionStartedAt string `json:"executionStartedAt,omitempty"` + ExecutionFinishedAt string `json:"executionFinishedAt,omitempty"` +} + +func summarizeJob(job *jobpb.Job) jobSummary { + var timeline timelineSummary + if job.GetTimeline() != nil { + tl := job.GetTimeline() + timeline = timelineSummary{ + CreatedAt: shared.FormatTimestamp(tl.GetCreatedAt()), + EnqueuedAt: shared.FormatTimestamp(tl.GetEnqueuedAt()), + StartedAt: shared.FormatTimestamp(tl.GetStartedAt()), + FinishedAt: shared.FormatTimestamp(tl.GetFinishedAt()), + ExecutionStartedAt: shared.FormatTimestamp(tl.GetExecutionStartedAt()), + ExecutionFinishedAt: shared.FormatTimestamp(tl.GetExecutionFinishedAt()), + } + } + + return jobSummary{ + ID: job.GetId(), + Name: job.GetName(), + PipelineID: job.GetPplId(), + BuildRequestID: job.GetBuildReqId(), + ProjectID: job.GetProjectId(), + OrganizationID: job.GetOrganizationId(), + BranchID: job.GetBranchId(), + HookID: job.GetHookId(), + State: jobStateToString(job.GetState()), + Result: jobResultToString(job.GetResult()), + FailureReason: strings.TrimSpace(job.GetFailureReason()), + MachineType: job.GetMachineType(), + MachineImage: job.GetMachineOsImage(), + AgentHost: job.GetAgentHost(), + AgentName: job.GetAgentName(), + AgentID: job.GetAgentId(), + Priority: job.GetPriority(), + IsDebugJob: job.GetIsDebugJob(), + DebugUserID: job.GetDebugUserId(), + SelfHosted: job.GetSelfHosted(), + Timeline: timeline, + } +} + +func formatJobMarkdown(summary jobSummary, mode string) string { + mb := shared.NewMarkdownBuilder() + + title := summary.Name + if strings.TrimSpace(title) == "" { + title = fmt.Sprintf("Job %s", summary.ID) + } else { + title = fmt.Sprintf("%s (%s)", summary.Name, summary.ID) + } + mb.H1(title) + + mb.KeyValue("Job ID", fmt.Sprintf("`%s`", summary.ID)) + if summary.PipelineID != "" { + mb.KeyValue("Pipeline ID", fmt.Sprintf("`%s`", summary.PipelineID)) + } + if summary.ProjectID != "" { + mb.KeyValue("Project ID", fmt.Sprintf("`%s`", summary.ProjectID)) + } + if summary.OrganizationID != "" { + mb.KeyValue("Organization ID", fmt.Sprintf("`%s`", summary.OrganizationID)) + } + if summary.BranchID != "" { + mb.KeyValue("Branch ID", fmt.Sprintf("`%s`", summary.BranchID)) + } + if summary.HookID != "" { + mb.KeyValue("Hook ID", fmt.Sprintf("`%s`", summary.HookID)) + } + + resultDisplay := strings.TrimSpace(summary.Result) + if resultDisplay != "" { + mb.KeyValue("Result", fmt.Sprintf("%s %s", shared.StatusIcon(resultDisplay), titleCase(resultDisplay))) + } + if summary.State != "" { + mb.KeyValue("State", titleCase(summary.State)) + } + + mb.KeyValue("Self-hosted", shared.FormatBoolean(summary.SelfHosted, "Yes", "No")) + if summary.IsDebugJob { + mb.ListItem("🛠 Debug job") + } + if summary.DebugUserID != "" { + mb.KeyValue("Debug user ID", fmt.Sprintf("`%s`", summary.DebugUserID)) + } + + if summary.FailureReason != "" { + mb.Paragraph(fmt.Sprintf("⚠️ **Failure reason**: %s", summary.FailureReason)) + } + + mb.Newline() + mb.H2("Timeline") + appendTimeline(mb, summary.Timeline) + + if mode == "detailed" { + mb.Line() + mb.H2("Agent & Machine") + if summary.MachineType != "" { + mb.KeyValue("Machine Type", summary.MachineType) + } + if summary.MachineImage != "" { + mb.KeyValue("Machine Image", summary.MachineImage) + } + if summary.AgentName != "" { + mb.KeyValue("Agent Name", summary.AgentName) + } + if summary.AgentHost != "" { + mb.KeyValue("Agent Host", summary.AgentHost) + } + if summary.AgentID != "" { + mb.KeyValue("Agent ID", fmt.Sprintf("`%s`", summary.AgentID)) + } + mb.KeyValue("Priority", fmt.Sprintf("%d", summary.Priority)) + } + + mb.Line() + + return mb.String() +} + +func appendTimeline(mb *shared.MarkdownBuilder, timeline timelineSummary) { + if timeline == (timelineSummary{}) { + mb.Paragraph("No timeline information reported.") + return + } + if timeline.CreatedAt != "" { + mb.KeyValue("Created", timeline.CreatedAt) + } + if timeline.EnqueuedAt != "" { + mb.KeyValue("Enqueued", timeline.EnqueuedAt) + } + if timeline.StartedAt != "" { + mb.KeyValue("Started", timeline.StartedAt) + } + if timeline.ExecutionStartedAt != "" { + mb.KeyValue("Execution Started", timeline.ExecutionStartedAt) + } + if timeline.ExecutionFinishedAt != "" { + mb.KeyValue("Execution Finished", timeline.ExecutionFinishedAt) + } + if timeline.FinishedAt != "" { + mb.KeyValue("Finished", timeline.FinishedAt) + } +} + +func titleCase(value string) string { + value = strings.TrimSpace(strings.ToLower(value)) + if value == "" { + return "" + } + parts := strings.Split(value, "_") + for i, part := range parts { + if part == "" { + continue + } + parts[i] = strings.ToUpper(part[:1]) + part[1:] + } + return strings.Join(parts, " ") +} diff --git a/mcp_server/pkg/tools/jobs/jobs_test.go b/mcp_server/pkg/tools/jobs/jobs_test.go new file mode 100644 index 000000000..9030a0892 --- /dev/null +++ b/mcp_server/pkg/tools/jobs/jobs_test.go @@ -0,0 +1,241 @@ +package jobs + +import ( + "context" + "testing" + "time" + + "github.com/mark3labs/mcp-go/mcp" + + loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" + loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" + jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestDescribeJob(t *testing.T) { + jobID := "11111111-2222-3333-4444-555555555555" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + Name: "Build", + PplId: "ppl-1", + ProjectId: "proj-1", + OrganizationId: orgID, + FailureReason: "", + Timeline: &jobpb.Job_Timeline{ + CreatedAt: timestamppb.New(time.Unix(1700000000, 0)), + }, + }, + }, + } + + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second} + handler := describeHandler(provider) + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(jobSummary) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + + if result.ID != jobID || result.PipelineID != "ppl-1" { + toFail(t, "unexpected job summary: %+v", result) + } +} + +func TestFetchHostedLogs(t *testing.T) { + jobID := "99999999-aaaa-bbbb-cccc-dddddddddddd" + jobClient := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{Id: jobID, SelfHosted: false}, + }, + } + loghubClient := &loghubClientStub{ + resp: &loghubpb.GetLogEventsResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Events: []string{"line1", "line2"}, + Final: false, + }, + } + + provider := &internalapi.MockProvider{ + JobClient: jobClient, + LoghubClient: loghubClient, + Timeout: time.Second, + } + + handler := logsHandler(provider) + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "job_id": jobID, + "cursor": "5", + }}} + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(logsResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + + if result.Source != loghubSource || result.NextCursor != "7" || len(result.Preview) != 2 { + toFail(t, "unexpected log result: %+v", result) + } + + if loghubClient.lastRequest == nil || loghubClient.lastRequest.GetStartingLine() != 5 { + toFail(t, "unexpected loghub request: %+v", loghubClient.lastRequest) + } +} + +func TestFetchSelfHostedLogs(t *testing.T) { + jobID := "88888888-7777-6666-5555-444444444444" + jobClient := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{Id: jobID, SelfHosted: true}, + }, + } + loghub2Client := &loghub2ClientStub{ + resp: &loghub2pb.GenerateTokenResponse{Token: "token", Type: loghub2pb.TokenType_PULL}, + } + + provider := &internalapi.MockProvider{ + JobClient: jobClient, + Loghub2Client: loghub2Client, + Timeout: time.Second, + } + + handler := logsHandler(provider) + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "job_id": jobID, + }}} + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(logsResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + + if result.Source != loghub2Source || result.Token != "token" || result.TokenTtlSeconds != loghub2TokenDuration { + toFail(t, "unexpected loghub2 response: %+v", result) + } + + if loghub2Client.lastRequest == nil || loghub2Client.lastRequest.GetJobId() != jobID { + toFail(t, "unexpected loghub2 request: %+v", loghub2Client.lastRequest) + } +} + +type jobClientStub struct { + jobpb.JobServiceClient + describeResp *jobpb.DescribeResponse + describeErr error + lastDescribe *jobpb.DescribeRequest +} + +func (s *jobClientStub) Describe(ctx context.Context, in *jobpb.DescribeRequest, opts ...grpc.CallOption) (*jobpb.DescribeResponse, error) { + s.lastDescribe = in + if s.describeErr != nil { + return nil, s.describeErr + } + return s.describeResp, nil +} + +func (s *jobClientStub) List(context.Context, *jobpb.ListRequest, ...grpc.CallOption) (*jobpb.ListResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) ListDebugSessions(context.Context, *jobpb.ListDebugSessionsRequest, ...grpc.CallOption) (*jobpb.ListDebugSessionsResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) Count(context.Context, *jobpb.CountRequest, ...grpc.CallOption) (*jobpb.CountResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) CountByState(context.Context, *jobpb.CountByStateRequest, ...grpc.CallOption) (*jobpb.CountByStateResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) Stop(context.Context, *jobpb.StopRequest, ...grpc.CallOption) (*jobpb.StopResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) TotalExecutionTime(context.Context, *jobpb.TotalExecutionTimeRequest, ...grpc.CallOption) (*jobpb.TotalExecutionTimeResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) GetAgentPayload(context.Context, *jobpb.GetAgentPayloadRequest, ...grpc.CallOption) (*jobpb.GetAgentPayloadResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) CanDebug(context.Context, *jobpb.CanDebugRequest, ...grpc.CallOption) (*jobpb.CanDebugResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) CanAttach(context.Context, *jobpb.CanAttachRequest, ...grpc.CallOption) (*jobpb.CanAttachResponse, error) { + panic("not implemented") +} + +func (s *jobClientStub) Create(context.Context, *jobpb.CreateRequest, ...grpc.CallOption) (*jobpb.CreateResponse, error) { + panic("not implemented") +} + +type loghubClientStub struct { + loghubpb.LoghubClient + resp *loghubpb.GetLogEventsResponse + err error + lastRequest *loghubpb.GetLogEventsRequest +} + +func (s *loghubClientStub) GetLogEvents(ctx context.Context, in *loghubpb.GetLogEventsRequest, opts ...grpc.CallOption) (*loghubpb.GetLogEventsResponse, error) { + s.lastRequest = in + if s.err != nil { + return nil, s.err + } + return s.resp, nil +} + +type loghub2ClientStub struct { + loghub2pb.Loghub2Client + resp *loghub2pb.GenerateTokenResponse + err error + lastRequest *loghub2pb.GenerateTokenRequest +} + +func (s *loghub2ClientStub) GenerateToken(ctx context.Context, in *loghub2pb.GenerateTokenRequest, opts ...grpc.CallOption) (*loghub2pb.GenerateTokenResponse, error) { + s.lastRequest = in + if s.err != nil { + return nil, s.err + } + return s.resp, nil +} + +func toFail(t *testing.T, format string, args ...any) { + t.Helper() + t.Fatalf(format, args...) +} diff --git a/mcp_server/pkg/tools/jobs/logs.go b/mcp_server/pkg/tools/jobs/logs.go new file mode 100644 index 000000000..cf30e6123 --- /dev/null +++ b/mcp_server/pkg/tools/jobs/logs.go @@ -0,0 +1,337 @@ +package jobs + +import ( + "context" + "fmt" + "strconv" + "strings" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + "github.com/sirupsen/logrus" + + loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" + loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + logsToolName = "jobs_logs" + loghubSource = "loghub" + loghub2Source = "loghub2" + loghub2TokenDuration = 300 + maxLogPreviewLines = 200 + errLoghubMissing = "loghub gRPC endpoint is not configured" + errLoghub2Missing = "loghub2 gRPC endpoint is not configured" +) + +func logsFullDescription() string { + return `Fetch recent log output for a job. + +Use this after jobs_describe indicates a failure or long-running job. + +Outputs: +- Hosted jobs: returns a preview of the most recent log lines (up to 200) and a nextCursor for pagination. +- Self-hosted jobs: returns a temporary log token (300s TTL) and instructions for downloading full logs. + +Examples: +1. Fetch latest job logs: + jobs_logs(job_id="...", organization_id="...") + +2. Paginate through more logs: + jobs_logs(job_id="...", organization_id="...", cursor="next-page-token") + +3. Get logs for self-hosted job: + jobs_logs(job_id="...", organization_id="...") + +Typical workflow: +1. jobs_describe(job_id="...") → identify failing job +2. jobs_logs(job_id="...") → view latest log lines +3. If more logs needed, call again with cursor from the previous response. +4. For self-hosted jobs, use the returned token in a follow-up HTTPS request. +` +} + +type logsResult struct { + JobID string `json:"jobId"` + Source string `json:"source"` + Preview []string `json:"preview,omitempty"` + NextCursor string `json:"nextCursor,omitempty"` + Final bool `json:"final,omitempty"` + StartLine int `json:"startLine,omitempty"` + PreviewTruncated bool `json:"previewTruncated,omitempty"` + Token string `json:"token,omitempty"` + TokenType string `json:"tokenType,omitempty"` + TokenTtlSeconds uint32 `json:"tokenTtlSeconds,omitempty"` +} + +func newLogsTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString( + "organization_id", + mcp.Required(), + mcp.Description("Organization UUID associated with the job. Cache this value after calling semaphore_organizations_list."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "job_id", + mcp.Required(), + mcp.Description("Job UUID to fetch logs for (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "cursor", + mcp.Description("Pagination cursor returned by a previous call’s nextCursor. Omit to start from the latest logs."), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +func logsHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError("organization_id is required. Provide the organization UUID returned by organizations_list."), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + jobIDRaw, err := req.RequireString("job_id") + if err != nil { + return mcp.NewToolResultError("job_id is required. Provide the job UUID shown by jobs_describe."), nil + } + + jobID := strings.TrimSpace(jobIDRaw) + if err := shared.ValidateUUID(jobID, "job_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + cursor := strings.TrimSpace(req.GetString("cursor", "")) + startingLine, err := parseCursor(cursor) + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + job, err := fetchJob(ctx, api, jobID) + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + if job.GetOrganizationId() != "" && !strings.EqualFold(job.GetOrganizationId(), orgID) { + return mcp.NewToolResultError(fmt.Sprintf(`Organization mismatch: job belongs to %s but you provided %s. + +Retrieve the correct organization ID from organizations_list before fetching logs.`, job.GetOrganizationId(), orgID)), nil + } + + if job.GetSelfHosted() { + return fetchSelfHostedLogs(ctx, api, jobID) + } + return fetchHostedLogs(ctx, api, jobID, startingLine) + } +} + +func parseCursor(cursor string) (int, error) { + if cursor == "" { + return 0, nil + } + value, err := strconv.Atoi(cursor) + if err != nil || value < 0 { + return 0, fmt.Errorf("cursor must be a non-negative integer produced by the previous response (got %q)", cursor) + } + return value, nil +} + +func fetchHostedLogs(ctx context.Context, api internalapi.Provider, jobID string, startingLine int) (*mcp.CallToolResult, error) { + client := api.Loghub() + if client == nil { + return mcp.NewToolResultError(errLoghubMissing), nil + } + + request := &loghubpb.GetLogEventsRequest{JobId: jobID} + if startingLine > 0 { + offset, err := shared.IntToInt32(startingLine, "cursor offset") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + request.StartingLine = offset + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.GetLogEvents(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "loghub.GetLogEvents", + "jobId": jobID, + }). + WithError(err). + Error("gRPC call failed") + return mcp.NewToolResultError(fmt.Sprintf("loghub RPC failed: %v", err)), nil + } + + if err := shared.CheckResponseStatus(resp.GetStatus()); err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "loghub.GetLogEvents", + "jobId": jobID, + }). + WithError(err). + Warn("loghub returned non-OK status") + return mcp.NewToolResultError(err.Error()), nil + } + + events := append([]string(nil), resp.GetEvents()...) + displayEvents := events + truncated := false + if len(events) > maxLogPreviewLines { + displayEvents, truncated = shared.TruncateList(events, maxLogPreviewLines) + } + + result := logsResult{ + JobID: jobID, + Source: loghubSource, + Preview: displayEvents, + Final: resp.GetFinal(), + StartLine: startingLine, + PreviewTruncated: truncated, + } + + if !resp.GetFinal() && len(events) > 0 { + next := startingLine + len(events) + result.NextCursor = strconv.Itoa(next) + } + + markdown := formatHostedLogsMarkdown(result) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil +} + +func fetchSelfHostedLogs(ctx context.Context, api internalapi.Provider, jobID string) (*mcp.CallToolResult, error) { + client := api.Loghub2() + if client == nil { + return mcp.NewToolResultError(errLoghub2Missing), nil + } + + request := &loghub2pb.GenerateTokenRequest{ + JobId: jobID, + Type: loghub2pb.TokenType_PULL, + Duration: loghub2TokenDuration, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.GenerateToken(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "loghub2.GenerateToken", + "jobId": jobID, + }). + WithError(err). + Error("gRPC call failed") + return mcp.NewToolResultError(fmt.Sprintf("loghub2 RPC failed: %v", err)), nil + } + + result := logsResult{ + JobID: jobID, + Source: loghub2Source, + Token: resp.GetToken(), + TokenType: tokenTypeToString(resp.GetType()), + TokenTtlSeconds: loghub2TokenDuration, + } + + markdown := formatSelfHostedLogsMarkdown(result) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil +} + +func formatHostedLogsMarkdown(result logsResult) string { + mb := shared.NewMarkdownBuilder() + + mb.H1(fmt.Sprintf("Hosted Logs Preview for Job %s", result.JobID)) + + if len(result.Preview) == 0 { + mb.Paragraph("No log lines were returned. The job may not have produced output yet, or all logs have been consumed.") + } else { + start := result.StartLine + end := result.StartLine + len(result.Preview) - 1 + if start <= 0 { + start = 0 + } + + mb.Paragraph(fmt.Sprintf("Showing log lines %d-%d (newest first).", start, end)) + mb.Raw("```\n") + mb.Raw(strings.Join(result.Preview, "\n")) + mb.Raw("\n```\n") + + if result.PreviewTruncated { + mb.Paragraph(fmt.Sprintf("⚠️ Preview truncated to the most recent %d lines. Use pagination to retrieve the full log.", maxLogPreviewLines)) + } + } + + if result.Final { + mb.Paragraph("✅ This job reported final logs. No additional pages are available.") + } else if result.NextCursor != "" { + mb.Paragraph(fmt.Sprintf("📄 **More available**. Use `cursor=\"%s\"`", result.NextCursor)) + } else { + mb.Paragraph("ℹ️ Logs are still streaming. Retry shortly for additional output.") + } + + mb.Line() + + return mb.String() +} + +func formatSelfHostedLogsMarkdown(result logsResult) string { + mb := shared.NewMarkdownBuilder() + + mb.H1(fmt.Sprintf("Self-Hosted Logs for Job %s", result.JobID)) + mb.Paragraph("This job ran on a self-hosted agent. Logs are available via a short-lived token.") + + mb.KeyValue("Token Type", strings.ToUpper(result.TokenType)) + mb.KeyValue("Expires In", fmt.Sprintf("%d seconds", result.TokenTtlSeconds)) + + if result.Token != "" { + mb.Paragraph("Use the following JWT within the TTL to stream logs:") + mb.Raw("```\n") + mb.Raw(result.Token) + mb.Raw("\n```\n") + mb.Paragraph("Example:\n`curl \"https:///api/v1/logs/" + result.JobID + "?jwt=\"`\n") + } else { + mb.Paragraph("⚠️ No token was returned. Retry the request or contact support if the problem persists.") + } + + mb.Line() + mb.Paragraph("Remember to rotate tokens promptly and never store them in persistent logs.") + + return mb.String() +} + +func tokenTypeToString(tokenType loghub2pb.TokenType) string { + if name, ok := loghub2pb.TokenType_name[int32(tokenType)]; ok { + return strings.ToLower(name) + } + return "unknown" +} diff --git a/mcp_server/pkg/tools/jobs/register.go b/mcp_server/pkg/tools/jobs/register.go new file mode 100644 index 000000000..8ef652b0a --- /dev/null +++ b/mcp_server/pkg/tools/jobs/register.go @@ -0,0 +1,16 @@ +package jobs + +import ( + "github.com/mark3labs/mcp-go/server" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" +) + +// Register wires job-related tools into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + descH := describeHandler(api) + s.AddTool(newDescribeTool(describeToolName, describeFullDescription()), descH) + + logsH := logsHandler(api) + s.AddTool(newLogsTool(logsToolName, logsFullDescription()), logsH) +} diff --git a/mcp_server/pkg/tools/organizations/organizations.go b/mcp_server/pkg/tools/organizations/organizations.go new file mode 100644 index 000000000..69ec34362 --- /dev/null +++ b/mcp_server/pkg/tools/organizations/organizations.go @@ -0,0 +1,559 @@ +package organizations + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "sort" + "strconv" + "strings" + "time" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + "github.com/sirupsen/logrus" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + listToolName = "organizations_list" + defaultPageSize = 20 + maxPageSize = 100 +) + +func fullDescription() string { + return `List organizations available to the authenticated user. + +This tool retrieves all organizations the user can access. The caller's user ID is derived from the X-Semaphore-User-ID header that the authentication layer injects into every request, so no additional arguments are required to identify the caller. + +Use this as the first step when users ask questions like: +- "Show me my organizations" +- "Which orgs can I access?" +- "List all my projects" (first get orgs, then list projects) + +Response Modes: +- summary (default): Name, ID, username, creation date, verification status +- detailed: Includes IP allowlists, identity provider settings, workflow restrictions, and all organization settings + +Pagination: +- Default page size: 20 organizations +- Maximum page size: 100 organizations +- Use 'cursor' from the previous response's 'nextCursor' field to fetch the next page +- Empty/omitted cursor starts from the beginning + +Common Usage Patterns: +1. List all accessible orgs → Pick one → Call projects_list(organization_id="...") +2. List orgs → Filter by name in application code → Use selected org_id + +Examples: +1. List first 10 organizations: + organizations_list(limit=10, mode="summary") + +2. Paginate through all organizations: + organizations_list(cursor="opaque-cursor-from-previous-response", limit=50) + +3. Get detailed org information with IP allowlists: + organizations_list(mode="detailed", limit=5) + +4. Fetch specific page of organizations: + organizations_list(limit=20, cursor="next-page-token") + +Common Errors: +- Empty list: User may not belong to any organizations (check authentication) +- RPC failed: Organization service temporarily unavailable (retry after a few seconds) +- Missing header: Ensure the authentication proxy forwards X-Semaphore-User-ID + +Next Steps After This Call: +- Store the organization_id you intend to use (for example in a local ".semaphore/org" file) so future requests can reference it quickly +- Use projects_list(organization_id="...") to see projects in an organization +- Use projects_search(organization_id="...", query="...") to find specific projects +` +} + +// Register wires organization tools into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + if s == nil { + return + } + s.AddTool(newListTool(listToolName, fullDescription()), listHandler(api)) +} + +func newListTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + + mcp.WithString("cursor", + mcp.Description("Opaque pagination token from a previous response's 'nextCursor' field. Omit or leave empty to start from the first page."), + ), + mcp.WithNumber("limit", + mcp.Description("Number of organizations to return per page (1-100). Higher values consume more tokens but require fewer API calls. Default: 20."), + mcp.Min(1), + mcp.Max(maxPageSize), + mcp.DefaultNumber(defaultPageSize), + ), + mcp.WithString("mode", + mcp.Description("Response detail level. Use 'summary' for quick listings; use 'detailed' only when you need IP allowlists, identity providers, or specific organization settings."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +type listResult struct { + Organizations []organizationSummary `json:"organizations"` + NextCursor string `json:"nextCursor,omitempty"` +} + +type organizationSummary struct { + ID string `json:"id"` + Name string `json:"name"` + Username string `json:"username,omitempty"` + OwnerID string `json:"ownerId,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + Verified bool `json:"verified,omitempty"` + Restricted bool `json:"restricted,omitempty"` + Suspended bool `json:"suspended,omitempty"` + OpenSource bool `json:"openSource,omitempty"` + Details *organizationDetails `json:"details,omitempty"` + RawSettings map[string]string `json:"settings,omitempty"` +} + +type organizationDetails struct { + AllowedIDProviders []string `json:"allowedIdProviders,omitempty"` + IPAllowList []string `json:"ipAllowList,omitempty"` + DenyMemberWorkflows bool `json:"denyMemberWorkflows,omitempty"` + DenyNonMemberWorkflows bool `json:"denyNonMemberWorkflows,omitempty"` +} + +func listHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Organizations() + if client == nil { + return mcp.NewToolResultError(`Organization gRPC endpoint is not configured. + +This usually means: +1. The INTERNAL_API_URL_ORGANIZATION environment variable is not set +2. The organization service is not accessible from this server +3. Network connectivity issues + +Please check the server configuration and retry.`), nil + } + + rbacClient := api.RBAC() + if rbacClient == nil { + return mcp.NewToolResultError(`RBAC gRPC endpoint is not configured. + +This usually means: +1. The INTERNAL_API_URL_RBAC environment variable is not set +2. The RBAC service is not accessible from this server +3. Network connectivity issues + +The RBAC service determines which organizations the authenticated user can access. Please configure the endpoint and retry.`), nil + } + + // Validate and normalize mode + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`Invalid mode parameter: %v + +The 'mode' parameter must be either 'summary' or 'detailed': +- summary: Returns basic org information (name, ID, status) +- detailed: Returns full details including IP allowlists, settings, permissions + +Example: semaphore_organizations_list(mode="summary")`, err)), nil + } + + // Fetch and validate the caller's user ID from the authentication header + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so the tool knows which user's organizations to list. + +Troubleshooting: +- Ensure requests pass through the authentication proxy +- Verify the header value is the caller's UUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present + +Example: semaphore_organizations_list(limit=20)`, err)), nil + } + + limit := req.GetInt("limit", defaultPageSize) + if limit <= 0 { + limit = defaultPageSize + } else if limit > maxPageSize { + limit = maxPageSize + } + + offset, err := parseCursorOffset(strings.TrimSpace(req.GetString("cursor", ""))) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`Invalid cursor parameter: %v + +The 'cursor' parameter must be the opaque value returned in a previous response's 'nextCursor' field. + +Tips: +- Omit the cursor to start from the beginning +- Use exactly the value returned from 'nextCursor' without modification`, err)), nil + } + + accessibleIDs, err := listAccessibleOrgIDs(ctx, rbacClient, api.CallTimeout(), userID) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "rbac.ListAccessibleOrgs", + "userId": userID, + "reqName": listToolName, + }). + WithError(err). + Error("rbac list accessible orgs RPC failed") + + return mcp.NewToolResultError(fmt.Sprintf(`Failed to determine accessible organizations: %v + +The RBAC service confirms which organizations the authenticated user can access. Ensure the RBAC service is reachable and the user ID header is valid, then retry.`, err)), nil + } + + accessibleSet, dedupIDs := normalizeAccessibleIDs(accessibleIDs) + if len(accessibleSet) == 0 { + result := listResult{Organizations: []organizationSummary{}} + markdown := formatOrganizationsMarkdown(result.Organizations, mode, "") + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{mcp.NewTextContent(markdown)}, + StructuredContent: result, + }, nil + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + resp, err := client.DescribeMany(callCtx, &orgpb.DescribeManyRequest{OrgIds: dedupIDs}) + cancel() + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "organization.DescribeMany", + "userId": userID, + "orgCount": len(dedupIDs), + "reqName": listToolName, + }). + WithError(err). + Error("organization describe many RPC failed") + + return mcp.NewToolResultError(fmt.Sprintf(`Organization lookup failed: %v + +The organization service could not describe the permitted organizations. Retry in a few moments or verify the service connectivity.`, err)), nil + } + + filtered := filterAccessibleOrganizations(resp.GetOrganizations(), accessibleSet) + if len(filtered) == 0 { + result := listResult{Organizations: []organizationSummary{}} + markdown := formatOrganizationsMarkdown(result.Organizations, mode, "") + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{mcp.NewTextContent(markdown)}, + StructuredContent: result, + }, nil + } + + sortOrganizations(filtered) + + if offset < 0 { + offset = 0 + } + if offset > len(filtered) { + offset = len(filtered) + } + + end := offset + limit + if end > len(filtered) { + end = len(filtered) + } + + includeDetails := mode == "detailed" + orgs := make([]organizationSummary, 0, end-offset) + for _, o := range filtered[offset:end] { + orgs = append(orgs, summarizeOrganization(o, includeDetails)) + } + + nextCursor := "" + if end < len(filtered) { + if token, err := encodeCursorOffset(end); err == nil { + nextCursor = token + } else { + logging.ForComponent("tools"). + WithField("tool", listToolName). + WithError(err). + Warn("failed to encode pagination cursor") + } + } + + result := listResult{ + Organizations: orgs, + NextCursor: nextCursor, + } + + // Generate Markdown summary + markdown := formatOrganizationsMarkdown(orgs, mode, result.NextCursor) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func listAccessibleOrgIDs(ctx context.Context, client rbacpb.RBACClient, timeout time.Duration, userID string) ([]string, error) { + callCtx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + + resp, err := client.ListAccessibleOrgs(callCtx, &rbacpb.ListAccessibleOrgsRequest{UserId: userID}) + if err != nil { + return nil, err + } + return resp.GetOrgIds(), nil +} + +func normalizeAccessibleIDs(ids []string) (map[string]struct{}, []string) { + set := make(map[string]struct{}, len(ids)) + dedup := make([]string, 0, len(ids)) + for _, id := range ids { + norm := normalizeOrgID(id) + if norm == "" { + continue + } + if _, exists := set[norm]; exists { + continue + } + set[norm] = struct{}{} + dedup = append(dedup, id) + } + return set, dedup +} + +func filterAccessibleOrganizations(orgs []*orgpb.Organization, allowed map[string]struct{}) []*orgpb.Organization { + if len(orgs) == 0 { + return nil + } + + filtered := make([]*orgpb.Organization, 0, len(orgs)) + for _, org := range orgs { + if org == nil { + continue + } + if _, ok := allowed[normalizeOrgID(org.GetOrgId())]; ok { + filtered = append(filtered, org) + } + } + return filtered +} + +func sortOrganizations(orgs []*orgpb.Organization) { + sort.SliceStable(orgs, func(i, j int) bool { + a := orgs[i] + b := orgs[j] + + aName := strings.ToLower(strings.TrimSpace(a.GetName())) + bName := strings.ToLower(strings.TrimSpace(b.GetName())) + if aName != bName { + return aName < bName + } + + aUsername := strings.ToLower(strings.TrimSpace(a.GetOrgUsername())) + bUsername := strings.ToLower(strings.TrimSpace(b.GetOrgUsername())) + if aUsername != bUsername { + return aUsername < bUsername + } + + return normalizeOrgID(a.GetOrgId()) < normalizeOrgID(b.GetOrgId()) + }) +} + +type cursorPayload struct { + Offset int `json:"offset"` +} + +func parseCursorOffset(raw string) (int, error) { + if raw == "" { + return 0, nil + } + if strings.HasPrefix(raw, "v1:") { + data, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(raw, "v1:")) + if err != nil { + return 0, fmt.Errorf("decode cursor: %w", err) + } + var payload cursorPayload + if err := json.Unmarshal(data, &payload); err != nil { + return 0, fmt.Errorf("parse cursor: %w", err) + } + if payload.Offset < 0 { + payload.Offset = 0 + } + return payload.Offset, nil + } + if n, err := strconv.Atoi(raw); err == nil { + if n < 0 { + return 0, fmt.Errorf("cursor offset cannot be negative") + } + return n, nil + } + // Unknown legacy cursor – treat as start of list. + return 0, nil +} + +func encodeCursorOffset(offset int) (string, error) { + if offset <= 0 { + return "", nil + } + payload := cursorPayload{Offset: offset} + raw, err := json.Marshal(payload) + if err != nil { + return "", err + } + return "v1:" + base64.StdEncoding.EncodeToString(raw), nil +} + +func normalizeOrgID(id string) string { + return strings.ToLower(strings.TrimSpace(id)) +} + +func formatOrganizationsMarkdown(orgs []organizationSummary, mode string, nextCursor string) string { + mb := shared.NewMarkdownBuilder() + + mb.H1(fmt.Sprintf("Organizations (%d)", len(orgs))) + + if len(orgs) == 0 { + mb.Paragraph("No organizations found. The authenticated user may not belong to any organizations, or their account currently has no access.") + mb.Paragraph("**Troubleshooting:**") + mb.ListItem("Verify authentication credentials are valid") + mb.ListItem("Check if the user account is active") + mb.ListItem("Confirm the X-Semaphore-User-ID header is present and points to the expected user") + return mb.String() + } + + for i, org := range orgs { + if i > 0 { + mb.Newline() + } + + mb.H2(fmt.Sprintf("%s `%s`", org.Name, org.Username)) + + mb.KeyValue("ID", fmt.Sprintf("`%s`", org.ID)) + + if mode == "detailed" { + mb.KeyValue("Owner ID", fmt.Sprintf("`%s`", org.OwnerID)) + if org.CreatedAt != "" { + mb.KeyValue("Created", org.CreatedAt) + } + } + + // Status flags + statusItems := []string{} + if org.Verified { + statusItems = append(statusItems, "✅ Verified") + } + if org.Suspended { + statusItems = append(statusItems, "⛔ Suspended") + } + if org.Restricted { + statusItems = append(statusItems, "🔒 Restricted") + } + if org.OpenSource { + statusItems = append(statusItems, "🌐 Open Source") + } + if len(statusItems) > 0 { + mb.KeyValue("Status", strings.Join(statusItems, ", ")) + } + + // Detailed mode information + if mode == "detailed" && org.Details != nil { + mb.Newline() + mb.H3("Details") + + if len(org.Details.IPAllowList) > 0 { + mb.KeyValue("IP Allow List", fmt.Sprintf("%d entries", len(org.Details.IPAllowList))) + for _, ip := range org.Details.IPAllowList { + mb.ListItem(fmt.Sprintf(" - `%s`", ip)) + } + } + + if len(org.Details.AllowedIDProviders) > 0 { + mb.KeyValue("Allowed Identity Providers", strings.Join(org.Details.AllowedIDProviders, ", ")) + } + + if org.Details.DenyMemberWorkflows { + mb.ListItem("⚠️ Member workflows are denied") + } + if org.Details.DenyNonMemberWorkflows { + mb.ListItem("⚠️ Non-member workflows are denied") + } + + if len(org.RawSettings) > 0 { + mb.H3("Settings") + for key, value := range org.RawSettings { + mb.KeyValue(key, value) + } + } + } + } + + // Pagination hint + if nextCursor != "" { + mb.Line() + mb.Paragraph(fmt.Sprintf("📄 **More organizations available**. Use `cursor=\"%s\"` to fetch the next page.", nextCursor)) + } + + return mb.String() +} + +func summarizeOrganization(org *orgpb.Organization, detailed bool) organizationSummary { + if org == nil { + return organizationSummary{} + } + + summary := organizationSummary{ + ID: org.GetOrgId(), + Name: org.GetName(), + Username: org.GetOrgUsername(), + OwnerID: org.GetOwnerId(), + CreatedAt: shared.FormatTimestamp(org.GetCreatedAt()), + Verified: org.GetVerified(), + Restricted: org.GetRestricted(), + Suspended: org.GetSuspended(), + OpenSource: org.GetOpenSource(), + } + + if detailed { + summary.Details = &organizationDetails{ + AllowedIDProviders: append([]string{}, org.GetAllowedIdProviders()...), + IPAllowList: append([]string{}, org.GetIpAllowList()...), + DenyMemberWorkflows: org.GetDenyMemberWorkflows(), + DenyNonMemberWorkflows: org.GetDenyNonMemberWorkflows(), + } + + settings := make(map[string]string, len(org.GetSettings())) + for _, setting := range org.GetSettings() { + if setting == nil { + continue + } + settings[strings.TrimSpace(setting.GetKey())] = strings.TrimSpace(setting.GetValue()) + } + if len(settings) > 0 { + summary.RawSettings = settings + } + } + + return summary +} diff --git a/mcp_server/pkg/tools/organizations/organizations_test.go b/mcp_server/pkg/tools/organizations/organizations_test.go new file mode 100644 index 000000000..d5bd0a005 --- /dev/null +++ b/mcp_server/pkg/tools/organizations/organizations_test.go @@ -0,0 +1,225 @@ +package organizations + +import ( + "context" + "net/http" + "testing" + "time" + + "github.com/mark3labs/mcp-go/mcp" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestListOrganizationsSummary(t *testing.T) { + orgStub := &organizationClientStub{ + organizations: []*orgpb.Organization{ + { + OrgId: "org-1", + Name: "Example Org", + OrgUsername: "example", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + Verified: true, + }, + }, + } + rbacStub := &rbacClientStub{ids: []string{"org-1"}} + + provider := &internalapi.MockProvider{ + OrganizationClient: orgStub, + RBACClient: rbacStub, + Timeout: time.Second, + } + + res, err := listHandler(provider)(context.Background(), mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{"limit": 5}, + }, + Header: func() http.Header { + h := http.Header{} + h.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + return h + }(), + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if res.IsError { + t.Fatalf("expected success, got error result: %+v", res) + } + + got := res.StructuredContent.(listResult) + if len(got.Organizations) != 1 { + t.Fatalf("expected 1 organization, got %d", len(got.Organizations)) + } + if got.NextCursor != "" { + t.Fatalf("expected empty next cursor, got %q", got.NextCursor) + } + if got.Organizations[0].Name != "Example Org" { + t.Fatalf("unexpected organization name: %q", got.Organizations[0].Name) + } + if got.Organizations[0].Details != nil { + t.Fatalf("expected summary mode to omit details") + } +} + +func TestListOrganizationsDetailed(t *testing.T) { + orgStub := &organizationClientStub{ + organizations: []*orgpb.Organization{ + { + OrgId: "org-1", + Name: "Detailed Org", + OrgUsername: "detail", + AllowedIdProviders: []string{"github"}, + IpAllowList: []string{"1.1.1.1/32"}, + DenyMemberWorkflows: true, + DenyNonMemberWorkflows: true, + Settings: []*orgpb.OrganizationSetting{ + {Key: "feature", Value: "enabled"}, + }, + }, + }, + } + rbacStub := &rbacClientStub{ids: []string{"org-1"}} + + provider := &internalapi.MockProvider{ + OrganizationClient: orgStub, + RBACClient: rbacStub, + Timeout: time.Second, + } + + res, err := listHandler(provider)(context.Background(), mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "mode": "detailed", + }, + }, + Header: func() http.Header { + h := http.Header{} + h.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + return h + }(), + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if res.IsError { + t.Fatalf("expected success, got error result: %+v", res) + } + + got := res.StructuredContent.(listResult) + if len(got.Organizations) != 1 { + t.Fatalf("unexpected organization count: %d", len(got.Organizations)) + } + + details := got.Organizations[0].Details + if details == nil { + t.Fatalf("expected details in detailed mode") + } + if len(details.AllowedIDProviders) != 1 || details.AllowedIDProviders[0] != "github" { + t.Fatalf("unexpected allowed ID providers: %+v", details.AllowedIDProviders) + } + if got.Organizations[0].RawSettings["feature"] != "enabled" { + t.Fatalf("expected settings map to include feature") + } +} + +func TestListOrganizationsPagination(t *testing.T) { + orgStub := &organizationClientStub{ + organizations: []*orgpb.Organization{ + {OrgId: "org-2", Name: "Beta Org", OrgUsername: "beta"}, + {OrgId: "org-1", Name: "Alpha Org", OrgUsername: "alpha"}, + {OrgId: "org-3", Name: "Gamma Org", OrgUsername: "gamma"}, + }, + } + rbacStub := &rbacClientStub{ids: []string{"org-1", "org-2", "org-3"}} + provider := &internalapi.MockProvider{ + OrganizationClient: orgStub, + RBACClient: rbacStub, + Timeout: time.Second, + } + + first, err := listHandler(provider)(context.Background(), mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "limit": 2, + }, + }, + Header: func() http.Header { + h := http.Header{} + h.Set("X-Semaphore-User-ID", "11111111-2222-3333-4444-555555555555") + return h + }(), + }) + if err != nil || first.IsError { + t.Fatalf("first page failed: err=%v, res=%+v", err, first) + } + + page1 := first.StructuredContent.(listResult) + if len(page1.Organizations) != 2 { + t.Fatalf("expected 2 orgs on first page, got %d", len(page1.Organizations)) + } + if page1.Organizations[0].Name != "Alpha Org" || page1.Organizations[1].Name != "Beta Org" { + t.Fatalf("unexpected sort order: %#v", page1.Organizations) + } + if page1.NextCursor == "" { + t.Fatalf("expected next cursor for remaining items") + } + + second, err := listHandler(provider)(context.Background(), mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "limit": 2, + "cursor": page1.NextCursor, + }, + }, + Header: func() http.Header { + h := http.Header{} + h.Set("X-Semaphore-User-ID", "11111111-2222-3333-4444-555555555555") + return h + }(), + }) + if err != nil || second.IsError { + t.Fatalf("second page failed: err=%v, res=%+v", err, second) + } + + page2 := second.StructuredContent.(listResult) + if len(page2.Organizations) != 1 || page2.Organizations[0].Name != "Gamma Org" { + t.Fatalf("unexpected second page data: %#v", page2.Organizations) + } + if page2.NextCursor != "" { + t.Fatalf("expected no further pages, got cursor %q", page2.NextCursor) + } +} + +type organizationClientStub struct { + orgpb.OrganizationServiceClient + organizations []*orgpb.Organization + err error + describeRequest *orgpb.DescribeManyRequest +} + +func (o *organizationClientStub) DescribeMany(ctx context.Context, in *orgpb.DescribeManyRequest, opts ...grpc.CallOption) (*orgpb.DescribeManyResponse, error) { + o.describeRequest = in + if o.err != nil { + return nil, o.err + } + return &orgpb.DescribeManyResponse{Organizations: o.organizations}, nil +} + +type rbacClientStub struct { + rbacpb.RBACClient + ids []string + err error +} + +func (r *rbacClientStub) ListAccessibleOrgs(ctx context.Context, in *rbacpb.ListAccessibleOrgsRequest, opts ...grpc.CallOption) (*rbacpb.ListAccessibleOrgsResponse, error) { + if r.err != nil { + return nil, r.err + } + return &rbacpb.ListAccessibleOrgsResponse{OrgIds: r.ids}, nil +} diff --git a/mcp_server/pkg/tools/pipelines/pipelines.go b/mcp_server/pkg/tools/pipelines/pipelines.go new file mode 100644 index 000000000..ba1671022 --- /dev/null +++ b/mcp_server/pkg/tools/pipelines/pipelines.go @@ -0,0 +1,732 @@ +package pipelines + +import ( + "context" + "fmt" + "strings" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + "github.com/sirupsen/logrus" + + pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + listToolName = "pipelines_list" + jobsToolName = "pipeline_jobs" + defaultLimit = 20 + maxLimit = 100 + errNoClient = "pipeline gRPC endpoint is not configured" +) + +func listFullDescription() string { + return `List pipelines associated with a workflow (most recent first). + +This is typically called after discovering workflows via workflows_search. Use it to: +- Identify pipeline IDs before drilling into jobs with jobs_describe or jobs_logs +- Check which branch/commit triggered each pipeline +- Investigate promotions, reruns, and queue usage + +Filters & pagination: +- organization_id (required): UUID of the organization context (cache it after calling organizations_list) +- workflow_id (required): UUID of the workflow whose pipelines you need +- project_id (optional): narrow results when workflows span multiple projects +- cursor: use the previous response's nextCursor to fetch older pipelines +- limit: number of pipelines to return (default 20, max 100) + +Response modes: +- summary (default): pipeline ID, state, result, branch, queue, triggerer, timestamps +- detailed: includes rerun linkage, promotion metadata, and queue details expanded + +Examples: +1. List recent pipelines for a workflow: + pipelines_list(workflow_id="...", organization_id="...", limit=5) + +2. Get detailed pipeline info: + pipelines_list(workflow_id="...", organization_id="...", mode="detailed") + +3. Paginate through older pipelines: + pipelines_list(workflow_id="...", organization_id="...", cursor="opaque-token") + +4. Filter by project ID: + pipelines_list(workflow_id="...", organization_id="...", project_id="...", limit=10) +` +} + +func jobsFullDescription() string { + return `List jobs belonging to a specific pipeline. + +Use this after discovering a pipeline via pipelines_list when you need job IDs for follow-up calls (jobs_describe, jobs_logs). + +Inputs: +- organization_id (required): UUID of the organization context (cache it after calling organizations_list). +- pipeline_id (required): UUID of the pipeline whose jobs you need. +- mode (optional): "summary" (default) or "detailed". + +Response: +- summary: Block headings with job names and IDs. +- detailed: Adds job status/result, block state, and pipeline metadata. + +Examples: +1. List jobs for a pipeline: + pipeline_jobs(pipeline_id="...", organization_id="...") + +2. Get detailed job information: + pipeline_jobs(pipeline_id="...", organization_id="...", mode="detailed") +` +} + +// Register wires pipeline tooling into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + list := listHandler(api) + jobs := jobsHandler(api) + + s.AddTool(newListTool(listToolName, listFullDescription()), list) + s.AddTool(newJobsTool(jobsToolName, jobsFullDescription()), jobs) +} + +func newListTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString( + "workflow_id", + mcp.Required(), + mcp.Description("Workflow UUID to list pipelines for (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "organization_id", + mcp.Required(), + mcp.Description("Organization UUID that owns the workflow. Keep it consistent with semaphore_organizations_list results."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "project_id", + mcp.Description("Optional project UUID filter to restrict results (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."), + mcp.Pattern(`^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "cursor", + mcp.Description("Opaque pagination cursor returned by previous calls."), + ), + mcp.WithNumber( + "limit", + mcp.Description("Maximum number of pipelines to return."), + mcp.Min(1), + mcp.Max(maxLimit), + mcp.DefaultNumber(defaultLimit), + ), + mcp.WithString( + "mode", + mcp.Description("Response detail level. Use 'summary' for quick scans or 'detailed' for rerun/promotion context."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +func newJobsTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString( + "pipeline_id", + mcp.Required(), + mcp.Description("Pipeline UUID to inspect (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "organization_id", + mcp.Required(), + mcp.Description("Organization UUID that owns the pipeline. Cache it after calling semaphore_organizations_list."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString( + "mode", + mcp.Description("Response detail level. Use 'summary' for concise output; 'detailed' adds job status and block metadata."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +type queueSummary struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + Type string `json:"type,omitempty"` +} + +type pipelineSummary struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + WorkflowID string `json:"workflowId,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Branch string `json:"branch,omitempty"` + CommitSHA string `json:"commitSha,omitempty"` + State string `json:"state,omitempty"` + Result string `json:"result,omitempty"` + ResultReason string `json:"resultReason,omitempty"` + ErrorMessage string `json:"errorMessage,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + RunningAt string `json:"runningAt,omitempty"` + DoneAt string `json:"doneAt,omitempty"` + Queue queueSummary `json:"queue"` + Triggerer string `json:"triggerer,omitempty"` + WithAfterTask bool `json:"withAfterTask"` + AfterTaskID string `json:"afterTaskId,omitempty"` + PromotionOf string `json:"promotionOf,omitempty"` + PartialRerunOf string `json:"partialRerunOf,omitempty"` +} + +type listResult struct { + Pipelines []pipelineSummary `json:"pipelines"` + NextCursor string `json:"nextCursor,omitempty"` +} + +type pipelineJobEntry struct { + JobID string `json:"jobId"` + Name string `json:"name,omitempty"` + BlockID string `json:"blockId,omitempty"` + BlockName string `json:"blockName,omitempty"` + Index uint32 `json:"index,omitempty"` + Status string `json:"status,omitempty"` + Result string `json:"result,omitempty"` + Error string `json:"error,omitempty"` +} + +type blockJobGroup struct { + ID string `json:"blockId"` + Name string `json:"blockName,omitempty"` + State string `json:"state,omitempty"` + Result string `json:"result,omitempty"` + Jobs []pipelineJobEntry `json:"jobs,omitempty"` +} + +type jobsListResult struct { + Pipeline pipelineSummary `json:"pipeline"` + Blocks []blockJobGroup `json:"blocks"` + Jobs []pipelineJobEntry `json:"jobs"` + JobCount int `json:"jobCount"` +} + +func listHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Pipelines() + if client == nil { + return mcp.NewToolResultError(errNoClient), nil + } + + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError("organization_id is required. Use organizations_list to select an organization before listing pipelines."), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + workflowIDRaw, err := req.RequireString("workflow_id") + if err != nil { + return mcp.NewToolResultError("workflow_id is required. Provide the workflow UUID returned by workflows_search."), nil + } + + workflowID := strings.TrimSpace(workflowIDRaw) + if err := shared.ValidateUUID(workflowID, "workflow_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + projectID := strings.TrimSpace(req.GetString("project_id", "")) + if projectID != "" { + if err := shared.ValidateUUID(projectID, "project_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil + } + + limit := req.GetInt("limit", defaultLimit) + if limit <= 0 { + limit = defaultLimit + } else if limit > maxLimit { + limit = maxLimit + } + + pageSize, err := shared.IntToInt32(limit, "limit") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + request := &pipelinepb.ListKeysetRequest{ + WfId: workflowID, + PageSize: pageSize, + PageToken: strings.TrimSpace(req.GetString("cursor", "")), + Order: pipelinepb.ListKeysetRequest_BY_CREATION_TIME_DESC, + Direction: pipelinepb.ListKeysetRequest_NEXT, + } + + if projectID != "" { + request.ProjectId = projectID + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.ListKeyset(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "pipeline.ListKeyset", + "workflowId": workflowID, + "projectId": projectID, + "organizationId": orgID, + "limit": limit, + "cursor": request.PageToken, + "mode": mode, + }). + WithError(err). + Error("gRPC call failed") + return mcp.NewToolResultError(fmt.Sprintf(`Pipeline list RPC failed: %v + +Check that: +- The workflow still exists and you have permission to access it +- INTERNAL_API_URL_PLUMBER (or MCP_PIPELINE_GRPC_ENDPOINT) is reachable +- You are not paginating beyond available results (try removing cursor) +`, err)), nil + } + + pipelines := make([]pipelineSummary, 0, len(resp.GetPipelines())) + for _, ppl := range resp.GetPipelines() { + pipelines = append(pipelines, summarizePipeline(ppl)) + } + + result := listResult{Pipelines: pipelines} + if token := strings.TrimSpace(resp.GetNextPageToken()); token != "" { + result.NextCursor = token + } + + markdown := formatPipelineListMarkdown(result, mode, workflowID, projectID, orgID, limit) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func jobsHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Pipelines() + if client == nil { + return mcp.NewToolResultError(errNoClient), nil + } + + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError("organization_id is required. Use organizations_list to select an organization before listing jobs."), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + pipelineIDRaw, err := req.RequireString("pipeline_id") + if err != nil { + return mcp.NewToolResultError("pipeline_id is required. Provide the pipeline UUID from workflow_pipelines_list."), nil + } + pipelineID := strings.TrimSpace(pipelineIDRaw) + if err := shared.ValidateUUID(pipelineID, "pipeline_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + describeResp, err := client.Describe(callCtx, &pipelinepb.DescribeRequest{PplId: pipelineID, Detailed: true}) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "pipeline.Describe", + "pipelineId": pipelineID, + }). + WithError(err). + Error("pipeline describe RPC failed") + return mcp.NewToolResultError(fmt.Sprintf("Pipeline describe RPC failed: %v", err)), nil + } + + if status := describeResp.GetResponseStatus(); status != nil && status.GetCode() != pipelinepb.ResponseStatus_OK { + message := strings.TrimSpace(status.GetMessage()) + if message == "" { + message = "pipeline describe returned non-OK status" + } + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "pipeline.Describe", + "pipelineId": pipelineID, + "statusCode": status.GetCode(), + }). + Warn("pipeline describe returned non-OK status") + return mcp.NewToolResultError(message), nil + } + + pipeline := summarizePipeline(describeResp.GetPipeline()) + blocks := make([]blockJobGroup, 0, len(describeResp.GetBlocks())) + jobs := make([]pipelineJobEntry, 0) + for _, block := range describeResp.GetBlocks() { + if block == nil { + continue + } + group := blockJobGroup{ + ID: block.GetBlockId(), + Name: strings.TrimSpace(block.GetName()), + State: blockStateToString(block.GetState()), + Result: blockResultToString(block.GetResult()), + } + + blockJobs := block.GetJobs() + if len(blockJobs) > 0 { + group.Jobs = make([]pipelineJobEntry, 0, len(blockJobs)) + for _, bj := range blockJobs { + if bj == nil { + continue + } + entry := pipelineJobEntry{ + JobID: bj.GetJobId(), + Name: strings.TrimSpace(bj.GetName()), + BlockID: group.ID, + BlockName: group.Name, + Index: bj.GetIndex(), + Status: strings.TrimSpace(bj.GetStatus()), + Result: strings.TrimSpace(bj.GetResult()), + } + group.Jobs = append(group.Jobs, entry) + jobs = append(jobs, entry) + } + } + + blocks = append(blocks, group) + } + + result := jobsListResult{ + Pipeline: pipeline, + Blocks: blocks, + Jobs: jobs, + JobCount: len(jobs), + } + + markdown := formatPipelineJobsMarkdown(result, mode, orgID) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func summarizePipeline(ppl *pipelinepb.Pipeline) pipelineSummary { + if ppl == nil { + return pipelineSummary{} + } + + return pipelineSummary{ + ID: ppl.GetPplId(), + Name: ppl.GetName(), + WorkflowID: ppl.GetWfId(), + ProjectID: ppl.GetProjectId(), + Branch: ppl.GetBranchName(), + CommitSHA: ppl.GetCommitSha(), + State: pipelineStateToString(ppl.GetState()), + Result: pipelineResultToString(ppl.GetResult()), + ResultReason: pipelineResultReasonToString(ppl.GetResultReason()), + ErrorMessage: strings.TrimSpace(ppl.GetErrorDescription()), + CreatedAt: shared.FormatTimestamp(ppl.GetCreatedAt()), + RunningAt: shared.FormatTimestamp(ppl.GetRunningAt()), + DoneAt: shared.FormatTimestamp(ppl.GetDoneAt()), + Queue: summarizeQueue(ppl.GetQueue()), + Triggerer: summarizeTriggerer(ppl.GetTriggerer()), + WithAfterTask: ppl.GetWithAfterTask(), + AfterTaskID: ppl.GetAfterTaskId(), + PromotionOf: ppl.GetPromotionOf(), + PartialRerunOf: ppl.GetPartialRerunOf(), + } +} + +func pipelineStateToString(state pipelinepb.Pipeline_State) string { + if name, ok := pipelinepb.Pipeline_State_name[int32(state)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} + +func pipelineResultToString(result pipelinepb.Pipeline_Result) string { + if name, ok := pipelinepb.Pipeline_Result_name[int32(result)]; ok { + return strings.ToLower(name) + } + return "unknown" +} + +func pipelineResultReasonToString(reason pipelinepb.Pipeline_ResultReason) string { + if name, ok := pipelinepb.Pipeline_ResultReason_name[int32(reason)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} + +func summarizeQueue(q *pipelinepb.Queue) queueSummary { + if q == nil { + return queueSummary{} + } + return queueSummary{ + ID: q.GetQueueId(), + Name: q.GetName(), + Type: queueTypeToString(q.GetType()), + } +} + +func queueTypeToString(t pipelinepb.QueueType) string { + if name, ok := pipelinepb.QueueType_name[int32(t)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} + +func summarizeTriggerer(triggerer *pipelinepb.Triggerer) string { + if triggerer == nil { + return "" + } + if name, ok := pipelinepb.TriggeredBy_name[int32(triggerer.GetPplTriggeredBy())]; ok { + return strings.ToLower(name) + } + return "" +} + +func blockStateToString(state pipelinepb.Block_State) string { + if name, ok := pipelinepb.Block_State_name[int32(state)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} + +func blockResultToString(result pipelinepb.Block_Result) string { + if name, ok := pipelinepb.Block_Result_name[int32(result)]; ok { + return strings.ToLower(name) + } + return "unknown" +} + +func formatPipelineListMarkdown(result listResult, mode, workflowID, projectID, orgID string, limit int) string { + mb := shared.NewMarkdownBuilder() + + header := fmt.Sprintf("Pipelines for Workflow %s (%d returned)", workflowID, len(result.Pipelines)) + mb.H1(header) + filters := []string{fmt.Sprintf("limit=%d", limit), fmt.Sprintf("organizationId=%s", orgID)} + if projectID != "" { + filters = append(filters, fmt.Sprintf(`project_id="%s"`, projectID)) + } + if len(filters) > 0 { + mb.Paragraph("Filters: " + strings.Join(filters, ", ")) + } + + if len(result.Pipelines) == 0 { + mb.Paragraph("No pipelines found for the provided workflow and filters.") + mb.Paragraph("**Suggestions:**") + mb.ListItem("Verify the workflow still exists and has completed pipelines.") + mb.ListItem("Remove the project_id filter if one was provided.") + mb.ListItem("Use workflows_search to confirm the workflow status.") + return mb.String() + } + + for i, pipeline := range result.Pipelines { + if i > 0 { + mb.Line() + } + + name := strings.TrimSpace(pipeline.Name) + if name == "" { + name = pipeline.ID + } + mb.H2(fmt.Sprintf("%s (%s)", name, pipeline.ID)) + + if pipeline.State != "" { + mb.KeyValue("State", fmt.Sprintf("%s %s", shared.StatusIcon(pipeline.State), titleCase(pipeline.State))) + } + if pipeline.Result != "" { + resultLine := titleCase(pipeline.Result) + if pipeline.ResultReason != "" { + resultLine = fmt.Sprintf("%s (reason: %s)", resultLine, titleCase(pipeline.ResultReason)) + } + mb.KeyValue("Result", fmt.Sprintf("%s %s", shared.StatusIcon(pipeline.Result), resultLine)) + } + if pipeline.CreatedAt != "" { + mb.KeyValue("Created", pipeline.CreatedAt) + } + if pipeline.Branch != "" { + mb.KeyValue("Branch", pipeline.Branch) + } + + if mode == "detailed" { + if pipeline.CommitSHA != "" { + mb.KeyValue("Commit", shortenCommit(pipeline.CommitSHA)) + } + if pipeline.Triggerer != "" { + mb.KeyValue("Triggered By", titleCase(pipeline.Triggerer)) + } + if pipeline.Queue.Name != "" { + mb.KeyValue("Queue", fmt.Sprintf("%s (%s)", pipeline.Queue.Name, titleCase(pipeline.Queue.Type))) + } + if pipeline.RunningAt != "" { + mb.KeyValue("Running Since", pipeline.RunningAt) + } + if pipeline.DoneAt != "" { + mb.KeyValue("Completed", pipeline.DoneAt) + } + if pipeline.ErrorMessage != "" { + mb.Paragraph(fmt.Sprintf("⚠️ **Error**: %s", pipeline.ErrorMessage)) + } + if pipeline.WithAfterTask { + mb.ListItem("🔁 Includes after-task stage") + } + if pipeline.AfterTaskID != "" { + mb.KeyValue("After Task ID", fmt.Sprintf("`%s`", pipeline.AfterTaskID)) + } + if pipeline.PromotionOf != "" { + mb.KeyValue("Promotion Of", fmt.Sprintf("`%s`", pipeline.PromotionOf)) + } + if pipeline.PartialRerunOf != "" { + mb.KeyValue("Partial Rerun Of", fmt.Sprintf("`%s`", pipeline.PartialRerunOf)) + } + } + + } + + mb.Line() + if result.NextCursor != "" { + mb.Paragraph(fmt.Sprintf("📄 **More available**. Use `cursor=\"%s\"`", result.NextCursor)) + } + + return mb.String() +} + +func formatPipelineJobsMarkdown(result jobsListResult, mode, orgID string) string { + mb := shared.NewMarkdownBuilder() + + pipelineName := strings.TrimSpace(result.Pipeline.Name) + if pipelineName == "" { + pipelineName = result.Pipeline.ID + } + mb.H1(fmt.Sprintf("Jobs for Pipeline %s", pipelineName)) + mb.KeyValue("Pipeline ID", fmt.Sprintf("`%s`", result.Pipeline.ID)) + if result.Pipeline.State != "" { + mb.KeyValue("Pipeline State", fmt.Sprintf("%s %s", shared.StatusIcon(result.Pipeline.State), titleCase(result.Pipeline.State))) + } + if result.Pipeline.Result != "" { + res := titleCase(result.Pipeline.Result) + if result.Pipeline.ResultReason != "" { + res = fmt.Sprintf("%s (reason: %s)", res, titleCase(result.Pipeline.ResultReason)) + } + mb.KeyValue("Pipeline Result", fmt.Sprintf("%s %s", shared.StatusIcon(result.Pipeline.Result), res)) + } + mb.Paragraph(fmt.Sprintf("Organization: `%s` • Jobs discovered: %d", orgID, result.JobCount)) + + if result.JobCount == 0 { + mb.Paragraph("No jobs found for this pipeline. The pipeline may not have started yet or it may only include manual blocks.") + return mb.String() + } + + for idx, block := range result.Blocks { + if idx > 0 { + mb.Line() + } + + title := block.Name + if strings.TrimSpace(title) == "" { + title = block.ID + } + mb.H2(fmt.Sprintf("Block %s", title)) + + if mode == "detailed" { + if block.State != "" { + mb.KeyValue("State", fmt.Sprintf("%s %s", shared.StatusIcon(block.State), titleCase(block.State))) + } + if block.Result != "" { + mb.KeyValue("Result", fmt.Sprintf("%s %s", shared.StatusIcon(block.Result), titleCase(block.Result))) + } + } + + if len(block.Jobs) == 0 { + mb.Paragraph("No jobs reported for this block.") + continue + } + + for _, job := range block.Jobs { + statusParts := []string{fmt.Sprintf("`%s`", job.JobID)} + if job.Name != "" { + statusParts = append(statusParts, fmt.Sprintf("%s", job.Name)) + } + if mode == "detailed" { + if job.Status != "" { + statusParts = append(statusParts, fmt.Sprintf("status: %s %s", shared.StatusIcon(job.Status), titleCase(job.Status))) + } + if job.Result != "" { + statusParts = append(statusParts, fmt.Sprintf("result: %s %s", shared.StatusIcon(job.Result), titleCase(job.Result))) + } + if job.Index > 0 { + statusParts = append(statusParts, fmt.Sprintf("index %d", job.Index)) + } + if job.Error != "" { + statusParts = append(statusParts, fmt.Sprintf("error: %s", job.Error)) + } + } + mb.ListItem(strings.Join(statusParts, " • ")) + } + } + + return mb.String() +} + +func titleCase(value string) string { + value = strings.TrimSpace(strings.ToLower(value)) + if value == "" { + return "" + } + parts := strings.Split(value, "_") + for i, part := range parts { + if part == "" { + continue + } + parts[i] = strings.ToUpper(part[:1]) + part[1:] + } + return strings.Join(parts, " ") +} + +func shortenCommit(sha string) string { + sha = strings.TrimSpace(sha) + if len(sha) > 12 { + return sha[:12] + } + return sha +} diff --git a/mcp_server/pkg/tools/pipelines/pipelines_test.go b/mcp_server/pkg/tools/pipelines/pipelines_test.go new file mode 100644 index 000000000..702032f45 --- /dev/null +++ b/mcp_server/pkg/tools/pipelines/pipelines_test.go @@ -0,0 +1,229 @@ +package pipelines + +import ( + "context" + "testing" + "time" + + "github.com/mark3labs/mcp-go/mcp" + + pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestListPipelines(t *testing.T) { + workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + pipelineID := "11111111-2222-3333-4444-555555555555" + client := &pipelineClientStub{ + listResp: &pipelinepb.ListKeysetResponse{ + Pipelines: []*pipelinepb.Pipeline{ + { + PplId: pipelineID, + Name: "Build", + WfId: workflowID, + ProjectId: "proj-1", + BranchName: "main", + CommitSha: "abc123", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + ResultReason: pipelinepb.Pipeline_TEST, + CreatedAt: timestamppb.New(time.Unix(1700000000, 0)), + Queue: &pipelinepb.Queue{QueueId: "queue-1", Name: "default", Type: pipelinepb.QueueType_IMPLICIT}, + Triggerer: &pipelinepb.Triggerer{PplTriggeredBy: pipelinepb.TriggeredBy_PROMOTION}, + WithAfterTask: true, + AfterTaskId: "after-1", + }, + }, + NextPageToken: "cursor", + }, + } + + provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second} + handler := listHandler(provider) + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "workflow_id": workflowID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(listResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + + if len(result.Pipelines) != 1 { + toFail(t, "expected 1 pipeline, got %d", len(result.Pipelines)) + } + + ppl := result.Pipelines[0] + if ppl.ID != pipelineID || ppl.Triggerer != "promotion" || ppl.Queue.ID != "queue-1" { + toFail(t, "unexpected pipeline summary: %+v", ppl) + } + + if result.NextCursor != "cursor" { + toFail(t, "expected next cursor 'cursor', got %q", result.NextCursor) + } + + if client.lastList == nil || client.lastList.GetWfId() != workflowID { + toFail(t, "unexpected list request: %+v", client.lastList) + } +} + +func TestListPipelineJobs(t *testing.T) { + pipelineID := "11111111-2222-3333-4444-555555555555" + client := &pipelineClientStub{ + describeResp: &pipelinepb.DescribeResponse{ + Pipeline: &pipelinepb.Pipeline{ + PplId: pipelineID, + Name: "Build", + WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + ProjectId: "proj-1", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + }, + Blocks: []*pipelinepb.Block{ + { + BlockId: "block-1", + Name: "Tests", + State: pipelinepb.Block_RUNNING, + Result: pipelinepb.Block_PASSED, + Jobs: []*pipelinepb.Block_Job{ + {Name: "unit", JobId: "job-1", Index: 0, Status: "running", Result: "unknown"}, + {Name: "integration", JobId: "job-2", Index: 1, Status: "queued", Result: "unknown"}, + }, + }, + }, + }, + } + + provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second} + handler := jobsHandler(provider) + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "pipeline_id": pipelineID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(jobsListResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + if result.JobCount != 2 { + toFail(t, "expected 2 jobs, got %d", result.JobCount) + } + if len(result.Blocks) != 1 || len(result.Blocks[0].Jobs) != 2 { + toFail(t, "unexpected block grouping: %+v", result.Blocks) + } + if client.lastDescribe == nil || client.lastDescribe.GetPplId() != pipelineID { + toFail(t, "expected describe request for pipeline, got %+v", client.lastDescribe) + } +} + +type pipelineClientStub struct { + pipelinepb.PipelineServiceClient + listResp *pipelinepb.ListKeysetResponse + listErr error + lastList *pipelinepb.ListKeysetRequest + describeResp *pipelinepb.DescribeResponse + describeErr error + lastDescribe *pipelinepb.DescribeRequest +} + +func (s *pipelineClientStub) Schedule(context.Context, *pipelinepb.ScheduleRequest, ...grpc.CallOption) (*pipelinepb.ScheduleResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) DescribeMany(context.Context, *pipelinepb.DescribeManyRequest, ...grpc.CallOption) (*pipelinepb.DescribeManyResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) DescribeTopology(context.Context, *pipelinepb.DescribeTopologyRequest, ...grpc.CallOption) (*pipelinepb.DescribeTopologyResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) Terminate(context.Context, *pipelinepb.TerminateRequest, ...grpc.CallOption) (*pipelinepb.TerminateResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ListKeyset(ctx context.Context, in *pipelinepb.ListKeysetRequest, opts ...grpc.CallOption) (*pipelinepb.ListKeysetResponse, error) { + s.lastList = in + if s.listErr != nil { + return nil, s.listErr + } + return s.listResp, nil +} + +func (s *pipelineClientStub) Describe(ctx context.Context, in *pipelinepb.DescribeRequest, opts ...grpc.CallOption) (*pipelinepb.DescribeResponse, error) { + s.lastDescribe = in + if s.describeErr != nil { + return nil, s.describeErr + } + if s.describeResp == nil { + return &pipelinepb.DescribeResponse{}, nil + } + return s.describeResp, nil +} + +func (s *pipelineClientStub) List(context.Context, *pipelinepb.ListRequest, ...grpc.CallOption) (*pipelinepb.ListResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ListGrouped(context.Context, *pipelinepb.ListGroupedRequest, ...grpc.CallOption) (*pipelinepb.ListGroupedResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ListQueues(context.Context, *pipelinepb.ListQueuesRequest, ...grpc.CallOption) (*pipelinepb.ListQueuesResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ListActivity(context.Context, *pipelinepb.ListActivityRequest, ...grpc.CallOption) (*pipelinepb.ListActivityResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ListRequesters(context.Context, *pipelinepb.ListRequestersRequest, ...grpc.CallOption) (*pipelinepb.ListRequestersResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) RunNow(context.Context, *pipelinepb.RunNowRequest, ...grpc.CallOption) (*pipelinepb.RunNowResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) GetProjectId(context.Context, *pipelinepb.GetProjectIdRequest, ...grpc.CallOption) (*pipelinepb.GetProjectIdResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ValidateYaml(context.Context, *pipelinepb.ValidateYamlRequest, ...grpc.CallOption) (*pipelinepb.ValidateYamlResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) ScheduleExtension(context.Context, *pipelinepb.ScheduleExtensionRequest, ...grpc.CallOption) (*pipelinepb.ScheduleExtensionResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) Delete(context.Context, *pipelinepb.DeleteRequest, ...grpc.CallOption) (*pipelinepb.DeleteResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) PartialRebuild(context.Context, *pipelinepb.PartialRebuildRequest, ...grpc.CallOption) (*pipelinepb.PartialRebuildResponse, error) { + panic("not implemented") +} + +func (s *pipelineClientStub) Version(context.Context, *pipelinepb.VersionRequest, ...grpc.CallOption) (*pipelinepb.VersionResponse, error) { + panic("not implemented") +} + +func toFail(t *testing.T, format string, args ...any) { + t.Helper() + t.Fatalf(format, args...) +} diff --git a/mcp_server/pkg/tools/projects/projects.go b/mcp_server/pkg/tools/projects/projects.go new file mode 100644 index 000000000..19d146b0d --- /dev/null +++ b/mcp_server/pkg/tools/projects/projects.go @@ -0,0 +1,983 @@ +package projects + +import ( + "context" + "fmt" + "sort" + "strings" + + "github.com/google/uuid" + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + "github.com/sirupsen/logrus" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + listToolName = "projects_list" + searchToolName = "projects_search" + defaultListLimit = 25 + maxListLimit = 200 + defaultSearchLimit = 20 + defaultSearchPages = 5 + maxSearchPages = 10 + searchPageSize = 100 +) + +func listFullDescription() string { + return `List projects that belong to a specific organization. + +Use this when you need the project_id before digging into workflows, pipelines, or jobs. + +Typical flows: +- "Show me projects in Acme Org" → call this tool, then ask follow-up questions +- "I only remember the repo URL" → list projects, then filter or use projects_search + +Response modes: +- summary (default): project name, IDs, repository URL, visibility, last updated +- detailed: adds scheduler/task counts, custom permission flags, debug/attach permissions + +Pagination: +- Default page size: 25 projects +- Maximum: 200 projects (be mindful of context size) +- Use cursor from previous response's nextCursor field to fetch more +- Empty/omitted cursor starts from the beginning + +Examples: +1. List first 10 projects: + projects_list(organization_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", limit=10) + +2. Get detailed project info with schedulers: + projects_list(organization_id="...", mode="detailed", limit=25) + +3. Fetch next page of projects: + projects_list(organization_id="...", cursor="opaque-token-from-previous-response", limit=25) + +4. List many projects with full details: + projects_list(organization_id="...", mode="detailed", limit=200) + +Common follow-ups: +- projects_search(...) to find a specific repo or branch +- workflows_search(project_id="...", status="failed") to debug +` +} + +func searchFullDescription() string { + return `Search projects inside an organization by project name, repository URL, or description. + +Use this to quickly narrow down a project when you only remember part of its name, repo slug, or default branch. + +Ideal prompts: +- "Find the payments API project" +- "Which project uses repo github.com/example/mobile?" +- "Locate projects with 'infra' in the description" + +Search details: +- Provide either a free-form query, a repository URL, or both +- Matches on project name, description, repository URL, repository name, and default branch +- Highlights matched fields and provides a confidence score (high / medium / low) + +Tuning: +- limit: cap how many matches the LLM receives (default 20) +- max_pages: how many paginated fetches to inspect (default 5). Increase for large orgs. +- mode: 'summary' for concise answers, 'detailed' for schedulers/tasks/permissions + +Examples: +1. Search by project name: + projects_search(organization_id="...", query="mobile") + +2. Search by repository URL: + projects_search(organization_id="...", repository_url="github.com/example/app") + +3. Combined search with increased depth: + projects_search(organization_id="...", query="payments", max_pages=8, limit=30) + +4. Detailed search results: + projects_search(organization_id="...", query="backend", mode="detailed") + +Follow-ups: +- Once you have a project_id, call workflows_search for deeper inspection. +` +} + +// Register wires project tools into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + if s == nil { + return + } + + s.AddTool(newListTool(listToolName, listFullDescription()), listHandler(api)) + s.AddTool(newSearchTool(searchToolName, searchFullDescription()), searchHandler(api)) +} + +func newListTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString("organization_id", + mcp.Required(), + mcp.Description("Organization UUID whose projects should be listed. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString("cursor", + mcp.Description("Opaque pagination token from a previous response's 'nextCursor' field. Omit or leave empty to start from the first page."), + ), + mcp.WithNumber("limit", + mcp.Description("Number of projects per page (1-200). Larger limits consume more context tokens."), + mcp.Min(1), + mcp.Max(maxListLimit), + mcp.DefaultNumber(defaultListLimit), + ), + mcp.WithString("mode", + mcp.Description("Controls response detail. Use 'summary' for quick scans; 'detailed' adds schedulers, tasks, and permission metadata."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +func newSearchTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString("organization_id", + mcp.Required(), + mcp.Description("Organization UUID that scoping the search. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString("query", + mcp.Description("Optional search query evaluated against project name, description, repository URL, repository name, and default branch."), + ), + mcp.WithString("repository_url", + mcp.Description("Optional repository URL to match (exact or substring, case-insensitive). Provide either this or query."), + ), + mcp.WithNumber("limit", + mcp.Description("Maximum number of matches to return (1-50)."), + mcp.Min(1), + mcp.Max(50), + mcp.DefaultNumber(defaultSearchLimit), + ), + mcp.WithNumber("max_pages", + mcp.Description("Maximum number of paginated fetches to evaluate (1-10). Higher values explore more projects at the cost of latency."), + mcp.Min(1), + mcp.Max(maxSearchPages), + mcp.DefaultNumber(defaultSearchPages), + ), + mcp.WithString("mode", + mcp.Description("Controls response detail. 'summary' shows key identifiers; 'detailed' adds schedulers/tasks/permissions metadata."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +type listResult struct { + Projects []projectSummary `json:"projects"` + NextCursor string `json:"nextCursor,omitempty"` +} + +type searchResult struct { + Projects []projectSearchEntry `json:"projects"` + TotalMatches int `json:"totalMatches"` + SearchedPages int `json:"searchedPages"` + MoreAvailable bool `json:"moreAvailable"` +} + +type projectSearchEntry struct { + projectSummary + MatchConfidence string `json:"matchConfidence"` + MatchedFields []string `json:"matchedFields,omitempty"` +} + +type projectSummary struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Visibility string `json:"visibility,omitempty"` + Repository repositorySummary `json:"repository"` + Details *projectDetails `json:"details,omitempty"` +} + +type repositorySummary struct { + URL string `json:"url,omitempty"` + Name string `json:"name,omitempty"` + DefaultBranch string `json:"defaultBranch,omitempty"` + PipelineFile string `json:"pipelineFile,omitempty"` + Integration string `json:"integrationType,omitempty"` + Public bool `json:"public"` + Connected bool `json:"connected"` + RepositoryID string `json:"repositoryId,omitempty"` + Owner string `json:"owner,omitempty"` + RunOnPresent bool `json:"runOnConfigured,omitempty"` + IntegrationURL string `json:"integrationUrl,omitempty"` +} + +type projectDetails struct { + OrganizationID string `json:"organizationId,omitempty"` + OwnerID string `json:"ownerId,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + CustomPermissions bool `json:"customPermissions,omitempty"` + SchedulerCount int `json:"schedulerCount,omitempty"` + TaskCount int `json:"taskCount,omitempty"` + DebugPermissions []string `json:"debugPermissions,omitempty"` + AttachPermissions []string `json:"attachPermissions,omitempty"` +} + +func formatProjectListMarkdown(result listResult, mode string, orgID string) string { + mb := shared.NewMarkdownBuilder() + + title := fmt.Sprintf("Projects in %s (%d)", orgID, len(result.Projects)) + mb.H1(title) + + if len(result.Projects) == 0 { + mb.Paragraph("No projects found for this organization.") + mb.Paragraph("**Tips:**") + mb.ListItem("Confirm the organization_id is correct") + mb.ListItem("Ensure the X-Semaphore-User-ID header identifies a user with access") + mb.ListItem("Use projects_search for fuzzy matching") + return mb.String() + } + + for idx, project := range result.Projects { + if idx > 0 { + mb.Line() + } + + displayName := project.Name + if displayName == "" { + displayName = "(unnamed project)" + } + mb.H2(displayName) + + mb.KeyValue("ID", fmt.Sprintf("`%s`", project.ID)) + + if project.Repository.URL != "" { + mb.KeyValue("Repository", project.Repository.URL) + } + + // Status (minimal in summary mode) + statusFlags := []string{} + if project.Repository.Public { + statusFlags = append(statusFlags, "🌐 Public") + } else { + statusFlags = append(statusFlags, "🔒 Private") + } + if len(statusFlags) > 0 { + mb.KeyValue("Status", strings.Join(statusFlags, ", ")) + } + + // Detailed mode only + if mode == "detailed" { + if project.Description != "" { + mb.Paragraph(project.Description) + } + + if project.Repository.DefaultBranch != "" { + mb.KeyValue("Default Branch", project.Repository.DefaultBranch) + } + if project.Repository.PipelineFile != "" { + mb.KeyValue("Pipeline File", project.Repository.PipelineFile) + } + + detailFlags := []string{} + if project.Repository.Connected { + detailFlags = append(detailFlags, "✅ Repo connected") + } else { + detailFlags = append(detailFlags, "⚠️ Repo not connected") + } + if project.Visibility != "" { + detailFlags = append(detailFlags, fmt.Sprintf("Visibility: %s", project.Visibility)) + } + if len(detailFlags) > 0 { + mb.KeyValue("Details", strings.Join(detailFlags, ", ")) + } + } + + if mode == "detailed" && project.Details != nil { + mb.Newline() + mb.H3("Details") + if project.Details.OrganizationID != "" { + mb.KeyValue("Organization ID", fmt.Sprintf("`%s`", project.Details.OrganizationID)) + } + if project.Details.OwnerID != "" { + mb.KeyValue("Owner ID", fmt.Sprintf("`%s`", project.Details.OwnerID)) + } + if project.Details.CreatedAt != "" { + mb.KeyValue("Created", project.Details.CreatedAt) + } + mb.KeyValue("Custom Permissions", shared.FormatBoolean(project.Details.CustomPermissions, "Yes", "No")) + mb.KeyValue("Schedulers", fmt.Sprintf("%d", project.Details.SchedulerCount)) + mb.KeyValue("Tasks", fmt.Sprintf("%d", project.Details.TaskCount)) + if len(project.Details.DebugPermissions) > 0 { + mb.KeyValue("Debug Permissions", strings.Join(project.Details.DebugPermissions, ", ")) + } + if len(project.Details.AttachPermissions) > 0 { + mb.KeyValue("Attach Permissions", strings.Join(project.Details.AttachPermissions, ", ")) + } + } + } + + mb.Line() + mb.Paragraph(fmt.Sprintf("Showing %d projects", len(result.Projects))) + + if result.NextCursor != "" { + mb.Paragraph(fmt.Sprintf("📄 **More projects available**. Use `cursor=\"%s\"` to fetch the next page.", result.NextCursor)) + } + + return mb.String() +} + +func formatProjectSearchMarkdown(result searchResult, mode string, orgID string, query string, repoURL string, limit int, maxPages int) string { + mb := shared.NewMarkdownBuilder() + + titleParts := []string{"Project Search Results"} + if query != "" { + titleParts = append(titleParts, fmt.Sprintf("query=\"%s\"", query)) + } + if repoURL != "" { + titleParts = append(titleParts, fmt.Sprintf("repository=\"%s\"", repoURL)) + } + header := fmt.Sprintf("%s (%d returned)", strings.Join(titleParts, " • "), len(result.Projects)) + mb.H1(header) + filters := []string{fmt.Sprintf("Organization: `%s`", orgID), fmt.Sprintf("Limit: %d", limit), fmt.Sprintf("Pages scanned: %d", result.SearchedPages)} + mb.Paragraph(strings.Join(filters, " • ")) + + if len(result.Projects) == 0 { + mb.Paragraph("No projects matched the search criteria.") + mb.Paragraph("**Suggestions:**") + mb.ListItem("Try a different keyword (e.g., repository slug or branch name)") + mb.ListItem("Increase `max_pages` to inspect more projects (up to 10)") + mb.ListItem("Double-check the repository URL filter (use the canonical HTTPS URL)") + return mb.String() + } + + for idx, project := range result.Projects { + if idx > 0 { + mb.Line() + } + + displayName := project.Name + if displayName == "" { + displayName = "(unnamed project)" + } + mb.H2(displayName) + + mb.KeyValue("Project ID", fmt.Sprintf("`%s`", project.ID)) + if project.Repository.URL != "" { + mb.KeyValue("Repository", project.Repository.URL) + } + if project.Repository.DefaultBranch != "" { + mb.KeyValue("Default Branch", project.Repository.DefaultBranch) + } + if project.Repository.Name != "" { + mb.KeyValue("Repository Name", project.Repository.Name) + } + mb.KeyValue("Match Confidence", strings.Title(project.MatchConfidence)) + + if len(project.MatchedFields) > 0 { + mb.KeyValue("Matched Fields", formatMatchedFields(project.MatchedFields)) + } + + if mode == "detailed" && project.Details != nil { + mb.Newline() + mb.H3("Details") + mb.KeyValue("Custom Permissions", shared.FormatBoolean(project.Details.CustomPermissions, "Yes", "No")) + mb.KeyValue("Schedulers", fmt.Sprintf("%d", project.Details.SchedulerCount)) + mb.KeyValue("Tasks", fmt.Sprintf("%d", project.Details.TaskCount)) + } + + } + + mb.Line() + mb.Paragraph(fmt.Sprintf("Total matches discovered: %d (showing up to %d).", result.TotalMatches, len(result.Projects))) + if result.MoreAvailable { + mb.Paragraph("🔍 **More matches likely exist.** Increase `max_pages` or adjust your query to retrieve additional projects.") + } + + return mb.String() +} + +func formatMatchedFields(fields []string) string { + if len(fields) == 0 { + return "" + } + + labels := make([]string, 0, len(fields)) + for _, field := range fields { + switch field { + case "name_exact": + labels = append(labels, "project name (exact)") + case "name": + labels = append(labels, "project name") + case "description": + labels = append(labels, "description") + case "repository_url_exact": + labels = append(labels, "repository URL (exact)") + case "repository_url": + labels = append(labels, "repository URL") + case "repository_name": + labels = append(labels, "repository name") + case "default_branch": + labels = append(labels, "default branch") + default: + labels = append(labels, field) + } + } + + return strings.Join(labels, ", ") +} + +func listHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Projects() + if client == nil { + return mcp.NewToolResultError(`Project gRPC endpoint is not configured. + +This usually means: +1. INTERNAL_API_URL_PROJECT is missing or incorrect +2. The ProjectHub service is unreachable from the MCP server +3. Network connectivity problems + +Verify server configuration and retry.`), nil + } + + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError(`Missing required argument: organization_id. + +Provide the organization UUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). +You can discover organizations by calling organizations_list first.`), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +Example: projects_list(organization_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")`, err)), nil + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`Invalid mode parameter: %v + +Use mode="summary" for quick scanning or mode="detailed" to include schedulers, tasks, and permission metadata.`, err)), nil + } + + cursor := strings.TrimSpace(req.GetString("cursor", "")) + + limit := req.GetInt("limit", defaultListLimit) + if limit <= 0 { + limit = defaultListLimit + } else if limit > maxListLimit { + limit = maxListLimit + } + + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can enforce per-user permissions. + +Troubleshooting: +- Ensure calls pass through the authenticated proxy +- Verify the header value is a user UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + + pageSize, err := shared.IntToInt32(limit, "limit") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + request := &projecthubpb.ListKeysetRequest{ + Metadata: projectRequestMeta(orgID, userID), + PageToken: cursor, + PageSize: pageSize, + Direction: projecthubpb.ListKeysetRequest_NEXT, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.ListKeyset(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "project.ListKeyset", + "organizationId": orgID, + "cursor": cursor, + "limit": limit, + "mode": mode, + "userId": userID, + }). + WithError(err). + Error("project list RPC failed") + return mcp.NewToolResultError(fmt.Sprintf(`Project list RPC failed: %v + +Possible causes: +- Organization service is temporarily unavailable (retry shortly) +- Authentication token lacks access to this organization +- Network or routing issues + +Suggested next steps: +- Verify organization_id is correct +- Confirm INTERNAL_API_URL_PROJECT points to a reachable endpoint +- Retry with a smaller limit`, err)), nil + } + + if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { + logging.ForComponent("rpc"). + WithField("rpc", "project.ListKeyset"). + WithError(err). + Warn("project list returned non-OK status") + return mcp.NewToolResultError(fmt.Sprintf(`Request failed: %v + +This can happen if: +- organization_id is valid but you lack permission to list its projects +- The authenticated user (from X-Semaphore-User-ID) has no project access +- The organization has been suspended or deleted + +Try removing optional filters or verifying access permissions.`, err)), nil + } + + projects := make([]projectSummary, 0, len(resp.GetProjects())) + for _, proj := range resp.GetProjects() { + projects = append(projects, summarizeProject(proj, mode == "detailed")) + } + + result := listResult{ + Projects: projects, + NextCursor: strings.TrimSpace(resp.GetNextPageToken()), + } + + markdown := formatProjectListMarkdown(result, mode, orgID) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func searchHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Projects() + if client == nil { + return mcp.NewToolResultError(`Project gRPC endpoint is not configured. + +Check INTERNAL_API_URL_PROJECT or MCP_PROJECT_GRPC_ENDPOINT and ensure ProjectHub is reachable.`), nil + } + + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError(`Missing required argument: organization_id. Use organizations_list to discover organization IDs.`), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + rawQuery := strings.TrimSpace(req.GetString("query", "")) + queryDisplay := rawQuery + queryNormalized := strings.ToLower(rawQuery) + + repoFilterRaw := strings.TrimSpace(req.GetString("repository_url", "")) + repoDisplay := repoFilterRaw + repoFilter := strings.ToLower(repoFilterRaw) + + if queryNormalized == "" && repoFilter == "" { + return mcp.NewToolResultError("Provide at least one of query or repository_url."), nil + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil + } + + limit := req.GetInt("limit", defaultSearchLimit) + if limit <= 0 { + limit = defaultSearchLimit + } else if limit > 50 { + limit = 50 + } + + maxPages := req.GetInt("max_pages", defaultSearchPages) + if maxPages <= 0 { + return mcp.NewToolResultError("max_pages must be at least 1. Increase it (maximum 10) to inspect more projects."), nil + } else if maxPages > maxSearchPages { + maxPages = maxSearchPages + } + + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can enforce per-user permissions. + +Troubleshooting: +- Ensure requests go through the authenticated proxy +- Verify the header contains a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + + type candidate struct { + summary projectSummary + score int + matchedFields []string + } + + candidates := make([]candidate, 0, limit*2) + totalMatches := 0 + searchedPages := 0 + moreAvailable := false + + for page := 1; page <= maxPages; page++ { + pageNumber, err := shared.IntToInt32(page, "page") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + request := &projecthubpb.ListRequest{ + Metadata: projectRequestMeta(orgID, userID), + Pagination: &projecthubpb.PaginationRequest{ + Page: pageNumber, + PageSize: searchPageSize, + }, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + resp, err := client.List(callCtx, request) + cancel() + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "project.List", + "organizationId": orgID, + "page": page, + "mode": mode, + "query": rawQuery, + "repositoryUrl": repoFilterRaw, + "userId": userID, + }). + WithError(err). + Error("project list RPC failed during search") + return mcp.NewToolResultError(fmt.Sprintf(`Project search failed while fetching page %d: %v + +Possible causes: +- High load on ProjectHub service (retry shortly) +- Network connectivity issues +- Organization ID is correct but service is unavailable + +Try lowering max_pages or limit if the organization has many projects.`, page, err)), nil + } + + if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { + logging.ForComponent("rpc"). + WithField("rpc", "project.List"). + WithError(err). + Warn("project search received non-OK status") + return mcp.NewToolResultError(fmt.Sprintf(`Project search failed: %v + +Ensure you have permission to list projects in organization %s.`, err, orgID)), nil + } + + searchedPages++ + + for _, proj := range resp.GetProjects() { + score := 0 + matched := []string{} + + if queryNormalized != "" { + queryScore, queryMatches := scoreProjectMatch(proj, queryNormalized) + score += queryScore + matched = append(matched, queryMatches...) + } + + if repoFilter != "" { + spec := proj.GetSpec() + var repoURL string + if spec != nil && spec.GetRepository() != nil { + repoURL = strings.ToLower(strings.TrimSpace(spec.GetRepository().GetUrl())) + } + if repoURL == "" { + continue + } + if repoURL == repoFilter { + score += 10 + matched = append(matched, "repository_url_exact") + } else if strings.Contains(repoURL, repoFilter) { + score += 6 + matched = append(matched, "repository_url") + } else { + continue + } + } + + if len(matched) == 0 { + continue + } + + totalMatches++ + candidates = append(candidates, candidate{ + summary: summarizeProject(proj, mode == "detailed"), + score: score, + matchedFields: matched, + }) + } + + pagination := resp.GetPagination() + if pagination == nil || int(pagination.GetPageNumber()) >= int(pagination.GetTotalPages()) { + moreAvailable = false + break + } + moreAvailable = true + } + + if len(candidates) == 0 { + result := searchResult{ + Projects: []projectSearchEntry{}, + TotalMatches: 0, + SearchedPages: searchedPages, + MoreAvailable: moreAvailable, + } + + markdown := formatProjectSearchMarkdown(result, mode, orgID, queryDisplay, repoDisplay, limit, maxPages) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } + + sort.SliceStable(candidates, func(i, j int) bool { + if candidates[i].score == candidates[j].score { + return strings.Compare(candidates[i].summary.Name, candidates[j].summary.Name) < 0 + } + return candidates[i].score > candidates[j].score + }) + + if len(candidates) > limit { + candidates = candidates[:limit] + } + + results := make([]projectSearchEntry, 0, len(candidates)) + for _, cand := range candidates { + results = append(results, projectSearchEntry{ + projectSummary: cand.summary, + MatchConfidence: classifyConfidence(cand.score), + MatchedFields: cand.matchedFields, + }) + } + + result := searchResult{ + Projects: results, + TotalMatches: totalMatches, + SearchedPages: searchedPages, + MoreAvailable: moreAvailable || totalMatches > len(results), + } + + markdown := formatProjectSearchMarkdown(result, mode, orgID, queryDisplay, repoDisplay, limit, maxPages) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func projectRequestMeta(orgID, userID string) *projecthubpb.RequestMeta { + return &projecthubpb.RequestMeta{ + ApiVersion: "v1alpha", + Kind: "Project", + OrgId: strings.TrimSpace(orgID), + UserId: strings.TrimSpace(userID), + ReqId: uuid.NewString(), + } +} + +func summarizeProject(project *projecthubpb.Project, includeDetails bool) projectSummary { + if project == nil { + return projectSummary{} + } + + meta := project.GetMetadata() + spec := project.GetSpec() + var repoSummary repositorySummary + if spec != nil { + repoSummary = summarizeRepository(spec.GetRepository()) + } + + summary := projectSummary{ + ID: meta.GetId(), + Name: meta.GetName(), + Description: meta.GetDescription(), + Visibility: normalizeProjectVisibility(spec), + Repository: repoSummary, + } + + if includeDetails { + var debugPerms, attachPerms []string + var schedulers, tasks int + var customPerms bool + if spec != nil { + debugPerms = normalizePermissionTypes(spec.GetDebugPermissions()) + attachPerms = normalizePermissionTypes(spec.GetAttachPermissions()) + schedulers = len(spec.GetSchedulers()) + tasks = len(spec.GetTasks()) + customPerms = spec.GetCustomPermissions() + } + details := projectDetails{ + OrganizationID: meta.GetOrgId(), + OwnerID: meta.GetOwnerId(), + CreatedAt: shared.FormatTimestamp(meta.GetCreatedAt()), + CustomPermissions: customPerms, + SchedulerCount: schedulers, + TaskCount: tasks, + DebugPermissions: debugPerms, + AttachPermissions: attachPerms, + } + summary.Details = &details + } + + return summary +} + +func summarizeRepository(repo *projecthubpb.Project_Spec_Repository) repositorySummary { + if repo == nil { + return repositorySummary{} + } + + return repositorySummary{ + URL: repo.GetUrl(), + Name: repo.GetName(), + Owner: repo.GetOwner(), + DefaultBranch: repo.GetDefaultBranch(), + PipelineFile: repo.GetPipelineFile(), + Integration: normalizeIntegration(repo.GetIntegrationType()), + Public: repo.GetPublic(), + Connected: repo.GetConnected(), + RepositoryID: repo.GetId(), + RunOnPresent: repo.GetRunPresent() != nil, + } +} + +func normalizeProjectVisibility(spec *projecthubpb.Project_Spec) string { + if spec == nil { + return "" + } + value := spec.GetVisibility().String() + return normalizeEnumName(value, "Project_Spec_") +} + +func normalizeIntegration(integration repoipb.IntegrationType) string { + return normalizeEnumName(integration.String(), "IntegrationType_") +} + +func normalizePermissionTypes(perms []projecthubpb.Project_Spec_PermissionType) []string { + if len(perms) == 0 { + return nil + } + out := make([]string, 0, len(perms)) + for _, p := range perms { + out = append(out, normalizeEnumName(p.String(), "Project_Spec_")) + } + return out +} + +func normalizeEnumName(raw, prefix string) string { + raw = strings.TrimSpace(raw) + if raw == "" { + return "" + } + if strings.HasPrefix(raw, prefix) { + raw = strings.TrimPrefix(raw, prefix) + } + raw = strings.ReplaceAll(raw, "_", " ") + return strings.ToLower(raw) +} + +func scoreProjectMatch(project *projecthubpb.Project, query string) (int, []string) { + if project == nil { + return 0, nil + } + metadata := project.GetMetadata() + spec := project.GetSpec() + var repo *projecthubpb.Project_Spec_Repository + if spec != nil { + repo = spec.GetRepository() + } + + score := 0 + var matched []string + + name := strings.ToLower(strings.TrimSpace(metadata.GetName())) + description := strings.ToLower(strings.TrimSpace(metadata.GetDescription())) + repoURL := "" + repoName := "" + defaultBranch := "" + if repo != nil { + repoURL = strings.ToLower(strings.TrimSpace(repo.GetUrl())) + repoName = strings.ToLower(strings.TrimSpace(repo.GetName())) + defaultBranch = strings.ToLower(strings.TrimSpace(repo.GetDefaultBranch())) + } + + if name == query { + score += 6 + matched = append(matched, "name_exact") + } else if strings.Contains(name, query) { + score += 4 + matched = append(matched, "name") + } + + if desc := description; desc != "" && strings.Contains(desc, query) { + score += 2 + matched = append(matched, "description") + } + + if repoURL != "" && strings.Contains(repoURL, query) { + score += 3 + matched = append(matched, "repository_url") + } + + if repoName != "" && strings.Contains(repoName, query) { + score += 2 + matched = append(matched, "repository_name") + } + + if defaultBranch != "" && strings.Contains(defaultBranch, query) { + score++ + matched = append(matched, "default_branch") + } + + return score, matched +} + +func classifyConfidence(score int) string { + switch { + case score >= 6: + return "high" + case score >= 3: + return "medium" + default: + return "low" + } +} diff --git a/mcp_server/pkg/tools/projects/projects.go.backup b/mcp_server/pkg/tools/projects/projects.go.backup new file mode 100644 index 000000000..dff9a16fe --- /dev/null +++ b/mcp_server/pkg/tools/projects/projects.go.backup @@ -0,0 +1,577 @@ +package projects + +import ( + "context" + "fmt" + "sort" + "strings" + + "github.com/google/uuid" + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + "github.com/sirupsen/logrus" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + listToolName = "org.projects.list" + searchToolName = "org.projects.search" + defaultListLimit = 25 + maxListLimit = 200 + defaultSearchLimit = 20 + defaultSearchPages = 5 + maxSearchPages = 10 + searchPageSize = 100 +) + +// Register wires project tools into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + if s == nil { + return + } + + s.AddTool(newListTool(), listHandler(api)) + s.AddTool(newSearchTool(), searchHandler(api)) +} + +func newListTool() mcp.Tool { + return mcp.NewTool( + listToolName, + mcp.WithDescription("List projects within an organization."), + mcp.WithString("organization_id", + mcp.Required(), + mcp.Description("Organization UUID whose projects should be listed."), + ), + mcp.WithString("user_id", + mcp.Description("Optional user UUID to scope results to member-accessible projects."), + ), + mcp.WithNumber("page", + mcp.Description("1-based page number."), + mcp.Min(1), + mcp.DefaultNumber(1), + ), + mcp.WithNumber("limit", + mcp.Description("Number of projects per page (1-200)."), + mcp.Min(1), + mcp.Max(maxListLimit), + mcp.DefaultNumber(defaultListLimit), + ), + mcp.WithString("mode", + mcp.Description("Response detail level (`summary` or `detailed`). Defaults to `summary`."), + ), + ) +} + +func newSearchTool() mcp.Tool { + return mcp.NewTool( + searchToolName, + mcp.WithDescription("Search projects within an organization by name, repository URL, or description."), + mcp.WithString("organization_id", + mcp.Required(), + mcp.Description("Organization UUID whose projects should be searched."), + ), + mcp.WithString("query", + mcp.Required(), + mcp.Description("Search query matched against project name, description, and repository URL."), + ), + mcp.WithString("user_id", + mcp.Description("Optional user UUID to scope search results to accessible projects."), + ), + mcp.WithNumber("limit", + mcp.Description("Maximum number of matches to return (1-50)."), + mcp.Min(1), + mcp.Max(50), + mcp.DefaultNumber(defaultSearchLimit), + ), + mcp.WithNumber("max_pages", + mcp.Description("Maximum number of paginated fetches to evaluate (1-10). Higher values explore more projects at the cost of latency."), + mcp.Min(1), + mcp.Max(maxSearchPages), + mcp.DefaultNumber(defaultSearchPages), + ), + mcp.WithString("mode", + mcp.Description("Response detail level (`summary` or `detailed`). Defaults to `summary`."), + ), + ) +} + +type listResult struct { + Projects []projectSummary `json:"projects"` + Page int `json:"page"` + TotalPages int `json:"totalPages"` + TotalEntries int `json:"totalEntries"` + HasMore bool `json:"hasMore"` +} + +type searchResult struct { + Projects []projectSearchEntry `json:"projects"` + TotalMatches int `json:"totalMatches"` + SearchedPages int `json:"searchedPages"` + MoreAvailable bool `json:"moreAvailable"` +} + +type projectSearchEntry struct { + projectSummary + MatchConfidence string `json:"matchConfidence"` + MatchedFields []string `json:"matchedFields,omitempty"` +} + +type projectSummary struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + OrganizationID string `json:"organizationId,omitempty"` + OwnerID string `json:"ownerId,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + Visibility string `json:"visibility,omitempty"` + Repository repositorySummary `json:"repository"` + Details *projectDetails `json:"details,omitempty"` +} + +type repositorySummary struct { + URL string `json:"url,omitempty"` + Name string `json:"name,omitempty"` + DefaultBranch string `json:"defaultBranch,omitempty"` + PipelineFile string `json:"pipelineFile,omitempty"` + Integration string `json:"integrationType,omitempty"` + Public bool `json:"public"` + Connected bool `json:"connected"` + RepositoryID string `json:"repositoryId,omitempty"` + Owner string `json:"owner,omitempty"` + RunOnPresent bool `json:"runOnConfigured,omitempty"` + IntegrationURL string `json:"integrationUrl,omitempty"` +} + +type projectDetails struct { + CustomPermissions bool `json:"customPermissions,omitempty"` + SchedulerCount int `json:"schedulerCount,omitempty"` + TaskCount int `json:"taskCount,omitempty"` + DebugPermissions []string `json:"debugPermissions,omitempty"` + AttachPermissions []string `json:"attachPermissions,omitempty"` +} + +func listHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Projects() + if client == nil { + return mcp.NewToolResultError("project gRPC endpoint is not configured"), nil + } + + orgID, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + mode := strings.ToLower(strings.TrimSpace(req.GetString("mode", "summary"))) + if mode == "" { + mode = "summary" + } + if mode != "summary" && mode != "detailed" { + return mcp.NewToolResultError("mode must be either 'summary' or 'detailed'"), nil + } + includeDetails := mode == "detailed" + + page := req.GetInt("page", 1) + if page < 1 { + page = 1 + } + + limit := req.GetInt("limit", defaultListLimit) + if limit <= 0 { + limit = defaultListLimit + } else if limit > maxListLimit { + limit = maxListLimit + } + + request := &projecthubpb.ListRequest{ + Metadata: projectRequestMeta(orgID, strings.TrimSpace(req.GetString("user_id", ""))), + Pagination: &projecthubpb.PaginationRequest{ + Page: int32(page), + PageSize: int32(limit), + }, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.List(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "project.List", + "organizationId": orgID, + "page": page, + "limit": limit, + "mode": mode, + }). + WithError(err). + Error("project list RPC failed") + return mcp.NewToolResultError(fmt.Sprintf("project list RPC failed: %v", err)), nil + } + + if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { + logging.ForComponent("rpc"). + WithField("rpc", "project.List"). + WithError(err). + Warn("project list returned non-OK status") + return mcp.NewToolResultError(err.Error()), nil + } + + pagination := resp.GetPagination() + totalPages := 0 + totalEntries := 0 + hasMore := false + if pagination != nil { + totalPages = int(pagination.GetTotalPages()) + totalEntries = int(pagination.GetTotalEntries()) + hasMore = int(pagination.GetPageNumber()) < totalPages + } + + projects := make([]projectSummary, 0, len(resp.GetProjects())) + for _, proj := range resp.GetProjects() { + projects = append(projects, summarizeProject(proj, includeDetails)) + } + + return mcp.NewToolResultStructuredOnly(listResult{ + Projects: projects, + Page: page, + TotalPages: totalPages, + TotalEntries: totalEntries, + HasMore: hasMore, + }), nil + } +} + +func searchHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Projects() + if client == nil { + return mcp.NewToolResultError("project gRPC endpoint is not configured"), nil + } + + orgID, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + rawQuery, err := req.RequireString("query") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + query := strings.TrimSpace(strings.ToLower(rawQuery)) + if query == "" { + return mcp.NewToolResultError("query must not be empty"), nil + } + + mode := strings.ToLower(strings.TrimSpace(req.GetString("mode", "summary"))) + if mode == "" { + mode = "summary" + } + if mode != "summary" && mode != "detailed" { + return mcp.NewToolResultError("mode must be either 'summary' or 'detailed'"), nil + } + includeDetails := mode == "detailed" + + limit := req.GetInt("limit", defaultSearchLimit) + if limit <= 0 { + limit = defaultSearchLimit + } else if limit > 50 { + limit = 50 + } + + maxPages := req.GetInt("max_pages", defaultSearchPages) + if maxPages <= 0 { + maxPages = defaultSearchPages + } else if maxPages > maxSearchPages { + maxPages = maxSearchPages + } + + userID := strings.TrimSpace(req.GetString("user_id", "")) + + type candidate struct { + summary projectSummary + score int + matchedFields []string + } + + candidates := make([]candidate, 0, limit*2) + totalMatches := 0 + searchedPages := 0 + moreAvailable := false + + for page := 1; page <= maxPages; page++ { + request := &projecthubpb.ListRequest{ + Metadata: projectRequestMeta(orgID, userID), + Pagination: &projecthubpb.PaginationRequest{ + Page: int32(page), + PageSize: searchPageSize, + }, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + resp, err := client.List(callCtx, request) + cancel() + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "project.List", + "organizationId": orgID, + "page": page, + "mode": mode, + "query": rawQuery, + }). + WithError(err). + Error("project list RPC failed during search") + return mcp.NewToolResultError(fmt.Sprintf("project search failed: %v", err)), nil + } + + if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { + logging.ForComponent("rpc"). + WithField("rpc", "project.List"). + WithError(err). + Warn("project search received non-OK status") + return mcp.NewToolResultError(err.Error()), nil + } + + searchedPages++ + + for _, proj := range resp.GetProjects() { + score, matched := scoreProjectMatch(proj, query) + if score == 0 || len(matched) == 0 { + continue + } + totalMatches++ + candidates = append(candidates, candidate{ + summary: summarizeProject(proj, includeDetails), + score: score, + matchedFields: matched, + }) + } + + pagination := resp.GetPagination() + if pagination == nil || int(pagination.GetPageNumber()) >= int(pagination.GetTotalPages()) { + moreAvailable = false + break + } + moreAvailable = true + } + + if len(candidates) == 0 { + return mcp.NewToolResultStructuredOnly(searchResult{ + Projects: []projectSearchEntry{}, + TotalMatches: 0, + SearchedPages: searchedPages, + MoreAvailable: moreAvailable, + }), nil + } + + sort.SliceStable(candidates, func(i, j int) bool { + if candidates[i].score == candidates[j].score { + return strings.Compare(candidates[i].summary.Name, candidates[j].summary.Name) < 0 + } + return candidates[i].score > candidates[j].score + }) + + if len(candidates) > limit { + candidates = candidates[:limit] + } + + results := make([]projectSearchEntry, 0, len(candidates)) + for _, cand := range candidates { + results = append(results, projectSearchEntry{ + projectSummary: cand.summary, + MatchConfidence: classifyConfidence(cand.score), + MatchedFields: cand.matchedFields, + }) + } + + return mcp.NewToolResultStructuredOnly(searchResult{ + Projects: results, + TotalMatches: totalMatches, + SearchedPages: searchedPages, + MoreAvailable: moreAvailable || totalMatches > len(results), + }), nil + } +} + +func projectRequestMeta(orgID, userID string) *projecthubpb.RequestMeta { + return &projecthubpb.RequestMeta{ + ApiVersion: "v1alpha", + Kind: "Project", + OrgId: strings.TrimSpace(orgID), + UserId: strings.TrimSpace(userID), + ReqId: uuid.NewString(), + } +} + +func summarizeProject(project *projecthubpb.Project, includeDetails bool) projectSummary { + if project == nil { + return projectSummary{} + } + + meta := project.GetMetadata() + spec := project.GetSpec() + var repoSummary repositorySummary + if spec != nil { + repoSummary = summarizeRepository(spec.GetRepository()) + } + + summary := projectSummary{ + ID: meta.GetId(), + Name: meta.GetName(), + Description: meta.GetDescription(), + OrganizationID: meta.GetOrgId(), + OwnerID: meta.GetOwnerId(), + CreatedAt: shared.FormatTimestamp(meta.GetCreatedAt()), + Visibility: normalizeProjectVisibility(spec), + Repository: repoSummary, + } + + if includeDetails { + var debugPerms, attachPerms []string + var schedulers, tasks int + var customPerms bool + if spec != nil { + debugPerms = normalizePermissionTypes(spec.GetDebugPermissions()) + attachPerms = normalizePermissionTypes(spec.GetAttachPermissions()) + schedulers = len(spec.GetSchedulers()) + tasks = len(spec.GetTasks()) + customPerms = spec.GetCustomPermissions() + } + details := projectDetails{ + CustomPermissions: customPerms, + SchedulerCount: schedulers, + TaskCount: tasks, + DebugPermissions: debugPerms, + AttachPermissions: attachPerms, + } + summary.Details = &details + } + + return summary +} + +func summarizeRepository(repo *projecthubpb.Project_Spec_Repository) repositorySummary { + if repo == nil { + return repositorySummary{} + } + + return repositorySummary{ + URL: repo.GetUrl(), + Name: repo.GetName(), + Owner: repo.GetOwner(), + DefaultBranch: repo.GetDefaultBranch(), + PipelineFile: repo.GetPipelineFile(), + Integration: normalizeIntegration(repo.GetIntegrationType()), + Public: repo.GetPublic(), + Connected: repo.GetConnected(), + RepositoryID: repo.GetId(), + RunOnPresent: repo.GetRunPresent() != nil, + } +} + +func normalizeProjectVisibility(spec *projecthubpb.Project_Spec) string { + if spec == nil { + return "" + } + value := spec.GetVisibility().String() + return normalizeEnumName(value, "Project_Spec_") +} + +func normalizeIntegration(integration repoipb.IntegrationType) string { + return normalizeEnumName(integration.String(), "IntegrationType_") +} + +func normalizePermissionTypes(perms []projecthubpb.Project_Spec_PermissionType) []string { + if len(perms) == 0 { + return nil + } + out := make([]string, 0, len(perms)) + for _, p := range perms { + out = append(out, normalizeEnumName(p.String(), "Project_Spec_")) + } + return out +} + +func normalizeEnumName(raw, prefix string) string { + raw = strings.TrimSpace(raw) + if raw == "" { + return "" + } + if strings.HasPrefix(raw, prefix) { + raw = strings.TrimPrefix(raw, prefix) + } + raw = strings.ReplaceAll(raw, "_", " ") + return strings.ToLower(raw) +} + +func scoreProjectMatch(project *projecthubpb.Project, query string) (int, []string) { + if project == nil { + return 0, nil + } + metadata := project.GetMetadata() + spec := project.GetSpec() + var repo *projecthubpb.Project_Spec_Repository + if spec != nil { + repo = spec.GetRepository() + } + + score := 0 + var matched []string + + name := strings.ToLower(strings.TrimSpace(metadata.GetName())) + description := strings.ToLower(strings.TrimSpace(metadata.GetDescription())) + repoURL := "" + repoName := "" + defaultBranch := "" + if repo != nil { + repoURL = strings.ToLower(strings.TrimSpace(repo.GetUrl())) + repoName = strings.ToLower(strings.TrimSpace(repo.GetName())) + defaultBranch = strings.ToLower(strings.TrimSpace(repo.GetDefaultBranch())) + } + + if name == query { + score += 6 + matched = append(matched, "name_exact") + } else if strings.Contains(name, query) { + score += 4 + matched = append(matched, "name") + } + + if desc := description; desc != "" && strings.Contains(desc, query) { + score += 2 + matched = append(matched, "description") + } + + if repoURL != "" && strings.Contains(repoURL, query) { + score += 3 + matched = append(matched, "repository_url") + } + + if repoName != "" && strings.Contains(repoName, query) { + score += 2 + matched = append(matched, "repository_name") + } + + if defaultBranch != "" && strings.Contains(defaultBranch, query) { + score++ + matched = append(matched, "default_branch") + } + + return score, matched +} + +func classifyConfidence(score int) string { + switch { + case score >= 6: + return "high" + case score >= 3: + return "medium" + default: + return "low" + } +} diff --git a/mcp_server/pkg/tools/projects/projects_test.go b/mcp_server/pkg/tools/projects/projects_test.go new file mode 100644 index 000000000..503a2c2ab --- /dev/null +++ b/mcp_server/pkg/tools/projects/projects_test.go @@ -0,0 +1,227 @@ +package projects + +import ( + "context" + "net/http" + "testing" + "time" + + "github.com/mark3labs/mcp-go/mcp" + projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestListProjectsSummary(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{ + keysetResponses: map[string]*projecthubpb.ListKeysetResponse{ + "": { + Metadata: okMetadata(), + NextPageToken: "next-page-token", + Projects: []*projecthubpb.Project{ + makeProject("proj-1", "API Service", orgID, "https://github.com/example/api", "main"), + }, + }, + }, + } + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + } + + handler := listHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + "cursor": "", + "limit": 10, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if res.IsError { + t.Fatalf("expected success, got error result: %+v", res) + } + + out, ok := res.StructuredContent.(listResult) + if !ok { + t.Fatalf("unexpected structured content type: %T", res.StructuredContent) + } + if len(out.Projects) != 1 { + t.Fatalf("expected 1 project, got %d", len(out.Projects)) + } + if out.NextCursor != "next-page-token" { + t.Fatalf("expected nextCursor=next-page-token, got %q", out.NextCursor) + } + if out.Projects[0].Repository.URL != "https://github.com/example/api" { + t.Fatalf("unexpected repository url: %s", out.Projects[0].Repository.URL) + } +} + +func TestSearchProjectsMatches(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{ + responses: map[int32]*projecthubpb.ListResponse{ + 1: { + Metadata: okMetadata(), + Pagination: &projecthubpb.PaginationResponse{ + PageNumber: 1, + PageSize: searchPageSize, + TotalEntries: 2, + TotalPages: 2, + }, + Projects: []*projecthubpb.Project{ + makeProject("proj-1", "API Service", orgID, "https://github.com/example/api", "main"), + makeProject("proj-2", "Marketing Site", orgID, "https://github.com/example/marketing", "main"), + }, + }, + 2: { + Metadata: okMetadata(), + Pagination: &projecthubpb.PaginationResponse{ + PageNumber: 2, + PageSize: searchPageSize, + TotalEntries: 2, + TotalPages: 2, + }, + Projects: []*projecthubpb.Project{ + makeProject("proj-3", "Payments API", orgID, "https://github.com/example/payments", "release"), + }, + }, + }, + } + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + } + + handler := searchHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + "query": "api", + "limit": 2, + "max_pages": 2, + "mode": "detailed", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if res.IsError { + t.Fatalf("expected success, got error result: %+v", res) + } + + out, ok := res.StructuredContent.(searchResult) + if !ok { + t.Fatalf("unexpected structured content type: %T", res.StructuredContent) + } + + if len(out.Projects) != 2 { + t.Fatalf("expected 2 results, got %d", len(out.Projects)) + } + + if out.Projects[0].ID != "proj-1" { + t.Fatalf("expected proj-1 first, got %s", out.Projects[0].ID) + } + + if out.Projects[0].Details == nil { + t.Fatalf("expected detailed mode to include details") + } + + if out.TotalMatches < len(out.Projects) { + t.Fatalf("expected total matches to be >= returned projects") + } + + if stub.pageCalls[0] != 1 || stub.pageCalls[1] != 2 { + t.Fatalf("expected pages 1 and 2 to be fetched, got %v", stub.pageCalls) + } +} + +type projectClientStub struct { + projecthubpb.ProjectServiceClient + keysetResponses map[string]*projecthubpb.ListKeysetResponse + responses map[int32]*projecthubpb.ListResponse + calls []string + pageCalls []int32 + err error +} + +func (p *projectClientStub) ListKeyset(ctx context.Context, in *projecthubpb.ListKeysetRequest, opts ...grpc.CallOption) (*projecthubpb.ListKeysetResponse, error) { + cursor := in.GetPageToken() + p.calls = append(p.calls, cursor) + if p.err != nil { + return nil, p.err + } + if resp, ok := p.keysetResponses[cursor]; ok { + return resp, nil + } + return &projecthubpb.ListKeysetResponse{ + Metadata: okMetadata(), + NextPageToken: "", + Projects: []*projecthubpb.Project{}, + }, nil +} + +func (p *projectClientStub) List(ctx context.Context, in *projecthubpb.ListRequest, opts ...grpc.CallOption) (*projecthubpb.ListResponse, error) { + page := in.GetPagination().GetPage() + p.pageCalls = append(p.pageCalls, page) + if p.err != nil { + return nil, p.err + } + if resp, ok := p.responses[page]; ok { + return resp, nil + } + return &projecthubpb.ListResponse{ + Metadata: okMetadata(), + Pagination: &projecthubpb.PaginationResponse{PageNumber: page, PageSize: in.GetPagination().GetPageSize()}, + Projects: []*projecthubpb.Project{}, + }, nil +} + +func okMetadata() *projecthubpb.ResponseMeta { + return &projecthubpb.ResponseMeta{ + Status: &projecthubpb.ResponseMeta_Status{Code: projecthubpb.ResponseMeta_OK}, + } +} + +func makeProject(id, name, orgID, repoURL, defaultBranch string) *projecthubpb.Project { + return &projecthubpb.Project{ + Metadata: &projecthubpb.Project_Metadata{ + Id: id, + Name: name, + OrgId: orgID, + OwnerId: "user-1", + CreatedAt: timestamppb.New(time.Unix(1_700_000_000, 0)), + }, + Spec: &projecthubpb.Project_Spec{ + Repository: &projecthubpb.Project_Spec_Repository{ + Url: repoURL, + DefaultBranch: defaultBranch, + IntegrationType: repoipb.IntegrationType_GITHUB_APP, + PipelineFile: ".semaphore/semaphore.yml", + }, + Schedulers: []*projecthubpb.Project_Spec_Scheduler{}, + Tasks: []*projecthubpb.Project_Spec_Task{}, + }, + } +} diff --git a/mcp_server/pkg/tools/workflows/workflows.go b/mcp_server/pkg/tools/workflows/workflows.go new file mode 100644 index 000000000..4dd761500 --- /dev/null +++ b/mcp_server/pkg/tools/workflows/workflows.go @@ -0,0 +1,435 @@ +package workflows + +import ( + "context" + "fmt" + "strings" + + "github.com/mark3labs/mcp-go/mcp" + "github.com/mark3labs/mcp-go/server" + "github.com/sirupsen/logrus" + + workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" +) + +const ( + searchToolName = "workflows_search" + defaultLimit = 20 + maxLimit = 100 + missingWorkflowError = "workflow gRPC endpoint is not configured" +) + +func searchFullDescription() string { + return `Search recent workflows for a project (most recent first). + +Use this when you need to answer: +- "Show the last N workflows for project X" +- "List failed workflows on the main branch" +- "Who triggered the latest deployment workflow?" + +- organization_id: identify which organization’s project you are querying (required) +- branch: limit results to a specific branch (e.g., "main" or "release/*") +- requester: filter by a specific requester (UUID, username, or automation handle) +- my_workflows_only: when true (default), limit results to workflows triggered by the authenticated user +- cursor: paginate through older results using the previous response's nextCursor +- limit: number of workflows to return (default 20, max 100) + +Response modes: +- summary (default): workflow ID, branch, triggered by, commit SHA, created time +- detailed: adds pipeline IDs, rerun metadata, and repository IDs + +Examples: +1. List recent workflows for a project: + workflows_search(project_id="...", organization_id="...", limit=10) + +2. Find failed workflows on main branch: + workflows_search(project_id="...", organization_id="...", branch="main", mode="detailed") + +3. Search workflows by automation requester: + workflows_search(project_id="...", organization_id="...", requester="deploy-bot", my_workflows_only=false) + +4. Paginate through older workflows: + workflows_search(project_id="...", organization_id="...", cursor="opaque-token-from-previous-call") + +Next steps: +- Call jobs_logs(job_id="...") after identifying failing jobs +- Use workflows_search(project_id="...", branch="main") regularly to monitor your own workflows` +} + +// Register wires the workflows tool into the MCP server. +func Register(s *server.MCPServer, api internalapi.Provider) { + s.AddTool(newTool(searchToolName, searchFullDescription()), listHandler(api)) +} + +func newTool(name, description string) mcp.Tool { + return mcp.NewTool( + name, + mcp.WithDescription(description), + mcp.WithString("project_id", + mcp.Required(), + mcp.Description("Project UUID that scopes the workflow search. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString("organization_id", + mcp.Required(), + mcp.Description("Organization UUID associated with the project. Keep this consistent across subsequent tool calls."), + mcp.Pattern(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`), + ), + mcp.WithString("branch", + mcp.Description("Optional branch filter. Supports exact matches (e.g., \"main\")."), + ), + mcp.WithString("requester", + mcp.Description("Optional requester identifier (UUID, username, or automation handle) to filter workflows."), + ), + mcp.WithBoolean("my_workflows_only", + mcp.Description("When true (default), only return workflows triggered by the authenticated user."), + func(schema map[string]any) { schema["default"] = true }, + ), + mcp.WithString("cursor", + mcp.Description("Pagination token from a prior call's nextCursor. Use to fetch older workflows."), + ), + mcp.WithNumber("limit", + mcp.Description("Number of workflows to return (1-100). Defaults to 20."), + mcp.Min(1), + mcp.Max(maxLimit), + mcp.DefaultNumber(defaultLimit), + ), + mcp.WithString("mode", + mcp.Description("Response detail. Use 'summary' for compact output; 'detailed' adds pipeline IDs and rerun metadata."), + mcp.Enum("summary", "detailed"), + mcp.DefaultString("summary"), + ), + mcp.WithReadOnlyHintAnnotation(true), + mcp.WithIdempotentHintAnnotation(true), + mcp.WithOpenWorldHintAnnotation(true), + ) +} + +type summary struct { + ID string `json:"id"` + InitialPipeline string `json:"initialPipelineId,omitempty"` + ProjectID string `json:"projectId,omitempty"` + OrganizationID string `json:"organizationId,omitempty"` + Branch string `json:"branch,omitempty"` + CommitSHA string `json:"commitSha,omitempty"` + RequesterID string `json:"requesterId,omitempty"` + TriggeredBy string `json:"triggeredBy,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + RerunOf string `json:"rerunOf,omitempty"` + RepositoryID string `json:"repositoryId,omitempty"` +} + +type listResult struct { + Workflows []summary `json:"workflows"` + NextCursor string `json:"nextCursor,omitempty"` +} + +func listHandler(api internalapi.Provider) server.ToolHandlerFunc { + return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { + client := api.Workflow() + if client == nil { + return mcp.NewToolResultError(missingWorkflowError), nil + } + + projectIDRaw, err := req.RequireString("project_id") + if err != nil { + return mcp.NewToolResultError(`Missing required argument: project_id. Provide the project UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).`), nil + } + projectID := strings.TrimSpace(projectIDRaw) + if err := shared.ValidateUUID(projectID, "project_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + orgIDRaw, err := req.RequireString("organization_id") + if err != nil { + return mcp.NewToolResultError(`Missing required argument: organization_id. Provide the organization UUID returned by organizations_list.`), nil + } + orgID := strings.TrimSpace(orgIDRaw) + if err := shared.ValidateUUID(orgID, "organization_id"); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil + } + + branch := strings.TrimSpace(req.GetString("branch", "")) + requesterFilter := strings.TrimSpace(req.GetString("requester", "")) + myWorkflowsOnly := mcp.ParseBoolean(req, "my_workflows_only", true) + cursor := strings.TrimSpace(req.GetString("cursor", "")) + + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can scope workflow searches to the authenticated caller. + +Troubleshooting: +- Ensure requests pass through the auth proxy +- Verify the header value is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + + limit := req.GetInt("limit", defaultLimit) + if limit <= 0 { + limit = defaultLimit + } else if limit > maxLimit { + limit = maxLimit + } + + pageSize, err := shared.IntToInt32(limit, "limit") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + + request := &workflowpb.ListKeysetRequest{ + ProjectId: projectID, + PageSize: pageSize, + PageToken: cursor, + Order: workflowpb.ListKeysetRequest_BY_CREATION_TIME_DESC, + Direction: workflowpb.ListKeysetRequest_NEXT, + } + + request.OrganizationId = orgID + if branch != "" { + request.BranchName = branch + } + var effectiveRequester string + if requesterFilter != "" { + resolved, err := resolveRequesterID(ctx, api, requesterFilter) + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + effectiveRequester = resolved + } else if myWorkflowsOnly { + effectiveRequester = userID + } + + if effectiveRequester != "" { + request.RequesterId = effectiveRequester + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + effectiveRequester = request.GetRequesterId() + resp, err := client.ListKeyset(callCtx, request) + if err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "workflow.ListKeyset", + "projectId": projectID, + "limit": limit, + "cursor": cursor, + "branch": branch, + "userId": userID, + "requester": effectiveRequester, + "scoped": myWorkflowsOnly, + "mode": mode, + "hasOrgId": orgID != "", + "legacyTool": false, + }). + WithError(err). + Error("workflow list RPC failed") + return mcp.NewToolResultError(fmt.Sprintf(`Workflow list RPC failed: %v + +Possible causes: +- Project does not exist or you lack access rights +- Internal workflow service is unavailable (retry shortly) +- Network connectivity issues between MCP server and workflow service + +Try reducing the limit or removing filters to see if results return.`, err)), nil + } + + if err := shared.CheckStatus(resp.GetStatus()); err != nil { + logging.ForComponent("rpc"). + WithFields(logrus.Fields{ + "rpc": "workflow.ListKeyset", + "projectId": projectID, + }). + WithError(err). + Warn("workflow list returned non-OK status") + return mcp.NewToolResultError(fmt.Sprintf(`Request failed: %v + +Double-check that: +- project_id is correct +- You have permission to view workflows for this project +- The organization is active and not suspended`, err)), nil + } + + workflows := make([]summary, 0, len(resp.GetWorkflows())) + for _, wf := range resp.GetWorkflows() { + workflows = append(workflows, summary{ + ID: wf.GetWfId(), + InitialPipeline: wf.GetInitialPplId(), + ProjectID: wf.GetProjectId(), + OrganizationID: wf.GetOrganizationId(), + Branch: wf.GetBranchName(), + CommitSHA: wf.GetCommitSha(), + RequesterID: wf.GetRequesterId(), + TriggeredBy: triggeredByToString(wf.GetTriggeredBy()), + CreatedAt: shared.FormatTimestamp(wf.GetCreatedAt()), + RerunOf: wf.GetRerunOf(), + RepositoryID: wf.GetRepositoryId(), + }) + } + + result := listResult{Workflows: workflows} + if token := strings.TrimSpace(resp.GetNextPageToken()); token != "" { + result.NextCursor = token + } + + markdown := formatWorkflowsMarkdown(result, mode, projectID, orgID, branch, requesterFilter, myWorkflowsOnly, userID, limit) + markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) + + return &mcp.CallToolResult{ + Content: []mcp.Content{ + mcp.NewTextContent(markdown), + }, + StructuredContent: result, + }, nil + } +} + +func formatWorkflowsMarkdown(result listResult, mode, projectID, orgID, branch, requester string, myWorkflowsOnly bool, userID string, limit int) string { + mb := shared.NewMarkdownBuilder() + + header := fmt.Sprintf("Workflows (%d returned)", len(result.Workflows)) + mb.H1(header) + + if len(result.Workflows) == 0 { + mb.Paragraph("No workflows matched the current filters.") + mb.Paragraph("**Suggestions:**") + mb.ListItem("Remove the branch filter to broaden the search") + mb.ListItem("Verify the project_id is correct and has recent activity") + mb.ListItem("Confirm the authenticated user has permission to view this project") + return mb.String() + } + + for idx, wf := range result.Workflows { + if idx > 0 { + mb.Line() + } + + mb.H2(fmt.Sprintf("Workflow %s", wf.ID)) + + if wf.CreatedAt != "" { + mb.KeyValue("Created", wf.CreatedAt) + } + if wf.Branch != "" { + mb.KeyValue("Branch", wf.Branch) + } + mb.KeyValue("Triggered By", humanizeTriggeredBy(wf.TriggeredBy)) + + if mode == "detailed" { + if wf.RequesterID != "" { + mb.KeyValue("Requester", fmt.Sprintf("`%s`", wf.RequesterID)) + } + if wf.CommitSHA != "" { + mb.KeyValue("Commit", shortenCommit(wf.CommitSHA)) + } + if wf.InitialPipeline != "" { + mb.KeyValue("Initial Pipeline", fmt.Sprintf("`%s`", wf.InitialPipeline)) + } + if wf.RepositoryID != "" { + mb.KeyValue("Repository", fmt.Sprintf("`%s`", wf.RepositoryID)) + } + if wf.RerunOf != "" { + mb.KeyValue("Rerun Of", fmt.Sprintf("`%s`", wf.RerunOf)) + } + if wf.ProjectID != "" { + mb.KeyValue("Project ID", fmt.Sprintf("`%s`", wf.ProjectID)) + } + if wf.OrganizationID != "" { + mb.KeyValue("Organization ID", fmt.Sprintf("`%s`", wf.OrganizationID)) + } + } + } + + mb.Line() + if result.NextCursor != "" { + mb.Paragraph(fmt.Sprintf("📄 **More available**. Use `cursor=\"%s\"`", result.NextCursor)) + } + + return mb.String() +} + +func humanizeTriggeredBy(value string) string { + value = strings.TrimSpace(value) + if value == "" { + return "Unspecified" + } + parts := strings.Split(value, "_") + for i, part := range parts { + if part == "" { + continue + } + part = strings.ToLower(part) + parts[i] = strings.ToUpper(part[:1]) + part[1:] + } + return strings.Join(parts, " ") +} + +func shortenCommit(sha string) string { + sha = strings.TrimSpace(sha) + if len(sha) > 12 { + return sha[:12] + } + return sha +} + +func resolveRequesterID(ctx context.Context, api internalapi.Provider, raw string) (string, error) { + candidate := strings.ToLower(strings.TrimSpace(raw)) + if candidate == "" { + return "", fmt.Errorf("requester must not be empty") + } + + if err := shared.ValidateUUID(candidate, "requester"); err == nil { + return candidate, nil + } + + client := api.Users() + if client == nil { + return "", fmt.Errorf(`Unable to resolve requester %q: user service is not configured. Provide a user UUID or configure INTERNAL_API_URL_USER.`, raw) + } + + req := &userpb.DescribeByRepositoryProviderRequest{ + Provider: &userpb.RepositoryProvider{ + Type: userpb.RepositoryProvider_GITHUB, + Scope: userpb.RepositoryProvider_PUBLIC, + Login: candidate, + }, + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + resp, err := client.DescribeByRepositoryProvider(callCtx, req) + if err != nil { + logging.ForComponent("rpc"). + WithField("rpc", "user.DescribeByRepositoryProvider"). + WithField("login", candidate). + WithError(err). + Warn("user lookup by repository provider failed") + return "", fmt.Errorf(`Failed to resolve requester %q via GitHub handle: %v`, raw, err) + } + + userID := strings.ToLower(strings.TrimSpace(resp.GetId())) + if userID == "" { + return "", fmt.Errorf(`Failed to resolve requester %q: no matching user found.`, raw) + } + + return userID, nil +} + +func triggeredByToString(value workflowpb.TriggeredBy) string { + if name, ok := workflowpb.TriggeredBy_name[int32(value)]; ok { + return strings.ToLower(name) + } + return "unspecified" +} diff --git a/mcp_server/pkg/tools/workflows/workflows_test.go b/mcp_server/pkg/tools/workflows/workflows_test.go new file mode 100644 index 000000000..f2333cb4a --- /dev/null +++ b/mcp_server/pkg/tools/workflows/workflows_test.go @@ -0,0 +1,236 @@ +package workflows + +import ( + "context" + "net/http" + "strings" + "testing" + "time" + + "github.com/mark3labs/mcp-go/mcp" + + workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" + userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + + "google.golang.org/genproto/googleapis/rpc/code" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestListWorkflows(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + client := &workflowClientStub{ + listResp: &workflowpb.ListKeysetResponse{ + Status: &statuspb.Status{Code: code.Code_OK}, + Workflows: []*workflowpb.WorkflowDetails{ + { + WfId: "wf-123", + ProjectId: projectID, + BranchName: "main", + CommitSha: "abc123", + CreatedAt: timestamppb.New(time.Unix(1700000000, 0)), + TriggeredBy: workflowpb.TriggeredBy_MANUAL_RUN, + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + NextPageToken: "cursor", + }, + } + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + Timeout: time.Second, + } + + handler := listHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "limit": 10, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + result, ok := res.StructuredContent.(listResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + + if len(result.Workflows) != 1 { + toFail(t, "expected 1 workflow, got %d", len(result.Workflows)) + } + + wf := result.Workflows[0] + if wf.ID != "wf-123" || wf.ProjectID != projectID || wf.TriggeredBy != "manual_run" { + toFail(t, "unexpected workflow summary: %+v", wf) + } + + if result.NextCursor != "cursor" { + toFail(t, "expected next cursor 'cursor', got %q", result.NextCursor) + } + + if client.lastList == nil { + toFail(t, "expected list request to be recorded") + } + if got := client.lastList.GetRequesterId(); got != "99999999-aaaa-bbbb-cccc-dddddddddddd" { + toFail(t, "expected requester to default to user header, got %s", got) + } + + if got := client.lastList.GetPageSize(); got != 10 { + toFail(t, "expected page size 10, got %d", got) + } +} + +func TestListWorkflowsWithRequesterOverride(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + requester := "deploy-bot" + client := &workflowClientStub{ + listResp: &workflowpb.ListKeysetResponse{ + Status: &statuspb.Status{Code: code.Code_OK}, + Workflows: []*workflowpb.WorkflowDetails{}, + }, + } + userClient := &userClientStub{ + response: &userpb.User{Id: "00000000-1111-2222-3333-444444444444"}, + } + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + UserClient: userClient, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "my_workflows_only": false, + "requester": requester, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + _, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + if client.lastList == nil { + toFail(t, "expected list request to be recorded") + } + if got := strings.TrimSpace(client.lastList.GetRequesterId()); got != "00000000-1111-2222-3333-444444444444" { + toFail(t, "expected requester override to propagate, got %s", got) + } + if userClient.lastRequest == nil || userClient.lastRequest.GetProvider() == nil { + toFail(t, "expected user lookup to be recorded") + } + if login := userClient.lastRequest.GetProvider().GetLogin(); login != requester { + toFail(t, "expected user lookup login %s, got %s", requester, login) + } +} + +type workflowClientStub struct { + workflowpb.WorkflowServiceClient + listResp *workflowpb.ListKeysetResponse + listErr error + lastList *workflowpb.ListKeysetRequest +} + +func (s *workflowClientStub) Schedule(context.Context, *workflowpb.ScheduleRequest, ...grpc.CallOption) (*workflowpb.ScheduleResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) GetPath(context.Context, *workflowpb.GetPathRequest, ...grpc.CallOption) (*workflowpb.GetPathResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) List(context.Context, *workflowpb.ListRequest, ...grpc.CallOption) (*workflowpb.ListResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) ListKeyset(ctx context.Context, in *workflowpb.ListKeysetRequest, opts ...grpc.CallOption) (*workflowpb.ListKeysetResponse, error) { + s.lastList = in + if s.listErr != nil { + return nil, s.listErr + } + return s.listResp, nil +} + +type userClientStub struct { + userpb.UserServiceClient + response *userpb.User + err error + lastRequest *userpb.DescribeByRepositoryProviderRequest +} + +func (u *userClientStub) DescribeByRepositoryProvider(ctx context.Context, in *userpb.DescribeByRepositoryProviderRequest, opts ...grpc.CallOption) (*userpb.User, error) { + u.lastRequest = in + if u.err != nil { + return nil, u.err + } + if u.response == nil { + u.response = &userpb.User{Id: "ffffffff-ffff-ffff-ffff-ffffffffffff"} + } + return u.response, nil +} + +func (s *workflowClientStub) ListGrouped(context.Context, *workflowpb.ListGroupedRequest, ...grpc.CallOption) (*workflowpb.ListGroupedResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) ListGroupedKS(context.Context, *workflowpb.ListGroupedKSRequest, ...grpc.CallOption) (*workflowpb.ListGroupedKSResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) ListLatestWorkflows(context.Context, *workflowpb.ListLatestWorkflowsRequest, ...grpc.CallOption) (*workflowpb.ListLatestWorkflowsResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) Describe(context.Context, *workflowpb.DescribeRequest, ...grpc.CallOption) (*workflowpb.DescribeResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) DescribeMany(context.Context, *workflowpb.DescribeManyRequest, ...grpc.CallOption) (*workflowpb.DescribeManyResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) Terminate(context.Context, *workflowpb.TerminateRequest, ...grpc.CallOption) (*workflowpb.TerminateResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) ListLabels(context.Context, *workflowpb.ListLabelsRequest, ...grpc.CallOption) (*workflowpb.ListLabelsResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) Reschedule(context.Context, *workflowpb.RescheduleRequest, ...grpc.CallOption) (*workflowpb.ScheduleResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) GetProjectId(context.Context, *workflowpb.GetProjectIdRequest, ...grpc.CallOption) (*workflowpb.GetProjectIdResponse, error) { + panic("not implemented") +} + +func (s *workflowClientStub) Create(context.Context, *workflowpb.CreateRequest, ...grpc.CallOption) (*workflowpb.CreateResponse, error) { + panic("not implemented") +} + +func toFail(t *testing.T, format string, args ...any) { + t.Helper() + t.Fatalf(format, args...) +} diff --git a/mcp_server/script/internal_api/gen.sh b/mcp_server/script/internal_api/gen.sh new file mode 100755 index 000000000..3085d1c58 --- /dev/null +++ b/mcp_server/script/internal_api/gen.sh @@ -0,0 +1,174 @@ +#!/bin/bash +set -euo pipefail + +if [[ $# -lt 1 || -z ${1:-} ]]; then + echo "Usage: $0 [branch] [internal_api_dir]" >&2 + exit 1 +fi + +MODULE_LIST=$1 +INTERNAL_API_BRANCH=${2:-master} +INTERNAL_API_SOURCE=${3:-/tmp/internal_api} + +IFS=',' read -r -a RAW_MODULES <<< "${MODULE_LIST}" + +RESPONSE_STATUS_MODULE="include/internal_api/response_status" + +declare -A SEEN +MODULES=() + +canon_module() { + local value="$1" + case "$value" in + "" ) return 1 ;; + "response_status"|"internal_api/response_status") + echo "$RESPONSE_STATUS_MODULE" + ;; + *) + echo "$value" + ;; + esac +} + +add_module() { + local module + module=$(canon_module "$1") || return 0 + if [[ -z ${SEEN[$module]:-} ]]; then + SEEN[$module]=1 + MODULES+=("$module") + fi +} + +for raw in "${RAW_MODULES[@]}"; do + add_module "$raw" +done + +if [[ -z ${SEEN[$RESPONSE_STATUS_MODULE]:-} ]]; then + MODULES+=("$RESPONSE_STATUS_MODULE") +fi + +if [[ ${#MODULES[@]} -eq 0 ]]; then + echo "No internal_api modules provided." >&2 + exit 1 +fi + +export PATH="$PATH:$(go env GOPATH)/bin" + +INTERNAL_API_OUT=/app/pkg/internal_api +MODULE_PREFIX=github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api + +WORK_DIR=$(mktemp -d) +trap 'rm -rf "$WORK_DIR"' EXIT +cp -R "$INTERNAL_API_SOURCE"/. "$WORK_DIR" >/dev/null + +sanitize_package() { + local module="$1" + if [[ "$module" == include/internal_api/* ]]; then + echo "${module#include/internal_api/}" + elif [[ "$module" == include/* ]]; then + echo "${module#include/}" + else + echo "$module" + fi +} + +proto_file_for() { + local module="$1" + local base + base=$(basename "$module") + + local candidates=( + "${WORK_DIR}/${module}.proto" + ) + + case "$module" in + include/*) + candidates+=( + "${WORK_DIR}/include/${module#include/}.proto" + "${WORK_DIR}/include/${module#include/}/${base}.proto" + ) + ;; + *) + candidates+=( + "${WORK_DIR}/${module}/${base}.proto" + ) + ;; + esac + + for candidate in "${candidates[@]}"; do + if [[ -f "$candidate" ]]; then + echo "$candidate" + return 0 + fi + done + + echo "Proto file not found. Checked: ${candidates[*]}" >&2 + exit 1 +} + +update_go_package() { + local module="$1" + local package + package=$(sanitize_package "$module") + local proto_file + proto_file=$(proto_file_for "$module") + + sed --in-place '/go_package/d' "$proto_file" + if [[ $(tail -c1 "$proto_file") != $'\n' ]]; then + printf '\n' >> "$proto_file" + fi + printf 'option go_package = "%s/%s";\n' "$MODULE_PREFIX" "$package" >> "$proto_file" +} + +generate_proto_definition() { + local module="$1" + local package + package=$(sanitize_package "$module") + local proto_file + proto_file=$(proto_file_for "$module") + local out_dir="$INTERNAL_API_OUT/$package" + local mapping="M${proto_file}=internal_api/${package}" + + mkdir -p "$out_dir" + + protoc \ + --proto_path "$WORK_DIR" \ + --proto_path "$WORK_DIR/include" \ + --proto_path "$WORK_DIR/include/internal_api" \ + --go_out="$out_dir" \ + --go_opt=paths=source_relative \ + --go_opt="${mapping}" \ + --go_opt=Mgoogle/protobuf/timestamp.proto=google.golang.org/protobuf/types/known/timestamppb \ + --go_opt=Mgoogle/protobuf/empty.proto=google.golang.org/protobuf/types/known/emptypb \ + --go_opt=Mgoogle/protobuf/duration.proto=google.golang.org/protobuf/types/known/durationpb \ + --go_opt=Mgoogle/protobuf/any.proto=google.golang.org/protobuf/types/known/anypb \ + --go_opt=Mgoogle/rpc/status.proto=google.golang.org/genproto/googleapis/rpc/status \ + --go_opt=Mgoogle/rpc/code.proto=google.golang.org/genproto/googleapis/rpc/code \ + --go_opt=Mgoogle/rpc/errdetails.proto=google.golang.org/genproto/googleapis/rpc/errdetails \ + --go-grpc_out="$out_dir" \ + --go-grpc_opt=paths=source_relative \ + --go-grpc_opt=require_unimplemented_servers=false \ + "$proto_file" + + if [[ "$module" == include/* ]]; then + local base + base=$(basename "$module") + local nested="$out_dir/include/${module#include/}.pb.go" + if [[ -f "$nested" ]]; then + mv "$nested" "$out_dir/${base}.pb.go" + rm -rf "$out_dir/include" + fi + fi +} + +rm -rf "$INTERNAL_API_OUT" + +for module in "${MODULES[@]}"; do + update_go_package "$module" +done + +for module in "${MODULES[@]}"; do + generate_proto_definition "$module" +done + +echo "Generated $((${#MODULES[@]})) module(s) into $INTERNAL_API_OUT" From dab5764c207afe0286e28e89920e4f7f4bf5a923 Mon Sep 17 00:00:00 2001 From: Amir Hasanbasic <43892661+hamir-suspect@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:29:44 +0100 Subject: [PATCH 2/5] chore(mcp_server): Add codeowners (#689) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📝 Description Just adding CODEOWNERS for the new service --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e35b9f733..7b7dbe18c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -23,6 +23,7 @@ /hooks_receiver/ @hamir-suspect @DamjanBecirovic @forestileao /keycloak/ @skipi @hamir-suspect /loghub2/ @lucaspin @hamir-suspect @DamjanBecirovic +/mcp_server/ @DamjanBecirovic @hamir-suspect @dexyk /notifications/ @hamir-suspect @dexyk @DamjanBecirovic /periodic_scheduler/ @DamjanBecirovic @dexyk @skipi /plumber/ @DamjanBecirovic @dexyk @skipi From 4776e3b8fba71a0d564d4990d0887c05f963f813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damjan=20Be=C4=87irovi=C4=87?= Date: Tue, 4 Nov 2025 13:24:13 +0100 Subject: [PATCH 3/5] MCP - security improvements (#688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📝 Description This PR improves the security posture of the exposed MCP tools by adding: - RBAC permissions check for the user on whose behalf the action is taken - Verifying the resource ownership of the requested resources - Sanitization of input parameters before passing them to the backend services --------- Co-authored-by: hamir-suspect --- mcp_server/go.mod | 3 + mcp_server/go.sum | 4 + mcp_server/pkg/authz/authz.go | 120 +++++ mcp_server/pkg/tools/internal/shared/auth.go | 42 ++ .../pkg/tools/internal/shared/guardrails.go | 81 +++ .../pkg/tools/internal/shared/validation.go | 111 +++- .../tools/internal/shared/validation_test.go | 209 ++++++++ mcp_server/pkg/tools/jobs/describe.go | 63 ++- mcp_server/pkg/tools/jobs/jobs_test.go | 417 ++++++++++++++- mcp_server/pkg/tools/jobs/logs.go | 45 +- .../pkg/tools/organizations/organizations.go | 45 +- mcp_server/pkg/tools/pipelines/pipelines.go | 169 ++++++- .../pkg/tools/pipelines/pipelines_test.go | 476 +++++++++++++++++- mcp_server/pkg/tools/projects/projects.go | 84 +++- .../pkg/tools/projects/projects_test.go | 297 +++++++++++ mcp_server/pkg/tools/workflows/workflows.go | 71 ++- .../pkg/tools/workflows/workflows_test.go | 255 +++++++++- 17 files changed, 2422 insertions(+), 70 deletions(-) create mode 100644 mcp_server/pkg/authz/authz.go create mode 100644 mcp_server/pkg/tools/internal/shared/auth.go create mode 100644 mcp_server/pkg/tools/internal/shared/guardrails.go create mode 100644 mcp_server/pkg/tools/internal/shared/validation_test.go diff --git a/mcp_server/go.mod b/mcp_server/go.mod index 0e3e55a70..cc7dcad8c 100644 --- a/mcp_server/go.mod +++ b/mcp_server/go.mod @@ -8,12 +8,15 @@ require ( github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 github.com/mark3labs/mcp-go v0.41.1 + github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92 github.com/sirupsen/logrus v1.9.3 google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f google.golang.org/grpc v1.75.1 google.golang.org/protobuf v1.36.10 ) +require gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect + require ( github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect diff --git a/mcp_server/go.sum b/mcp_server/go.sum index b9ff37e5b..65f7c2c7d 100644 --- a/mcp_server/go.sum +++ b/mcp_server/go.sum @@ -28,6 +28,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mark3labs/mcp-go v0.41.1 h1:w78eWfiQam2i8ICL7AL0WFiq7KHNJQ6UB53ZVtH4KGA= github.com/mark3labs/mcp-go v0.41.1/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= +github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92 h1:OmDghaSHy96nHV+ZnXBKQnXBLvuSQNdFZRYIQiDDXsg= +github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92/go.mod h1:Z+qanDzSoUGCbcrTM7G6YCA9ST2KBdte7sCz+HQAp7I= 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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= @@ -76,3 +78,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= +gopkg.in/alexcesaro/statsd.v2 v2.0.0/go.mod h1:i0ubccKGzBVNBpdGV5MocxyA/XlLUJzA7SLonnE4drU= diff --git a/mcp_server/pkg/authz/authz.go b/mcp_server/pkg/authz/authz.go new file mode 100644 index 000000000..ff5e93b78 --- /dev/null +++ b/mcp_server/pkg/authz/authz.go @@ -0,0 +1,120 @@ +package authz + +import ( + "context" + "errors" + "fmt" + "strings" + + watchman "github.com/renderedtext/go-watchman" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" + "github.com/sirupsen/logrus" +) + +var ( + // ErrPermissionDenied represents a missing RBAC permission for the caller. + ErrPermissionDenied = errors.New("permission denied") + + // ErrRBACUnavailable indicates that the RBAC client is not configured. + ErrRBACUnavailable = errors.New("rbac client is not configured") +) + +// CheckOrgPermission ensures the caller has all requested organization-level permissions. +func CheckOrgPermission(ctx context.Context, api internalapi.Provider, userID, orgID string, permissions ...string) error { + return checkPermissions(ctx, api, userID, orgID, "", permissions) +} + +// CheckProjectPermission ensures the caller has the requested project-level permissions. +func CheckProjectPermission(ctx context.Context, api internalapi.Provider, userID, orgID, projectID string, permissions ...string) error { + return checkPermissions(ctx, api, userID, orgID, projectID, permissions) +} + +func checkPermissions(ctx context.Context, api internalapi.Provider, userID, orgID, projectID string, permissions []string) error { + if len(permissions) == 0 { + return nil + } + + client := api.RBAC() + if client == nil { + emitPermissionMetric("rbac_unavailable", orgID, projectID, permissions) + return ErrRBACUnavailable + } + + callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) + defer cancel() + + req := &rbacpb.ListUserPermissionsRequest{ + UserId: userID, + OrgId: orgID, + ProjectId: projectID, + } + + resp, err := client.ListUserPermissions(callCtx, req) + if err != nil { + logging.ForComponent("rbac"). + WithFields(logrus.Fields{ + "userId": userID, + "orgId": orgID, + "projectId": projectID, + "perms": permissions, + }). + WithError(err). + Error("ListUserPermissions RPC failed") + emitPermissionMetric("rpc_error", orgID, projectID, permissions) + return fmt.Errorf("rbac permission lookup failed: %w", err) + } + + granted := make(map[string]struct{}, len(resp.GetPermissions())) + for _, perm := range resp.GetPermissions() { + granted[strings.TrimSpace(perm)] = struct{}{} + } + + var missing []string + for _, perm := range permissions { + if _, ok := granted[perm]; !ok { + missing = append(missing, perm) + } + } + + if len(missing) > 0 { + logging.ForComponent("authz"). + WithFields(logrus.Fields{ + "userId": userID, + "orgId": orgID, + "projectId": projectID, + "missing": missing, + }). + Info("permission check failed") + emitPermissionMetric("denied", orgID, projectID, permissions) + return fmt.Errorf("%w: missing %s", ErrPermissionDenied, strings.Join(missing, ", ")) + } + + emitPermissionMetric("granted", orgID, projectID, permissions) + return nil +} + +func emitPermissionMetric(outcome, orgID, projectID string, permissions []string) { + scope := "organization" + if strings.TrimSpace(projectID) != "" { + scope = "project" + } + permTag := "unknown" + if len(permissions) > 0 { + permTag = strings.TrimSpace(permissions[0]) + if permTag == "" { + permTag = "unknown" + } + } + tags := []string{outcome, scope, permTag} + if err := watchman.IncrementWithTags("mcp.authz.permission_check", tags); err != nil { + logging.ForComponent("metrics"). + WithError(err). + WithFields(logrus.Fields{ + "metric": "mcp.authz.permission_check", + "tags": tags, + }). + Debug("failed to emit Watchman metric") + } +} diff --git a/mcp_server/pkg/tools/internal/shared/auth.go b/mcp_server/pkg/tools/internal/shared/auth.go new file mode 100644 index 000000000..fde81e8c3 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/auth.go @@ -0,0 +1,42 @@ +package shared + +import ( + "errors" + "fmt" + + "github.com/mark3labs/mcp-go/mcp" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" +) + +const rbacUnavailableMessage = `Authorization service is not configured. + +The RBAC gRPC endpoint must be set (INTERNAL_API_URL_RBAC / MCP_RBAC_GRPC_ENDPOINT) so we can verify permissions. Contact an administrator to configure the service and retry.` + +// OrgAuthorizationError formats a consistent MCP error result for organization-scoped permission checks. +func OrgAuthorizationError(err error, orgID, permission string) *mcp.CallToolResult { + switch { + case errors.Is(err, authz.ErrRBACUnavailable): + return mcp.NewToolResultError(rbacUnavailableMessage) + case errors.Is(err, authz.ErrPermissionDenied): + return mcp.NewToolResultError(fmt.Sprintf(`Permission denied while accessing organization %s. + +The authenticated user is missing the %q permission for this organization. Request access from an administrator or choose another organization.`, orgID, permission)) + default: + return mcp.NewToolResultError(fmt.Sprintf("Authorization check failed: %v", err)) + } +} + +// ProjectAuthorizationError formats a consistent MCP error result for project-scoped permission checks. +func ProjectAuthorizationError(err error, orgID, projectID, permission string) *mcp.CallToolResult { + switch { + case errors.Is(err, authz.ErrRBACUnavailable): + return mcp.NewToolResultError(rbacUnavailableMessage) + case errors.Is(err, authz.ErrPermissionDenied): + return mcp.NewToolResultError(fmt.Sprintf(`Permission denied while accessing project %s in organization %s. + +The authenticated user is missing the %q permission for this project. Request access from an administrator or try a different project.`, projectID, orgID, permission)) + default: + return mcp.NewToolResultError(fmt.Sprintf("Authorization check failed: %v", err)) + } +} diff --git a/mcp_server/pkg/tools/internal/shared/guardrails.go b/mcp_server/pkg/tools/internal/shared/guardrails.go new file mode 100644 index 000000000..5976b0d36 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/guardrails.go @@ -0,0 +1,81 @@ +package shared + +import ( + "fmt" + "strings" + + "github.com/mark3labs/mcp-go/mcp" + watchman "github.com/renderedtext/go-watchman" + "github.com/sirupsen/logrus" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" +) + +// ScopeMismatchMetadata captures details about a response that violated the caller's scope. +type ScopeMismatchMetadata struct { + Tool string + ResourceType string + ResourceID string + RequestOrgID string + ResourceOrgID string + RequestProjectID string + ResourceProjectID string +} + +// ReportScopeMismatch emits structured logging and metrics for scope violations. +func ReportScopeMismatch(meta ScopeMismatchMetadata) { + tool := strings.TrimSpace(meta.Tool) + entry := logging.ForComponent("authz").WithFields(logrus.Fields{ + "event": "mcp.authz.scope_mismatch", + "tool": tool, + "resource_type": strings.TrimSpace(meta.ResourceType), + "resource_id": strings.TrimSpace(meta.ResourceID), + "request_org_id": normalizeScopeValue(meta.RequestOrgID), + "resource_org_id": normalizeScopeValue(meta.ResourceOrgID), + "request_project_id": normalizeScopeValue(meta.RequestProjectID), + "resource_project_id": normalizeScopeValue(meta.ResourceProjectID), + }) + + entry.Warn("response scope mismatch detected") + + metricTags := []string{} + if tool != "" { + metricTags = append(metricTags, tool) + } + if resourceType := strings.TrimSpace(meta.ResourceType); resourceType != "" { + metricTags = append(metricTags, resourceType) + } + if len(metricTags) == 0 { + metricTags = append(metricTags, "unknown") + } + + if err := watchman.IncrementWithTags("mcp.authz.scope_mismatch", metricTags); err != nil { + logging.ForComponent("metrics"). + WithError(err). + WithField("event", "mcp.authz.scope_mismatch"). + Debug("failed to increment Watchman metric") + } +} + +// ScopeMismatchError formats a user-friendly MCP error without leaking sensitive identifiers. +func ScopeMismatchError(tool, scope string) *mcp.CallToolResult { + safeTool := strings.TrimSpace(tool) + if safeTool == "" { + safeTool = "requested tool" + } + safeScope := strings.TrimSpace(scope) + if safeScope == "" { + safeScope = "requested" + } + + message := fmt.Sprintf(`Permission denied: %s received data outside the authorized %s scope. The request was aborted. Retry once cache inconsistencies resolve or contact an administrator.`, safeTool, safeScope) + return mcp.NewToolResultError(message) +} + +func normalizeScopeValue(value string) string { + value = strings.TrimSpace(strings.ToLower(value)) + if value == "" { + return "(unset)" + } + return value +} diff --git a/mcp_server/pkg/tools/internal/shared/validation.go b/mcp_server/pkg/tools/internal/shared/validation.go index 80beeb2c0..cc2fd23b7 100644 --- a/mcp_server/pkg/tools/internal/shared/validation.go +++ b/mcp_server/pkg/tools/internal/shared/validation.go @@ -4,10 +4,15 @@ import ( "fmt" "regexp" "strings" + "unicode/utf8" ) var ( - uuidPattern = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`) + uuidPattern = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`) + cursorPattern = regexp.MustCompile(`^[A-Za-z0-9\-_.:/+=]*$`) + branchPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._/@-]{0,254}$`) + requesterPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9._-]{0,62}$`) + repositoryURLPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9:/._?#=&%+\-@]*$`) ) // ValidateUUID ensures a string is a valid UUID format. @@ -51,3 +56,107 @@ func NormalizeMode(mode string) (string, error) { return mode, nil } + +// SanitizeCursorToken validates pagination tokens before sending them to downstream services. +func SanitizeCursorToken(raw, fieldName string) (string, error) { + if hasControlRune(raw) { + return "", fmt.Errorf("%s contains control characters", fieldName) + } + + value := strings.TrimSpace(raw) + if value == "" { + return "", nil + } + if utf8.RuneCountInString(value) > 512 { + return "", fmt.Errorf("%s must not exceed 512 characters", fieldName) + } + if !cursorPattern.MatchString(value) { + return "", fmt.Errorf("%s contains unsupported characters. Allowed: letters, numbers, and - _ . : / + =", fieldName) + } + return value, nil +} + +// SanitizeBranch ensures branch filters only contain characters that cannot alter backend queries. +func SanitizeBranch(raw, fieldName string) (string, error) { + value := strings.TrimSpace(raw) + if value == "" { + return "", nil + } + if utf8.RuneCountInString(value) > 255 { + return "", fmt.Errorf("%s must not exceed 255 characters", fieldName) + } + if hasControlRune(value) { + return "", fmt.Errorf("%s contains control characters", fieldName) + } + if strings.Contains(value, "..") || strings.Contains(value, "//") || strings.Contains(value, "@{") { + return "", fmt.Errorf("%s contains unsupported sequences", fieldName) + } + if !branchPattern.MatchString(value) { + return "", fmt.Errorf("%s may only contain letters, numbers, slash (/), dot (.), underscore (_), hyphen (-), or @", fieldName) + } + return value, nil +} + +// SanitizeRequesterFilter validates non-UUID requester identifiers prior to user lookup. +func SanitizeRequesterFilter(raw, fieldName string) (string, error) { + value := strings.TrimSpace(raw) + if value == "" { + return "", nil + } + if utf8.RuneCountInString(value) > 64 { + return "", fmt.Errorf("%s must not exceed 64 characters", fieldName) + } + if hasControlRune(value) { + return "", fmt.Errorf("%s contains control characters", fieldName) + } + lower := strings.ToLower(value) + if !requesterPattern.MatchString(lower) { + return "", fmt.Errorf("%s may only contain lowercase letters, numbers, dot (.), underscore (_), or hyphen (-)", fieldName) + } + return lower, nil +} + +// SanitizeSearchQuery strips characters commonly used for injection while allowing flexible search terms. +func SanitizeSearchQuery(raw, fieldName string) (string, error) { + value := strings.TrimSpace(raw) + if value == "" { + return "", nil + } + if utf8.RuneCountInString(value) > 256 { + return "", fmt.Errorf("%s must not exceed 256 characters", fieldName) + } + if hasControlRune(value) { + return "", fmt.Errorf("%s contains control characters", fieldName) + } + if strings.ContainsAny(value, `"'\\`) { + return "", fmt.Errorf("%s must not contain quotes or backslashes", fieldName) + } + return value, nil +} + +// SanitizeRepositoryURLFilter restricts repository_url filters to URL-safe characters. +func SanitizeRepositoryURLFilter(raw, fieldName string) (string, error) { + value := strings.TrimSpace(raw) + if value == "" { + return "", nil + } + if utf8.RuneCountInString(value) > 512 { + return "", fmt.Errorf("%s must not exceed 512 characters", fieldName) + } + if hasControlRune(value) { + return "", fmt.Errorf("%s contains control characters", fieldName) + } + if !repositoryURLPattern.MatchString(value) { + return "", fmt.Errorf("%s contains unsupported characters. Allowed: letters, numbers, and URL punctuation (:/._?#=&%%+-@)", fieldName) + } + return value, nil +} + +func hasControlRune(value string) bool { + for _, r := range value { + if r < 32 || r == 127 { + return true + } + } + return false +} diff --git a/mcp_server/pkg/tools/internal/shared/validation_test.go b/mcp_server/pkg/tools/internal/shared/validation_test.go new file mode 100644 index 000000000..d40784956 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/validation_test.go @@ -0,0 +1,209 @@ +package shared + +import ( + "strings" + "testing" +) + +func TestSanitizeCursorToken(t *testing.T) { + t.Parallel() + + longCursor := strings.Repeat("a", 513) + + tests := []struct { + name string + input string + want string + wantErr bool + }{ + {name: "empty allowed", input: "", want: ""}, + {name: "basic token", input: "abc123", want: "abc123"}, + {name: "with punctuation", input: "next-page:/token+1=", want: "next-page:/token+1="}, + {name: "trims whitespace", input: " token ", want: "token"}, + {name: "contains space", input: "bad token", wantErr: true}, + {name: "contains control rune", input: "bad\n", wantErr: true}, + {name: "too long", input: longCursor, wantErr: true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := SanitizeCursorToken(tt.input, "cursor") + if tt.wantErr { + if err == nil { + t.Fatalf("expected error for input %q", tt.input) + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("expected %q, got %q", tt.want, got) + } + }) + } +} + +func TestSanitizeBranch(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + input string + want string + wantErr bool + }{ + {name: "empty branch allowed", input: "", want: ""}, + {name: "simple branch", input: "main", want: "main"}, + {name: "slash branch", input: "feature/new-ui", want: "feature/new-ui"}, + {name: "trims whitespace", input: " release/v1 ", want: "release/v1"}, + {name: "double dots blocked", input: "bad..branch", wantErr: true}, + {name: "double slash blocked", input: "bad//branch", wantErr: true}, + {name: "at brace blocked", input: "feature@{bad}", wantErr: true}, + {name: "invalid char", input: "feature$bug", wantErr: true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := SanitizeBranch(tt.input, "branch") + if tt.wantErr { + if err == nil { + t.Fatalf("expected error for input %q", tt.input) + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("expected %q, got %q", tt.want, got) + } + }) + } +} + +func TestSanitizeRequesterFilter(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + input string + want string + wantErr bool + }{ + {name: "empty allowed", input: "", want: ""}, + {name: "lowercase ok", input: "deploy-bot", want: "deploy-bot"}, + {name: "upper gets normalized", input: "Deploy.Bot", want: "deploy.bot"}, + {name: "invalid char blocked", input: "user!name", wantErr: true}, + {name: "too long", input: strings.Repeat("a", 80), wantErr: true}, + {name: "contains space", input: "user name", wantErr: true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := SanitizeRequesterFilter(tt.input, "requester") + if tt.wantErr { + if err == nil { + t.Fatalf("expected error for input %q", tt.input) + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("expected %q, got %q", tt.want, got) + } + }) + } +} + +func TestSanitizeSearchQuery(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + input string + want string + wantErr bool + }{ + {name: "empty ok", input: "", want: ""}, + {name: "basic query", input: "status:failed branch main", want: "status:failed branch main"}, + {name: "trim spaces", input: " failure reason ", want: "failure reason"}, + {name: "quote rejected", input: `value"drop`, wantErr: true}, + {name: "backslash rejected", input: `value\drop`, wantErr: true}, + {name: "newline rejected", input: "foo\nbar", wantErr: true}, + {name: "too long", input: strings.Repeat("q", 300), wantErr: true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := SanitizeSearchQuery(tt.input, "query") + if tt.wantErr { + if err == nil { + t.Fatalf("expected error for input %q", tt.input) + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("expected %q, got %q", tt.want, got) + } + }) + } +} + +func TestSanitizeRepositoryURLFilter(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + input string + want string + wantErr bool + }{ + {name: "empty allowed", input: "", want: ""}, + {name: "https url", input: "https://github.com/org/repo", want: "https://github.com/org/repo"}, + {name: "ssh url", input: "git@github.com:org/repo.git", want: "git@github.com:org/repo.git"}, + {name: "trims whitespace", input: " github.com/org/repo.git ", want: "github.com/org/repo.git"}, + {name: "invalid char", input: "github.com/org/repo|bad", wantErr: true}, + {name: "space rejected", input: "github.com/org bad", wantErr: true}, + {name: "too long", input: "https://" + strings.Repeat("a", 520), wantErr: true}, + {name: "control rune rejected", input: "github.com/org\nrepo", wantErr: true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := SanitizeRepositoryURLFilter(tt.input, "repository_url") + if tt.wantErr { + if err == nil { + t.Fatalf("expected error for input %q", tt.input) + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("expected %q, got %q", tt.want, got) + } + }) + } +} diff --git a/mcp_server/pkg/tools/jobs/describe.go b/mcp_server/pkg/tools/jobs/describe.go index 72db3af05..8c127b780 100644 --- a/mcp_server/pkg/tools/jobs/describe.go +++ b/mcp_server/pkg/tools/jobs/describe.go @@ -8,12 +8,14 @@ import ( "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" ) const ( - describeToolName = "jobs_describe" + describeToolName = "jobs_describe" + projectViewPermission = "project.view" ) func describeFullDescription() string { @@ -94,6 +96,18 @@ func describeHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can enforce project permissions before describing jobs. + +Troubleshooting: +- Ensure calls pass through the authenticated proxy +- Verify the header value is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) if err != nil { return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil @@ -104,11 +118,50 @@ func describeHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } - summary := summarizeJob(job) - if summary.OrganizationID != "" && !strings.EqualFold(summary.OrganizationID, orgID) { - return mcp.NewToolResultError(fmt.Sprintf(`Organization mismatch: job belongs to %s but you provided %s. + jobProjectID := strings.TrimSpace(job.GetProjectId()) + jobOrg := strings.TrimSpace(job.GetOrganizationId()) + if jobOrg == "" || !strings.EqualFold(jobOrg, orgID) { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: describeToolName, + ResourceType: "job", + ResourceID: jobID, + RequestOrgID: orgID, + ResourceOrgID: job.GetOrganizationId(), + RequestProjectID: "", + ResourceProjectID: jobProjectID, + }) + return shared.ScopeMismatchError(describeToolName, "organization"), nil + } -Use the organization_id returned by organizations_list for this workspace.`, summary.OrganizationID, orgID)), nil + if jobProjectID == "" { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: describeToolName, + ResourceType: "job", + ResourceID: jobID, + RequestOrgID: orgID, + ResourceOrgID: jobOrg, + RequestProjectID: "", + ResourceProjectID: jobProjectID, + }) + return shared.ScopeMismatchError(describeToolName, "project"), nil + } + + if err := authz.CheckProjectPermission(ctx, api, userID, orgID, jobProjectID, projectViewPermission); err != nil { + return shared.ProjectAuthorizationError(err, orgID, jobProjectID, projectViewPermission), nil + } + + summary := summarizeJob(job) + if summary.OrganizationID == "" || !strings.EqualFold(summary.OrganizationID, orgID) { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: describeToolName, + ResourceType: "job", + ResourceID: summary.ID, + RequestOrgID: orgID, + ResourceOrgID: summary.OrganizationID, + RequestProjectID: "", + ResourceProjectID: summary.ProjectID, + }) + return shared.ScopeMismatchError(describeToolName, "organization"), nil } markdown := formatJobMarkdown(summary, mode) markdown = shared.TruncateResponse(markdown, shared.MaxResponseChars) diff --git a/mcp_server/pkg/tools/jobs/jobs_test.go b/mcp_server/pkg/tools/jobs/jobs_test.go index 9030a0892..92ff7ec86 100644 --- a/mcp_server/pkg/tools/jobs/jobs_test.go +++ b/mcp_server/pkg/tools/jobs/jobs_test.go @@ -2,13 +2,15 @@ package jobs import ( "context" + "net/http" + "strings" "testing" "time" "github.com/mark3labs/mcp-go/mcp" - loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -37,12 +39,15 @@ func TestDescribeJob(t *testing.T) { }, } - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second} + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view", "organization.view")} handler := describeHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, "job_id": jobID, }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header res, err := handler(context.Background(), req) if err != nil { @@ -59,12 +64,175 @@ func TestDescribeJob(t *testing.T) { } } +func TestDescribeJobPermissionDenied(t *testing.T) { + jobID := "11111111-2222-3333-4444-555555555555" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + PplId: "ppl-1", + ProjectId: "proj-1", + OrganizationId: orgID, + }, + }, + } + rbac := newRBACStub("organization.view") + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := describeHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing project proj-1`) { + toFail(t, "expected project denial message, got %q", msg) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC request, got %d", len(rbac.lastRequests)) + } + if got := rbac.lastRequests[0].GetProjectId(); got != "proj-1" { + toFail(t, "expected RBAC project proj-1, got %s", got) + } + if got := rbac.lastRequests[0].GetOrgId(); got != orgID { + toFail(t, "expected RBAC org %s, got %s", orgID, got) + } +} + +func TestDescribeJobRBACUnavailable(t *testing.T) { + jobID := "11111111-2222-3333-4444-555555555555" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + PplId: "ppl-1", + ProjectId: "proj-1", + OrganizationId: orgID, + }, + }, + } + + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second} + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := describeHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "Authorization service is not configured") { + toFail(t, "expected RBAC unavailable message, got %q", msg) + } +} + +func TestDescribeJobScopeMismatchOrganization(t *testing.T) { + jobID := "11111111-2222-3333-4444-555555555555" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + PplId: "ppl-1", + ProjectId: "proj-1", + OrganizationId: "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + }, + }, + } + rbac := newRBACStub("project.view") + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := describeHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + toFail(t, "expected organization scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } +} + +func TestDescribeJobScopeMismatchMissingProject(t *testing.T) { + jobID := "11111111-2222-3333-4444-555555555555" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + PplId: "ppl-1", + ProjectId: "", + OrganizationId: orgID, + }, + }, + } + rbac := newRBACStub("project.view") + provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := describeHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized project scope") { + toFail(t, "expected project scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } +} + func TestFetchHostedLogs(t *testing.T) { jobID := "99999999-aaaa-bbbb-cccc-dddddddddddd" jobClient := &jobClientStub{ describeResp: &jobpb.DescribeResponse{ Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, - Job: &jobpb.Job{Id: jobID, SelfHosted: false}, + Job: &jobpb.Job{ + Id: jobID, + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + SelfHosted: false, + }, }, } loghubClient := &loghubClientStub{ @@ -78,6 +246,7 @@ func TestFetchHostedLogs(t *testing.T) { provider := &internalapi.MockProvider{ JobClient: jobClient, LoghubClient: loghubClient, + RBACClient: newRBACStub("project.view"), Timeout: time.Second, } @@ -87,6 +256,9 @@ func TestFetchHostedLogs(t *testing.T) { "job_id": jobID, "cursor": "5", }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header res, err := handler(context.Background(), req) if err != nil { @@ -112,7 +284,12 @@ func TestFetchSelfHostedLogs(t *testing.T) { jobClient := &jobClientStub{ describeResp: &jobpb.DescribeResponse{ Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, - Job: &jobpb.Job{Id: jobID, SelfHosted: true}, + Job: &jobpb.Job{ + Id: jobID, + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + SelfHosted: true, + }, }, } loghub2Client := &loghub2ClientStub{ @@ -122,6 +299,7 @@ func TestFetchSelfHostedLogs(t *testing.T) { provider := &internalapi.MockProvider{ JobClient: jobClient, Loghub2Client: loghub2Client, + RBACClient: newRBACStub("project.view"), Timeout: time.Second, } @@ -130,6 +308,9 @@ func TestFetchSelfHostedLogs(t *testing.T) { "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_id": jobID, }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header res, err := handler(context.Background(), req) if err != nil { @@ -150,6 +331,148 @@ func TestFetchSelfHostedLogs(t *testing.T) { } } +func TestLogsPermissionDenied(t *testing.T) { + jobID := "99999999-aaaa-bbbb-cccc-dddddddddddd" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + jobClient := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + ProjectId: "proj-1", + OrganizationId: orgID, + SelfHosted: false, + }, + }, + } + loghubClient := &loghubClientStub{} + rbac := newRBACStub() + + provider := &internalapi.MockProvider{ + JobClient: jobClient, + LoghubClient: loghubClient, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := logsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing project proj-1`) { + toFail(t, "expected project denial message, got %q", msg) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC request, got %d", len(rbac.lastRequests)) + } + if loghubClient.lastRequest != nil { + toFail(t, "expected no loghub call, got %+v", loghubClient.lastRequest) + } +} + +func TestLogsScopeMismatchOrganization(t *testing.T) { + jobID := "99999999-aaaa-bbbb-cccc-dddddddddddd" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + jobClient := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + ProjectId: "proj-1", + OrganizationId: "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + SelfHosted: false, + }, + }, + } + loghubClient := &loghubClientStub{} + rbac := newRBACStub("project.view") + + provider := &internalapi.MockProvider{ + JobClient: jobClient, + LoghubClient: loghubClient, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := logsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + toFail(t, "expected organization scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } + if loghubClient.lastRequest != nil { + toFail(t, "expected no loghub call, got %+v", loghubClient.lastRequest) + } +} + +func TestLogsRBACUnavailable(t *testing.T) { + jobID := "99999999-aaaa-bbbb-cccc-dddddddddddd" + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + jobClient := &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: jobID, + ProjectId: "proj-1", + OrganizationId: orgID, + SelfHosted: false, + }, + }, + } + loghubClient := &loghubClientStub{} + + provider := &internalapi.MockProvider{ + JobClient: jobClient, + LoghubClient: loghubClient, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": jobID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := logsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "Authorization service is not configured") { + toFail(t, "expected RBAC unavailable message, got %q", msg) + } + if loghubClient.lastRequest != nil { + toFail(t, "expected no loghub call, got %+v", loghubClient.lastRequest) + } +} + type jobClientStub struct { jobpb.JobServiceClient describeResp *jobpb.DescribeResponse @@ -235,6 +558,92 @@ func (s *loghub2ClientStub) GenerateToken(ctx context.Context, in *loghub2pb.Gen return s.resp, nil } +func requireErrorText(t *testing.T, res *mcp.CallToolResult) string { + t.Helper() + if res == nil { + t.Fatalf("expected tool result") + } + if !res.IsError { + t.Fatalf("expected error result, got success") + } + if len(res.Content) == 0 { + t.Fatalf("expected error content") + } + text, ok := res.Content[0].(mcp.TextContent) + if !ok { + t.Fatalf("expected text content, got %T", res.Content[0]) + } + return text.Text +} + +func newRBACStub(perms ...string) *rbacStub { + copied := append([]string(nil), perms...) + return &rbacStub{permissions: copied} +} + +type rbacStub struct { + rbacpb.RBACClient + + permissions []string + perProject map[string][]string + perOrg map[string][]string + err error + errorForProject map[string]error + errorForOrg map[string]error + lastRequests []*rbacpb.ListUserPermissionsRequest +} + +func (s *rbacStub) ListUserPermissions(ctx context.Context, in *rbacpb.ListUserPermissionsRequest, opts ...grpc.CallOption) (*rbacpb.ListUserPermissionsResponse, error) { + reqCopy := &rbacpb.ListUserPermissionsRequest{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + } + s.lastRequests = append(s.lastRequests, reqCopy) + + if s.err != nil { + return nil, s.err + } + + projectKey := normalizeKey(in.GetProjectId()) + orgKey := normalizeKey(in.GetOrgId()) + + if projectKey != "" { + if err := s.errorForProject[projectKey]; err != nil { + return nil, err + } + } else if orgKey != "" { + if err := s.errorForOrg[orgKey]; err != nil { + return nil, err + } + } + + perms := s.permissions + if projectKey != "" { + if override, ok := s.perProject[projectKey]; ok { + perms = override + } + } else if orgKey != "" { + if override, ok := s.perOrg[orgKey]; ok { + perms = override + } + } + if perms == nil { + perms = []string{} + } + + return &rbacpb.ListUserPermissionsResponse{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + Permissions: append([]string(nil), perms...), + }, nil +} + +func normalizeKey(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func toFail(t *testing.T, format string, args ...any) { t.Helper() t.Fatalf(format, args...) diff --git a/mcp_server/pkg/tools/jobs/logs.go b/mcp_server/pkg/tools/jobs/logs.go index cf30e6123..96b0220d1 100644 --- a/mcp_server/pkg/tools/jobs/logs.go +++ b/mcp_server/pkg/tools/jobs/logs.go @@ -10,6 +10,7 @@ import ( "github.com/mark3labs/mcp-go/server" "github.com/sirupsen/logrus" + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -114,6 +115,18 @@ func logsHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can enforce project permissions before streaming job logs. + +Troubleshooting: +- Ensure requests pass through the authenticated proxy +- Verify the header value is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + cursor := strings.TrimSpace(req.GetString("cursor", "")) startingLine, err := parseCursor(cursor) if err != nil { @@ -124,10 +137,36 @@ func logsHandler(api internalapi.Provider) server.ToolHandlerFunc { if err != nil { return mcp.NewToolResultError(err.Error()), nil } - if job.GetOrganizationId() != "" && !strings.EqualFold(job.GetOrganizationId(), orgID) { - return mcp.NewToolResultError(fmt.Sprintf(`Organization mismatch: job belongs to %s but you provided %s. + jobProjectID := strings.TrimSpace(job.GetProjectId()) + jobOrg := strings.TrimSpace(job.GetOrganizationId()) + if jobOrg == "" || !strings.EqualFold(jobOrg, orgID) { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: logsToolName, + ResourceType: "job", + ResourceID: jobID, + RequestOrgID: orgID, + ResourceOrgID: job.GetOrganizationId(), + RequestProjectID: "", + ResourceProjectID: jobProjectID, + }) + return shared.ScopeMismatchError(logsToolName, "organization"), nil + } + + if jobProjectID == "" { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: logsToolName, + ResourceType: "job", + ResourceID: jobID, + RequestOrgID: orgID, + ResourceOrgID: jobOrg, + RequestProjectID: "", + ResourceProjectID: jobProjectID, + }) + return shared.ScopeMismatchError(logsToolName, "project"), nil + } -Retrieve the correct organization ID from organizations_list before fetching logs.`, job.GetOrganizationId(), orgID)), nil + if err := authz.CheckProjectPermission(ctx, api, userID, orgID, jobProjectID, projectViewPermission); err != nil { + return shared.ProjectAuthorizationError(err, orgID, jobProjectID, projectViewPermission), nil } if job.GetSelfHosted() { diff --git a/mcp_server/pkg/tools/organizations/organizations.go b/mcp_server/pkg/tools/organizations/organizations.go index 69ec34362..777df4034 100644 --- a/mcp_server/pkg/tools/organizations/organizations.go +++ b/mcp_server/pkg/tools/organizations/organizations.go @@ -12,8 +12,8 @@ import ( "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" - rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" "github.com/sirupsen/logrus" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -195,7 +195,18 @@ Example: semaphore_organizations_list(limit=20)`, err)), nil limit = maxPageSize } - offset, err := parseCursorOffset(strings.TrimSpace(req.GetString("cursor", ""))) + cursor, err := shared.SanitizeCursorToken(req.GetString("cursor", ""), "cursor") + if err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`Invalid cursor parameter: %v + +The 'cursor' parameter must be the opaque value returned in a previous response's 'nextCursor' field. + +Tips: +- Omit the cursor to start from the beginning +- Use exactly the value returned from 'nextCursor' without modification`, err)), nil + } + + offset, err := parseCursorOffset(cursor) if err != nil { return mcp.NewToolResultError(fmt.Sprintf(`Invalid cursor parameter: %v @@ -253,7 +264,23 @@ The RBAC service confirms which organizations the authenticated user can access. The organization service could not describe the permitted organizations. Retry in a few moments or verify the service connectivity.`, err)), nil } - filtered := filterAccessibleOrganizations(resp.GetOrganizations(), accessibleSet) + filtered, mismatches := filterAccessibleOrganizations(resp.GetOrganizations(), accessibleSet) + if len(mismatches) > 0 { + for _, org := range mismatches { + if org == nil { + continue + } + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: listToolName, + ResourceType: "organization", + ResourceID: org.GetOrgId(), + RequestOrgID: "(multiple)", + ResourceOrgID: org.GetOrgId(), + RequestProjectID: "", + }) + } + return shared.ScopeMismatchError(listToolName, "organization"), nil + } if len(filtered) == 0 { result := listResult{Organizations: []organizationSummary{}} markdown := formatOrganizationsMarkdown(result.Organizations, mode, "") @@ -343,21 +370,25 @@ func normalizeAccessibleIDs(ids []string) (map[string]struct{}, []string) { return set, dedup } -func filterAccessibleOrganizations(orgs []*orgpb.Organization, allowed map[string]struct{}) []*orgpb.Organization { +func filterAccessibleOrganizations(orgs []*orgpb.Organization, allowed map[string]struct{}) ([]*orgpb.Organization, []*orgpb.Organization) { if len(orgs) == 0 { - return nil + return nil, nil } filtered := make([]*orgpb.Organization, 0, len(orgs)) + mismatches := make([]*orgpb.Organization, 0) for _, org := range orgs { if org == nil { continue } - if _, ok := allowed[normalizeOrgID(org.GetOrgId())]; ok { + norm := normalizeOrgID(org.GetOrgId()) + if _, ok := allowed[norm]; ok { filtered = append(filtered, org) + continue } + mismatches = append(mismatches, org) } - return filtered + return filtered, mismatches } func sortOrganizations(orgs []*orgpb.Organization) { diff --git a/mcp_server/pkg/tools/pipelines/pipelines.go b/mcp_server/pkg/tools/pipelines/pipelines.go index ba1671022..089260d66 100644 --- a/mcp_server/pkg/tools/pipelines/pipelines.go +++ b/mcp_server/pkg/tools/pipelines/pipelines.go @@ -2,6 +2,7 @@ package pipelines import ( "context" + "errors" "fmt" "strings" @@ -9,6 +10,7 @@ import ( "github.com/mark3labs/mcp-go/server" "github.com/sirupsen/logrus" + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" @@ -16,11 +18,12 @@ import ( ) const ( - listToolName = "pipelines_list" - jobsToolName = "pipeline_jobs" - defaultLimit = 20 - maxLimit = 100 - errNoClient = "pipeline gRPC endpoint is not configured" + listToolName = "pipelines_list" + jobsToolName = "pipeline_jobs" + defaultLimit = 20 + maxLimit = 100 + errNoClient = "pipeline gRPC endpoint is not configured" + projectViewPermission = "project.view" ) func listFullDescription() string { @@ -172,6 +175,7 @@ type pipelineSummary struct { Name string `json:"name,omitempty"` WorkflowID string `json:"workflowId,omitempty"` ProjectID string `json:"projectId,omitempty"` + OrganizationID string `json:"organizationId,omitempty"` Branch string `json:"branch,omitempty"` CommitSHA string `json:"commitSha,omitempty"` State string `json:"state,omitempty"` @@ -253,6 +257,24 @@ func listHandler(api internalapi.Provider) server.ToolHandlerFunc { } } + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can enforce project permissions for pipelines. + +Troubleshooting: +- Ensure requests pass through the authenticated proxy +- Verify the header value is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + + if projectID != "" { + if err := authz.CheckProjectPermission(ctx, api, userID, orgID, projectID, projectViewPermission); err != nil { + return shared.ProjectAuthorizationError(err, orgID, projectID, projectViewPermission), nil + } + } + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) if err != nil { return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil @@ -270,10 +292,16 @@ func listHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + cursorRaw := req.GetString("cursor", "") + cursor, err := shared.SanitizeCursorToken(cursorRaw, "cursor") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + request := &pipelinepb.ListKeysetRequest{ WfId: workflowID, PageSize: pageSize, - PageToken: strings.TrimSpace(req.GetString("cursor", "")), + PageToken: cursor, Order: pipelinepb.ListKeysetRequest_BY_CREATION_TIME_DESC, Direction: pipelinepb.ListKeysetRequest_NEXT, } @@ -308,9 +336,88 @@ Check that: `, err)), nil } + normalizedOrg := normalizeID(orgID) + requestedProject := normalizeID(projectID) + projectAccess := map[string]bool{} + if requestedProject != "" { + projectAccess[requestedProject] = true + } + pipelines := make([]pipelineSummary, 0, len(resp.GetPipelines())) for _, ppl := range resp.GetPipelines() { - pipelines = append(pipelines, summarizePipeline(ppl)) + if ppl == nil { + continue + } + + summary := summarizePipeline(ppl) + pipelineOrg := normalizeID(summary.OrganizationID) + if pipelineOrg == "" || pipelineOrg != normalizedOrg { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: listToolName, + ResourceType: "pipeline", + ResourceID: summary.ID, + RequestOrgID: orgID, + ResourceOrgID: summary.OrganizationID, + RequestProjectID: projectID, + ResourceProjectID: summary.ProjectID, + }) + return shared.ScopeMismatchError(listToolName, "organization"), nil + } + + pipelineProject := normalizeID(summary.ProjectID) + if pipelineProject == "" { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: listToolName, + ResourceType: "pipeline", + ResourceID: summary.ID, + RequestOrgID: orgID, + ResourceOrgID: summary.OrganizationID, + RequestProjectID: projectID, + ResourceProjectID: summary.ProjectID, + }) + return shared.ScopeMismatchError(listToolName, "project"), nil + } + + if requestedProject != "" && pipelineProject != requestedProject { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: listToolName, + ResourceType: "pipeline", + ResourceID: summary.ID, + RequestOrgID: orgID, + ResourceOrgID: summary.OrganizationID, + RequestProjectID: projectID, + ResourceProjectID: summary.ProjectID, + }) + return shared.ScopeMismatchError(listToolName, "project"), nil + } + + allowed, known := projectAccess[pipelineProject] + if !known { + err := authz.CheckProjectPermission(ctx, api, userID, orgID, summary.ProjectID, projectViewPermission) + if err != nil { + if errors.Is(err, authz.ErrPermissionDenied) { + logging.ForComponent("tools"). + WithFields(logrus.Fields{ + "tool": listToolName, + "pipelineId": summary.ID, + "workflowId": summary.WorkflowID, + "projectId": summary.ProjectID, + }). + Info("skipping pipeline due to missing project permission") + projectAccess[pipelineProject] = false + continue + } + return shared.ProjectAuthorizationError(err, orgID, summary.ProjectID, projectViewPermission), nil + } + projectAccess[pipelineProject] = true + allowed = true + } + + if !allowed { + continue + } + + pipelines = append(pipelines, summary) } result := listResult{Pipelines: pipelines} @@ -355,6 +462,18 @@ func jobsHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) + if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { + return mcp.NewToolResultError(fmt.Sprintf(`%v + +The authentication layer must inject the X-Semaphore-User-ID header so we can verify project permissions before returning pipeline jobs. + +Troubleshooting: +- Ensure requests pass through the authenticated proxy +- Verify the header value is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +- Retry once the header is present`, err)), nil + } + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) if err != nil { return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil @@ -391,6 +510,35 @@ func jobsHandler(api internalapi.Provider) server.ToolHandlerFunc { } pipeline := summarizePipeline(describeResp.GetPipeline()) + if normalized := normalizeID(pipeline.OrganizationID); normalized == "" || normalized != normalizeID(orgID) { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: jobsToolName, + ResourceType: "pipeline", + ResourceID: pipeline.ID, + RequestOrgID: orgID, + ResourceOrgID: pipeline.OrganizationID, + RequestProjectID: "", + ResourceProjectID: pipeline.ProjectID, + }) + return shared.ScopeMismatchError(jobsToolName, "organization"), nil + } + + if strings.TrimSpace(pipeline.ProjectID) == "" { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: jobsToolName, + ResourceType: "pipeline", + ResourceID: pipeline.ID, + RequestOrgID: orgID, + ResourceOrgID: pipeline.OrganizationID, + RequestProjectID: "", + ResourceProjectID: pipeline.ProjectID, + }) + return shared.ScopeMismatchError(jobsToolName, "project"), nil + } + + if err := authz.CheckProjectPermission(ctx, api, userID, orgID, pipeline.ProjectID, projectViewPermission); err != nil { + return shared.ProjectAuthorizationError(err, orgID, pipeline.ProjectID, projectViewPermission), nil + } blocks := make([]blockJobGroup, 0, len(describeResp.GetBlocks())) jobs := make([]pipelineJobEntry, 0) for _, block := range describeResp.GetBlocks() { @@ -456,7 +604,8 @@ func summarizePipeline(ppl *pipelinepb.Pipeline) pipelineSummary { ID: ppl.GetPplId(), Name: ppl.GetName(), WorkflowID: ppl.GetWfId(), - ProjectID: ppl.GetProjectId(), + ProjectID: strings.TrimSpace(ppl.GetProjectId()), + OrganizationID: strings.TrimSpace(ppl.GetOrganizationId()), Branch: ppl.GetBranchName(), CommitSHA: ppl.GetCommitSha(), State: pipelineStateToString(ppl.GetState()), @@ -496,6 +645,10 @@ func pipelineResultReasonToString(reason pipelinepb.Pipeline_ResultReason) strin return "unspecified" } +func normalizeID(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func summarizeQueue(q *pipelinepb.Queue) queueSummary { if q == nil { return queueSummary{} diff --git a/mcp_server/pkg/tools/pipelines/pipelines_test.go b/mcp_server/pkg/tools/pipelines/pipelines_test.go index 702032f45..7c43646dc 100644 --- a/mcp_server/pkg/tools/pipelines/pipelines_test.go +++ b/mcp_server/pkg/tools/pipelines/pipelines_test.go @@ -2,12 +2,15 @@ package pipelines import ( "context" + "errors" + "net/http" + "strings" "testing" "time" "github.com/mark3labs/mcp-go/mcp" - pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "google.golang.org/grpc" @@ -21,32 +24,36 @@ func TestListPipelines(t *testing.T) { listResp: &pipelinepb.ListKeysetResponse{ Pipelines: []*pipelinepb.Pipeline{ { - PplId: pipelineID, - Name: "Build", - WfId: workflowID, - ProjectId: "proj-1", - BranchName: "main", - CommitSha: "abc123", - State: pipelinepb.Pipeline_RUNNING, - Result: pipelinepb.Pipeline_PASSED, - ResultReason: pipelinepb.Pipeline_TEST, - CreatedAt: timestamppb.New(time.Unix(1700000000, 0)), - Queue: &pipelinepb.Queue{QueueId: "queue-1", Name: "default", Type: pipelinepb.QueueType_IMPLICIT}, - Triggerer: &pipelinepb.Triggerer{PplTriggeredBy: pipelinepb.TriggeredBy_PROMOTION}, - WithAfterTask: true, - AfterTaskId: "after-1", + PplId: pipelineID, + Name: "Build", + WfId: workflowID, + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + BranchName: "main", + CommitSha: "abc123", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + ResultReason: pipelinepb.Pipeline_TEST, + CreatedAt: timestamppb.New(time.Unix(1700000000, 0)), + Queue: &pipelinepb.Queue{QueueId: "queue-1", Name: "default", Type: pipelinepb.QueueType_IMPLICIT}, + Triggerer: &pipelinepb.Triggerer{PplTriggeredBy: pipelinepb.TriggeredBy_PROMOTION}, + WithAfterTask: true, + AfterTaskId: "after-1", }, }, NextPageToken: "cursor", }, } - provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second} + provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} handler := listHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "workflow_id": workflowID, "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header res, err := handler(context.Background(), req) if err != nil { @@ -76,17 +83,216 @@ func TestListPipelines(t *testing.T) { } } +func TestListPipelinesPermissionDeniedWithProjectFilter(t *testing.T) { + workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + projectID := "11111111-2222-3333-4444-555555555555" + pipelineClient := &pipelineClientStub{} + rbac := newRBACStub("organization.view") + + provider := &internalapi.MockProvider{ + PipelineClient: pipelineClient, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "workflow_id": workflowID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "project_id": projectID, + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing project `+projectID) { + toFail(t, "expected project denial message, got %q", msg) + } + if pipelineClient.lastList != nil { + toFail(t, "expected no pipeline ListKeyset call, got %+v", pipelineClient.lastList) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC request, got %d", len(rbac.lastRequests)) + } + if got := rbac.lastRequests[0].GetProjectId(); got != projectID { + toFail(t, "expected RBAC project %s, got %s", projectID, got) + } +} + +func TestListPipelinesSkipsUnauthorizedProjects(t *testing.T) { + workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &pipelineClientStub{ + listResp: &pipelinepb.ListKeysetResponse{ + Pipelines: []*pipelinepb.Pipeline{ + { + PplId: "ppl-denied", + Name: "Denied Pipeline", + WfId: workflowID, + ProjectId: "proj-denied", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + { + PplId: "ppl-allowed", + Name: "Allowed Pipeline", + WfId: workflowID, + ProjectId: "proj-allowed", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + }, + } + rbac := newRBACStub() + rbac.perProject = map[string][]string{ + "proj-denied": {}, + "proj-allowed": {"project.view"}, + } + + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "workflow_id": workflowID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + if res.IsError { + toFail(t, "unexpected error result: %+v", res) + } + + out, ok := res.StructuredContent.(listResult) + if !ok { + toFail(t, "unexpected structured content type: %T", res.StructuredContent) + } + if len(out.Pipelines) != 1 { + toFail(t, "expected 1 pipeline after filtering, got %d", len(out.Pipelines)) + } + if out.Pipelines[0].ID != "ppl-allowed" { + toFail(t, "expected allowed pipeline, got %+v", out.Pipelines[0]) + } + if len(rbac.lastRequests) != 2 { + toFail(t, "expected RBAC to be called twice, got %d", len(rbac.lastRequests)) + } +} + +func TestListPipelinesScopeMismatchOrganization(t *testing.T) { + workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &pipelineClientStub{ + listResp: &pipelinepb.ListKeysetResponse{ + Pipelines: []*pipelinepb.Pipeline{ + { + PplId: "ppl-1", + Name: "Build", + WfId: workflowID, + ProjectId: "proj-1", + OrganizationId: "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + }, + }, + }, + } + rbac := newRBACStub("project.view") + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "workflow_id": workflowID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + toFail(t, "expected scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } +} + +func TestListPipelinesRBACError(t *testing.T) { + workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + client := &pipelineClientStub{ + listResp: &pipelinepb.ListKeysetResponse{ + Pipelines: []*pipelinepb.Pipeline{ + { + PplId: "ppl-1", + Name: "Build", + WfId: workflowID, + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + }, + } + rbac := newRBACStub("project.view") + rbac.errorForProject = map[string]error{ + "proj-1": errors.New("rbac rpc failure"), + } + + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "workflow_id": workflowID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "Authorization check failed") { + toFail(t, "expected RBAC error message, got %q", msg) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC call, got %d", len(rbac.lastRequests)) + } +} + func TestListPipelineJobs(t *testing.T) { pipelineID := "11111111-2222-3333-4444-555555555555" client := &pipelineClientStub{ describeResp: &pipelinepb.DescribeResponse{ Pipeline: &pipelinepb.Pipeline{ - PplId: pipelineID, - Name: "Build", - WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - ProjectId: "proj-1", - State: pipelinepb.Pipeline_RUNNING, - Result: pipelinepb.Pipeline_PASSED, + PplId: pipelineID, + Name: "Build", + WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, }, Blocks: []*pipelinepb.Block{ { @@ -103,12 +309,15 @@ func TestListPipelineJobs(t *testing.T) { }, } - provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second} + provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} handler := jobsHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "pipeline_id": pipelineID, "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header res, err := handler(context.Background(), req) if err != nil { @@ -130,6 +339,141 @@ func TestListPipelineJobs(t *testing.T) { } } +func TestPipelineJobsPermissionDenied(t *testing.T) { + pipelineID := "11111111-2222-3333-4444-555555555555" + client := &pipelineClientStub{ + describeResp: &pipelinepb.DescribeResponse{ + Pipeline: &pipelinepb.Pipeline{ + PplId: pipelineID, + Name: "Build", + WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + ProjectId: "proj-1", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + }, + }, + } + rbac := newRBACStub() + + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "pipeline_id": pipelineID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := jobsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing project proj-1`) { + toFail(t, "expected project denial message, got %q", msg) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC request, got %d", len(rbac.lastRequests)) + } +} + +func TestPipelineJobsScopeMismatchOrganization(t *testing.T) { + pipelineID := "11111111-2222-3333-4444-555555555555" + client := &pipelineClientStub{ + describeResp: &pipelinepb.DescribeResponse{ + Pipeline: &pipelinepb.Pipeline{ + PplId: pipelineID, + Name: "Build", + WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + ProjectId: "proj-1", + OrganizationId: "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + }, + }, + } + rbac := newRBACStub("project.view") + + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "pipeline_id": pipelineID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := jobsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + toFail(t, "expected organization scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } +} + +func TestPipelineJobsScopeMismatchProjectMissing(t *testing.T) { + pipelineID := "11111111-2222-3333-4444-555555555555" + client := &pipelineClientStub{ + describeResp: &pipelinepb.DescribeResponse{ + Pipeline: &pipelinepb.Pipeline{ + PplId: pipelineID, + Name: "Build", + WfId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + ProjectId: "", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + State: pipelinepb.Pipeline_RUNNING, + Result: pipelinepb.Pipeline_PASSED, + }, + }, + } + rbac := newRBACStub("project.view") + + provider := &internalapi.MockProvider{ + PipelineClient: client, + RBACClient: rbac, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "pipeline_id": pipelineID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := jobsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized project scope") { + toFail(t, "expected project scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 0 { + toFail(t, "expected no RBAC calls, got %d", len(rbac.lastRequests)) + } +} + type pipelineClientStub struct { pipelinepb.PipelineServiceClient listResp *pipelinepb.ListKeysetResponse @@ -223,6 +567,92 @@ func (s *pipelineClientStub) Version(context.Context, *pipelinepb.VersionRequest panic("not implemented") } +func requireErrorText(t *testing.T, res *mcp.CallToolResult) string { + t.Helper() + if res == nil { + t.Fatalf("expected tool result") + } + if !res.IsError { + t.Fatalf("expected error result, got success") + } + if len(res.Content) == 0 { + t.Fatalf("expected error content") + } + text, ok := res.Content[0].(mcp.TextContent) + if !ok { + t.Fatalf("expected text content, got %T", res.Content[0]) + } + return text.Text +} + +func newRBACStub(perms ...string) *rbacStub { + copied := append([]string(nil), perms...) + return &rbacStub{permissions: copied} +} + +type rbacStub struct { + rbacpb.RBACClient + + permissions []string + perProject map[string][]string + perOrg map[string][]string + err error + errorForProject map[string]error + errorForOrg map[string]error + lastRequests []*rbacpb.ListUserPermissionsRequest +} + +func (s *rbacStub) ListUserPermissions(ctx context.Context, in *rbacpb.ListUserPermissionsRequest, opts ...grpc.CallOption) (*rbacpb.ListUserPermissionsResponse, error) { + reqCopy := &rbacpb.ListUserPermissionsRequest{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + } + s.lastRequests = append(s.lastRequests, reqCopy) + + if s.err != nil { + return nil, s.err + } + + projectKey := normalizeKey(in.GetProjectId()) + orgKey := normalizeKey(in.GetOrgId()) + + if projectKey != "" { + if err := s.errorForProject[projectKey]; err != nil { + return nil, err + } + } else if orgKey != "" { + if err := s.errorForOrg[orgKey]; err != nil { + return nil, err + } + } + + perms := s.permissions + if projectKey != "" { + if override, ok := s.perProject[projectKey]; ok { + perms = override + } + } else if orgKey != "" { + if override, ok := s.perOrg[orgKey]; ok { + perms = override + } + } + if perms == nil { + perms = []string{} + } + + return &rbacpb.ListUserPermissionsResponse{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + Permissions: append([]string(nil), perms...), + }, nil +} + +func normalizeKey(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func toFail(t *testing.T, format string, args ...any) { t.Helper() t.Fatalf(format, args...) diff --git a/mcp_server/pkg/tools/projects/projects.go b/mcp_server/pkg/tools/projects/projects.go index 19d146b0d..da1feeded 100644 --- a/mcp_server/pkg/tools/projects/projects.go +++ b/mcp_server/pkg/tools/projects/projects.go @@ -13,6 +13,7 @@ import ( repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" "github.com/sirupsen/logrus" + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" @@ -27,6 +28,8 @@ const ( defaultSearchPages = 5 maxSearchPages = 10 searchPageSize = 100 + + orgViewPermission = "organization.view" ) func listFullDescription() string { @@ -473,7 +476,11 @@ Example: projects_list(organization_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")`, Use mode="summary" for quick scanning or mode="detailed" to include schedulers, tasks, and permission metadata.`, err)), nil } - cursor := strings.TrimSpace(req.GetString("cursor", "")) + cursorRaw := req.GetString("cursor", "") + cursor, err := shared.SanitizeCursorToken(cursorRaw, "cursor") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } limit := req.GetInt("limit", defaultListLimit) if limit <= 0 { @@ -499,6 +506,10 @@ Troubleshooting: return mcp.NewToolResultError(err.Error()), nil } + if err := authz.CheckOrgPermission(ctx, api, userID, orgID, orgViewPermission); err != nil { + return shared.OrgAuthorizationError(err, orgID, orgViewPermission), nil + } + request := &projecthubpb.ListKeysetRequest{ Metadata: projectRequestMeta(orgID, userID), PageToken: cursor, @@ -552,6 +563,12 @@ Try removing optional filters or verifying access permissions.`, err)), nil projects := make([]projectSummary, 0, len(resp.GetProjects())) for _, proj := range resp.GetProjects() { + if proj == nil { + continue + } + if mismatch := ensureProjectInOrg(listToolName, orgID, "", proj); mismatch != nil { + return mismatch, nil + } projects = append(projects, summarizeProject(proj, mode == "detailed")) } @@ -590,13 +607,19 @@ Check INTERNAL_API_URL_PROJECT or MCP_PROJECT_GRPC_ENDPOINT and ensure ProjectHu return mcp.NewToolResultError(err.Error()), nil } - rawQuery := strings.TrimSpace(req.GetString("query", "")) - queryDisplay := rawQuery - queryNormalized := strings.ToLower(rawQuery) + querySanitized, err := shared.SanitizeSearchQuery(req.GetString("query", ""), "query") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + queryDisplay := querySanitized + queryNormalized := strings.ToLower(querySanitized) - repoFilterRaw := strings.TrimSpace(req.GetString("repository_url", "")) - repoDisplay := repoFilterRaw - repoFilter := strings.ToLower(repoFilterRaw) + repoSanitized, err := shared.SanitizeRepositoryURLFilter(req.GetString("repository_url", ""), "repository_url") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + repoDisplay := repoSanitized + repoFilter := strings.ToLower(repoSanitized) if queryNormalized == "" && repoFilter == "" { return mcp.NewToolResultError("Provide at least one of query or repository_url."), nil @@ -633,6 +656,10 @@ Troubleshooting: - Retry once the header is present`, err)), nil } + if err := authz.CheckOrgPermission(ctx, api, userID, orgID, orgViewPermission); err != nil { + return shared.OrgAuthorizationError(err, orgID, orgViewPermission), nil + } + type candidate struct { summary projectSummary score int @@ -668,8 +695,8 @@ Troubleshooting: "organizationId": orgID, "page": page, "mode": mode, - "query": rawQuery, - "repositoryUrl": repoFilterRaw, + "query": queryDisplay, + "repositoryUrl": repoDisplay, "userId": userID, }). WithError(err). @@ -697,6 +724,12 @@ Ensure you have permission to list projects in organization %s.`, err, orgID)), searchedPages++ for _, proj := range resp.GetProjects() { + if proj == nil { + continue + } + if mismatch := ensureProjectInOrg(searchToolName, orgID, "", proj); mismatch != nil { + return mismatch, nil + } score := 0 matched := []string{} @@ -814,6 +847,39 @@ func projectRequestMeta(orgID, userID string) *projecthubpb.RequestMeta { } } +func ensureProjectInOrg(tool, orgID, expectedProjectID string, project *projecthubpb.Project) *mcp.CallToolResult { + if project == nil { + return nil + } + meta := project.GetMetadata() + if meta == nil { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: tool, + ResourceType: "project", + ResourceID: "", + RequestOrgID: orgID, + ResourceOrgID: "", + RequestProjectID: expectedProjectID, + ResourceProjectID: "", + }) + return shared.ScopeMismatchError(tool, "organization") + } + resourceOrg := strings.TrimSpace(meta.GetOrgId()) + if !strings.EqualFold(resourceOrg, orgID) || resourceOrg == "" { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: tool, + ResourceType: "project", + ResourceID: meta.GetId(), + RequestOrgID: orgID, + ResourceOrgID: resourceOrg, + RequestProjectID: expectedProjectID, + ResourceProjectID: meta.GetId(), + }) + return shared.ScopeMismatchError(tool, "organization") + } + return nil +} + func summarizeProject(project *projecthubpb.Project, includeDetails bool) projectSummary { if project == nil { return projectSummary{} diff --git a/mcp_server/pkg/tools/projects/projects_test.go b/mcp_server/pkg/tools/projects/projects_test.go index 503a2c2ab..71e024f4e 100644 --- a/mcp_server/pkg/tools/projects/projects_test.go +++ b/mcp_server/pkg/tools/projects/projects_test.go @@ -3,11 +3,13 @@ package projects import ( "context" "net/http" + "strings" "testing" "time" "github.com/mark3labs/mcp-go/mcp" projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -32,6 +34,7 @@ func TestListProjectsSummary(t *testing.T) { provider := &internalapi.MockProvider{ ProjectClient: stub, + RBACClient: newRBACStub("organization.view", "project.view"), } handler := listHandler(provider) @@ -71,6 +74,124 @@ func TestListProjectsSummary(t *testing.T) { } } +func TestListProjectsPermissionDenied(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{} + rbac := newRBACStub() + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + RBACClient: rbac, + } + + handler := listHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing organization`) { + t.Fatalf("expected permission denied message, got %q", msg) + } + if len(stub.calls) != 0 { + t.Fatalf("expected ProjectHub not to be called, got %v", stub.calls) + } + if len(rbac.lastRequests) != 1 { + t.Fatalf("expected one RBAC request, got %d", len(rbac.lastRequests)) + } +} + +func TestListProjectsRBACUnavailable(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{} + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + } + + handler := listHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "Authorization service is not configured") { + t.Fatalf("expected RBAC unavailable message, got %q", msg) + } + if len(stub.calls) != 0 { + t.Fatalf("expected ProjectHub not to be called, got %v", stub.calls) + } +} + +func TestListProjectsScopeMismatch(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{ + keysetResponses: map[string]*projecthubpb.ListKeysetResponse{ + "": { + Metadata: okMetadata(), + Projects: []*projecthubpb.Project{ + makeProject("proj-1", "API Service", "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", "https://github.com/example/api", "main"), + }, + }, + }, + } + rbac := newRBACStub("organization.view") + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + RBACClient: rbac, + } + + handler := listHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + t.Fatalf("expected scope mismatch message, got %q", msg) + } + if len(rbac.lastRequests) != 1 { + t.Fatalf("expected one RBAC request, got %d", len(rbac.lastRequests)) + } +} + func TestSearchProjectsMatches(t *testing.T) { orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" stub := &projectClientStub{ @@ -105,6 +226,7 @@ func TestSearchProjectsMatches(t *testing.T) { provider := &internalapi.MockProvider{ ProjectClient: stub, + RBACClient: newRBACStub("organization.view", "project.view"), } handler := searchHandler(provider) @@ -157,6 +279,95 @@ func TestSearchProjectsMatches(t *testing.T) { } } +func TestSearchProjectsPermissionDenied(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{} + rbac := newRBACStub() + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + RBACClient: rbac, + } + + handler := searchHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + "query": "api", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing organization`) { + t.Fatalf("expected permission denied message, got %q", msg) + } + if len(stub.pageCalls) != 0 { + t.Fatalf("expected no pagination calls, got %v", stub.pageCalls) + } + if len(rbac.lastRequests) != 1 { + t.Fatalf("expected one RBAC call, got %d", len(rbac.lastRequests)) + } +} + +func TestSearchProjectsScopeMismatch(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + stub := &projectClientStub{ + responses: map[int32]*projecthubpb.ListResponse{ + 1: { + Metadata: okMetadata(), + Pagination: &projecthubpb.PaginationResponse{ + PageNumber: 1, + PageSize: searchPageSize, + TotalEntries: 1, + TotalPages: 1, + }, + Projects: []*projecthubpb.Project{ + makeProject("proj-1", "API Service", "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", "https://github.com/example/api", "main"), + }, + }, + }, + } + rbac := newRBACStub("organization.view") + + provider := &internalapi.MockProvider{ + ProjectClient: stub, + RBACClient: rbac, + } + + handler := searchHandler(provider) + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "organization_id": orgID, + "query": "api", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := handler(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + t.Fatalf("expected scope mismatch message, got %q", msg) + } +} + type projectClientStub struct { projecthubpb.ProjectServiceClient keysetResponses map[string]*projecthubpb.ListKeysetResponse @@ -182,6 +393,92 @@ func (p *projectClientStub) ListKeyset(ctx context.Context, in *projecthubpb.Lis }, nil } +func requireErrorText(t *testing.T, res *mcp.CallToolResult) string { + t.Helper() + if res == nil { + t.Fatalf("expected tool result") + } + if !res.IsError { + t.Fatalf("expected error result, got success") + } + if len(res.Content) == 0 { + t.Fatalf("expected error content") + } + text, ok := res.Content[0].(mcp.TextContent) + if !ok { + t.Fatalf("expected text content, got %T", res.Content[0]) + } + return text.Text +} + +func newRBACStub(perms ...string) *rbacStub { + copied := append([]string(nil), perms...) + return &rbacStub{permissions: copied} +} + +type rbacStub struct { + rbacpb.RBACClient + + permissions []string + perProject map[string][]string + perOrg map[string][]string + err error + errorForProject map[string]error + errorForOrg map[string]error + lastRequests []*rbacpb.ListUserPermissionsRequest +} + +func (s *rbacStub) ListUserPermissions(ctx context.Context, in *rbacpb.ListUserPermissionsRequest, opts ...grpc.CallOption) (*rbacpb.ListUserPermissionsResponse, error) { + reqCopy := &rbacpb.ListUserPermissionsRequest{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + } + s.lastRequests = append(s.lastRequests, reqCopy) + + if s.err != nil { + return nil, s.err + } + + projectKey := normalizeKey(in.GetProjectId()) + orgKey := normalizeKey(in.GetOrgId()) + + if projectKey != "" { + if err := s.errorForProject[projectKey]; err != nil { + return nil, err + } + } else if orgKey != "" { + if err := s.errorForOrg[orgKey]; err != nil { + return nil, err + } + } + + perms := s.permissions + if projectKey != "" { + if override, ok := s.perProject[projectKey]; ok { + perms = override + } + } else if orgKey != "" { + if override, ok := s.perOrg[orgKey]; ok { + perms = override + } + } + if perms == nil { + perms = []string{} + } + + return &rbacpb.ListUserPermissionsResponse{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + Permissions: append([]string(nil), perms...), + }, nil +} + +func normalizeKey(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func (p *projectClientStub) List(ctx context.Context, in *projecthubpb.ListRequest, opts ...grpc.CallOption) (*projecthubpb.ListResponse, error) { page := in.GetPagination().GetPage() p.pageCalls = append(p.pageCalls, page) diff --git a/mcp_server/pkg/tools/workflows/workflows.go b/mcp_server/pkg/tools/workflows/workflows.go index 4dd761500..32e9044f2 100644 --- a/mcp_server/pkg/tools/workflows/workflows.go +++ b/mcp_server/pkg/tools/workflows/workflows.go @@ -9,6 +9,7 @@ import ( "github.com/mark3labs/mcp-go/server" "github.com/sirupsen/logrus" + "github.com/semaphoreio/semaphore/mcp_server/pkg/authz" workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -17,10 +18,11 @@ import ( ) const ( - searchToolName = "workflows_search" - defaultLimit = 20 - maxLimit = 100 - missingWorkflowError = "workflow gRPC endpoint is not configured" + searchToolName = "workflows_search" + defaultLimit = 20 + maxLimit = 100 + missingWorkflowError = "workflow gRPC endpoint is not configured" + projectViewPermission = "project.view" ) func searchFullDescription() string { @@ -158,10 +160,19 @@ func listHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil } - branch := strings.TrimSpace(req.GetString("branch", "")) - requesterFilter := strings.TrimSpace(req.GetString("requester", "")) + branch, err := shared.SanitizeBranch(req.GetString("branch", ""), "branch") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + requesterFilter, err := shared.SanitizeRequesterFilter(req.GetString("requester", ""), "requester") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } myWorkflowsOnly := mcp.ParseBoolean(req, "my_workflows_only", true) - cursor := strings.TrimSpace(req.GetString("cursor", "")) + cursor, err := shared.SanitizeCursorToken(req.GetString("cursor", ""), "cursor") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } userID := strings.ToLower(strings.TrimSpace(req.Header.Get("X-Semaphore-User-ID"))) if err := shared.ValidateUUID(userID, "x-semaphore-user-id header"); err != nil { @@ -175,6 +186,10 @@ Troubleshooting: - Retry once the header is present`, err)), nil } + if err := authz.CheckProjectPermission(ctx, api, userID, orgID, projectID, projectViewPermission); err != nil { + return shared.ProjectAuthorizationError(err, orgID, projectID, projectViewPermission), nil + } + limit := req.GetInt("limit", defaultLimit) if limit <= 0 { limit = defaultLimit @@ -262,13 +277,47 @@ Double-check that: - The organization is active and not suspended`, err)), nil } + expectedOrg := normalizeID(orgID) + expectedProject := normalizeID(projectID) workflows := make([]summary, 0, len(resp.GetWorkflows())) for _, wf := range resp.GetWorkflows() { + if wf == nil { + continue + } + + workflowOrg := normalizeID(wf.GetOrganizationId()) + if workflowOrg == "" || workflowOrg != expectedOrg { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: searchToolName, + ResourceType: "workflow", + ResourceID: wf.GetWfId(), + RequestOrgID: orgID, + ResourceOrgID: wf.GetOrganizationId(), + RequestProjectID: projectID, + ResourceProjectID: wf.GetProjectId(), + }) + return shared.ScopeMismatchError(searchToolName, "organization"), nil + } + + workflowProject := normalizeID(wf.GetProjectId()) + if workflowProject == "" || workflowProject != expectedProject { + shared.ReportScopeMismatch(shared.ScopeMismatchMetadata{ + Tool: searchToolName, + ResourceType: "workflow", + ResourceID: wf.GetWfId(), + RequestOrgID: orgID, + ResourceOrgID: wf.GetOrganizationId(), + RequestProjectID: projectID, + ResourceProjectID: wf.GetProjectId(), + }) + return shared.ScopeMismatchError(searchToolName, "project"), nil + } + workflows = append(workflows, summary{ ID: wf.GetWfId(), InitialPipeline: wf.GetInitialPplId(), - ProjectID: wf.GetProjectId(), - OrganizationID: wf.GetOrganizationId(), + ProjectID: strings.TrimSpace(wf.GetProjectId()), + OrganizationID: strings.TrimSpace(wf.GetOrganizationId()), Branch: wf.GetBranchName(), CommitSHA: wf.GetCommitSha(), RequesterID: wf.GetRequesterId(), @@ -383,6 +432,10 @@ func shortenCommit(sha string) string { return sha } +func normalizeID(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func resolveRequesterID(ctx context.Context, api internalapi.Provider, raw string) (string, error) { candidate := strings.ToLower(strings.TrimSpace(raw)) if candidate == "" { diff --git a/mcp_server/pkg/tools/workflows/workflows_test.go b/mcp_server/pkg/tools/workflows/workflows_test.go index f2333cb4a..30e3c0e3e 100644 --- a/mcp_server/pkg/tools/workflows/workflows_test.go +++ b/mcp_server/pkg/tools/workflows/workflows_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" - workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" @@ -42,6 +42,7 @@ func TestListWorkflows(t *testing.T) { provider := &internalapi.MockProvider{ WorkflowClient: client, Timeout: time.Second, + RBACClient: newRBACStub("project.view"), } handler := listHandler(provider) @@ -110,6 +111,7 @@ func TestListWorkflowsWithRequesterOverride(t *testing.T) { WorkflowClient: client, UserClient: userClient, Timeout: time.Second, + RBACClient: newRBACStub("project.view"), } req := mcp.CallToolRequest{ @@ -145,6 +147,171 @@ func TestListWorkflowsWithRequesterOverride(t *testing.T) { } } +func TestListWorkflowsPermissionDenied(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + client := &workflowClientStub{} + rbac := newRBACStub() + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + Timeout: time.Second, + RBACClient: rbac, + } + + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, `Permission denied while accessing project`) { + toFail(t, "expected permission denied message, got %q", msg) + } + if client.lastList != nil { + toFail(t, "expected no workflow RPC call, got %+v", client.lastList) + } + if len(rbac.lastRequests) != 1 { + toFail(t, "expected one RBAC request, got %d", len(rbac.lastRequests)) + } +} + +func TestListWorkflowsRBACUnavailable(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + client := &workflowClientStub{} + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + Timeout: time.Second, + } + + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "Authorization service is not configured") { + toFail(t, "expected RBAC unavailable message, got %q", msg) + } + if client.lastList != nil { + toFail(t, "expected no workflow RPC call, got %+v", client.lastList) + } +} + +func TestListWorkflowsScopeMismatchOrganization(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + client := &workflowClientStub{ + listResp: &workflowpb.ListKeysetResponse{ + Status: &statuspb.Status{Code: code.Code_OK}, + Workflows: []*workflowpb.WorkflowDetails{ + { + WfId: "wf-123", + ProjectId: projectID, + OrganizationId: "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + }, + }, + }, + } + rbac := newRBACStub("project.view") + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + Timeout: time.Second, + RBACClient: rbac, + } + + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized organization scope") { + toFail(t, "expected organization scope mismatch message, got %q", msg) + } +} + +func TestListWorkflowsScopeMismatchProject(t *testing.T) { + projectID := "11111111-2222-3333-4444-555555555555" + client := &workflowClientStub{ + listResp: &workflowpb.ListKeysetResponse{ + Status: &statuspb.Status{Code: code.Code_OK}, + Workflows: []*workflowpb.WorkflowDetails{ + { + WfId: "wf-123", + ProjectId: "different-project", + OrganizationId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + }, + } + rbac := newRBACStub("project.view") + + provider := &internalapi.MockProvider{ + WorkflowClient: client, + Timeout: time.Second, + RBACClient: rbac, + } + + req := mcp.CallToolRequest{ + Params: mcp.CallToolParams{ + Arguments: map[string]any{ + "project_id": projectID, + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + }, + } + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "handler error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(msg, "outside the authorized project scope") { + toFail(t, "expected project scope mismatch message, got %q", msg) + } +} + type workflowClientStub struct { workflowpb.WorkflowServiceClient listResp *workflowpb.ListKeysetResponse @@ -152,6 +319,92 @@ type workflowClientStub struct { lastList *workflowpb.ListKeysetRequest } +func requireErrorText(t *testing.T, res *mcp.CallToolResult) string { + t.Helper() + if res == nil { + t.Fatalf("expected tool result") + } + if !res.IsError { + t.Fatalf("expected error result, got success") + } + if len(res.Content) == 0 { + t.Fatalf("expected error content") + } + text, ok := res.Content[0].(mcp.TextContent) + if !ok { + t.Fatalf("expected text content, got %T", res.Content[0]) + } + return text.Text +} + +func newRBACStub(perms ...string) *rbacStub { + copied := append([]string(nil), perms...) + return &rbacStub{permissions: copied} +} + +type rbacStub struct { + rbacpb.RBACClient + + permissions []string + perProject map[string][]string + perOrg map[string][]string + err error + errorForProject map[string]error + errorForOrg map[string]error + lastRequests []*rbacpb.ListUserPermissionsRequest +} + +func (s *rbacStub) ListUserPermissions(ctx context.Context, in *rbacpb.ListUserPermissionsRequest, opts ...grpc.CallOption) (*rbacpb.ListUserPermissionsResponse, error) { + reqCopy := &rbacpb.ListUserPermissionsRequest{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + } + s.lastRequests = append(s.lastRequests, reqCopy) + + if s.err != nil { + return nil, s.err + } + + projectKey := normalizeKey(in.GetProjectId()) + orgKey := normalizeKey(in.GetOrgId()) + + if projectKey != "" { + if err := s.errorForProject[projectKey]; err != nil { + return nil, err + } + } else if orgKey != "" { + if err := s.errorForOrg[orgKey]; err != nil { + return nil, err + } + } + + perms := s.permissions + if projectKey != "" { + if override, ok := s.perProject[projectKey]; ok { + perms = override + } + } else if orgKey != "" { + if override, ok := s.perOrg[orgKey]; ok { + perms = override + } + } + if perms == nil { + perms = []string{} + } + + return &rbacpb.ListUserPermissionsResponse{ + UserId: in.GetUserId(), + OrgId: in.GetOrgId(), + ProjectId: in.GetProjectId(), + Permissions: append([]string(nil), perms...), + }, nil +} + +func normalizeKey(value string) string { + return strings.ToLower(strings.TrimSpace(value)) +} + func (s *workflowClientStub) Schedule(context.Context, *workflowpb.ScheduleRequest, ...grpc.CallOption) (*workflowpb.ScheduleResponse, error) { panic("not implemented") } From adb0235e05b7605f48b7a5e886570cd8fddf9ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damjan=20Be=C4=87irovi=C4=87?= Date: Thu, 6 Nov 2025 11:59:18 +0100 Subject: [PATCH 4/5] MCP: Add feature flag checks (#693) Changes: - Adds infrastructure for checking feature flags based on the one from the `velocity` service - Reorganizes mocks and stubs to avoid cycle import issues - Adds a check for `mcp_server_read_tools` feature flag before any tool execution --- mcp_server/Dockerfile | 3 +- mcp_server/Makefile | 2 +- mcp_server/cmd/mcp_server/main.go | 4 +- mcp_server/go.mod | 21 +- mcp_server/go.sum | 39 +- .../pkg/feature/feature_hub_provider.go | 99 ++ .../pkg/feature/feature_hub_provider_test.go | 122 ++ mcp_server/pkg/feature/feature_provider.go | 22 + mcp_server/pkg/feature/test_features.yml | 2 + mcp_server/pkg/feature/yaml_provider.go | 105 ++ mcp_server/pkg/feature/yaml_provider_test.go | 24 + .../pkg/internal_api/feature/feature.pb.go | 1289 +++++++++++++++++ .../internal_api/feature/feature_grpc.pb.go | 257 ++++ mcp_server/pkg/internalapi/config.go | 9 + mcp_server/pkg/internalapi/manager.go | 13 +- mcp_server/pkg/service/cache.go | 80 + mcp_server/pkg/service/cache_test.go | 89 ++ mcp_server/pkg/service/feature_service.go | 97 ++ .../pkg/service/feature_service_test.go | 227 +++ .../pkg/tools/internal/shared/features.go | 30 + mcp_server/pkg/tools/jobs/describe.go | 4 + mcp_server/pkg/tools/jobs/jobs_test.go | 87 +- mcp_server/pkg/tools/jobs/logs.go | 7 +- .../tools/organizations/organizations_test.go | 10 +- mcp_server/pkg/tools/pipelines/pipelines.go | 11 +- .../pkg/tools/pipelines/pipelines_test.go | 73 +- mcp_server/pkg/tools/projects/projects.go | 13 +- .../pkg/tools/projects/projects_test.go | 69 +- mcp_server/pkg/tools/workflows/workflows.go | 7 +- .../pkg/tools/workflows/workflows_test.go | 41 +- .../internal/shared => utils}/numeric.go | 10 +- mcp_server/test/support/features_stub.go | 24 + .../mock.go => test/support/mock_provider.go} | 26 +- .../stubs => test/support}/stubs.go | 105 +- 34 files changed, 2953 insertions(+), 68 deletions(-) create mode 100644 mcp_server/pkg/feature/feature_hub_provider.go create mode 100644 mcp_server/pkg/feature/feature_hub_provider_test.go create mode 100644 mcp_server/pkg/feature/feature_provider.go create mode 100644 mcp_server/pkg/feature/test_features.yml create mode 100644 mcp_server/pkg/feature/yaml_provider.go create mode 100644 mcp_server/pkg/feature/yaml_provider_test.go create mode 100644 mcp_server/pkg/internal_api/feature/feature.pb.go create mode 100644 mcp_server/pkg/internal_api/feature/feature_grpc.pb.go create mode 100644 mcp_server/pkg/service/cache.go create mode 100644 mcp_server/pkg/service/cache_test.go create mode 100644 mcp_server/pkg/service/feature_service.go create mode 100644 mcp_server/pkg/service/feature_service_test.go create mode 100644 mcp_server/pkg/tools/internal/shared/features.go rename mcp_server/pkg/{tools/internal/shared => utils}/numeric.go (52%) create mode 100644 mcp_server/test/support/features_stub.go rename mcp_server/{pkg/internalapi/mock.go => test/support/mock_provider.go} (75%) rename mcp_server/{pkg/internalapi/stubs => test/support}/stubs.go (79%) diff --git a/mcp_server/Dockerfile b/mcp_server/Dockerfile index 979fd6a97..03dbf1304 100644 --- a/mcp_server/Dockerfile +++ b/mcp_server/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.24.9 +ARG GO_VERSION=1.25.2 ARG ALPINE_VERSION=3.22 FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base @@ -18,6 +18,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \ COPY cmd ./cmd COPY pkg ./pkg +COPY test ./test FROM base AS dev RUN --mount=type=cache,target=/root/.cache/go-build \ diff --git a/mcp_server/Makefile b/mcp_server/Makefile index 5bc31efbb..8c31b4db1 100644 --- a/mcp_server/Makefile +++ b/mcp_server/Makefile @@ -5,7 +5,7 @@ APP_ENV=prod INTERNAL_API_BRANCH?=master TMP_REPO_DIR ?= /tmp/internal_api -INTERNAL_API_MODULES?=include/internal_api/status,include/internal_api/response_status,plumber_w_f.workflow,plumber.pipeline,server_farm.job,loghub,loghub2,user,repository_integrator,rbac,organization,projecthub +INTERNAL_API_MODULES?=include/internal_api/status,include/internal_api/response_status,plumber_w_f.workflow,plumber.pipeline,server_farm.job,loghub,loghub2,user,repository_integrator,rbac,organization,projecthub,feature PROTOC_IMAGE?=golang:1.24-alpine .PHONY: tidy test test.setup lint pb.gen dev.run diff --git a/mcp_server/cmd/mcp_server/main.go b/mcp_server/cmd/mcp_server/main.go index 5be613db0..af63e6aca 100644 --- a/mcp_server/cmd/mcp_server/main.go +++ b/mcp_server/cmd/mcp_server/main.go @@ -18,13 +18,13 @@ import ( "github.com/sirupsen/logrus" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi/stubs" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/jobs" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/organizations" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/pipelines" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/projects" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/workflows" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" ) var ( @@ -65,7 +65,7 @@ func main() { bootstrapLog := logging.ForComponent("bootstrap") if strings.EqualFold(os.Getenv("MCP_USE_STUBS"), "true") { bootstrapLog.Info("using stubbed internal API clients (MCP_USE_STUBS=true)") - provider = stubs.New() + provider = support.New() } else { cfg, err := internalapi.LoadConfig() if err != nil { diff --git a/mcp_server/go.mod b/mcp_server/go.mod index cc7dcad8c..6f4f876aa 100644 --- a/mcp_server/go.mod +++ b/mcp_server/go.mod @@ -1,32 +1,45 @@ module github.com/semaphoreio/semaphore/mcp_server -go 1.24.0 - -toolchain go1.24.9 +go 1.25 require ( + github.com/allegro/bigcache/v3 v3.1.0 + github.com/eko/gocache/lib/v4 v4.2.2 + github.com/eko/gocache/store/bigcache/v4 v4.2.3 github.com/golang/protobuf v1.5.4 + github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/mark3labs/mcp-go v0.41.1 github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92 github.com/sirupsen/logrus v1.9.3 + github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f google.golang.org/grpc v1.75.1 google.golang.org/protobuf v1.36.10 + gopkg.in/yaml.v3 v3.0.1 ) require gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect require ( github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/invopop/jsonschema v0.13.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.3 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/spf13/cast v1.7.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/net v0.41.0 // indirect + golang.org/x/sync v0.15.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/text v0.26.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/mcp_server/go.sum b/mcp_server/go.sum index 65f7c2c7d..32258902c 100644 --- a/mcp_server/go.sum +++ b/mcp_server/go.sum @@ -1,10 +1,20 @@ +github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= +github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eko/gocache/lib/v4 v4.2.2 h1:jUQ1EPoapmnxeDfekdu8nb2D5d5nSgxSJyPZ1PsloBM= +github.com/eko/gocache/lib/v4 v4.2.2/go.mod h1:/Lpnfie38P4Qkun24jyIVRv95GzhbC90dsq6Q7AtQ2I= +github.com/eko/gocache/store/bigcache/v4 v4.2.3 h1:EAYtLX7srR9hkr9AP+JVLVymUYXihNfsgNusPfH5SoA= +github.com/eko/gocache/store/bigcache/v4 v4.2.3/go.mod h1:ty85W3DT2S5ZO3VG30UkwMQ1FmH8p6O0Y6FrQz7alUo= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= @@ -28,12 +38,20 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mark3labs/mcp-go v0.41.1 h1:w78eWfiQam2i8ICL7AL0WFiq7KHNJQ6UB53ZVtH4KGA= github.com/mark3labs/mcp-go v0.41.1/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= -github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92 h1:OmDghaSHy96nHV+ZnXBKQnXBLvuSQNdFZRYIQiDDXsg= -github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92/go.mod h1:Z+qanDzSoUGCbcrTM7G6YCA9ST2KBdte7sCz+HQAp7I= 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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= +github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92 h1:OmDghaSHy96nHV+ZnXBKQnXBLvuSQNdFZRYIQiDDXsg= +github.com/renderedtext/go-watchman v0.0.0-20221222100224-451a6f3c8d92/go.mod h1:Z+qanDzSoUGCbcrTM7G6YCA9ST2KBdte7sCz+HQAp7I= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= @@ -58,8 +76,14 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFh go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= @@ -73,10 +97,11 @@ google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= +gopkg.in/alexcesaro/statsd.v2 v2.0.0/go.mod h1:i0ubccKGzBVNBpdGV5MocxyA/XlLUJzA7SLonnE4drU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= -gopkg.in/alexcesaro/statsd.v2 v2.0.0/go.mod h1:i0ubccKGzBVNBpdGV5MocxyA/XlLUJzA7SLonnE4drU= diff --git a/mcp_server/pkg/feature/feature_hub_provider.go b/mcp_server/pkg/feature/feature_hub_provider.go new file mode 100644 index 000000000..ab1d50228 --- /dev/null +++ b/mcp_server/pkg/feature/feature_hub_provider.go @@ -0,0 +1,99 @@ +// Package feature holds the feature provider interface and its implementations. +package feature + +import ( + "context" + "errors" + "net" + "time" + + "google.golang.org/grpc" + + "github.com/renderedtext/go-watchman" + pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/feature" +) + +type FeatureHubProvider struct { + grpcEndpoint string + dialContext DialContextFunc +} + +type DialContextFunc func(ctx context.Context, addr string) (net.Conn, error) + +type FeatureHubProviderOption func(*FeatureHubProvider) + +// WithDialContext overrides the default transport dialer used by the provider. +// It is mainly intended for tests where an in-memory listener (for example +// google.golang.org/grpc/test/bufconn) replaces a real network connection. +func WithDialContext(dialer DialContextFunc) FeatureHubProviderOption { + return func(p *FeatureHubProvider) { + p.dialContext = dialer + } +} + +func NewFeatureHubProvider(grpcEndpoint string, opts ...FeatureHubProviderOption) (*FeatureHubProvider, error) { + if grpcEndpoint == "" { + return nil, errors.New("FeatureHub configuration is invalid, missing grpc endpoint is not set") + } + provider := &FeatureHubProvider{grpcEndpoint: grpcEndpoint} + for _, opt := range opts { + opt(provider) + } + return provider, nil +} + +func (p *FeatureHubProvider) ListFeatures(orgID string) ([]OrganizationFeature, error) { + return p.ListFeaturesWithContext(context.Background(), orgID) +} + +func (p *FeatureHubProvider) ListFeaturesWithContext(ctx context.Context, orgID string) ([]OrganizationFeature, error) { + defer watchman.Benchmark(time.Now(), "feature_hub.list_organization_features.duration") + conn, err := grpc.DialContext(ctx, p.grpcEndpoint, p.dialOptions()...) + if err != nil { + return nil, err + } + + defer conn.Close() + + client := pb.NewFeatureServiceClient(conn) + req := pb.ListOrganizationFeaturesRequest{OrgId: orgID} + + response, err := client.ListOrganizationFeatures(ctx, &req) + if err != nil { + _ = watchman.Increment("feature_hub.list_organization_features.failure") + return nil, err + } + + organizationFeatures := make([]OrganizationFeature, 0, len(response.OrganizationFeatures)) + for _, orgFeature := range response.OrganizationFeatures { + organizationFeatures = append(organizationFeatures, OrganizationFeature{ + Name: orgFeature.Feature.Type, + Quantity: orgFeature.Availability.Quantity, + State: stateOfFeature(orgFeature), + }) + } + + _ = watchman.Increment("feature_hub.list_organization_features.success") + return organizationFeatures, nil +} + +func stateOfFeature(orgFeature *pb.OrganizationFeature) State { + switch orgFeature.Availability.State { + case pb.Availability_ENABLED: + return Enabled + case pb.Availability_HIDDEN: + return Hidden + case pb.Availability_ZERO_STATE: + return ZeroState + default: + return Hidden + } +} + +func (p *FeatureHubProvider) dialOptions() []grpc.DialOption { + opts := []grpc.DialOption{grpc.WithInsecure()} + if p.dialContext != nil { + opts = append(opts, grpc.WithContextDialer(p.dialContext)) + } + return opts +} diff --git a/mcp_server/pkg/feature/feature_hub_provider_test.go b/mcp_server/pkg/feature/feature_hub_provider_test.go new file mode 100644 index 000000000..ad5fcb877 --- /dev/null +++ b/mcp_server/pkg/feature/feature_hub_provider_test.go @@ -0,0 +1,122 @@ +package feature_test + +import ( + "context" + "net" + "testing" + "time" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/grpc/test/bufconn" + + feature "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" + featurepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/feature" + "github.com/semaphoreio/semaphore/mcp_server/test/support" +) + +func TestNewFeatureHubProvider_ReturnsErrorWhenEndpointMissing(t *testing.T) { + provider, err := feature.NewFeatureHubProvider("") + require.Nil(t, provider) + require.Error(t, err) +} + +func TestFeatureHubProvider_ListFeatures(t *testing.T) { + stub := support.NewFeatureHubServiceStub() + stub.SetResponse(&featurepb.ListOrganizationFeaturesResponse{ + OrganizationFeatures: []*featurepb.OrganizationFeature{ + { + Feature: &featurepb.Feature{Type: "feature-enabled"}, + Availability: &featurepb.Availability{ + State: featurepb.Availability_ENABLED, + Quantity: 5, + }, + }, + { + Feature: &featurepb.Feature{Type: "feature-zero"}, + Availability: &featurepb.Availability{ + State: featurepb.Availability_ZERO_STATE, + Quantity: 3, + }, + }, + { + Feature: &featurepb.Feature{Type: "feature-hidden"}, + Availability: &featurepb.Availability{ + State: featurepb.Availability_HIDDEN, + Quantity: 1, + }, + }, + { + Feature: &featurepb.Feature{Type: "feature-unknown"}, + Availability: &featurepb.Availability{ + State: featurepb.Availability_State(99), + Quantity: 7, + }, + }, + }, + }) + + addr, opt, cleanup := startFeatureHubServer(t, stub) + t.Cleanup(cleanup) + + provider, err := feature.NewFeatureHubProvider(addr, opt) + require.NoError(t, err) + + orgFeatures, err := provider.ListFeatures("org-123") + require.NoError(t, err) + require.Equal(t, []feature.OrganizationFeature{ + {Name: "feature-enabled", Quantity: 5, State: feature.Enabled}, + {Name: "feature-zero", Quantity: 3, State: feature.ZeroState}, + {Name: "feature-hidden", Quantity: 1, State: feature.Hidden}, + {Name: "feature-unknown", Quantity: 7, State: feature.Hidden}, + }, orgFeatures) + + request := stub.LastRequest() + require.NotNil(t, request) + require.Equal(t, "org-123", request.GetOrgId()) + require.Equal(t, 1, stub.CallCount()) +} + +func TestFeatureHubProvider_ListFeaturesWithContextPropagatesError(t *testing.T) { + stub := support.NewFeatureHubServiceStub() + stub.SetError(status.Error(codes.Internal, "feature service unavailable")) + + addr, opt, cleanup := startFeatureHubServer(t, stub) + t.Cleanup(cleanup) + + provider, err := feature.NewFeatureHubProvider(addr, opt) + require.NoError(t, err) + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + orgFeatures, err := provider.ListFeaturesWithContext(ctx, "org-123") + require.Error(t, err) + require.Nil(t, orgFeatures) + + require.Equal(t, 1, stub.CallCount()) +} + +func startFeatureHubServer(t *testing.T, stub *support.FeatureHubServiceStub) (string, feature.FeatureHubProviderOption, func()) { + t.Helper() + + listener := bufconn.Listen(1_048_576) + + server := grpc.NewServer() + featurepb.RegisterFeatureServiceServer(server, stub) + + go func() { + _ = server.Serve(listener) + }() + + option := feature.WithDialContext(func(ctx context.Context, _ string) (net.Conn, error) { + return listener.Dial() + }) + + return "bufnet", option, func() { + server.GracefulStop() + _ = listener.Close() + } +} diff --git a/mcp_server/pkg/feature/feature_provider.go b/mcp_server/pkg/feature/feature_provider.go new file mode 100644 index 000000000..8e4b9557d --- /dev/null +++ b/mcp_server/pkg/feature/feature_provider.go @@ -0,0 +1,22 @@ +package feature + +import "context" + +type FeatureProvider interface { + ListFeatures(orgId string) ([]OrganizationFeature, error) + ListFeaturesWithContext(ctx context.Context, orgId string) ([]OrganizationFeature, error) +} + +type State int + +const ( + Enabled State = 0 + Hidden State = 1 + ZeroState State = 2 +) + +type OrganizationFeature struct { + Name string + State State + Quantity uint32 +} diff --git a/mcp_server/pkg/feature/test_features.yml b/mcp_server/pkg/feature/test_features.yml new file mode 100644 index 000000000..85422afc6 --- /dev/null +++ b/mcp_server/pkg/feature/test_features.yml @@ -0,0 +1,2 @@ +mcp_feature1: + enabled: true diff --git a/mcp_server/pkg/feature/yaml_provider.go b/mcp_server/pkg/feature/yaml_provider.go new file mode 100644 index 000000000..76516efb6 --- /dev/null +++ b/mcp_server/pkg/feature/yaml_provider.go @@ -0,0 +1,105 @@ +package feature + +import ( + "context" + "io/ioutil" + "os" + + log "github.com/sirupsen/logrus" + "gopkg.in/yaml.v3" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/utils" +) + +type YamlProvider struct { + filename string + OrganizationFeatures []OrganizationFeature +} + +type yamlFeature struct { + Quantity *int `yaml:"quantity,omitempty"` + Enabled *bool `yaml:"enabled,omitempty"` +} + +func (f yamlFeature) ToOrganizationFeature(name string) OrganizationFeature { + state := Hidden + if f.Enabled == nil || *f.Enabled { + state = Enabled + } + + quantity := uint32(1) + if f.Quantity != nil && *f.Quantity >= 0 { + if safeQuantity, err := utils.IntToUint32(*f.Quantity, "quantity"); err != nil { + log.WithField("feature", name).Warnf("Ignoring invalid quantity: %v", err) + } else { + quantity = safeQuantity + } + } + + return OrganizationFeature{ + Name: name, + Quantity: quantity, + State: state, + } +} + +func NewYamlProvider(filename string) (*YamlProvider, error) { + provider := &YamlProvider{ + filename: filename, + } + + if err := provider.loadFeatures(); err != nil { + return nil, err + } + + return provider, nil +} + +func (p *YamlProvider) ListFeatures(orgId string) ([]OrganizationFeature, error) { + return p.OrganizationFeatures, nil +} + +func (p *YamlProvider) ListFeaturesWithContext(ctx context.Context, orgId string) ([]OrganizationFeature, error) { + return p.OrganizationFeatures, nil +} + +func (p *YamlProvider) loadFeatures() error { + if p.OrganizationFeatures != nil { + return nil + } + + if err := p.validateFile(); err != nil { + return err + } + + yamlFile, err := ioutil.ReadFile(p.filename) + if err != nil { + log.Errorf("Reading '%s' failed with %v", p.filename, err) + return err + } + + yamlFeatures := make(map[string]yamlFeature) + err = yaml.Unmarshal(yamlFile, &yamlFeatures) + if err != nil { + log.Errorf("Unmarshaling results from yaml failed: %v", err) + return err + } + + p.OrganizationFeatures = make([]OrganizationFeature, 0, len(yamlFeatures)) + + for featureName, feature := range yamlFeatures { + organizationFeature := feature.ToOrganizationFeature(featureName) + p.OrganizationFeatures = append(p.OrganizationFeatures, organizationFeature) + } + + return nil +} + +func (p *YamlProvider) validateFile() error { + _, err := os.Stat(p.filename) + if err != nil { + log.Errorf("File '%s' does not exist. Can't load features from YAML", p.filename) + return err + } + return nil +} diff --git a/mcp_server/pkg/feature/yaml_provider_test.go b/mcp_server/pkg/feature/yaml_provider_test.go new file mode 100644 index 000000000..cc954158e --- /dev/null +++ b/mcp_server/pkg/feature/yaml_provider_test.go @@ -0,0 +1,24 @@ +package feature + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test__YAMLProvider(t *testing.T) { + + t.Run("fetches feature configuration from yaml file", func(t *testing.T) { + provider, err := NewYamlProvider("./test_features.yml") + assert.Nil(t, err) + + orgID := "org1" + features, err := provider.ListFeatures(orgID) + + assert.Nil(t, err) + assert.ElementsMatch(t, []OrganizationFeature{ + {Name: "mcp_feature1", State: Enabled, Quantity: 1}, + }, features) + }) + +} diff --git a/mcp_server/pkg/internal_api/feature/feature.pb.go b/mcp_server/pkg/internal_api/feature/feature.pb.go new file mode 100644 index 000000000..1ad77f8b5 --- /dev/null +++ b/mcp_server/pkg/internal_api/feature/feature.pb.go @@ -0,0 +1,1289 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.2 +// protoc v5.29.4 +// source: feature.proto + +package feature + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Machine_Platform int32 + +const ( + Machine_LINUX Machine_Platform = 0 + Machine_MAC Machine_Platform = 1 +) + +// Enum value maps for Machine_Platform. +var ( + Machine_Platform_name = map[int32]string{ + 0: "LINUX", + 1: "MAC", + } + Machine_Platform_value = map[string]int32{ + "LINUX": 0, + "MAC": 1, + } +) + +func (x Machine_Platform) Enum() *Machine_Platform { + p := new(Machine_Platform) + *p = x + return p +} + +func (x Machine_Platform) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Machine_Platform) Descriptor() protoreflect.EnumDescriptor { + return file_feature_proto_enumTypes[0].Descriptor() +} + +func (Machine_Platform) Type() protoreflect.EnumType { + return &file_feature_proto_enumTypes[0] +} + +func (x Machine_Platform) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Machine_Platform.Descriptor instead. +func (Machine_Platform) EnumDescriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{11, 0} +} + +type Availability_State int32 + +const ( + Availability_HIDDEN Availability_State = 0 + Availability_ZERO_STATE Availability_State = 1 + Availability_ENABLED Availability_State = 2 +) + +// Enum value maps for Availability_State. +var ( + Availability_State_name = map[int32]string{ + 0: "HIDDEN", + 1: "ZERO_STATE", + 2: "ENABLED", + } + Availability_State_value = map[string]int32{ + "HIDDEN": 0, + "ZERO_STATE": 1, + "ENABLED": 2, + } +) + +func (x Availability_State) Enum() *Availability_State { + p := new(Availability_State) + *p = x + return p +} + +func (x Availability_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Availability_State) Descriptor() protoreflect.EnumDescriptor { + return file_feature_proto_enumTypes[1].Descriptor() +} + +func (Availability_State) Type() protoreflect.EnumType { + return &file_feature_proto_enumTypes[1] +} + +func (x Availability_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Availability_State.Descriptor instead. +func (Availability_State) EnumDescriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{12, 0} +} + +// - org_id = [required] Organization ID for which we request the information. +type ListOrganizationFeaturesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrganizationFeaturesRequest) Reset() { + *x = ListOrganizationFeaturesRequest{} + mi := &file_feature_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrganizationFeaturesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrganizationFeaturesRequest) ProtoMessage() {} + +func (x *ListOrganizationFeaturesRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrganizationFeaturesRequest.ProtoReflect.Descriptor instead. +func (*ListOrganizationFeaturesRequest) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{0} +} + +func (x *ListOrganizationFeaturesRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListOrganizationFeaturesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationFeatures []*OrganizationFeature `protobuf:"bytes,1,rep,name=organization_features,json=organizationFeatures,proto3" json:"organization_features,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrganizationFeaturesResponse) Reset() { + *x = ListOrganizationFeaturesResponse{} + mi := &file_feature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrganizationFeaturesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrganizationFeaturesResponse) ProtoMessage() {} + +func (x *ListOrganizationFeaturesResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrganizationFeaturesResponse.ProtoReflect.Descriptor instead. +func (*ListOrganizationFeaturesResponse) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{1} +} + +func (x *ListOrganizationFeaturesResponse) GetOrganizationFeatures() []*OrganizationFeature { + if x != nil { + return x.OrganizationFeatures + } + return nil +} + +// - feature = [required] Feature's description. +// - availability = [required] Availability set for organization. +// - project_ids = [optional] Ids of projects to which this feature belongs. Default: feature belongs to all the projects. +// - requester_id = [required] Id of user which created or lastly updated the feature +// - created_at = [required] Timestamp of the time when feature was originally created +// - updated_at = [required] Timestamp of last time when feature was updated +type OrganizationFeature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Feature *Feature `protobuf:"bytes,1,opt,name=feature,proto3" json:"feature,omitempty"` + Availability *Availability `protobuf:"bytes,2,opt,name=availability,proto3" json:"availability,omitempty"` + ProjectIds []string `protobuf:"bytes,3,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` + RequesterId string `protobuf:"bytes,5,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationFeature) Reset() { + *x = OrganizationFeature{} + mi := &file_feature_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationFeature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationFeature) ProtoMessage() {} + +func (x *OrganizationFeature) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationFeature.ProtoReflect.Descriptor instead. +func (*OrganizationFeature) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{2} +} + +func (x *OrganizationFeature) GetFeature() *Feature { + if x != nil { + return x.Feature + } + return nil +} + +func (x *OrganizationFeature) GetAvailability() *Availability { + if x != nil { + return x.Availability + } + return nil +} + +func (x *OrganizationFeature) GetProjectIds() []string { + if x != nil { + return x.ProjectIds + } + return nil +} + +func (x *OrganizationFeature) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *OrganizationFeature) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *OrganizationFeature) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ListFeaturesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListFeaturesRequest) Reset() { + *x = ListFeaturesRequest{} + mi := &file_feature_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListFeaturesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFeaturesRequest) ProtoMessage() {} + +func (x *ListFeaturesRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFeaturesRequest.ProtoReflect.Descriptor instead. +func (*ListFeaturesRequest) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{3} +} + +type ListFeaturesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Features []*Feature `protobuf:"bytes,1,rep,name=features,proto3" json:"features,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListFeaturesResponse) Reset() { + *x = ListFeaturesResponse{} + mi := &file_feature_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListFeaturesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFeaturesResponse) ProtoMessage() {} + +func (x *ListFeaturesResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFeaturesResponse.ProtoReflect.Descriptor instead. +func (*ListFeaturesResponse) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{4} +} + +func (x *ListFeaturesResponse) GetFeatures() []*Feature { + if x != nil { + return x.Features + } + return nil +} + +// - type = [required] unique type of a feature +// - availability = [required] default avabiluty for all organizations, +// can be overwriten per organization +// via OrganizationFeature +type Feature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Availability *Availability `protobuf:"bytes,2,opt,name=availability,proto3" json:"availability,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Feature) Reset() { + *x = Feature{} + mi := &file_feature_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Feature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Feature) ProtoMessage() {} + +func (x *Feature) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Feature.ProtoReflect.Descriptor instead. +func (*Feature) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{5} +} + +func (x *Feature) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Feature) GetAvailability() *Availability { + if x != nil { + return x.Availability + } + return nil +} + +func (x *Feature) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Feature) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// - org_id = [required] Organization ID for which we request the information. +// +// If the organization doesn't exists, a GRPC :not_found status is returned. +type ListOrganizationMachinesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrganizationMachinesRequest) Reset() { + *x = ListOrganizationMachinesRequest{} + mi := &file_feature_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrganizationMachinesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrganizationMachinesRequest) ProtoMessage() {} + +func (x *ListOrganizationMachinesRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrganizationMachinesRequest.ProtoReflect.Descriptor instead. +func (*ListOrganizationMachinesRequest) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{6} +} + +func (x *ListOrganizationMachinesRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// organization_machines - [required] list of machines available for given organization +// default_type - [required] default machine type for jobs (for example init jobs) +type ListOrganizationMachinesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationMachines []*OrganizationMachine `protobuf:"bytes,1,rep,name=organization_machines,json=organizationMachines,proto3" json:"organization_machines,omitempty"` + DefaultType string `protobuf:"bytes,2,opt,name=default_type,json=defaultType,proto3" json:"default_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrganizationMachinesResponse) Reset() { + *x = ListOrganizationMachinesResponse{} + mi := &file_feature_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrganizationMachinesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrganizationMachinesResponse) ProtoMessage() {} + +func (x *ListOrganizationMachinesResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrganizationMachinesResponse.ProtoReflect.Descriptor instead. +func (*ListOrganizationMachinesResponse) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{7} +} + +func (x *ListOrganizationMachinesResponse) GetOrganizationMachines() []*OrganizationMachine { + if x != nil { + return x.OrganizationMachines + } + return nil +} + +func (x *ListOrganizationMachinesResponse) GetDefaultType() string { + if x != nil { + return x.DefaultType + } + return "" +} + +type OrganizationMachine struct { + state protoimpl.MessageState `protogen:"open.v1"` + Machine *Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` + Availability *Availability `protobuf:"bytes,2,opt,name=availability,proto3" json:"availability,omitempty"` + RequesterId string `protobuf:"bytes,3,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationMachine) Reset() { + *x = OrganizationMachine{} + mi := &file_feature_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationMachine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationMachine) ProtoMessage() {} + +func (x *OrganizationMachine) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationMachine.ProtoReflect.Descriptor instead. +func (*OrganizationMachine) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{8} +} + +func (x *OrganizationMachine) GetMachine() *Machine { + if x != nil { + return x.Machine + } + return nil +} + +func (x *OrganizationMachine) GetAvailability() *Availability { + if x != nil { + return x.Availability + } + return nil +} + +func (x *OrganizationMachine) GetRequesterId() string { + if x != nil { + return x.RequesterId + } + return "" +} + +func (x *OrganizationMachine) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *OrganizationMachine) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ListMachinesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMachinesRequest) Reset() { + *x = ListMachinesRequest{} + mi := &file_feature_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMachinesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMachinesRequest) ProtoMessage() {} + +func (x *ListMachinesRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMachinesRequest.ProtoReflect.Descriptor instead. +func (*ListMachinesRequest) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{9} +} + +type ListMachinesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Machines []*Machine `protobuf:"bytes,1,rep,name=machines,proto3" json:"machines,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMachinesResponse) Reset() { + *x = ListMachinesResponse{} + mi := &file_feature_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMachinesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMachinesResponse) ProtoMessage() {} + +func (x *ListMachinesResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMachinesResponse.ProtoReflect.Descriptor instead. +func (*ListMachinesResponse) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{10} +} + +func (x *ListMachinesResponse) GetMachines() []*Machine { + if x != nil { + return x.Machines + } + return nil +} + +type Machine struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Availability *Availability `protobuf:"bytes,2,opt,name=availability,proto3" json:"availability,omitempty"` + Platform Machine_Platform `protobuf:"varint,3,opt,name=platform,proto3,enum=InternalApi.Feature.Machine_Platform" json:"platform,omitempty"` + Vcpu string `protobuf:"bytes,4,opt,name=vcpu,proto3" json:"vcpu,omitempty"` + Ram string `protobuf:"bytes,5,opt,name=ram,proto3" json:"ram,omitempty"` + Disk string `protobuf:"bytes,6,opt,name=disk,proto3" json:"disk,omitempty"` + DefaultOsImage string `protobuf:"bytes,7,opt,name=default_os_image,json=defaultOsImage,proto3" json:"default_os_image,omitempty"` + OsImages []string `protobuf:"bytes,8,rep,name=os_images,json=osImages,proto3" json:"os_images,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Machine) Reset() { + *x = Machine{} + mi := &file_feature_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Machine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Machine) ProtoMessage() {} + +func (x *Machine) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Machine.ProtoReflect.Descriptor instead. +func (*Machine) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{11} +} + +func (x *Machine) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Machine) GetAvailability() *Availability { + if x != nil { + return x.Availability + } + return nil +} + +func (x *Machine) GetPlatform() Machine_Platform { + if x != nil { + return x.Platform + } + return Machine_LINUX +} + +func (x *Machine) GetVcpu() string { + if x != nil { + return x.Vcpu + } + return "" +} + +func (x *Machine) GetRam() string { + if x != nil { + return x.Ram + } + return "" +} + +func (x *Machine) GetDisk() string { + if x != nil { + return x.Disk + } + return "" +} + +func (x *Machine) GetDefaultOsImage() string { + if x != nil { + return x.DefaultOsImage + } + return "" +} + +func (x *Machine) GetOsImages() []string { + if x != nil { + return x.OsImages + } + return nil +} + +type Availability struct { + state protoimpl.MessageState `protogen:"open.v1"` + State Availability_State `protobuf:"varint,1,opt,name=state,proto3,enum=InternalApi.Feature.Availability_State" json:"state,omitempty"` + Quantity uint32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Availability) Reset() { + *x = Availability{} + mi := &file_feature_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Availability) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Availability) ProtoMessage() {} + +func (x *Availability) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Availability.ProtoReflect.Descriptor instead. +func (*Availability) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{12} +} + +func (x *Availability) GetState() Availability_State { + if x != nil { + return x.State + } + return Availability_HIDDEN +} + +func (x *Availability) GetQuantity() uint32 { + if x != nil { + return x.Quantity + } + return 0 +} + +// Emitted when machines are changed +type MachinesChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MachinesChanged) Reset() { + *x = MachinesChanged{} + mi := &file_feature_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MachinesChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachinesChanged) ProtoMessage() {} + +func (x *MachinesChanged) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachinesChanged.ProtoReflect.Descriptor instead. +func (*MachinesChanged) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{13} +} + +// Emitted when organization machines are changed +type OrganizationMachinesChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationMachinesChanged) Reset() { + *x = OrganizationMachinesChanged{} + mi := &file_feature_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationMachinesChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationMachinesChanged) ProtoMessage() {} + +func (x *OrganizationMachinesChanged) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationMachinesChanged.ProtoReflect.Descriptor instead. +func (*OrganizationMachinesChanged) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{14} +} + +func (x *OrganizationMachinesChanged) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +// Emitted when features are changed +type FeaturesChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeaturesChanged) Reset() { + *x = FeaturesChanged{} + mi := &file_feature_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeaturesChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeaturesChanged) ProtoMessage() {} + +func (x *FeaturesChanged) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeaturesChanged.ProtoReflect.Descriptor instead. +func (*FeaturesChanged) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{15} +} + +// Emitted when organization features are changed +type OrganizationFeaturesChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrganizationFeaturesChanged) Reset() { + *x = OrganizationFeaturesChanged{} + mi := &file_feature_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrganizationFeaturesChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationFeaturesChanged) ProtoMessage() {} + +func (x *OrganizationFeaturesChanged) ProtoReflect() protoreflect.Message { + mi := &file_feature_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationFeaturesChanged.ProtoReflect.Descriptor instead. +func (*OrganizationFeaturesChanged) Descriptor() ([]byte, []int) { + return file_feature_proto_rawDescGZIP(), []int{16} +} + +func (x *OrganizationFeaturesChanged) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +var File_feature_proto protoreflect.FileDescriptor + +var file_feature_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 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, 0x22, 0x38, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, + 0x81, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x14, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x22, 0xce, 0x02, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 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, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x9a, 0x01, + 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, + 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, + 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x1f, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x22, 0xa4, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x52, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x13, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x52, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x50, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x73, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, + 0x0a, 0x04, 0x76, 0x63, 0x70, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x63, + 0x70, 0x75, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x73, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, + 0x1e, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x4c, + 0x49, 0x4e, 0x55, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x43, 0x10, 0x01, 0x22, + 0x9b, 0x01, 0x0a, 0x0c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x30, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x5a, 0x45, 0x52, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0x11, 0x0a, + 0x0f, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x22, 0x34, 0x0a, 0x1b, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, + 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x34, 0x0a, 0x1b, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x32, + 0xee, 0x03, 0x0a, 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x34, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x34, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x70, + 0x68, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_feature_proto_rawDescOnce sync.Once + file_feature_proto_rawDescData = file_feature_proto_rawDesc +) + +func file_feature_proto_rawDescGZIP() []byte { + file_feature_proto_rawDescOnce.Do(func() { + file_feature_proto_rawDescData = protoimpl.X.CompressGZIP(file_feature_proto_rawDescData) + }) + return file_feature_proto_rawDescData +} + +var file_feature_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_feature_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_feature_proto_goTypes = []any{ + (Machine_Platform)(0), // 0: InternalApi.Feature.Machine.Platform + (Availability_State)(0), // 1: InternalApi.Feature.Availability.State + (*ListOrganizationFeaturesRequest)(nil), // 2: InternalApi.Feature.ListOrganizationFeaturesRequest + (*ListOrganizationFeaturesResponse)(nil), // 3: InternalApi.Feature.ListOrganizationFeaturesResponse + (*OrganizationFeature)(nil), // 4: InternalApi.Feature.OrganizationFeature + (*ListFeaturesRequest)(nil), // 5: InternalApi.Feature.ListFeaturesRequest + (*ListFeaturesResponse)(nil), // 6: InternalApi.Feature.ListFeaturesResponse + (*Feature)(nil), // 7: InternalApi.Feature.Feature + (*ListOrganizationMachinesRequest)(nil), // 8: InternalApi.Feature.ListOrganizationMachinesRequest + (*ListOrganizationMachinesResponse)(nil), // 9: InternalApi.Feature.ListOrganizationMachinesResponse + (*OrganizationMachine)(nil), // 10: InternalApi.Feature.OrganizationMachine + (*ListMachinesRequest)(nil), // 11: InternalApi.Feature.ListMachinesRequest + (*ListMachinesResponse)(nil), // 12: InternalApi.Feature.ListMachinesResponse + (*Machine)(nil), // 13: InternalApi.Feature.Machine + (*Availability)(nil), // 14: InternalApi.Feature.Availability + (*MachinesChanged)(nil), // 15: InternalApi.Feature.MachinesChanged + (*OrganizationMachinesChanged)(nil), // 16: InternalApi.Feature.OrganizationMachinesChanged + (*FeaturesChanged)(nil), // 17: InternalApi.Feature.FeaturesChanged + (*OrganizationFeaturesChanged)(nil), // 18: InternalApi.Feature.OrganizationFeaturesChanged + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp +} +var file_feature_proto_depIdxs = []int32{ + 4, // 0: InternalApi.Feature.ListOrganizationFeaturesResponse.organization_features:type_name -> InternalApi.Feature.OrganizationFeature + 7, // 1: InternalApi.Feature.OrganizationFeature.feature:type_name -> InternalApi.Feature.Feature + 14, // 2: InternalApi.Feature.OrganizationFeature.availability:type_name -> InternalApi.Feature.Availability + 19, // 3: InternalApi.Feature.OrganizationFeature.created_at:type_name -> google.protobuf.Timestamp + 19, // 4: InternalApi.Feature.OrganizationFeature.updated_at:type_name -> google.protobuf.Timestamp + 7, // 5: InternalApi.Feature.ListFeaturesResponse.features:type_name -> InternalApi.Feature.Feature + 14, // 6: InternalApi.Feature.Feature.availability:type_name -> InternalApi.Feature.Availability + 10, // 7: InternalApi.Feature.ListOrganizationMachinesResponse.organization_machines:type_name -> InternalApi.Feature.OrganizationMachine + 13, // 8: InternalApi.Feature.OrganizationMachine.machine:type_name -> InternalApi.Feature.Machine + 14, // 9: InternalApi.Feature.OrganizationMachine.availability:type_name -> InternalApi.Feature.Availability + 19, // 10: InternalApi.Feature.OrganizationMachine.created_at:type_name -> google.protobuf.Timestamp + 19, // 11: InternalApi.Feature.OrganizationMachine.updated_at:type_name -> google.protobuf.Timestamp + 13, // 12: InternalApi.Feature.ListMachinesResponse.machines:type_name -> InternalApi.Feature.Machine + 14, // 13: InternalApi.Feature.Machine.availability:type_name -> InternalApi.Feature.Availability + 0, // 14: InternalApi.Feature.Machine.platform:type_name -> InternalApi.Feature.Machine.Platform + 1, // 15: InternalApi.Feature.Availability.state:type_name -> InternalApi.Feature.Availability.State + 2, // 16: InternalApi.Feature.FeatureService.ListOrganizationFeatures:input_type -> InternalApi.Feature.ListOrganizationFeaturesRequest + 5, // 17: InternalApi.Feature.FeatureService.ListFeatures:input_type -> InternalApi.Feature.ListFeaturesRequest + 8, // 18: InternalApi.Feature.FeatureService.ListOrganizationMachines:input_type -> InternalApi.Feature.ListOrganizationMachinesRequest + 11, // 19: InternalApi.Feature.FeatureService.ListMachines:input_type -> InternalApi.Feature.ListMachinesRequest + 3, // 20: InternalApi.Feature.FeatureService.ListOrganizationFeatures:output_type -> InternalApi.Feature.ListOrganizationFeaturesResponse + 6, // 21: InternalApi.Feature.FeatureService.ListFeatures:output_type -> InternalApi.Feature.ListFeaturesResponse + 9, // 22: InternalApi.Feature.FeatureService.ListOrganizationMachines:output_type -> InternalApi.Feature.ListOrganizationMachinesResponse + 12, // 23: InternalApi.Feature.FeatureService.ListMachines:output_type -> InternalApi.Feature.ListMachinesResponse + 20, // [20:24] is the sub-list for method output_type + 16, // [16:20] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_feature_proto_init() } +func file_feature_proto_init() { + if File_feature_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_feature_proto_rawDesc, + NumEnums: 2, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_feature_proto_goTypes, + DependencyIndexes: file_feature_proto_depIdxs, + EnumInfos: file_feature_proto_enumTypes, + MessageInfos: file_feature_proto_msgTypes, + }.Build() + File_feature_proto = out.File + file_feature_proto_rawDesc = nil + file_feature_proto_goTypes = nil + file_feature_proto_depIdxs = nil +} diff --git a/mcp_server/pkg/internal_api/feature/feature_grpc.pb.go b/mcp_server/pkg/internal_api/feature/feature_grpc.pb.go new file mode 100644 index 000000000..f22f6b7c9 --- /dev/null +++ b/mcp_server/pkg/internal_api/feature/feature_grpc.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.4 +// source: feature.proto + +package feature + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + FeatureService_ListOrganizationFeatures_FullMethodName = "/InternalApi.Feature.FeatureService/ListOrganizationFeatures" + FeatureService_ListFeatures_FullMethodName = "/InternalApi.Feature.FeatureService/ListFeatures" + FeatureService_ListOrganizationMachines_FullMethodName = "/InternalApi.Feature.FeatureService/ListOrganizationMachines" + FeatureService_ListMachines_FullMethodName = "/InternalApi.Feature.FeatureService/ListMachines" +) + +// FeatureServiceClient is the client API for FeatureService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FeatureServiceClient interface { + // Operation is called to get all features for an organization. + // Operation is used by client facing services to check what features + // are enabled for the organization. + // Operation is synchronous. + ListOrganizationFeatures(ctx context.Context, in *ListOrganizationFeaturesRequest, opts ...grpc.CallOption) (*ListOrganizationFeaturesResponse, error) + // Operation is called to get the list of a features available on semaphore. + // Operation is synchronous. + ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error) + // Operation is called to get all machines for an organization. + // Operation is used by client facing services to check what machines + // are enabled for the organization. + // Operation is synchronous. + ListOrganizationMachines(ctx context.Context, in *ListOrganizationMachinesRequest, opts ...grpc.CallOption) (*ListOrganizationMachinesResponse, error) + // Operation is called to get the list of a machines available on semaphore. + // Operation is synchronous. + ListMachines(ctx context.Context, in *ListMachinesRequest, opts ...grpc.CallOption) (*ListMachinesResponse, error) +} + +type featureServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFeatureServiceClient(cc grpc.ClientConnInterface) FeatureServiceClient { + return &featureServiceClient{cc} +} + +func (c *featureServiceClient) ListOrganizationFeatures(ctx context.Context, in *ListOrganizationFeaturesRequest, opts ...grpc.CallOption) (*ListOrganizationFeaturesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListOrganizationFeaturesResponse) + err := c.cc.Invoke(ctx, FeatureService_ListOrganizationFeatures_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *featureServiceClient) ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListFeaturesResponse) + err := c.cc.Invoke(ctx, FeatureService_ListFeatures_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *featureServiceClient) ListOrganizationMachines(ctx context.Context, in *ListOrganizationMachinesRequest, opts ...grpc.CallOption) (*ListOrganizationMachinesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListOrganizationMachinesResponse) + err := c.cc.Invoke(ctx, FeatureService_ListOrganizationMachines_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *featureServiceClient) ListMachines(ctx context.Context, in *ListMachinesRequest, opts ...grpc.CallOption) (*ListMachinesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListMachinesResponse) + err := c.cc.Invoke(ctx, FeatureService_ListMachines_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FeatureServiceServer is the server API for FeatureService service. +// All implementations should embed UnimplementedFeatureServiceServer +// for forward compatibility. +type FeatureServiceServer interface { + // Operation is called to get all features for an organization. + // Operation is used by client facing services to check what features + // are enabled for the organization. + // Operation is synchronous. + ListOrganizationFeatures(context.Context, *ListOrganizationFeaturesRequest) (*ListOrganizationFeaturesResponse, error) + // Operation is called to get the list of a features available on semaphore. + // Operation is synchronous. + ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error) + // Operation is called to get all machines for an organization. + // Operation is used by client facing services to check what machines + // are enabled for the organization. + // Operation is synchronous. + ListOrganizationMachines(context.Context, *ListOrganizationMachinesRequest) (*ListOrganizationMachinesResponse, error) + // Operation is called to get the list of a machines available on semaphore. + // Operation is synchronous. + ListMachines(context.Context, *ListMachinesRequest) (*ListMachinesResponse, error) +} + +// UnimplementedFeatureServiceServer should 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 UnimplementedFeatureServiceServer struct{} + +func (UnimplementedFeatureServiceServer) ListOrganizationFeatures(context.Context, *ListOrganizationFeaturesRequest) (*ListOrganizationFeaturesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOrganizationFeatures not implemented") +} +func (UnimplementedFeatureServiceServer) ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented") +} +func (UnimplementedFeatureServiceServer) ListOrganizationMachines(context.Context, *ListOrganizationMachinesRequest) (*ListOrganizationMachinesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOrganizationMachines not implemented") +} +func (UnimplementedFeatureServiceServer) ListMachines(context.Context, *ListMachinesRequest) (*ListMachinesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMachines not implemented") +} +func (UnimplementedFeatureServiceServer) testEmbeddedByValue() {} + +// UnsafeFeatureServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FeatureServiceServer will +// result in compilation errors. +type UnsafeFeatureServiceServer interface { + mustEmbedUnimplementedFeatureServiceServer() +} + +func RegisterFeatureServiceServer(s grpc.ServiceRegistrar, srv FeatureServiceServer) { + // If the following call pancis, it indicates UnimplementedFeatureServiceServer 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(&FeatureService_ServiceDesc, srv) +} + +func _FeatureService_ListOrganizationFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOrganizationFeaturesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FeatureServiceServer).ListOrganizationFeatures(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FeatureService_ListOrganizationFeatures_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FeatureServiceServer).ListOrganizationFeatures(ctx, req.(*ListOrganizationFeaturesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FeatureService_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFeaturesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FeatureServiceServer).ListFeatures(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FeatureService_ListFeatures_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FeatureServiceServer).ListFeatures(ctx, req.(*ListFeaturesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FeatureService_ListOrganizationMachines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOrganizationMachinesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FeatureServiceServer).ListOrganizationMachines(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FeatureService_ListOrganizationMachines_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FeatureServiceServer).ListOrganizationMachines(ctx, req.(*ListOrganizationMachinesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FeatureService_ListMachines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMachinesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FeatureServiceServer).ListMachines(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FeatureService_ListMachines_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FeatureServiceServer).ListMachines(ctx, req.(*ListMachinesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FeatureService_ServiceDesc is the grpc.ServiceDesc for FeatureService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FeatureService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "InternalApi.Feature.FeatureService", + HandlerType: (*FeatureServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListOrganizationFeatures", + Handler: _FeatureService_ListOrganizationFeatures_Handler, + }, + { + MethodName: "ListFeatures", + Handler: _FeatureService_ListFeatures_Handler, + }, + { + MethodName: "ListOrganizationMachines", + Handler: _FeatureService_ListOrganizationMachines_Handler, + }, + { + MethodName: "ListMachines", + Handler: _FeatureService_ListMachines_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature.proto", +} diff --git a/mcp_server/pkg/internalapi/config.go b/mcp_server/pkg/internalapi/config.go index 2d41a83ed..a1b4a9443 100644 --- a/mcp_server/pkg/internalapi/config.go +++ b/mcp_server/pkg/internalapi/config.go @@ -54,6 +54,10 @@ var ( "INTERNAL_API_URL_RBAC", "MCP_RBAC_GRPC_ENDPOINT", } + featureHubEndpointEnvs = []string{ + "INTERNAL_API_URL_FEATURE", + "MCP_FEATURE_GRPC_ENDPOINT", + } ) // Config captures the connection settings for talking to internal API services. @@ -67,6 +71,7 @@ type Config struct { Loghub2Endpoint string UserEndpoint string RBACEndpoint string + FeatureHubEndpoint string DialTimeout time.Duration CallTimeout time.Duration @@ -93,6 +98,7 @@ func LoadConfig() (Config, error) { Loghub2Endpoint: endpointFromEnv(loghub2EndpointEnvs...), UserEndpoint: endpointFromEnv(userEndpointEnvs...), RBACEndpoint: endpointFromEnv(rbacEndpointEnvs...), + FeatureHubEndpoint: endpointFromEnv(featureHubEndpointEnvs...), DialTimeout: dialTimeout, CallTimeout: callTimeout, } @@ -128,6 +134,9 @@ func (c Config) Validate() error { if c.RBACEndpoint == "" { missing = append(missing, "rbac gRPC endpoint") } + if c.FeatureHubEndpoint == "" { + missing = append(missing, "feature hub gRPC endpoint") + } if len(missing) > 0 { return fmt.Errorf("missing required configuration: %s", strings.Join(missing, ", ")) diff --git a/mcp_server/pkg/internalapi/manager.go b/mcp_server/pkg/internalapi/manager.go index 3aa66b72f..669c56d7f 100644 --- a/mcp_server/pkg/internalapi/manager.go +++ b/mcp_server/pkg/internalapi/manager.go @@ -7,15 +7,16 @@ import ( "strings" "time" - rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + featuresvc "github.com/semaphoreio/semaphore/mcp_server/pkg/service" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -32,6 +33,7 @@ type Provider interface { Loghub2() loghub2pb.Loghub2Client Users() userpb.UserServiceClient RBAC() rbacpb.RBACClient + Features() featuresvc.FeatureClient } // Manager owns gRPC connections to internal API services and exposes typed clients. @@ -57,6 +59,7 @@ type Manager struct { loghub2Client loghub2pb.Loghub2Client userClient userpb.UserServiceClient rbacClient rbacpb.RBACClient + featuresService featuresvc.FeatureClient } // NewManager dials the configured services and returns a ready-to-use manager. @@ -150,6 +153,10 @@ func NewManager(ctx context.Context, cfg Config) (*Manager, error) { m.rbacClient = rbacpb.NewRBACClient(m.rbacConn) } + cacheService := featuresvc.NewCacheService() + + m.featuresService = featuresvc.NewFeatureService(cfg.FeatureHubEndpoint, cacheService, cfg.CallTimeout) + return m, nil } @@ -223,6 +230,10 @@ func (m *Manager) RBAC() rbacpb.RBACClient { return m.rbacClient } +func (m *Manager) Features() featuresvc.FeatureClient { + return m.featuresService +} + func joinErrors(errs []error) error { if len(errs) == 1 { return errs[0] diff --git a/mcp_server/pkg/service/cache.go b/mcp_server/pkg/service/cache.go new file mode 100644 index 000000000..8018967a8 --- /dev/null +++ b/mcp_server/pkg/service/cache.go @@ -0,0 +1,80 @@ +package service + +import ( + "bytes" + "context" + "encoding/gob" + "log" + "time" + + bigcache "github.com/allegro/bigcache/v3" + "github.com/eko/gocache/lib/v4/cache" + bigcache_store "github.com/eko/gocache/store/bigcache/v4" +) + +type CacheGoClient struct { + cache *cache.Cache[[]byte] +} + +type CacheClient interface { + Get(ctx context.Context, key string, value interface{}) error + Set(ctx context.Context, key string, value interface{}) error +} + +func NewCacheService() CacheClient { + ctx := context.Background() + bigCacheInstance, _ := bigcache.New(ctx, bigcache.DefaultConfig(10*time.Minute)) + bigCacheStore := bigcache_store.NewBigcache(bigCacheInstance) + cacheInstance := cache.New[[]byte](bigCacheStore) + + return &CacheGoClient{cache: cacheInstance} +} + +func (c *CacheGoClient) Get(ctx context.Context, key string, value interface{}) error { + bytesValue, err := c.cache.Get(ctx, key) + if err != nil { + return err + } + + err = deserialize(bytesValue, value) + if err != nil { + return err + } + + return nil +} + +func (c *CacheGoClient) Set(ctx context.Context, key string, value interface{}) error { + serializedValue, err := serialize(value) + if err != nil { + return err + } + + return c.cache.Set(ctx, key, serializedValue) +} + +func serialize(value interface{}) ([]byte, error) { + buf := bytes.Buffer{} + enc := gob.NewEncoder(&buf) + + err := enc.Encode(value) + if err != nil { + log.Printf("Error serializing value: %v", err) + return nil, err + } + + return buf.Bytes(), nil +} + +func deserialize(valueBytes []byte, value interface{}) error { + buf := bytes.NewBuffer(valueBytes) + dec := gob.NewDecoder(buf) + + err := dec.Decode(value) + if err != nil { + log.Printf("Error serializing value: %v", err) + return err + } + + return nil +} diff --git a/mcp_server/pkg/service/cache_test.go b/mcp_server/pkg/service/cache_test.go new file mode 100644 index 000000000..b0109321e --- /dev/null +++ b/mcp_server/pkg/service/cache_test.go @@ -0,0 +1,89 @@ +// Package service holds grpc service's client implementations +package service + +import ( + "context" + "encoding/gob" + "reflect" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/feature" + "github.com/stretchr/testify/assert" +) + +func init() { + gob.Register(struct{ Name string }{}) +} + +func TestCacheGoClient_GetSet(t *testing.T) { + client := NewCacheService() + + testCases := []struct { + name string + key string + value interface{} + wantErr bool + }{ + { + name: "Caching strings", + key: "key1", + value: "value1", + wantErr: false, + }, + { + name: "Caching structs", + key: "key1", + value: struct{ Name string }{Name: "value2"}, + wantErr: false, + }, + { + name: "Caching integers", + key: "key1", + value: 123, + wantErr: false, + }, + { + name: "Caching bools", + key: "key1", + value: false, + wantErr: false, + }, + { + name: "Caching feature.ListOrganizationFeaturesResponse", + key: "key1", + value: feature.ListOrganizationFeaturesResponse{OrganizationFeatures: []*feature.OrganizationFeature{{RequesterId: "123"}}}, + wantErr: false, + }, + } + + for _, tc := range testCases { + err := client.Set(context.Background(), tc.key, tc.value) + assert.Nil(t, err) + + var got interface{} + switch tc.value.(type) { + case string: + got = new(string) + case int: + got = new(int) + case bool: + got = new(bool) + case struct{ Name string }: + got = new(struct{ Name string }) + case feature.ListOrganizationFeaturesResponse: + got = new(feature.ListOrganizationFeaturesResponse) + default: + t.Fatalf("Unsupported type in test case: %v", tc.value) + } + + err = client.Get(context.Background(), tc.key, got) + assert.Nil(t, err) + + gotDeref := reflect.ValueOf(got).Elem().Interface() + if diff := cmp.Diff(tc.value, gotDeref, cmp.AllowUnexported(feature.ListOrganizationFeaturesResponse{}, feature.OrganizationFeature{}), cmpopts.IgnoreUnexported(feature.ListOrganizationFeaturesResponse{}, feature.OrganizationFeature{})); diff != "" { + t.Fatalf("Assertion '%s' failed.\nDiff:%s\n", tc.name, diff) + } + } +} diff --git a/mcp_server/pkg/service/feature_service.go b/mcp_server/pkg/service/feature_service.go new file mode 100644 index 000000000..6d8a1f4b3 --- /dev/null +++ b/mcp_server/pkg/service/feature_service.go @@ -0,0 +1,97 @@ +// Package service holds grpc service's client implementations +package service + +import ( + "context" + "encoding/gob" + "log" + "os" + "time" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" +) + +type featureService struct { + provider feature.FeatureProvider + cache CacheClient + CallTimeout time.Duration +} + +// Register all the types that we want to store in the cache +func init() { + gob.Register([]feature.OrganizationFeature{}) +} + +type FeatureClient interface { + ListOrganizationFeatures(organizationId string) ([]feature.OrganizationFeature, error) + FeatureState(organizationId string, featureName string) (feature.State, error) +} + +func NewFeatureService(featureHubEndpoint string, cache CacheClient, callTimeout time.Duration) FeatureClient { + var provider feature.FeatureProvider + if os.Getenv("ON_PREM") != "true" { + provider = newFeatureServiceGrpcProvider(featureHubEndpoint) + } else { + provider = newFeatureServiceYamlProvider() + } + return &featureService{provider: provider, cache: cache, CallTimeout: callTimeout} +} + +func newFeatureServiceGrpcProvider(featureHubEndpoint string) feature.FeatureProvider { + provider, err := feature.NewFeatureHubProvider(featureHubEndpoint) + if err != nil { + log.Panicf("Failed to create Grpc feature provider: %v", err) + } + return provider +} + +func newFeatureServiceYamlProvider() feature.FeatureProvider { + featureYamlPath := os.Getenv("FEATURE_YAML_PATH") + if featureYamlPath == "" { + featureYamlPath = "/app/features.yml" + } + + provider, err := feature.NewYamlProvider(featureYamlPath) + if err != nil { + log.Panicf("Failed to create YAML feature provider: %v", err) + } + return provider +} + +func (c *featureService) FeatureState(organizationId string, featureName string) (feature.State, error) { + orgFeatures, err := c.ListOrganizationFeatures(organizationId) + if err != nil { + return feature.Hidden, err + } + + for _, feature := range orgFeatures { + if feature.Name == featureName { + return feature.State, nil + } + } + + return feature.Hidden, nil +} + +func (c *featureService) ListOrganizationFeatures(organizationId string) ([]feature.OrganizationFeature, error) { + var cachedResponse []feature.OrganizationFeature + tCtx, cancel := context.WithTimeout(context.Background(), c.CallTimeout) + defer cancel() + + err := c.cache.Get(tCtx, organizationId, &cachedResponse) + if err != nil { + orgFeatures, err := c.provider.ListFeaturesWithContext(tCtx, organizationId) + if err != nil { + return nil, err + } + + err = c.cache.Set(tCtx, organizationId, orgFeatures) + if err != nil { + return nil, err + } + + return orgFeatures, nil + } + + return cachedResponse, nil +} diff --git a/mcp_server/pkg/service/feature_service_test.go b/mcp_server/pkg/service/feature_service_test.go new file mode 100644 index 000000000..8b352ce41 --- /dev/null +++ b/mcp_server/pkg/service/feature_service_test.go @@ -0,0 +1,227 @@ +package service + +import ( + "context" + "errors" + "path/filepath" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" +) + +func TestNewFeatureService_UsesFeatureHubProviderByDefault(t *testing.T) { + t.Setenv("ON_PREM", "") + + cache := newFakeCache() + client := NewFeatureService("localhost:1234", cache, time.Second) + + svc, ok := client.(*featureService) + require.True(t, ok, "expected concrete featureService implementation") + assert.IsType(t, &feature.FeatureHubProvider{}, svc.provider) +} + +func TestNewFeatureService_UsesYamlProviderWhenOnPrem(t *testing.T) { + t.Setenv("ON_PREM", "true") + t.Setenv("FEATURE_YAML_PATH", filepath.Join("..", "feature", "test_features.yml")) + + cache := newFakeCache() + client := NewFeatureService("", cache, time.Second) + + svc, ok := client.(*featureService) + require.True(t, ok, "expected concrete featureService implementation") + require.IsType(t, &feature.YamlProvider{}, svc.provider) + + orgID := "org1" + features, err := svc.ListOrganizationFeatures(orgID) + require.NoError(t, err) + + assert.ElementsMatch(t, []feature.OrganizationFeature{ + {Name: "mcp_feature1", State: feature.Enabled, Quantity: 1}, + }, features) +} + +func TestFeatureService_ListOrganizationFeaturesCachesResults(t *testing.T) { + expected := []feature.OrganizationFeature{ + {Name: "feature-a", State: feature.Enabled, Quantity: 10}, + {Name: "feature-b", State: feature.Hidden, Quantity: 0}, + } + + cache := newFakeCache() + provider := newFakeFeatureProvider(expected) + service := &featureService{ + provider: provider, + cache: cache, + CallTimeout: time.Second, + } + + orgID := "org-local" + features, err := service.ListOrganizationFeatures(orgID) + require.NoError(t, err) + assert.ElementsMatch(t, expected, features) + assert.Equal(t, 1, provider.CallCount()) + assert.Equal(t, 1, cache.setCalls) + + featuresFromCache, err := service.ListOrganizationFeatures(orgID) + require.NoError(t, err) + assert.ElementsMatch(t, expected, featuresFromCache) + assert.Equal(t, 1, provider.CallCount(), "provider should not be called when cache hits") + assert.Equal(t, 2, cache.getCalls, "cache Get should be invoked on each call") +} + +func TestFeatureService_FeatureState(t *testing.T) { + expected := []feature.OrganizationFeature{ + {Name: "feature-a", State: feature.Enabled, Quantity: 10}, + {Name: "feature-b", State: feature.Hidden, Quantity: 0}, + } + + cache := newFakeCache() + provider := newFakeFeatureProvider(expected) + service := &featureService{ + provider: provider, + cache: cache, + CallTimeout: time.Second, + } + + state, err := service.FeatureState("org-local", "feature-a") + require.NoError(t, err) + assert.Equal(t, feature.Enabled, state) + + stateMissing, err := service.FeatureState("org-local", "feature-missing") + require.NoError(t, err) + assert.Equal(t, feature.Hidden, stateMissing) +} + +func TestFeatureService_WithMockProviderAndYamlBackend(t *testing.T) { + t.Setenv("ON_PREM", "true") + t.Setenv("FEATURE_YAML_PATH", filepath.Join("..", "feature", "test_features.yml")) + + cache := &noopCache{} + client := NewFeatureService("", cache, time.Second) + + features, err := client.ListOrganizationFeatures("org1") + require.NoError(t, err) + assert.ElementsMatch(t, []feature.OrganizationFeature{ + {Name: "mcp_feature1", State: feature.Enabled, Quantity: 1}, + }, features) + + state, err := client.FeatureState("org1", "mcp_feature1") + require.NoError(t, err) + assert.Equal(t, feature.Enabled, state) +} + +func TestFeatureService_WithMockProviderAndStubbedCache(t *testing.T) { + t.Setenv("ON_PREM", "") + + stubFeatures := []feature.OrganizationFeature{ + {Name: "feature-a", State: feature.Enabled, Quantity: 10}, + {Name: "feature-b", State: feature.Hidden, Quantity: 0}, + } + + cache := newFakeCache() + cache.store["org-local"] = append([]feature.OrganizationFeature(nil), stubFeatures...) + + client := NewFeatureService("localhost:1234", cache, 10*time.Millisecond) + + state, err := client.FeatureState("org-local", "feature-a") + require.NoError(t, err) + assert.Equal(t, feature.Enabled, state) + + stateHidden, err := client.FeatureState("org-local", "feature-b") + require.NoError(t, err) + assert.Equal(t, feature.Hidden, stateHidden) +} + +type fakeCache struct { + mu sync.Mutex + store map[string][]feature.OrganizationFeature + getCalls int + setCalls int +} + +func newFakeCache() *fakeCache { + return &fakeCache{ + store: make(map[string][]feature.OrganizationFeature), + } +} + +func (c *fakeCache) Get(_ context.Context, key string, value interface{}) error { + c.mu.Lock() + defer c.mu.Unlock() + c.getCalls++ + + features, ok := c.store[key] + if !ok { + return errors.New("cache miss") + } + + slicePtr, ok := value.(*[]feature.OrganizationFeature) + if !ok { + return errors.New("invalid value type") + } + + *slicePtr = append((*slicePtr)[:0], features...) + return nil +} + +func (c *fakeCache) Set(_ context.Context, key string, value interface{}) error { + c.mu.Lock() + defer c.mu.Unlock() + c.setCalls++ + + features, ok := value.([]feature.OrganizationFeature) + if !ok { + return errors.New("invalid cache value") + } + + c.store[key] = append([]feature.OrganizationFeature(nil), features...) + return nil +} + +type fakeFeatureProvider struct { + mu sync.Mutex + features []feature.OrganizationFeature + calls int +} + +func newFakeFeatureProvider(features []feature.OrganizationFeature) *fakeFeatureProvider { + return &fakeFeatureProvider{ + features: append([]feature.OrganizationFeature(nil), features...), + } +} + +func (p *fakeFeatureProvider) ListFeatures(_ string) ([]feature.OrganizationFeature, error) { + return p.listFeatures() +} + +func (p *fakeFeatureProvider) ListFeaturesWithContext(_ context.Context, _ string) ([]feature.OrganizationFeature, error) { + return p.listFeatures() +} + +func (p *fakeFeatureProvider) listFeatures() ([]feature.OrganizationFeature, error) { + p.mu.Lock() + defer p.mu.Unlock() + p.calls++ + + return append([]feature.OrganizationFeature(nil), p.features...), nil +} + +func (p *fakeFeatureProvider) CallCount() int { + p.mu.Lock() + defer p.mu.Unlock() + return p.calls +} + +type noopCache struct{} + +func (n *noopCache) Get(context.Context, string, interface{}) error { + return errors.New("cache miss") +} + +func (n *noopCache) Set(context.Context, string, interface{}) error { + return nil +} diff --git a/mcp_server/pkg/tools/internal/shared/features.go b/mcp_server/pkg/tools/internal/shared/features.go new file mode 100644 index 000000000..07f36c7f4 --- /dev/null +++ b/mcp_server/pkg/tools/internal/shared/features.go @@ -0,0 +1,30 @@ +package shared + +import ( + "context" + "fmt" + + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" + "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" +) + +const readToolsFeatureFlag = "mcp_server_read_tools" + +// EnsureReadToolsFeature verifies that the organization has the AI read tools feature enabled. +func EnsureReadToolsFeature(ctx context.Context, api internalapi.Provider, orgID string) error { + featureClient := api.Features() + if featureClient == nil { + return fmt.Errorf("Semaphore MCP tools are temporarily unavailable. Please try again later.") + } + + state, err := featureClient.FeatureState(orgID, readToolsFeatureFlag) + if err != nil { + return fmt.Errorf("We couldn't verify access to Semaphore MCP tools right now. Please try again in a few moments.") + } + + if state != feature.Enabled { + return fmt.Errorf("Semaphore MCP tools are disabled for this organization. Please contact support if you believe this is an error.") + } + + return nil +} diff --git a/mcp_server/pkg/tools/jobs/describe.go b/mcp_server/pkg/tools/jobs/describe.go index 8c127b780..d3f63d540 100644 --- a/mcp_server/pkg/tools/jobs/describe.go +++ b/mcp_server/pkg/tools/jobs/describe.go @@ -86,6 +86,10 @@ func describeHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + jobIDRaw, err := req.RequireString("job_id") if err != nil { return mcp.NewToolResultError("job_id is required. Provide the job UUID (e.g., 11111111-2222-3333-4444-555555555555)."), nil diff --git a/mcp_server/pkg/tools/jobs/jobs_test.go b/mcp_server/pkg/tools/jobs/jobs_test.go index 92ff7ec86..9912d6dd0 100644 --- a/mcp_server/pkg/tools/jobs/jobs_test.go +++ b/mcp_server/pkg/tools/jobs/jobs_test.go @@ -8,17 +8,82 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" ) +func TestDescribeJob_FeatureFlagDisabled(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": "11111111-2222-3333-4444-555555555555", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + } + + res, err := describeHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + toFail(t, "expected disabled feature error, got %q", msg) + } +} + +func TestLogsHandler_FeatureFlagDisabled(t *testing.T) { + orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": orgID, + "job_id": "11111111-2222-3333-4444-555555555555", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + LoghubClient: &loghubClientStub{}, + Loghub2Client: &loghub2ClientStub{}, + JobClient: &jobClientStub{ + describeResp: &jobpb.DescribeResponse{ + Status: &responsepb.ResponseStatus{Code: responsepb.ResponseStatus_OK}, + Job: &jobpb.Job{ + Id: "11111111-2222-3333-4444-555555555555", + ProjectId: "proj-1", + OrganizationId: orgID, + }, + }, + }, + } + + res, err := logsHandler(provider)(context.Background(), req) + if err != nil { + toFail(t, "unexpected error: %v", err) + } + + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + toFail(t, "expected disabled feature error, got %q", msg) + } +} + func TestDescribeJob(t *testing.T) { jobID := "11111111-2222-3333-4444-555555555555" orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" @@ -39,7 +104,7 @@ func TestDescribeJob(t *testing.T) { }, } - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view", "organization.view")} + provider := &support.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view", "organization.view")} handler := describeHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, @@ -79,7 +144,7 @@ func TestDescribeJobPermissionDenied(t *testing.T) { }, } rbac := newRBACStub("organization.view") - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + provider := &support.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, @@ -124,7 +189,7 @@ func TestDescribeJobRBACUnavailable(t *testing.T) { }, } - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second} + provider := &support.MockProvider{JobClient: client, Timeout: time.Second} req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, "job_id": jobID, @@ -159,7 +224,7 @@ func TestDescribeJobScopeMismatchOrganization(t *testing.T) { }, } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + provider := &support.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, @@ -198,7 +263,7 @@ func TestDescribeJobScopeMismatchMissingProject(t *testing.T) { }, } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} + provider := &support.MockProvider{JobClient: client, Timeout: time.Second, RBACClient: rbac} req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "organization_id": orgID, @@ -243,7 +308,7 @@ func TestFetchHostedLogs(t *testing.T) { }, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ JobClient: jobClient, LoghubClient: loghubClient, RBACClient: newRBACStub("project.view"), @@ -296,7 +361,7 @@ func TestFetchSelfHostedLogs(t *testing.T) { resp: &loghub2pb.GenerateTokenResponse{Token: "token", Type: loghub2pb.TokenType_PULL}, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ JobClient: jobClient, Loghub2Client: loghub2Client, RBACClient: newRBACStub("project.view"), @@ -348,7 +413,7 @@ func TestLogsPermissionDenied(t *testing.T) { loghubClient := &loghubClientStub{} rbac := newRBACStub() - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ JobClient: jobClient, LoghubClient: loghubClient, RBACClient: rbac, @@ -397,7 +462,7 @@ func TestLogsScopeMismatchOrganization(t *testing.T) { loghubClient := &loghubClientStub{} rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ JobClient: jobClient, LoghubClient: loghubClient, RBACClient: rbac, @@ -445,7 +510,7 @@ func TestLogsRBACUnavailable(t *testing.T) { } loghubClient := &loghubClientStub{} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ JobClient: jobClient, LoghubClient: loghubClient, Timeout: time.Second, diff --git a/mcp_server/pkg/tools/jobs/logs.go b/mcp_server/pkg/tools/jobs/logs.go index 96b0220d1..dbbed5396 100644 --- a/mcp_server/pkg/tools/jobs/logs.go +++ b/mcp_server/pkg/tools/jobs/logs.go @@ -16,6 +16,7 @@ import ( "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" + "github.com/semaphoreio/semaphore/mcp_server/pkg/utils" ) const ( @@ -105,6 +106,10 @@ func logsHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + jobIDRaw, err := req.RequireString("job_id") if err != nil { return mcp.NewToolResultError("job_id is required. Provide the job UUID shown by jobs_describe."), nil @@ -195,7 +200,7 @@ func fetchHostedLogs(ctx context.Context, api internalapi.Provider, jobID string request := &loghubpb.GetLogEventsRequest{JobId: jobID} if startingLine > 0 { - offset, err := shared.IntToInt32(startingLine, "cursor offset") + offset, err := utils.IntToInt32(startingLine, "cursor offset") if err != nil { return mcp.NewToolResultError(err.Error()), nil } diff --git a/mcp_server/pkg/tools/organizations/organizations_test.go b/mcp_server/pkg/tools/organizations/organizations_test.go index d5bd0a005..11bd0bf76 100644 --- a/mcp_server/pkg/tools/organizations/organizations_test.go +++ b/mcp_server/pkg/tools/organizations/organizations_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" - rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" @@ -29,7 +29,7 @@ func TestListOrganizationsSummary(t *testing.T) { } rbacStub := &rbacClientStub{ids: []string{"org-1"}} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ OrganizationClient: orgStub, RBACClient: rbacStub, Timeout: time.Second, @@ -86,7 +86,7 @@ func TestListOrganizationsDetailed(t *testing.T) { } rbacStub := &rbacClientStub{ids: []string{"org-1"}} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ OrganizationClient: orgStub, RBACClient: rbacStub, Timeout: time.Second, @@ -137,7 +137,7 @@ func TestListOrganizationsPagination(t *testing.T) { }, } rbacStub := &rbacClientStub{ids: []string{"org-1", "org-2", "org-3"}} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ OrganizationClient: orgStub, RBACClient: rbacStub, Timeout: time.Second, diff --git a/mcp_server/pkg/tools/pipelines/pipelines.go b/mcp_server/pkg/tools/pipelines/pipelines.go index 089260d66..23d24789b 100644 --- a/mcp_server/pkg/tools/pipelines/pipelines.go +++ b/mcp_server/pkg/tools/pipelines/pipelines.go @@ -15,6 +15,7 @@ import ( "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" + "github.com/semaphoreio/semaphore/mcp_server/pkg/utils" ) const ( @@ -240,6 +241,10 @@ func listHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + workflowIDRaw, err := req.RequireString("workflow_id") if err != nil { return mcp.NewToolResultError("workflow_id is required. Provide the workflow UUID returned by workflows_search."), nil @@ -287,7 +292,7 @@ Troubleshooting: limit = maxLimit } - pageSize, err := shared.IntToInt32(limit, "limit") + pageSize, err := utils.IntToInt32(limit, "limit") if err != nil { return mcp.NewToolResultError(err.Error()), nil } @@ -453,6 +458,10 @@ func jobsHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + pipelineIDRaw, err := req.RequireString("pipeline_id") if err != nil { return mcp.NewToolResultError("pipeline_id is required. Provide the pipeline UUID from workflow_pipelines_list."), nil diff --git a/mcp_server/pkg/tools/pipelines/pipelines_test.go b/mcp_server/pkg/tools/pipelines/pipelines_test.go index 7c43646dc..eae448f07 100644 --- a/mcp_server/pkg/tools/pipelines/pipelines_test.go +++ b/mcp_server/pkg/tools/pipelines/pipelines_test.go @@ -9,14 +9,67 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" ) +func TestListPipelines_FeatureFlagDisabled(t *testing.T) { + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workflow_id": "11111111-2222-3333-4444-555555555555", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + PipelineClient: &pipelineClientStub{}, + RBACClient: newRBACStub("project.view"), + } + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + t.Fatalf("expected disabled feature error, got %q", msg) + } +} + +func TestPipelineJobs_FeatureFlagDisabled(t *testing.T) { + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "pipeline_id": "11111111-2222-3333-4444-555555555555", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + PipelineClient: &pipelineClientStub{}, + RBACClient: newRBACStub("project.view"), + } + + res, err := jobsHandler(provider)(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + t.Fatalf("expected disabled feature error, got %q", msg) + } +} + func TestListPipelines(t *testing.T) { workflowID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" pipelineID := "11111111-2222-3333-4444-555555555555" @@ -45,7 +98,7 @@ func TestListPipelines(t *testing.T) { }, } - provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} + provider := &support.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} handler := listHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "workflow_id": workflowID, @@ -89,7 +142,7 @@ func TestListPipelinesPermissionDeniedWithProjectFilter(t *testing.T) { pipelineClient := &pipelineClientStub{} rbac := newRBACStub("organization.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: pipelineClient, RBACClient: rbac, Timeout: time.Second, @@ -152,7 +205,7 @@ func TestListPipelinesSkipsUnauthorizedProjects(t *testing.T) { "proj-allowed": {"project.view"}, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, @@ -205,7 +258,7 @@ func TestListPipelinesScopeMismatchOrganization(t *testing.T) { }, } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, @@ -253,7 +306,7 @@ func TestListPipelinesRBACError(t *testing.T) { "proj-1": errors.New("rbac rpc failure"), } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, @@ -309,7 +362,7 @@ func TestListPipelineJobs(t *testing.T) { }, } - provider := &internalapi.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} + provider := &support.MockProvider{PipelineClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view")} handler := jobsHandler(provider) req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ "pipeline_id": pipelineID, @@ -356,7 +409,7 @@ func TestPipelineJobsPermissionDenied(t *testing.T) { } rbac := newRBACStub() - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, @@ -401,7 +454,7 @@ func TestPipelineJobsScopeMismatchOrganization(t *testing.T) { } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, @@ -446,7 +499,7 @@ func TestPipelineJobsScopeMismatchProjectMissing(t *testing.T) { } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ PipelineClient: client, RBACClient: rbac, Timeout: time.Second, diff --git a/mcp_server/pkg/tools/projects/projects.go b/mcp_server/pkg/tools/projects/projects.go index da1feeded..260bea927 100644 --- a/mcp_server/pkg/tools/projects/projects.go +++ b/mcp_server/pkg/tools/projects/projects.go @@ -17,6 +17,7 @@ import ( "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" + "github.com/semaphoreio/semaphore/mcp_server/pkg/utils" ) const ( @@ -469,6 +470,10 @@ You can discover organizations by calling organizations_list first.`), nil Example: projects_list(organization_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")`, err)), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) if err != nil { return mcp.NewToolResultError(fmt.Sprintf(`Invalid mode parameter: %v @@ -501,7 +506,7 @@ Troubleshooting: - Retry once the header is present`, err)), nil } - pageSize, err := shared.IntToInt32(limit, "limit") + pageSize, err := utils.IntToInt32(limit, "limit") if err != nil { return mcp.NewToolResultError(err.Error()), nil } @@ -607,6 +612,10 @@ Check INTERNAL_API_URL_PROJECT or MCP_PROJECT_GRPC_ENDPOINT and ensure ProjectHu return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + querySanitized, err := shared.SanitizeSearchQuery(req.GetString("query", ""), "query") if err != nil { return mcp.NewToolResultError(err.Error()), nil @@ -672,7 +681,7 @@ Troubleshooting: moreAvailable := false for page := 1; page <= maxPages; page++ { - pageNumber, err := shared.IntToInt32(page, "page") + pageNumber, err := utils.IntToInt32(page, "page") if err != nil { return mcp.NewToolResultError(err.Error()), nil } diff --git a/mcp_server/pkg/tools/projects/projects_test.go b/mcp_server/pkg/tools/projects/projects_test.go index 71e024f4e..d84fc361a 100644 --- a/mcp_server/pkg/tools/projects/projects_test.go +++ b/mcp_server/pkg/tools/projects/projects_test.go @@ -8,16 +8,67 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" - - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" ) +func TestListProjects_FeatureFlagDisabled(t *testing.T) { + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + ProjectClient: &projectClientStub{}, + RBACClient: newRBACStub("organization.view", "project.view"), + } + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + t.Fatalf("expected disabled feature error, got %q", msg) + } +} + +func TestSearchProjects_FeatureFlagDisabled(t *testing.T) { + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "query": "search", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + ProjectClient: &projectClientStub{}, + RBACClient: newRBACStub("organization.view", "project.view"), + } + + res, err := searchHandler(provider)(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + t.Fatalf("expected disabled feature error, got %q", msg) + } +} + func TestListProjectsSummary(t *testing.T) { orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" stub := &projectClientStub{ @@ -32,7 +83,7 @@ func TestListProjectsSummary(t *testing.T) { }, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: newRBACStub("organization.view", "project.view"), } @@ -79,7 +130,7 @@ func TestListProjectsPermissionDenied(t *testing.T) { stub := &projectClientStub{} rbac := newRBACStub() - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: rbac, } @@ -117,7 +168,7 @@ func TestListProjectsRBACUnavailable(t *testing.T) { orgID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" stub := &projectClientStub{} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, } @@ -161,7 +212,7 @@ func TestListProjectsScopeMismatch(t *testing.T) { } rbac := newRBACStub("organization.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: rbac, } @@ -224,7 +275,7 @@ func TestSearchProjectsMatches(t *testing.T) { }, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: newRBACStub("organization.view", "project.view"), } @@ -284,7 +335,7 @@ func TestSearchProjectsPermissionDenied(t *testing.T) { stub := &projectClientStub{} rbac := newRBACStub() - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: rbac, } @@ -339,7 +390,7 @@ func TestSearchProjectsScopeMismatch(t *testing.T) { } rbac := newRBACStub("organization.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ ProjectClient: stub, RBACClient: rbac, } diff --git a/mcp_server/pkg/tools/workflows/workflows.go b/mcp_server/pkg/tools/workflows/workflows.go index 32e9044f2..7d93af235 100644 --- a/mcp_server/pkg/tools/workflows/workflows.go +++ b/mcp_server/pkg/tools/workflows/workflows.go @@ -15,6 +15,7 @@ import ( "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" + "github.com/semaphoreio/semaphore/mcp_server/pkg/utils" ) const ( @@ -155,6 +156,10 @@ func listHandler(api internalapi.Provider) server.ToolHandlerFunc { return mcp.NewToolResultError(err.Error()), nil } + if err := shared.EnsureReadToolsFeature(ctx, api, orgID); err != nil { + return mcp.NewToolResultError(err.Error()), nil + } + mode, err := shared.NormalizeMode(req.GetString("mode", "summary")) if err != nil { return mcp.NewToolResultError(fmt.Sprintf("Invalid mode parameter: %v", err)), nil @@ -197,7 +202,7 @@ Troubleshooting: limit = maxLimit } - pageSize, err := shared.IntToInt32(limit, "limit") + pageSize, err := utils.IntToInt32(limit, "limit") if err != nil { return mcp.NewToolResultError(err.Error()), nil } diff --git a/mcp_server/pkg/tools/workflows/workflows_test.go b/mcp_server/pkg/tools/workflows/workflows_test.go index 30e3c0e3e..d4f7f852b 100644 --- a/mcp_server/pkg/tools/workflows/workflows_test.go +++ b/mcp_server/pkg/tools/workflows/workflows_test.go @@ -8,17 +8,44 @@ import ( "time" "github.com/mark3labs/mcp-go/mcp" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + support "github.com/semaphoreio/semaphore/mcp_server/test/support" "google.golang.org/genproto/googleapis/rpc/code" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" ) +func TestListWorkflows_FeatureFlagDisabled(t *testing.T) { + req := mcp.CallToolRequest{Params: mcp.CallToolParams{Arguments: map[string]any{ + "organization_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "project_id": "11111111-2222-3333-4444-555555555555", + }}} + header := http.Header{} + header.Set("X-Semaphore-User-ID", "99999999-aaaa-bbbb-cccc-dddddddddddd") + req.Header = header + + provider := &support.MockProvider{ + FeaturesService: support.FeatureClientStub{State: feature.Hidden}, + Timeout: time.Second, + WorkflowClient: &workflowClientStub{}, + RBACClient: newRBACStub("project.view"), + } + + res, err := listHandler(provider)(context.Background(), req) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + msg := requireErrorText(t, res) + if !strings.Contains(strings.ToLower(msg), "disabled") { + t.Fatalf("expected disabled feature error, got %q", msg) + } +} + func TestListWorkflows(t *testing.T) { projectID := "11111111-2222-3333-4444-555555555555" client := &workflowClientStub{ @@ -39,7 +66,7 @@ func TestListWorkflows(t *testing.T) { }, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, Timeout: time.Second, RBACClient: newRBACStub("project.view"), @@ -107,7 +134,7 @@ func TestListWorkflowsWithRequesterOverride(t *testing.T) { response: &userpb.User{Id: "00000000-1111-2222-3333-444444444444"}, } - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, UserClient: userClient, Timeout: time.Second, @@ -152,7 +179,7 @@ func TestListWorkflowsPermissionDenied(t *testing.T) { client := &workflowClientStub{} rbac := newRBACStub() - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, Timeout: time.Second, RBACClient: rbac, @@ -191,7 +218,7 @@ func TestListWorkflowsRBACUnavailable(t *testing.T) { projectID := "11111111-2222-3333-4444-555555555555" client := &workflowClientStub{} - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, Timeout: time.Second, } @@ -238,7 +265,7 @@ func TestListWorkflowsScopeMismatchOrganization(t *testing.T) { } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, Timeout: time.Second, RBACClient: rbac, @@ -283,7 +310,7 @@ func TestListWorkflowsScopeMismatchProject(t *testing.T) { } rbac := newRBACStub("project.view") - provider := &internalapi.MockProvider{ + provider := &support.MockProvider{ WorkflowClient: client, Timeout: time.Second, RBACClient: rbac, diff --git a/mcp_server/pkg/tools/internal/shared/numeric.go b/mcp_server/pkg/utils/numeric.go similarity index 52% rename from mcp_server/pkg/tools/internal/shared/numeric.go rename to mcp_server/pkg/utils/numeric.go index 98dd01f44..37d8181ee 100644 --- a/mcp_server/pkg/tools/internal/shared/numeric.go +++ b/mcp_server/pkg/utils/numeric.go @@ -1,4 +1,4 @@ -package shared +package utils import ( "fmt" @@ -12,3 +12,11 @@ func IntToInt32(value int, fieldName string) (int32, error) { } return int32(value), nil } + +// IntToUint32 safely converts an int to uint32 ensuring the value is within bounds. +func IntToUint32(value int, fieldName string) (uint32, error) { + if value < 0 || value > int(math.MaxUint32) { + return 0, fmt.Errorf("%s must be between %d and %d", fieldName, 0, math.MaxUint32) + } + return uint32(value), nil +} diff --git a/mcp_server/test/support/features_stub.go b/mcp_server/test/support/features_stub.go new file mode 100644 index 000000000..be0b58de1 --- /dev/null +++ b/mcp_server/test/support/features_stub.go @@ -0,0 +1,24 @@ +package support + +import "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" + +// FeatureClientStub allows tests to control feature flag responses. +type FeatureClientStub struct { + State feature.State + StateError error + Features []feature.OrganizationFeature +} + +func (f FeatureClientStub) ListOrganizationFeatures(string) ([]feature.OrganizationFeature, error) { + if f.Features == nil { + return nil, nil + } + return append([]feature.OrganizationFeature(nil), f.Features...), nil +} + +func (f FeatureClientStub) FeatureState(string, string) (feature.State, error) { + if f.StateError != nil { + return feature.Hidden, f.StateError + } + return f.State, nil +} diff --git a/mcp_server/pkg/internalapi/mock.go b/mcp_server/test/support/mock_provider.go similarity index 75% rename from mcp_server/pkg/internalapi/mock.go rename to mcp_server/test/support/mock_provider.go index 9e7c26337..b356b6d35 100644 --- a/mcp_server/pkg/internalapi/mock.go +++ b/mcp_server/test/support/mock_provider.go @@ -1,17 +1,19 @@ -package internalapi +package support import ( "time" - rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" + featuresvc "github.com/semaphoreio/semaphore/mcp_server/pkg/service" ) // MockProvider is a lightweight Provider implementation intended for tests. @@ -25,6 +27,7 @@ type MockProvider struct { Loghub2Client loghub2pb.Loghub2Client UserClient userpb.UserServiceClient RBACClient rbacpb.RBACClient + FeaturesService featuresvc.FeatureClient Timeout time.Duration } @@ -54,3 +57,22 @@ func (m *MockProvider) Loghub2() loghub2pb.Loghub2Client { return m.Loghub2Clien func (m *MockProvider) Users() userpb.UserServiceClient { return m.UserClient } func (m *MockProvider) RBAC() rbacpb.RBACClient { return m.RBACClient } + +func (m *MockProvider) Features() featuresvc.FeatureClient { + if m.FeaturesService == nil { + return alwaysEnabledFeatureClient{} + } + return m.FeaturesService +} + +type alwaysEnabledFeatureClient struct{} + +func (alwaysEnabledFeatureClient) ListOrganizationFeatures(string) ([]feature.OrganizationFeature, error) { + return []feature.OrganizationFeature{ + {Name: "mcp_server_read_tools", State: feature.Enabled, Quantity: 1}, + }, nil +} + +func (alwaysEnabledFeatureClient) FeatureState(string, string) (feature.State, error) { + return feature.Enabled, nil +} diff --git a/mcp_server/pkg/internalapi/stubs/stubs.go b/mcp_server/test/support/stubs.go similarity index 79% rename from mcp_server/pkg/internalapi/stubs/stubs.go rename to mcp_server/test/support/stubs.go index 31c6618db..994badd9e 100644 --- a/mcp_server/pkg/internalapi/stubs/stubs.go +++ b/mcp_server/test/support/stubs.go @@ -1,23 +1,27 @@ -package stubs +package support import ( "context" "fmt" "strings" + "sync" "time" - rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" + "github.com/semaphoreio/semaphore/mcp_server/pkg/feature" + featurepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/feature" loghubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub" loghub2pb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/loghub2" orgpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/organization" pipelinepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber.pipeline" workflowpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/plumber_w_f.workflow" projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" + rbacpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/rbac" responsepb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/response_status" jobpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/server_farm.job" statuspb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/status" userpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/user" "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" + featuresvc "github.com/semaphoreio/semaphore/mcp_server/pkg/service" code "google.golang.org/genproto/googleapis/rpc/code" "google.golang.org/grpc" @@ -37,6 +41,7 @@ func New() internalapi.Provider { loghub2: &loghub2Stub{}, users: &userStub{}, rbac: &rbacStub{}, + features: &featureStub{}, } } @@ -51,6 +56,7 @@ type provider struct { loghub2 loghub2pb.Loghub2Client users userpb.UserServiceClient rbac rbacpb.RBACClient + features featuresvc.FeatureClient } func (p *provider) CallTimeout() time.Duration { return p.timeout } @@ -73,6 +79,8 @@ func (p *provider) Users() userpb.UserServiceClient { return p.users } func (p *provider) RBAC() rbacpb.RBACClient { return p.rbac } +func (p *provider) Features() featuresvc.FeatureClient { return p.features } + // --- workflow stub --- type workflowStub struct { @@ -310,3 +318,96 @@ func (p *projectStub) List(ctx context.Context, in *projecthubpb.ListRequest, op }, }, nil } + +// --- features stub --- + +type featureStub struct { + featuresvc.FeatureClient +} + +func (f *featureStub) ListOrganizationFeatures(organizationId string) ([]feature.OrganizationFeature, error) { + return []feature.OrganizationFeature{ + { + Name: "feature-a", + State: feature.Enabled, + Quantity: 10, + }, + { + Name: "feature-b", + State: feature.Hidden, + Quantity: 0, + }, + { + Name: "mcp_server_read_tools", + State: feature.Enabled, + Quantity: 1, + }, + }, nil +} + +func (f *featureStub) FeatureState(organizationId string, featureName string) (feature.State, error) { + switch featureName { + case "feature-a", "mcp_server_read_tools": + return feature.Enabled, nil + case "feature-b": + return feature.Hidden, nil + } + return feature.Hidden, nil +} + +// --- feature hub service stub --- + +type FeatureHubServiceStub struct { + featurepb.UnimplementedFeatureServiceServer + + mu sync.Mutex + response *featurepb.ListOrganizationFeaturesResponse + err error + lastRequest *featurepb.ListOrganizationFeaturesRequest + callCount int +} + +func NewFeatureHubServiceStub() *FeatureHubServiceStub { + return &FeatureHubServiceStub{} +} + +func (s *FeatureHubServiceStub) SetResponse(response *featurepb.ListOrganizationFeaturesResponse) { + s.mu.Lock() + defer s.mu.Unlock() + s.response = response +} + +func (s *FeatureHubServiceStub) SetError(err error) { + s.mu.Lock() + defer s.mu.Unlock() + s.err = err +} + +func (s *FeatureHubServiceStub) ListOrganizationFeatures(ctx context.Context, req *featurepb.ListOrganizationFeaturesRequest) (*featurepb.ListOrganizationFeaturesResponse, error) { + s.mu.Lock() + s.lastRequest = req + s.callCount++ + response := s.response + err := s.err + s.mu.Unlock() + + if err != nil { + return nil, err + } + if response != nil { + return response, nil + } + return &featurepb.ListOrganizationFeaturesResponse{}, nil +} + +func (s *FeatureHubServiceStub) LastRequest() *featurepb.ListOrganizationFeaturesRequest { + s.mu.Lock() + defer s.mu.Unlock() + return s.lastRequest +} + +func (s *FeatureHubServiceStub) CallCount() int { + s.mu.Lock() + defer s.mu.Unlock() + return s.callCount +} From b86a9b7f4bf082ebe73af1c4a597ac5c32768388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damjan=20Be=C4=87irovi=C4=87?= Date: Thu, 6 Nov 2025 14:05:20 +0100 Subject: [PATCH 5/5] chore(mcp): tidy up ReadMe and some tool descriptions (#698) Updates the ReadMe file and removes redundant files and tool descriptions. --- mcp_server/README.md | 44 +- .../pkg/tools/organizations/organizations.go | 3 +- .../pkg/tools/projects/projects.go.backup | 577 ------------------ mcp_server/pkg/tools/workflows/workflows.go | 1 + 4 files changed, 41 insertions(+), 584 deletions(-) delete mode 100644 mcp_server/pkg/tools/projects/projects.go.backup diff --git a/mcp_server/README.md b/mcp_server/README.md index ff002e400..749437a18 100644 --- a/mcp_server/README.md +++ b/mcp_server/README.md @@ -2,6 +2,34 @@ The `mcp_server` service is a Model Context Protocol (MCP) server implemented with [github.com/mark3labs/mcp-go](https://github.com/mark3labs/mcp-go). It exposes Semaphore workflow, pipeline, and job data to MCP-compatible clients. +## Configuration: + +### Claude Code: + +In terminal export the env var called MY_MCP_TOKEN with the value of the API token that should be used to connect to Semaphore MCP server. run the following command: + +claude mcp add semaphore https://mcp.semaphoreci.com/mcp \ + --scope user --transport http \ + --header "Authorization: Bearer $MY_MCP_TOKEN" + +Example prompt: "Help me figure out why have my test failed on Semaphore" + +### Codex: + +Open your ~/.codex/config.toml (if you’re using the CLI) or via the Codex IDE Extension in VS Code (Gear icon → MCP settings → Open config.toml) + +[mcp_servers.semaphore] +url = "https://mcp.semaphoreci.com/mcp" +bearer_token_env_var = "MY_MCP_TOKEN" +startup_timeout_sec = 30 +tool_timeout_sec = 300 + +In terminal export the env var called MY_MCP_TOKEN with the value of the API token that should be used to connect to Semaphore MCP server. + +You can then use Semaphore MCP in codex CLI by starting it in that same terminal session, or in VS Code codex extension by starting the VS Code from that terminal session with `code ` command. + +_Note_: Due to current limitations of Codex extension for VS Code, if you start VS Code in any other way except from the terminal session where MY_MCP_TOKEN env var has correct value, the Semaphore MCP server will not work. + ## Contributor Guide Refer to [`AGENTS.md`](AGENTS.md) for repository guidelines, project structure, and development workflows. @@ -11,15 +39,18 @@ Refer to [`AGENTS.md`](AGENTS.md) for repository guidelines, project structure, | Tool | Description | | ---- | ----------- | | `echo` | Returns the provided `message` verbatim (handy for smoke tests). | -| `workflows_list` | Lists workflows for a project using keyset pagination. | -| `pipelines_list` | Lists pipelines for a workflow, including state/result metadata. | -| `pipelines_describe` | Describes a pipeline and its blocks (optionally detailed). | +| `organizations_list` | Lists organizations that the user can access. | +| `projects_list` | List projects that belong to a specific organization. | +| `projects_search` | Search projects inside an organization by project name, repository URL, or description. | +| `workflows_search` | Search recent workflows for a project (most recent first). | +| `pipelines_list` | List pipelines associated with a workflow (most recent first). | +| `pipeline_jobs` | List jobs belonging to a specific pipeline. | | `jobs_describe` | Describes a job, surfacing agent details and lifecycle timestamps. | -| `jobs_logs` | Fetches job logs. Hosted jobs stream loghub events; self-hosted jobs mint a Loghub2 pull token. | +| `jobs_logs` | Fetches job logs. Hosted jobs stream loghub events; self-hosted jobs return a URL to fetch logs. | ## Requirements -- Go 1.24 (toolchain `go1.24.9` is configured in `go.mod`). +- Go 1.25 (toolchain `go1.25.2` is configured in `go.mod` and `Dockerfile`). - SSH access to `renderedtext/internal_api` for protobuf generation. ## Generating protobuf stubs @@ -44,6 +75,9 @@ The server dials internal gRPC services based on environment variables. Deployme | Job gRPC endpoint | `INTERNAL_API_URL_JOB`, `MCP_JOB_GRPC_ENDPOINT`, `JOBS_API_URL` | | Loghub gRPC endpoint (hosted logs) | `INTERNAL_API_URL_LOGHUB`, `MCP_LOGHUB_GRPC_ENDPOINT`, `LOGHUB_API_URL` | | Loghub2 gRPC endpoint (self-hosted logs) | `INTERNAL_API_URL_LOGHUB2`, `MCP_LOGHUB2_GRPC_ENDPOINT`, `LOGHUB2_API_URL` | +| RBAC gRPC endpoint | `INTERNAL_API_URL_RBAC`, `MCP_RBAC_GRPC_ENDPOINT` | +| Users gRPC endpoint | `INTERNAL_API_URL_USER`, `MCP_USER_GRPC_ENDPOINT` | +| Featurehub gRPC endpoint | `INTERNAL_API_URL_FEATURE`, `MCP_FEATURE_GRPC_ENDPOINT` | | Dial timeout | `MCP_GRPC_DIAL_TIMEOUT` (default `5s`) | | Call timeout | `MCP_GRPC_CALL_TIMEOUT` (default `15s`) | diff --git a/mcp_server/pkg/tools/organizations/organizations.go b/mcp_server/pkg/tools/organizations/organizations.go index 777df4034..18a78ce5f 100644 --- a/mcp_server/pkg/tools/organizations/organizations.go +++ b/mcp_server/pkg/tools/organizations/organizations.go @@ -30,7 +30,7 @@ const ( func fullDescription() string { return `List organizations available to the authenticated user. -This tool retrieves all organizations the user can access. The caller's user ID is derived from the X-Semaphore-User-ID header that the authentication layer injects into every request, so no additional arguments are required to identify the caller. +This tool retrieves all organizations the user can access. Use this as the first step when users ask questions like: - "Show me my organizations" @@ -67,7 +67,6 @@ Examples: Common Errors: - Empty list: User may not belong to any organizations (check authentication) - RPC failed: Organization service temporarily unavailable (retry after a few seconds) -- Missing header: Ensure the authentication proxy forwards X-Semaphore-User-ID Next Steps After This Call: - Store the organization_id you intend to use (for example in a local ".semaphore/org" file) so future requests can reference it quickly diff --git a/mcp_server/pkg/tools/projects/projects.go.backup b/mcp_server/pkg/tools/projects/projects.go.backup deleted file mode 100644 index dff9a16fe..000000000 --- a/mcp_server/pkg/tools/projects/projects.go.backup +++ /dev/null @@ -1,577 +0,0 @@ -package projects - -import ( - "context" - "fmt" - "sort" - "strings" - - "github.com/google/uuid" - "github.com/mark3labs/mcp-go/mcp" - "github.com/mark3labs/mcp-go/server" - projecthubpb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/projecthub" - repoipb "github.com/semaphoreio/semaphore/mcp_server/pkg/internal_api/repository_integrator" - "github.com/sirupsen/logrus" - - "github.com/semaphoreio/semaphore/mcp_server/pkg/internalapi" - "github.com/semaphoreio/semaphore/mcp_server/pkg/logging" - "github.com/semaphoreio/semaphore/mcp_server/pkg/tools/internal/shared" -) - -const ( - listToolName = "org.projects.list" - searchToolName = "org.projects.search" - defaultListLimit = 25 - maxListLimit = 200 - defaultSearchLimit = 20 - defaultSearchPages = 5 - maxSearchPages = 10 - searchPageSize = 100 -) - -// Register wires project tools into the MCP server. -func Register(s *server.MCPServer, api internalapi.Provider) { - if s == nil { - return - } - - s.AddTool(newListTool(), listHandler(api)) - s.AddTool(newSearchTool(), searchHandler(api)) -} - -func newListTool() mcp.Tool { - return mcp.NewTool( - listToolName, - mcp.WithDescription("List projects within an organization."), - mcp.WithString("organization_id", - mcp.Required(), - mcp.Description("Organization UUID whose projects should be listed."), - ), - mcp.WithString("user_id", - mcp.Description("Optional user UUID to scope results to member-accessible projects."), - ), - mcp.WithNumber("page", - mcp.Description("1-based page number."), - mcp.Min(1), - mcp.DefaultNumber(1), - ), - mcp.WithNumber("limit", - mcp.Description("Number of projects per page (1-200)."), - mcp.Min(1), - mcp.Max(maxListLimit), - mcp.DefaultNumber(defaultListLimit), - ), - mcp.WithString("mode", - mcp.Description("Response detail level (`summary` or `detailed`). Defaults to `summary`."), - ), - ) -} - -func newSearchTool() mcp.Tool { - return mcp.NewTool( - searchToolName, - mcp.WithDescription("Search projects within an organization by name, repository URL, or description."), - mcp.WithString("organization_id", - mcp.Required(), - mcp.Description("Organization UUID whose projects should be searched."), - ), - mcp.WithString("query", - mcp.Required(), - mcp.Description("Search query matched against project name, description, and repository URL."), - ), - mcp.WithString("user_id", - mcp.Description("Optional user UUID to scope search results to accessible projects."), - ), - mcp.WithNumber("limit", - mcp.Description("Maximum number of matches to return (1-50)."), - mcp.Min(1), - mcp.Max(50), - mcp.DefaultNumber(defaultSearchLimit), - ), - mcp.WithNumber("max_pages", - mcp.Description("Maximum number of paginated fetches to evaluate (1-10). Higher values explore more projects at the cost of latency."), - mcp.Min(1), - mcp.Max(maxSearchPages), - mcp.DefaultNumber(defaultSearchPages), - ), - mcp.WithString("mode", - mcp.Description("Response detail level (`summary` or `detailed`). Defaults to `summary`."), - ), - ) -} - -type listResult struct { - Projects []projectSummary `json:"projects"` - Page int `json:"page"` - TotalPages int `json:"totalPages"` - TotalEntries int `json:"totalEntries"` - HasMore bool `json:"hasMore"` -} - -type searchResult struct { - Projects []projectSearchEntry `json:"projects"` - TotalMatches int `json:"totalMatches"` - SearchedPages int `json:"searchedPages"` - MoreAvailable bool `json:"moreAvailable"` -} - -type projectSearchEntry struct { - projectSummary - MatchConfidence string `json:"matchConfidence"` - MatchedFields []string `json:"matchedFields,omitempty"` -} - -type projectSummary struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description,omitempty"` - OrganizationID string `json:"organizationId,omitempty"` - OwnerID string `json:"ownerId,omitempty"` - CreatedAt string `json:"createdAt,omitempty"` - Visibility string `json:"visibility,omitempty"` - Repository repositorySummary `json:"repository"` - Details *projectDetails `json:"details,omitempty"` -} - -type repositorySummary struct { - URL string `json:"url,omitempty"` - Name string `json:"name,omitempty"` - DefaultBranch string `json:"defaultBranch,omitempty"` - PipelineFile string `json:"pipelineFile,omitempty"` - Integration string `json:"integrationType,omitempty"` - Public bool `json:"public"` - Connected bool `json:"connected"` - RepositoryID string `json:"repositoryId,omitempty"` - Owner string `json:"owner,omitempty"` - RunOnPresent bool `json:"runOnConfigured,omitempty"` - IntegrationURL string `json:"integrationUrl,omitempty"` -} - -type projectDetails struct { - CustomPermissions bool `json:"customPermissions,omitempty"` - SchedulerCount int `json:"schedulerCount,omitempty"` - TaskCount int `json:"taskCount,omitempty"` - DebugPermissions []string `json:"debugPermissions,omitempty"` - AttachPermissions []string `json:"attachPermissions,omitempty"` -} - -func listHandler(api internalapi.Provider) server.ToolHandlerFunc { - return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { - client := api.Projects() - if client == nil { - return mcp.NewToolResultError("project gRPC endpoint is not configured"), nil - } - - orgID, err := req.RequireString("organization_id") - if err != nil { - return mcp.NewToolResultError(err.Error()), nil - } - - mode := strings.ToLower(strings.TrimSpace(req.GetString("mode", "summary"))) - if mode == "" { - mode = "summary" - } - if mode != "summary" && mode != "detailed" { - return mcp.NewToolResultError("mode must be either 'summary' or 'detailed'"), nil - } - includeDetails := mode == "detailed" - - page := req.GetInt("page", 1) - if page < 1 { - page = 1 - } - - limit := req.GetInt("limit", defaultListLimit) - if limit <= 0 { - limit = defaultListLimit - } else if limit > maxListLimit { - limit = maxListLimit - } - - request := &projecthubpb.ListRequest{ - Metadata: projectRequestMeta(orgID, strings.TrimSpace(req.GetString("user_id", ""))), - Pagination: &projecthubpb.PaginationRequest{ - Page: int32(page), - PageSize: int32(limit), - }, - } - - callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) - defer cancel() - - resp, err := client.List(callCtx, request) - if err != nil { - logging.ForComponent("rpc"). - WithFields(logrus.Fields{ - "rpc": "project.List", - "organizationId": orgID, - "page": page, - "limit": limit, - "mode": mode, - }). - WithError(err). - Error("project list RPC failed") - return mcp.NewToolResultError(fmt.Sprintf("project list RPC failed: %v", err)), nil - } - - if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { - logging.ForComponent("rpc"). - WithField("rpc", "project.List"). - WithError(err). - Warn("project list returned non-OK status") - return mcp.NewToolResultError(err.Error()), nil - } - - pagination := resp.GetPagination() - totalPages := 0 - totalEntries := 0 - hasMore := false - if pagination != nil { - totalPages = int(pagination.GetTotalPages()) - totalEntries = int(pagination.GetTotalEntries()) - hasMore = int(pagination.GetPageNumber()) < totalPages - } - - projects := make([]projectSummary, 0, len(resp.GetProjects())) - for _, proj := range resp.GetProjects() { - projects = append(projects, summarizeProject(proj, includeDetails)) - } - - return mcp.NewToolResultStructuredOnly(listResult{ - Projects: projects, - Page: page, - TotalPages: totalPages, - TotalEntries: totalEntries, - HasMore: hasMore, - }), nil - } -} - -func searchHandler(api internalapi.Provider) server.ToolHandlerFunc { - return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { - client := api.Projects() - if client == nil { - return mcp.NewToolResultError("project gRPC endpoint is not configured"), nil - } - - orgID, err := req.RequireString("organization_id") - if err != nil { - return mcp.NewToolResultError(err.Error()), nil - } - rawQuery, err := req.RequireString("query") - if err != nil { - return mcp.NewToolResultError(err.Error()), nil - } - query := strings.TrimSpace(strings.ToLower(rawQuery)) - if query == "" { - return mcp.NewToolResultError("query must not be empty"), nil - } - - mode := strings.ToLower(strings.TrimSpace(req.GetString("mode", "summary"))) - if mode == "" { - mode = "summary" - } - if mode != "summary" && mode != "detailed" { - return mcp.NewToolResultError("mode must be either 'summary' or 'detailed'"), nil - } - includeDetails := mode == "detailed" - - limit := req.GetInt("limit", defaultSearchLimit) - if limit <= 0 { - limit = defaultSearchLimit - } else if limit > 50 { - limit = 50 - } - - maxPages := req.GetInt("max_pages", defaultSearchPages) - if maxPages <= 0 { - maxPages = defaultSearchPages - } else if maxPages > maxSearchPages { - maxPages = maxSearchPages - } - - userID := strings.TrimSpace(req.GetString("user_id", "")) - - type candidate struct { - summary projectSummary - score int - matchedFields []string - } - - candidates := make([]candidate, 0, limit*2) - totalMatches := 0 - searchedPages := 0 - moreAvailable := false - - for page := 1; page <= maxPages; page++ { - request := &projecthubpb.ListRequest{ - Metadata: projectRequestMeta(orgID, userID), - Pagination: &projecthubpb.PaginationRequest{ - Page: int32(page), - PageSize: searchPageSize, - }, - } - - callCtx, cancel := context.WithTimeout(ctx, api.CallTimeout()) - resp, err := client.List(callCtx, request) - cancel() - if err != nil { - logging.ForComponent("rpc"). - WithFields(logrus.Fields{ - "rpc": "project.List", - "organizationId": orgID, - "page": page, - "mode": mode, - "query": rawQuery, - }). - WithError(err). - Error("project list RPC failed during search") - return mcp.NewToolResultError(fmt.Sprintf("project search failed: %v", err)), nil - } - - if err := shared.CheckProjectResponseMeta(resp.GetMetadata()); err != nil { - logging.ForComponent("rpc"). - WithField("rpc", "project.List"). - WithError(err). - Warn("project search received non-OK status") - return mcp.NewToolResultError(err.Error()), nil - } - - searchedPages++ - - for _, proj := range resp.GetProjects() { - score, matched := scoreProjectMatch(proj, query) - if score == 0 || len(matched) == 0 { - continue - } - totalMatches++ - candidates = append(candidates, candidate{ - summary: summarizeProject(proj, includeDetails), - score: score, - matchedFields: matched, - }) - } - - pagination := resp.GetPagination() - if pagination == nil || int(pagination.GetPageNumber()) >= int(pagination.GetTotalPages()) { - moreAvailable = false - break - } - moreAvailable = true - } - - if len(candidates) == 0 { - return mcp.NewToolResultStructuredOnly(searchResult{ - Projects: []projectSearchEntry{}, - TotalMatches: 0, - SearchedPages: searchedPages, - MoreAvailable: moreAvailable, - }), nil - } - - sort.SliceStable(candidates, func(i, j int) bool { - if candidates[i].score == candidates[j].score { - return strings.Compare(candidates[i].summary.Name, candidates[j].summary.Name) < 0 - } - return candidates[i].score > candidates[j].score - }) - - if len(candidates) > limit { - candidates = candidates[:limit] - } - - results := make([]projectSearchEntry, 0, len(candidates)) - for _, cand := range candidates { - results = append(results, projectSearchEntry{ - projectSummary: cand.summary, - MatchConfidence: classifyConfidence(cand.score), - MatchedFields: cand.matchedFields, - }) - } - - return mcp.NewToolResultStructuredOnly(searchResult{ - Projects: results, - TotalMatches: totalMatches, - SearchedPages: searchedPages, - MoreAvailable: moreAvailable || totalMatches > len(results), - }), nil - } -} - -func projectRequestMeta(orgID, userID string) *projecthubpb.RequestMeta { - return &projecthubpb.RequestMeta{ - ApiVersion: "v1alpha", - Kind: "Project", - OrgId: strings.TrimSpace(orgID), - UserId: strings.TrimSpace(userID), - ReqId: uuid.NewString(), - } -} - -func summarizeProject(project *projecthubpb.Project, includeDetails bool) projectSummary { - if project == nil { - return projectSummary{} - } - - meta := project.GetMetadata() - spec := project.GetSpec() - var repoSummary repositorySummary - if spec != nil { - repoSummary = summarizeRepository(spec.GetRepository()) - } - - summary := projectSummary{ - ID: meta.GetId(), - Name: meta.GetName(), - Description: meta.GetDescription(), - OrganizationID: meta.GetOrgId(), - OwnerID: meta.GetOwnerId(), - CreatedAt: shared.FormatTimestamp(meta.GetCreatedAt()), - Visibility: normalizeProjectVisibility(spec), - Repository: repoSummary, - } - - if includeDetails { - var debugPerms, attachPerms []string - var schedulers, tasks int - var customPerms bool - if spec != nil { - debugPerms = normalizePermissionTypes(spec.GetDebugPermissions()) - attachPerms = normalizePermissionTypes(spec.GetAttachPermissions()) - schedulers = len(spec.GetSchedulers()) - tasks = len(spec.GetTasks()) - customPerms = spec.GetCustomPermissions() - } - details := projectDetails{ - CustomPermissions: customPerms, - SchedulerCount: schedulers, - TaskCount: tasks, - DebugPermissions: debugPerms, - AttachPermissions: attachPerms, - } - summary.Details = &details - } - - return summary -} - -func summarizeRepository(repo *projecthubpb.Project_Spec_Repository) repositorySummary { - if repo == nil { - return repositorySummary{} - } - - return repositorySummary{ - URL: repo.GetUrl(), - Name: repo.GetName(), - Owner: repo.GetOwner(), - DefaultBranch: repo.GetDefaultBranch(), - PipelineFile: repo.GetPipelineFile(), - Integration: normalizeIntegration(repo.GetIntegrationType()), - Public: repo.GetPublic(), - Connected: repo.GetConnected(), - RepositoryID: repo.GetId(), - RunOnPresent: repo.GetRunPresent() != nil, - } -} - -func normalizeProjectVisibility(spec *projecthubpb.Project_Spec) string { - if spec == nil { - return "" - } - value := spec.GetVisibility().String() - return normalizeEnumName(value, "Project_Spec_") -} - -func normalizeIntegration(integration repoipb.IntegrationType) string { - return normalizeEnumName(integration.String(), "IntegrationType_") -} - -func normalizePermissionTypes(perms []projecthubpb.Project_Spec_PermissionType) []string { - if len(perms) == 0 { - return nil - } - out := make([]string, 0, len(perms)) - for _, p := range perms { - out = append(out, normalizeEnumName(p.String(), "Project_Spec_")) - } - return out -} - -func normalizeEnumName(raw, prefix string) string { - raw = strings.TrimSpace(raw) - if raw == "" { - return "" - } - if strings.HasPrefix(raw, prefix) { - raw = strings.TrimPrefix(raw, prefix) - } - raw = strings.ReplaceAll(raw, "_", " ") - return strings.ToLower(raw) -} - -func scoreProjectMatch(project *projecthubpb.Project, query string) (int, []string) { - if project == nil { - return 0, nil - } - metadata := project.GetMetadata() - spec := project.GetSpec() - var repo *projecthubpb.Project_Spec_Repository - if spec != nil { - repo = spec.GetRepository() - } - - score := 0 - var matched []string - - name := strings.ToLower(strings.TrimSpace(metadata.GetName())) - description := strings.ToLower(strings.TrimSpace(metadata.GetDescription())) - repoURL := "" - repoName := "" - defaultBranch := "" - if repo != nil { - repoURL = strings.ToLower(strings.TrimSpace(repo.GetUrl())) - repoName = strings.ToLower(strings.TrimSpace(repo.GetName())) - defaultBranch = strings.ToLower(strings.TrimSpace(repo.GetDefaultBranch())) - } - - if name == query { - score += 6 - matched = append(matched, "name_exact") - } else if strings.Contains(name, query) { - score += 4 - matched = append(matched, "name") - } - - if desc := description; desc != "" && strings.Contains(desc, query) { - score += 2 - matched = append(matched, "description") - } - - if repoURL != "" && strings.Contains(repoURL, query) { - score += 3 - matched = append(matched, "repository_url") - } - - if repoName != "" && strings.Contains(repoName, query) { - score += 2 - matched = append(matched, "repository_name") - } - - if defaultBranch != "" && strings.Contains(defaultBranch, query) { - score++ - matched = append(matched, "default_branch") - } - - return score, matched -} - -func classifyConfidence(score int) string { - switch { - case score >= 6: - return "high" - case score >= 3: - return "medium" - default: - return "low" - } -} diff --git a/mcp_server/pkg/tools/workflows/workflows.go b/mcp_server/pkg/tools/workflows/workflows.go index 7d93af235..0216bf3a8 100644 --- a/mcp_server/pkg/tools/workflows/workflows.go +++ b/mcp_server/pkg/tools/workflows/workflows.go @@ -35,6 +35,7 @@ Use this when you need to answer: - "Who triggered the latest deployment workflow?" - organization_id: identify which organization’s project you are querying (required) +- project_id: identify which project to search workflows for (required) - branch: limit results to a specific branch (e.g., "main" or "release/*") - requester: filter by a specific requester (UUID, username, or automation handle) - my_workflows_only: when true (default), limit results to workflows triggered by the authenticated user