diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 58f3d36b8..84ba3517f 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -47,7 +47,7 @@ jobs: # This is committed at generated/ but building here ensure the make # targets do not go stale and that any updates are committed. run: | - make proto-generated-srcs + make buf-install buf-generated-srcs git diff --exit-code HEAD - name: Go Unit Test diff --git a/.gitignore b/.gitignore index 9fdce4dc1..8c4b24f79 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ tags nohup.out test/mocks __debug_bin +.DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d093b5d2..9a9368ea2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Please avoid adding duplicate information across this changelog and JIRA/doc inp ## [NEXT RELEASE] +- gRPC code is now generated with [buf](https://github.com/bufbuild/buf). + ## [0.7.1] - ROX-15237: The Openshift 4 Demo flavor now supports testing of unreleased versions. diff --git a/Makefile b/Makefile index 62f4f6a1d..5a82105da 100644 --- a/Makefile +++ b/Makefile @@ -93,12 +93,12 @@ clean-image: ############# .PHONY: unit-test -unit-test: proto-generated-srcs +unit-test: buf-generated-srcs @echo "+ $@" @go test -v ./... .PHONY: go-e2e-tests -go-e2e-tests: proto-generated-srcs +go-e2e-tests: buf-install buf-generated-srcs @kubectl apply -f workflows/ @go test ./test/e2e/... -tags=e2e -v -parallel 5 -count 1 -cover -timeout 1h @@ -124,87 +124,17 @@ e2e-tests: ############## ## Protobuf ## ############## -# Tool versions. -protoc-version = 3.11.2 -protoc-gen-go-version = 1.3.2 -protoc-gen-grpc-gateway-version = 1.12.1 -protoc-gen-swagger-version = 1.12.1 - -# Tool binary paths -protoc = $(GOPATH)/bin/protoc -protoc-gen-go = $(GOPATH)/bin/protoc-gen-go -protoc-gen-grpc-gateway = $(GOPATH)/bin/protoc-gen-grpc-gateway -protoc-gen-swagger = $(GOPATH)/bin/protoc-gen-swagger - -# The protoc zip url changes depending on if we're running in CI or not. -ifeq ($(shell uname -s),Linux) -PROTOC_ZIP = https://github.com/protocolbuffers/protobuf/releases/download/v$(protoc-version)/protoc-$(protoc-version)-linux-x86_64.zip -endif -ifeq ($(shell uname -s),Darwin) -PROTOC_ZIP = https://github.com/protocolbuffers/protobuf/releases/download/v$(protoc-version)/protoc-$(protoc-version)-osx-x86_64.zip -endif - -# This target installs the protoc binary. -$(protoc): - @echo "+ $@" - @echo "Installing protoc $(protoc-version) to $(protoc)" - @mkdir -p $(GOPATH)/bin - @wget -q $(PROTOC_ZIP) -O /tmp/protoc.zip - @unzip -o -q -d /tmp /tmp/protoc.zip bin/protoc - @install /tmp/bin/protoc $(protoc) - -# This target installs the protoc-gen-go binary. -$(protoc-gen-go): - @echo "+ $@" - @echo "Installing protoc-gen-go $(protoc-gen-go-version) to $(protoc-gen-go)" - @cd /tmp; go install github.com/golang/protobuf/protoc-gen-go@v$(protoc-gen-go-version) - -# This target installs the protoc-gen-grpc-gateway binary. -$(protoc-gen-grpc-gateway): - @echo "+ $@" - @echo "Installing protoc-gen-grpc-gateway $(protoc-gen-grpc-gateway-version) to $(protoc-gen-grpc-gateway)" - @cd /tmp; go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v$(protoc-gen-grpc-gateway-version) - -# This target installs the protoc-gen-swagger binary. -$(protoc-gen-swagger): - @echo "+ $@" - @echo "Installing protoc-gen-swagger $(protoc-gen-swagger-version) to $(protoc-gen-swagger)" - @cd /tmp; go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v$(protoc-gen-swagger-version) - -# This target installs all of the protoc related binaries. -.PHONY: protoc-tools -protoc-tools: $(protoc) $(protoc-gen-go) $(protoc-gen-grpc-gateway) $(protoc-gen-swagger) - -PROTO_INPUT_DIR = proto/api/v1 -PROTO_THIRD_PARTY = proto/third_party -PROTO_FILES = service.proto -PROTO_OUTPUT_DIR = generated/api/v1 +# This target installs the buf binary. +buf-install: + @./scripts/install-buf.sh # This target compiles proto files into: # - Go gRPC bindings # - Go gRPC-Gateway bindings # - JSON Swagger definitions file -.PHONY: proto-generated-srcs -proto-generated-srcs: protoc-tools - @echo "+ $@" - @mkdir -p $(PROTO_OUTPUT_DIR) - # Generate gRPC bindings - $(protoc) -I$(PROTO_INPUT_DIR) \ - -I$(PROTO_THIRD_PARTY) \ - --go_out=plugins=grpc:$(PROTO_OUTPUT_DIR) \ - $(PROTO_FILES) - - # Generate gRPC-Gateway bindings - $(protoc) -I$(PROTO_INPUT_DIR) \ - -I$(PROTO_THIRD_PARTY) \ - --grpc-gateway_out=logtostderr=true:$(PROTO_OUTPUT_DIR) \ - $(PROTO_FILES) - - # Generate JSON Swagger manifest - $(protoc) -I$(PROTO_INPUT_DIR) \ - -I$(PROTO_THIRD_PARTY) \ - --swagger_out=logtostderr=true:$(PROTO_OUTPUT_DIR) \ - $(PROTO_FILES) +.PHONY: buf-generated-srcs +buf-generated-srcs: + @buf generate ########## ## Kube ## diff --git a/README.md b/README.md index 835fd956f..8c7df17b4 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,15 @@ toolchain, it is also possible to rely on CI. CI will lint, build and push the infra server. And then deploy it to a development cluster created using the production infra deployment. A (comment)[https://github.com/stackrox/infra/pull/711#issuecomment-1270457578] -will appear on PRs with more detail. +will appear on PRs with more detail. ### Regenerate Go bindings from protos To regenerate the Go proto bindings, run: -`make proto-generated-srcs` +`make buf-generated-srcs` + +Note: You need to have `buf` installed for this. Do this e.g. with `make buf-install`. ### Building the server and cli diff --git a/auth/handlers.go b/auth/handlers.go index cb7d73087..1e591e12c 100644 --- a/auth/handlers.go +++ b/auth/handlers.go @@ -7,7 +7,7 @@ import ( "net/http" "github.com/coreos/go-oidc/v3/oidc" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "golang.org/x/oauth2" ) @@ -35,13 +35,13 @@ func (a OidcAuth) ValidateUser(token string) (*v1.User, error) { // GenerateServiceAccountToken generates a service account JWT containing a // v1.User struct. -func (a OidcAuth) GenerateServiceAccountToken(svcacct v1.ServiceAccount) (string, error) { +func (a OidcAuth) GenerateServiceAccountToken(svcacct *v1.ServiceAccount) (string, error) { return a.jwtSvcAcct.Generate(svcacct) } // ValidateServiceAccountToken validates a service account JWT and returns the // contained v1.ServiceAccount struct. -func (a OidcAuth) ValidateServiceAccountToken(token string) (v1.ServiceAccount, error) { +func (a OidcAuth) ValidateServiceAccountToken(token string) (*v1.ServiceAccount, error) { return a.jwtSvcAcct.Validate(token) } @@ -56,7 +56,7 @@ func (a OidcAuth) loginHandler(w http.ResponseWriter, r *http.Request) { return } - oauth2.SetAuthURLParam("response_mode", "query") + _ = oauth2.SetAuthURLParam("response_mode", "query") redirectURL := a.conf.AuthCodeURL(stateToken) // Redirect to authorization server so that the user can login externally. diff --git a/auth/tokenizer.go b/auth/tokenizer.go index 9a010d0b0..a6b9d23f1 100644 --- a/auth/tokenizer.go +++ b/auth/tokenizer.go @@ -10,7 +10,7 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/pkg/errors" "github.com/stackrox/infra/auth/claimrule" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "golang.org/x/oauth2" ) @@ -186,7 +186,7 @@ func NewUserTokenizer(lifetime time.Duration, secret string) *userTokenizer { // userClaims facilitates the arshalling/unmarshalling of JWTs containing v1 // .User data. type userClaims struct { - User v1.User `json:"user"` + User *v1.User `json:"user"` jwt.StandardClaims } @@ -194,7 +194,7 @@ type userClaims struct { func (t userTokenizer) Generate(user *v1.User) (string, error) { now := time.Now() claims := userClaims{ - User: *user, + User: user, StandardClaims: jwt.StandardClaims{ ExpiresAt: now.Add(t.lifetime).Unix(), NotBefore: now.Unix(), @@ -217,12 +217,14 @@ func (t userTokenizer) Validate(token string) (*v1.User, error) { }); err != nil { return nil, err } - return &claims.User, nil + return claims.User, nil } -type serviceAccountValidator v1.ServiceAccount +type serviceAccountValidator struct { + *v1.ServiceAccount +} -func (s serviceAccountValidator) Valid() error { +func (s *serviceAccountValidator) Valid() error { _, isExcluded := excludedEmails[s.Email] if isExcluded { return errors.New("email address is excluded") @@ -254,14 +256,14 @@ type serviceAccountTokenizer struct { } // Generate generates a service account JWT containing a v1.ServiceAccount. -func (t serviceAccountTokenizer) Generate(svcacct v1.ServiceAccount) (string, error) { +func (t serviceAccountTokenizer) Generate(svcacct *v1.ServiceAccount) (string, error) { // Set issuing and expiration times on new ServiceAccount. now := time.Now() svcacct.ExpiresAt = now.Add(t.lifetime).Unix() svcacct.NotBefore = now.Unix() svcacct.IssuedAt = now.Unix() - svc := serviceAccountValidator(svcacct) + svc := serviceAccountValidator{svcacct} // Ensure that our service account is well-formed. if err := svc.Valid(); err != nil { @@ -269,7 +271,7 @@ func (t serviceAccountTokenizer) Generate(svcacct v1.ServiceAccount) (string, er } // Generate new token object, containing the wrapped data. - token := jwt.NewWithClaims(jwt.SigningMethodHS256, svc) + token := jwt.NewWithClaims(jwt.SigningMethodHS256, &svc) // Sign and get the complete encoded token as a string using the secret return token.SignedString(t.secret) @@ -277,15 +279,15 @@ func (t serviceAccountTokenizer) Generate(svcacct v1.ServiceAccount) (string, er // Validate validates a service account JWT and returns the contained // v1.ServiceAccount. -func (t serviceAccountTokenizer) Validate(token string) (v1.ServiceAccount, error) { +func (t serviceAccountTokenizer) Validate(token string) (*v1.ServiceAccount, error) { var claims serviceAccountValidator if _, err := jwt.ParseWithClaims(token, &claims, func(_ *jwt.Token) (interface{}, error) { return t.secret, nil }); err != nil { - return v1.ServiceAccount{}, err + return &v1.ServiceAccount{}, err } - return v1.ServiceAccount(claims), nil + return claims.ServiceAccount, nil } // accessTokenizer facilitates the verification of access roles generated by diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 000000000..9e5cf521c --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,17 @@ +version: v1 +plugins: + - remote: buf.build/library/plugins/go:v1.27.1-1 + out: generated + opt: + - paths=source_relative + - remote: buf.build/library/plugins/go-grpc:v1.1.0-2 + out: generated + opt: + - paths=source_relative + - require_unimplemented_servers=false + - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.6.0-1 + out: generated + opt: + - paths=source_relative + - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1 + out: generated diff --git a/buf.lock b/buf.lock new file mode 100644 index 000000000..539718790 --- /dev/null +++ b/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 5ae7f88519b04fe1965da0f8a375a088 diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 000000000..5482f8baa --- /dev/null +++ b/buf.yaml @@ -0,0 +1,9 @@ +version: v1 +breaking: + use: + - FILE +lint: + use: + - DEFAULT +deps: + - buf.build/googleapis/googleapis diff --git a/cmd/infractl/cli/upgrade/command.go b/cmd/infractl/cli/upgrade/command.go index f7c615b5f..435a33dde 100644 --- a/cmd/infractl/cli/upgrade/command.go +++ b/cmd/infractl/cli/upgrade/command.go @@ -11,7 +11,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/platform" "google.golang.org/grpc" ) diff --git a/cmd/infractl/cluster/artifacts/command.go b/cmd/infractl/cluster/artifacts/command.go index bcd121862..b2ecc728a 100644 --- a/cmd/infractl/cluster/artifacts/command.go +++ b/cmd/infractl/cluster/artifacts/command.go @@ -15,7 +15,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -65,25 +65,25 @@ func DownloadArtifacts(ctx context.Context, client v1.ClusterServiceClient, id s // If no --download-dir flag was given, skip downloading the artifacts // altogether. if downloadDir == "" { - return prettyClusterArtifacts(*resp), nil + return prettyClusterArtifacts{resp}, nil } for _, artifact := range resp.Artifacts { - filename, err := download(downloadDir, *artifact) + filename, err := download(downloadDir, artifact) if err != nil { return nil, err } if strings.HasSuffix(filename, ".tgz") { - unpackSingleArtifact(filename, downloadDir, *artifact) + unpackSingleArtifact(filename, downloadDir, artifact) } } - return prettyClusterArtifacts(*resp), nil + return prettyClusterArtifacts{resp}, nil } // download will save the given cluster artifact to disk inside the given // directory. -func download(downloadDir string, artifact v1.Artifact) (filename string, err error) { +func download(downloadDir string, artifact *v1.Artifact) (filename string, err error) { // Create the download directory if it doesn't exist. All artifacts will be // downloaded into this directory. if err := os.MkdirAll(downloadDir, 0755); err != nil { @@ -134,7 +134,7 @@ func download(downloadDir string, artifact v1.Artifact) (filename string, err er // ignored here as the artifact is already saved. // //nolint:errcheck -func unpackSingleArtifact(tgzFilename string, downloadDir string, artifact v1.Artifact) { +func unpackSingleArtifact(tgzFilename string, downloadDir string, artifact *v1.Artifact) { file, err := os.Open(tgzFilename) if err != nil { return diff --git a/cmd/infractl/cluster/artifacts/fancy.go b/cmd/infractl/cluster/artifacts/fancy.go index 5af160e0d..36bb71554 100644 --- a/cmd/infractl/cluster/artifacts/fancy.go +++ b/cmd/infractl/cluster/artifacts/fancy.go @@ -5,10 +5,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyClusterArtifacts v1.ClusterArtifacts +type prettyClusterArtifacts struct { + *v1.ClusterArtifacts +} func (p prettyClusterArtifacts) PrettyPrint(cmd *cobra.Command) { for _, artifact := range p.Artifacts { diff --git a/cmd/infractl/cluster/create/command.go b/cmd/infractl/cluster/create/command.go index 6d3959d8f..17500b9f3 100644 --- a/cmd/infractl/cluster/create/command.go +++ b/cmd/infractl/cluster/create/command.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/cluster/artifacts" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -143,7 +143,7 @@ func run(ctx context.Context, conn *grpc.ClientConn, cmd *cobra.Command, args [] } } - return prettyResourceByID(*clusterID), nil + return prettyResourceByID{clusterID}, nil } func determineWorkingEnvironment() { diff --git a/cmd/infractl/cluster/create/fancy.go b/cmd/infractl/cluster/create/fancy.go index 1d9c20572..e2193c524 100644 --- a/cmd/infractl/cluster/create/fancy.go +++ b/cmd/infractl/cluster/create/fancy.go @@ -5,10 +5,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyResourceByID v1.ResourceByID +type prettyResourceByID struct { + *v1.ResourceByID +} func (p prettyResourceByID) PrettyPrint(cmd *cobra.Command) { cmd.Printf("ID: %s\n", p.Id) diff --git a/cmd/infractl/cluster/delete/command.go b/cmd/infractl/cluster/delete/command.go index c8a2513ac..39738e78d 100644 --- a/cmd/infractl/cluster/delete/command.go +++ b/cmd/infractl/cluster/delete/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -35,13 +35,13 @@ func args(_ *cobra.Command, args []string) error { } func run(ctx context.Context, conn *grpc.ClientConn, cmd *cobra.Command, args []string) (common.PrettyPrinter, error) { - req := v1.ResourceByID{ + req := &v1.ResourceByID{ Id: args[0], } - if _, err := v1.NewClusterServiceClient(conn).Delete(ctx, &req); err != nil { + if _, err := v1.NewClusterServiceClient(conn).Delete(ctx, req); err != nil { return nil, err } - return id(req), nil + return id{req}, nil } diff --git a/cmd/infractl/cluster/delete/fancy.go b/cmd/infractl/cluster/delete/fancy.go index ca29e42f8..a9d55f355 100644 --- a/cmd/infractl/cluster/delete/fancy.go +++ b/cmd/infractl/cluster/delete/fancy.go @@ -5,10 +5,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type id v1.ResourceByID +type id struct { + *v1.ResourceByID +} func (p id) PrettyPrint(cmd *cobra.Command) { cmd.Printf("ID: %s\n", p.Id) diff --git a/cmd/infractl/cluster/get/command.go b/cmd/infractl/cluster/get/command.go index bcc48861b..2d51acf61 100644 --- a/cmd/infractl/cluster/get/command.go +++ b/cmd/infractl/cluster/get/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -40,5 +40,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, _ *cobra.Command, args []st return nil, err } - return &prettyCluster{*resp}, nil + return &prettyCluster{resp}, nil } diff --git a/cmd/infractl/cluster/get/fancy.go b/cmd/infractl/cluster/get/fancy.go index 53a07bced..7ee22791a 100644 --- a/cmd/infractl/cluster/get/fancy.go +++ b/cmd/infractl/cluster/get/fancy.go @@ -13,11 +13,11 @@ import ( "github.com/buger/jsonparser" "github.com/gogo/protobuf/jsonpb" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) type prettyCluster struct { - v1.Cluster + *v1.Cluster } func (p prettyCluster) PrettyPrint(cmd *cobra.Command) { @@ -49,7 +49,7 @@ func (p prettyCluster) PrettyJSONPrint(cmd *cobra.Command) error { b := new(bytes.Buffer) m := jsonpb.Marshaler{EnumsAsInts: false, EmitDefaults: true, Indent: " "} - if err := m.Marshal(b, &p.Cluster); err != nil { + if err := m.Marshal(b, p.Cluster); err != nil { return err } diff --git a/cmd/infractl/cluster/get/fancy_test.go b/cmd/infractl/cluster/get/fancy_test.go index c02403e32..92268dc2b 100644 --- a/cmd/infractl/cluster/get/fancy_test.go +++ b/cmd/infractl/cluster/get/fancy_test.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/cluster/get" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/buildinfo" "github.com/stretchr/testify/assert" "google.golang.org/grpc" diff --git a/cmd/infractl/cluster/lifespan/command.go b/cmd/infractl/cluster/lifespan/command.go index 83eb9450e..ec1031d81 100644 --- a/cmd/infractl/cluster/lifespan/command.go +++ b/cmd/infractl/cluster/lifespan/command.go @@ -9,7 +9,7 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) diff --git a/cmd/infractl/cluster/list/command.go b/cmd/infractl/cluster/list/command.go index 4fba68760..829fa852b 100644 --- a/cmd/infractl/cluster/list/command.go +++ b/cmd/infractl/cluster/list/command.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -56,5 +56,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, cmd *cobra.Command, _ []str return nil, err } - return prettyClusterListResponse(*resp), nil + return prettyClusterListResponse{resp}, nil } diff --git a/cmd/infractl/cluster/list/fancy.go b/cmd/infractl/cluster/list/fancy.go index 3919173fa..8ec36bdef 100644 --- a/cmd/infractl/cluster/list/fancy.go +++ b/cmd/infractl/cluster/list/fancy.go @@ -8,10 +8,12 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyClusterListResponse v1.ClusterListResponse +type prettyClusterListResponse struct { + *v1.ClusterListResponse +} func (p prettyClusterListResponse) PrettyPrint(cmd *cobra.Command) { for _, cluster := range p.Clusters { diff --git a/cmd/infractl/cluster/logs/command.go b/cmd/infractl/cluster/logs/command.go index 0c7f1460f..e0c8752e9 100644 --- a/cmd/infractl/cluster/logs/command.go +++ b/cmd/infractl/cluster/logs/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -42,5 +42,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, _ *cobra.Command, args []st return nil, err } - return prettyLogsResponse(*resp), nil + return prettyLogsResponse{resp}, nil } diff --git a/cmd/infractl/cluster/logs/fancy.go b/cmd/infractl/cluster/logs/fancy.go index b53a4c152..7d0f37f21 100644 --- a/cmd/infractl/cluster/logs/fancy.go +++ b/cmd/infractl/cluster/logs/fancy.go @@ -6,10 +6,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyLogsResponse v1.LogsResponse +type prettyLogsResponse struct { + *v1.LogsResponse +} func (p prettyLogsResponse) PrettyPrint(cmd *cobra.Command) { for _, log := range p.Logs { diff --git a/cmd/infractl/common/version.go b/cmd/infractl/common/version.go index d5b1d00a7..2fefd7e77 100644 --- a/cmd/infractl/common/version.go +++ b/cmd/infractl/common/version.go @@ -7,7 +7,7 @@ import ( "github.com/golang/protobuf/ptypes/empty" "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/buildinfo" "google.golang.org/grpc" ) diff --git a/cmd/infractl/flavor/get/command.go b/cmd/infractl/flavor/get/command.go index 8e3c25800..73dfbda29 100644 --- a/cmd/infractl/flavor/get/command.go +++ b/cmd/infractl/flavor/get/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -40,5 +40,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, _ *cobra.Command, args []st return nil, err } - return &prettyFlavor{*resp}, nil + return &prettyFlavor{resp}, nil } diff --git a/cmd/infractl/flavor/get/fancy.go b/cmd/infractl/flavor/get/fancy.go index 0451cb10d..a7fd03b5c 100644 --- a/cmd/infractl/flavor/get/fancy.go +++ b/cmd/infractl/flavor/get/fancy.go @@ -6,11 +6,11 @@ import ( "github.com/spf13/cobra" "github.com/gogo/protobuf/jsonpb" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) type prettyFlavor struct { - v1.Flavor + *v1.Flavor } func (p prettyFlavor) PrettyPrint(cmd *cobra.Command) { @@ -43,7 +43,7 @@ func (p prettyFlavor) PrettyJSONPrint(cmd *cobra.Command) error { b := new(bytes.Buffer) m := jsonpb.Marshaler{EnumsAsInts: false, EmitDefaults: true, Indent: " "} - if err := m.Marshal(b, &p.Flavor); err != nil { + if err := m.Marshal(b, p.Flavor); err != nil { return err } diff --git a/cmd/infractl/flavor/list/command.go b/cmd/infractl/flavor/list/command.go index baeca1063..bd1cd0fd6 100644 --- a/cmd/infractl/flavor/list/command.go +++ b/cmd/infractl/flavor/list/command.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -44,5 +44,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, cmd *cobra.Command, _ []str return nil, err } - return prettyFlavorListResponse(*resp), nil + return prettyFlavorListResponse{resp}, nil } diff --git a/cmd/infractl/flavor/list/fancy.go b/cmd/infractl/flavor/list/fancy.go index 9d64d6429..bce61db5a 100644 --- a/cmd/infractl/flavor/list/fancy.go +++ b/cmd/infractl/flavor/list/fancy.go @@ -5,10 +5,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyFlavorListResponse v1.FlavorListResponse +type prettyFlavorListResponse struct { + *v1.FlavorListResponse +} func (p prettyFlavorListResponse) PrettyPrint(cmd *cobra.Command) { for _, flavor := range p.Flavors { diff --git a/cmd/infractl/status/fancy.go b/cmd/infractl/status/fancy.go index ab8d4107d..a7b5f45dd 100644 --- a/cmd/infractl/status/fancy.go +++ b/cmd/infractl/status/fancy.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) // PrettyStatusResp is a struct wrapping an InfraStatus diff --git a/cmd/infractl/status/get/command.go b/cmd/infractl/status/get/command.go index ef3eec3db..227eb8223 100644 --- a/cmd/infractl/status/get/command.go +++ b/cmd/infractl/status/get/command.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" "github.com/stackrox/infra/cmd/infractl/status" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) diff --git a/cmd/infractl/status/reset/command.go b/cmd/infractl/status/reset/command.go index f05876425..3b0cd1fe2 100644 --- a/cmd/infractl/status/reset/command.go +++ b/cmd/infractl/status/reset/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" "github.com/stackrox/infra/cmd/infractl/status" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" diff --git a/cmd/infractl/status/set/command.go b/cmd/infractl/status/set/command.go index dc6466f6e..909e8d145 100644 --- a/cmd/infractl/status/set/command.go +++ b/cmd/infractl/status/set/command.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" "github.com/stackrox/infra/cmd/infractl/status" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) diff --git a/cmd/infractl/token/command.go b/cmd/infractl/token/command.go index 792a55ae8..efb847168 100644 --- a/cmd/infractl/token/command.go +++ b/cmd/infractl/token/command.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" ) @@ -55,5 +55,5 @@ func token(ctx context.Context, conn *grpc.ClientConn, _ *cobra.Command, args [] return nil, err } - return prettyTokenResponse(*resp), nil + return prettyTokenResponse{resp}, nil } diff --git a/cmd/infractl/token/fancy.go b/cmd/infractl/token/fancy.go index f4db7ad0c..0111eebc9 100644 --- a/cmd/infractl/token/fancy.go +++ b/cmd/infractl/token/fancy.go @@ -6,10 +6,12 @@ import ( "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyTokenResponse v1.TokenResponse +type prettyTokenResponse struct { + *v1.TokenResponse +} func (p prettyTokenResponse) PrettyPrint(cmd *cobra.Command) { cmd.Println("# Run the following command to configure your environment") diff --git a/cmd/infractl/version/command.go b/cmd/infractl/version/command.go index c1030677a..64f3a6739 100644 --- a/cmd/infractl/version/command.go +++ b/cmd/infractl/version/command.go @@ -7,7 +7,7 @@ import ( "github.com/golang/protobuf/ptypes/empty" "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/buildinfo" "google.golang.org/grpc" ) diff --git a/cmd/infractl/version/fancy.go b/cmd/infractl/version/fancy.go index 7cd4c6d28..f1d2814b4 100644 --- a/cmd/infractl/version/fancy.go +++ b/cmd/infractl/version/fancy.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" "github.com/golang/protobuf/ptypes" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) type prettyVersionResp struct { diff --git a/cmd/infractl/whoami/command.go b/cmd/infractl/whoami/command.go index 56ef32372..583628626 100644 --- a/cmd/infractl/whoami/command.go +++ b/cmd/infractl/whoami/command.go @@ -7,7 +7,7 @@ import ( "github.com/golang/protobuf/ptypes/empty" "github.com/spf13/cobra" "github.com/stackrox/infra/cmd/infractl/common" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -40,5 +40,5 @@ func run(ctx context.Context, conn *grpc.ClientConn, _ *cobra.Command, _ []strin return nil, err } - return prettyWhoamiResp(*resp), nil + return prettyWhoamiResp{resp}, nil } diff --git a/cmd/infractl/whoami/fancy.go b/cmd/infractl/whoami/fancy.go index 49bf88363..2a247cdfb 100644 --- a/cmd/infractl/whoami/fancy.go +++ b/cmd/infractl/whoami/fancy.go @@ -5,10 +5,12 @@ import ( "github.com/spf13/cobra" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) -type prettyWhoamiResp v1.WhoamiResponse +type prettyWhoamiResp struct { + *v1.WhoamiResponse +} func (p prettyWhoamiResp) PrettyPrint(cmd *cobra.Command) { switch p := p.Principal.(type) { diff --git a/flavor/registry.go b/flavor/registry.go index b644e5885..0eff64c47 100644 --- a/flavor/registry.go +++ b/flavor/registry.go @@ -15,13 +15,13 @@ import ( "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "github.com/stackrox/infra/config" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) // pair represents a tuple of an Argo workflow and a flavor. type pair struct { - workflow v1alpha1.Workflow - flavor v1.Flavor + workflow *v1alpha1.Workflow + flavor *v1.Flavor } // Registry represents the set of all configured flavors. @@ -36,8 +36,8 @@ type Registry struct { } // Flavors returns a sorted list of all registered flavors. -func (r *Registry) Flavors() []v1.Flavor { - results := make([]v1.Flavor, 0, len(r.flavors)) +func (r *Registry) Flavors() []*v1.Flavor { + results := make([]*v1.Flavor, 0, len(r.flavors)) for _, pair := range r.flavors { results = append(results, pair.flavor) } @@ -54,7 +54,7 @@ func (r *Registry) Flavors() []v1.Flavor { } // add registers the given flavor and workflow. -func (r *Registry) add(flavor v1.Flavor, workflow v1alpha1.Workflow) error { +func (r *Registry) add(flavor *v1.Flavor, workflow *v1alpha1.Workflow) error { // Validate that another flavor with the same ID was not already added. if _, found := r.flavors[flavor.ID]; found { return fmt.Errorf("duplicate flavor id %q", flavor.ID) @@ -92,15 +92,15 @@ func (r *Registry) Default() string { } // Get returns the named flavor if it exists along with a paired workflow. -func (r *Registry) Get(id string) (v1.Flavor, v1alpha1.Workflow, bool) { +func (r *Registry) Get(id string) (*v1.Flavor, *v1alpha1.Workflow, bool) { if pair, found := r.flavors[id]; found { return pair.flavor, pair.workflow, true } if flavor, workflow := r.getPairFromWorkflowTemplate(id); flavor != nil { - return *flavor, *workflow, true + return flavor, workflow, true } - return v1.Flavor{}, v1alpha1.Workflow{}, false + return &v1.Flavor{}, &v1alpha1.Workflow{}, false } // check validates that a default flavor was added. @@ -180,7 +180,7 @@ func NewFromConfig(filename string) (*Registry, error) { } } - flavor := v1.Flavor{ + flavor := &v1.Flavor{ ID: flavorCfg.ID, Name: flavorCfg.Name, Description: flavorCfg.Description, @@ -195,8 +195,8 @@ func NewFromConfig(filename string) (*Registry, error) { return nil, err } - var workflow v1alpha1.Workflow - if err := yaml.Unmarshal(data, &workflow); err != nil { + workflow := &v1alpha1.Workflow{} + if err := yaml.Unmarshal(data, workflow); err != nil { return nil, err } @@ -215,7 +215,7 @@ func NewFromConfig(filename string) (*Registry, error) { // - All parameter names must be unique. // // - All parameters from one set must be in the other. -func CheckWorkflowEquivalence(flavor v1.Flavor, workflow v1alpha1.Workflow) error { +func CheckWorkflowEquivalence(flavor *v1.Flavor, workflow *v1alpha1.Workflow) error { // Workflow have a list of parameters, so convert to a set. workflowParamSet := make(map[string]struct{}) for _, param := range workflow.Spec.Arguments.Parameters { diff --git a/flavor/workflow_templates.go b/flavor/workflow_templates.go index 3deab54f6..8f0bb84de 100644 --- a/flavor/workflow_templates.go +++ b/flavor/workflow_templates.go @@ -10,7 +10,7 @@ import ( argov3client "github.com/argoproj/argo-workflows/v3/cmd/argo/commands/client" workflowtemplatepkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/workflowtemplate" "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) func (r *Registry) initWorkflowTemplatesClient() error { @@ -28,7 +28,7 @@ func (r *Registry) initWorkflowTemplatesClient() error { return nil } -func (r *Registry) addWorkflowTemplates(results []v1.Flavor) []v1.Flavor { +func (r *Registry) addWorkflowTemplates(results []*v1.Flavor) []*v1.Flavor { templates, err := r.argoWorkflowTemplatesClient.ListWorkflowTemplates(r.argoClientCtx, &workflowtemplatepkg.WorkflowTemplateListRequest{ Namespace: r.workflowTemplateNamespace, }) @@ -40,7 +40,7 @@ func (r *Registry) addWorkflowTemplates(results []v1.Flavor) []v1.Flavor { for i := range templates.Items { flavor := workflowTemplate2Flavor(&templates.Items[i]) if flavor != nil { - results = append(results, *flavor) + results = append(results, flavor) } } diff --git a/generated/api/v1/service.pb.go b/generated/api/v1/service.pb.go deleted file mode 100644 index 19f0a919e..000000000 --- a/generated/api/v1/service.pb.go +++ /dev/null @@ -1,2664 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Status represents the various cluster states. -type Status int32 - -const ( - // FAILED is the state when the cluster has failed in one way or another. - Status_FAILED Status = 0 - // CREATING is the state when the cluster is being created. - Status_CREATING Status = 1 - // READY is the state when the cluster is available and ready for use. - Status_READY Status = 2 - // DESTROYING is the state when the cluster is being destroyed. - Status_DESTROYING Status = 3 - // FINISHED is the state when the cluster has been successfully destroyed. - Status_FINISHED Status = 4 -) - -var Status_name = map[int32]string{ - 0: "FAILED", - 1: "CREATING", - 2: "READY", - 3: "DESTROYING", - 4: "FINISHED", -} - -var Status_value = map[string]int32{ - "FAILED": 0, - "CREATING": 1, - "READY": 2, - "DESTROYING": 3, - "FINISHED": 4, -} - -func (x Status) String() string { - return proto.EnumName(Status_name, int32(x)) -} - -func (Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{0} -} - -// availability represents the availability classification levels. -type FlavorAvailability int32 - -const ( - // alpha is completely experemental, and is not expected to work in any way. - Flavor_alpha FlavorAvailability = 0 - // beta is being tested, and is expected to work with minor issues. - Flavor_beta FlavorAvailability = 1 - // stable is available for public consumption, and works without issue. - Flavor_stable FlavorAvailability = 2 - // default is stable, and available for customer demo consumption. - // Exactly 1 flavor should be configured as default. - Flavor_default FlavorAvailability = 3 -) - -var FlavorAvailability_name = map[int32]string{ - 0: "alpha", - 1: "beta", - 2: "stable", - 3: "default", -} - -var FlavorAvailability_value = map[string]int32{ - "alpha": 0, - "beta": 1, - "stable": 2, - "default": 3, -} - -func (x FlavorAvailability) String() string { - return proto.EnumName(FlavorAvailability_name, int32(x)) -} - -func (FlavorAvailability) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{8, 0} -} - -// method represents the various lifespan operations. -type LifespanRequest_Method int32 - -const ( - // REPLACE indicates that the given lifespan should replace the current - // lifespan. - LifespanRequest_REPLACE LifespanRequest_Method = 0 - // ADD indicates that the given lifespan should be added to the current - // lifespan. - LifespanRequest_ADD LifespanRequest_Method = 1 - // SUBTRACT indicates that the given lifespan should be subtracted from - // the current lifespan. - LifespanRequest_SUBTRACT LifespanRequest_Method = 2 -) - -var LifespanRequest_Method_name = map[int32]string{ - 0: "REPLACE", - 1: "ADD", - 2: "SUBTRACT", -} - -var LifespanRequest_Method_value = map[string]int32{ - "REPLACE": 0, - "ADD": 1, - "SUBTRACT": 2, -} - -func (x LifespanRequest_Method) String() string { - return proto.EnumName(LifespanRequest_Method_name, int32(x)) -} - -func (LifespanRequest_Method) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{14, 0} -} - -// ResourceByID represents a generic reference to a named/unique resource. -type ResourceByID struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResourceByID) Reset() { *m = ResourceByID{} } -func (m *ResourceByID) String() string { return proto.CompactTextString(m) } -func (*ResourceByID) ProtoMessage() {} -func (*ResourceByID) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{0} -} - -func (m *ResourceByID) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResourceByID.Unmarshal(m, b) -} -func (m *ResourceByID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResourceByID.Marshal(b, m, deterministic) -} -func (m *ResourceByID) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceByID.Merge(m, src) -} -func (m *ResourceByID) XXX_Size() int { - return xxx_messageInfo_ResourceByID.Size(m) -} -func (m *ResourceByID) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceByID.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceByID proto.InternalMessageInfo - -func (m *ResourceByID) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type Version struct { - BuildDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=BuildDate,proto3" json:"BuildDate,omitempty"` - GitCommit string `protobuf:"bytes,2,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"` - GoVersion string `protobuf:"bytes,3,opt,name=GoVersion,proto3" json:"GoVersion,omitempty"` - Platform string `protobuf:"bytes,4,opt,name=Platform,proto3" json:"Platform,omitempty"` - Version string `protobuf:"bytes,5,opt,name=Version,proto3" json:"Version,omitempty"` - Workflow string `protobuf:"bytes,6,opt,name=Workflow,proto3" json:"Workflow,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{1} -} - -func (m *Version) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Version.Unmarshal(m, b) -} -func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Version.Marshal(b, m, deterministic) -} -func (m *Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_Version.Merge(m, src) -} -func (m *Version) XXX_Size() int { - return xxx_messageInfo_Version.Size(m) -} -func (m *Version) XXX_DiscardUnknown() { - xxx_messageInfo_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_Version proto.InternalMessageInfo - -func (m *Version) GetBuildDate() *timestamppb.Timestamp { - if m != nil { - return m.BuildDate - } - return nil -} - -func (m *Version) GetGitCommit() string { - if m != nil { - return m.GitCommit - } - return "" -} - -func (m *Version) GetGoVersion() string { - if m != nil { - return m.GoVersion - } - return "" -} - -func (m *Version) GetPlatform() string { - if m != nil { - return m.Platform - } - return "" -} - -func (m *Version) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *Version) GetWorkflow() string { - if m != nil { - return m.Workflow - } - return "" -} - -// WhoamiResponse represents details about the current authenticated principal. -type WhoamiResponse struct { - // Principal represents a possible type of authenticated principal. - // - // Types that are valid to be assigned to Principal: - // *WhoamiResponse_User - // *WhoamiResponse_ServiceAccount - Principal isWhoamiResponse_Principal `protobuf_oneof:"principal"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WhoamiResponse) Reset() { *m = WhoamiResponse{} } -func (m *WhoamiResponse) String() string { return proto.CompactTextString(m) } -func (*WhoamiResponse) ProtoMessage() {} -func (*WhoamiResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{2} -} - -func (m *WhoamiResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WhoamiResponse.Unmarshal(m, b) -} -func (m *WhoamiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WhoamiResponse.Marshal(b, m, deterministic) -} -func (m *WhoamiResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WhoamiResponse.Merge(m, src) -} -func (m *WhoamiResponse) XXX_Size() int { - return xxx_messageInfo_WhoamiResponse.Size(m) -} -func (m *WhoamiResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WhoamiResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WhoamiResponse proto.InternalMessageInfo - -type isWhoamiResponse_Principal interface { - isWhoamiResponse_Principal() -} - -type WhoamiResponse_User struct { - User *User `protobuf:"bytes,1,opt,name=User,proto3,oneof"` -} - -type WhoamiResponse_ServiceAccount struct { - ServiceAccount *ServiceAccount `protobuf:"bytes,2,opt,name=ServiceAccount,proto3,oneof"` -} - -func (*WhoamiResponse_User) isWhoamiResponse_Principal() {} - -func (*WhoamiResponse_ServiceAccount) isWhoamiResponse_Principal() {} - -func (m *WhoamiResponse) GetPrincipal() isWhoamiResponse_Principal { - if m != nil { - return m.Principal - } - return nil -} - -func (m *WhoamiResponse) GetUser() *User { - if x, ok := m.GetPrincipal().(*WhoamiResponse_User); ok { - return x.User - } - return nil -} - -func (m *WhoamiResponse) GetServiceAccount() *ServiceAccount { - if x, ok := m.GetPrincipal().(*WhoamiResponse_ServiceAccount); ok { - return x.ServiceAccount - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*WhoamiResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*WhoamiResponse_User)(nil), - (*WhoamiResponse_ServiceAccount)(nil), - } -} - -// User represents an authenticated (human) principal. -type User struct { - // Expiry is the expiration date of this user session. Used only as a hint - // to the user and not for enforcement. - Expiry *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=Expiry,proto3" json:"Expiry,omitempty"` - // Name is the full name of the user. - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` - // Email is the email address of the user. - Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` - // Picture is a URL linking to this user's profile picture, if available. - Picture string `protobuf:"bytes,4,opt,name=Picture,proto3" json:"Picture,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{3} -} - -func (m *User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_User.Unmarshal(m, b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_User.Marshal(b, m, deterministic) -} -func (m *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(m, src) -} -func (m *User) XXX_Size() int { - return xxx_messageInfo_User.Size(m) -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -func (m *User) GetExpiry() *timestamppb.Timestamp { - if m != nil { - return m.Expiry - } - return nil -} - -func (m *User) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *User) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *User) GetPicture() string { - if m != nil { - return m.Picture - } - return "" -} - -// ServiceAccount represents an authenticated service account (robot) principal. -type ServiceAccount struct { - // Name is a human readable name for the service account. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - // Description is a human readable description for the service account. - Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` - // Email is the Red Hat email address for the service account. - Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` - // IssuedAt is the time of issuing the service account token. - IssuedAt int64 `protobuf:"varint,4,opt,name=IssuedAt,proto3" json:"IssuedAt,omitempty"` - // NotBefore is the beginning of service account token valid time period. - NotBefore int64 `protobuf:"varint,5,opt,name=NotBefore,proto3" json:"NotBefore,omitempty"` - // ExpiresAt is the end of service account token valid time period. - ExpiresAt int64 `protobuf:"varint,6,opt,name=ExpiresAt,proto3" json:"ExpiresAt,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } -func (m *ServiceAccount) String() string { return proto.CompactTextString(m) } -func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{4} -} - -func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ServiceAccount.Unmarshal(m, b) -} -func (m *ServiceAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ServiceAccount.Marshal(b, m, deterministic) -} -func (m *ServiceAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccount.Merge(m, src) -} -func (m *ServiceAccount) XXX_Size() int { - return xxx_messageInfo_ServiceAccount.Size(m) -} -func (m *ServiceAccount) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo - -func (m *ServiceAccount) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ServiceAccount) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *ServiceAccount) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *ServiceAccount) GetIssuedAt() int64 { - if m != nil { - return m.IssuedAt - } - return 0 -} - -func (m *ServiceAccount) GetNotBefore() int64 { - if m != nil { - return m.NotBefore - } - return 0 -} - -func (m *ServiceAccount) GetExpiresAt() int64 { - if m != nil { - return m.ExpiresAt - } - return 0 -} - -type TokenResponse struct { - // Account is the service account the token was generated for. - Account *ServiceAccount `protobuf:"bytes,1,opt,name=Account,proto3" json:"Account,omitempty"` - // Token is the token generated for the service account. - Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenResponse) Reset() { *m = TokenResponse{} } -func (m *TokenResponse) String() string { return proto.CompactTextString(m) } -func (*TokenResponse) ProtoMessage() {} -func (*TokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{5} -} - -func (m *TokenResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenResponse.Unmarshal(m, b) -} -func (m *TokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenResponse.Marshal(b, m, deterministic) -} -func (m *TokenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenResponse.Merge(m, src) -} -func (m *TokenResponse) XXX_Size() int { - return xxx_messageInfo_TokenResponse.Size(m) -} -func (m *TokenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenResponse proto.InternalMessageInfo - -func (m *TokenResponse) GetAccount() *ServiceAccount { - if m != nil { - return m.Account - } - return nil -} - -func (m *TokenResponse) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -// Parameter represents a single parameter that is needed to launch a flavor. -type Parameter struct { - // Name is the unique name of the parameter. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - // Description is a human readable description for the parameter. - Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` - // Value that this parameter could have. - // If the parameter is not optional, then value serves as an example. - // If the parameter is optional, then value serves as a default. - // If the parameter is internal, then value serves as a hardcoded constant. - Value string `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"` - // Optional indicates that this parameter can be optionally provided by a - // user. If the user does not provide a value, then Value serves as a - // default. - Optional bool `protobuf:"varint,4,opt,name=Optional,proto3" json:"Optional,omitempty"` - // Internal indicates that this parameter should not be provided by a user, - // but rather treats Value as a hardcoded constant. - Internal bool `protobuf:"varint,5,opt,name=Internal,proto3" json:"Internal,omitempty"` - // The relative order of importance of this parameter for when presenting in - // a UI for example. - Order int32 `protobuf:"varint,6,opt,name=Order,proto3" json:"Order,omitempty"` - Help string `protobuf:"bytes,7,opt,name=Help,proto3" json:"Help,omitempty"` - // Indicates that the value for this parameter can be provided from the - // contents of a file. - FromFile bool `protobuf:"varint,8,opt,name=FromFile,proto3" json:"FromFile,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Parameter) Reset() { *m = Parameter{} } -func (m *Parameter) String() string { return proto.CompactTextString(m) } -func (*Parameter) ProtoMessage() {} -func (*Parameter) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{6} -} - -func (m *Parameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Parameter.Unmarshal(m, b) -} -func (m *Parameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Parameter.Marshal(b, m, deterministic) -} -func (m *Parameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Parameter.Merge(m, src) -} -func (m *Parameter) XXX_Size() int { - return xxx_messageInfo_Parameter.Size(m) -} -func (m *Parameter) XXX_DiscardUnknown() { - xxx_messageInfo_Parameter.DiscardUnknown(m) -} - -var xxx_messageInfo_Parameter proto.InternalMessageInfo - -func (m *Parameter) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Parameter) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Parameter) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func (m *Parameter) GetOptional() bool { - if m != nil { - return m.Optional - } - return false -} - -func (m *Parameter) GetInternal() bool { - if m != nil { - return m.Internal - } - return false -} - -func (m *Parameter) GetOrder() int32 { - if m != nil { - return m.Order - } - return 0 -} - -func (m *Parameter) GetHelp() string { - if m != nil { - return m.Help - } - return "" -} - -func (m *Parameter) GetFromFile() bool { - if m != nil { - return m.FromFile - } - return false -} - -// FlavorArtifact represents a single artifact that is produced by a flavor. -type FlavorArtifact struct { - // Name is the unique name of the artifact. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - // Description is a human readable description for the artifact. - Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` - // Tags is a set of artifact tags. - Tags map[string]*emptypb.Empty `protobuf:"bytes,3,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FlavorArtifact) Reset() { *m = FlavorArtifact{} } -func (m *FlavorArtifact) String() string { return proto.CompactTextString(m) } -func (*FlavorArtifact) ProtoMessage() {} -func (*FlavorArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{7} -} - -func (m *FlavorArtifact) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FlavorArtifact.Unmarshal(m, b) -} -func (m *FlavorArtifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FlavorArtifact.Marshal(b, m, deterministic) -} -func (m *FlavorArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlavorArtifact.Merge(m, src) -} -func (m *FlavorArtifact) XXX_Size() int { - return xxx_messageInfo_FlavorArtifact.Size(m) -} -func (m *FlavorArtifact) XXX_DiscardUnknown() { - xxx_messageInfo_FlavorArtifact.DiscardUnknown(m) -} - -var xxx_messageInfo_FlavorArtifact proto.InternalMessageInfo - -func (m *FlavorArtifact) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *FlavorArtifact) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *FlavorArtifact) GetTags() map[string]*emptypb.Empty { - if m != nil { - return m.Tags - } - return nil -} - -// Flavor represents a configured cluster flavor. -type Flavor struct { - // ID is the unique, human type-able, ID for the flavor. - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - // Name is a human readable name for the flavor. - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` - // Description is a human readable description for the flavor. - Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` - // Description is an availability classification for the flavor. - Availability FlavorAvailability `protobuf:"varint,4,opt,name=Availability,proto3,enum=v1.FlavorAvailability" json:"Availability,omitempty"` - // Parameters is a map of parameters required for launching this flavor. - Parameters map[string]*Parameter `protobuf:"bytes,5,rep,name=Parameters,proto3" json:"Parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Artifacts is a map of artifacts produced by this flavor. - Artifacts map[string]*FlavorArtifact `protobuf:"bytes,6,rep,name=Artifacts,proto3" json:"Artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Flavor) Reset() { *m = Flavor{} } -func (m *Flavor) String() string { return proto.CompactTextString(m) } -func (*Flavor) ProtoMessage() {} -func (*Flavor) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{8} -} - -func (m *Flavor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Flavor.Unmarshal(m, b) -} -func (m *Flavor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Flavor.Marshal(b, m, deterministic) -} -func (m *Flavor) XXX_Merge(src proto.Message) { - xxx_messageInfo_Flavor.Merge(m, src) -} -func (m *Flavor) XXX_Size() int { - return xxx_messageInfo_Flavor.Size(m) -} -func (m *Flavor) XXX_DiscardUnknown() { - xxx_messageInfo_Flavor.DiscardUnknown(m) -} - -var xxx_messageInfo_Flavor proto.InternalMessageInfo - -func (m *Flavor) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Flavor) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Flavor) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Flavor) GetAvailability() FlavorAvailability { - if m != nil { - return m.Availability - } - return Flavor_alpha -} - -func (m *Flavor) GetParameters() map[string]*Parameter { - if m != nil { - return m.Parameters - } - return nil -} - -func (m *Flavor) GetArtifacts() map[string]*FlavorArtifact { - if m != nil { - return m.Artifacts - } - return nil -} - -// FlavorListRequest represents a request to FlavorService.List. -type FlavorListRequest struct { - // all indicates that all flavors should be returned, by default - // availability alpha clusters are excluded. - All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FlavorListRequest) Reset() { *m = FlavorListRequest{} } -func (m *FlavorListRequest) String() string { return proto.CompactTextString(m) } -func (*FlavorListRequest) ProtoMessage() {} -func (*FlavorListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{9} -} - -func (m *FlavorListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FlavorListRequest.Unmarshal(m, b) -} -func (m *FlavorListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FlavorListRequest.Marshal(b, m, deterministic) -} -func (m *FlavorListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlavorListRequest.Merge(m, src) -} -func (m *FlavorListRequest) XXX_Size() int { - return xxx_messageInfo_FlavorListRequest.Size(m) -} -func (m *FlavorListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FlavorListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FlavorListRequest proto.InternalMessageInfo - -func (m *FlavorListRequest) GetAll() bool { - if m != nil { - return m.All - } - return false -} - -// FlavorListResponse represents details about the available cluster flavors. -type FlavorListResponse struct { - // Default is the flavor ID of the default cluster flavor. - Default string `protobuf:"bytes,1,opt,name=Default,proto3" json:"Default,omitempty"` - // Flavors is a list of all available cluster flavors. - Flavors []*Flavor `protobuf:"bytes,2,rep,name=Flavors,proto3" json:"Flavors,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FlavorListResponse) Reset() { *m = FlavorListResponse{} } -func (m *FlavorListResponse) String() string { return proto.CompactTextString(m) } -func (*FlavorListResponse) ProtoMessage() {} -func (*FlavorListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{10} -} - -func (m *FlavorListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FlavorListResponse.Unmarshal(m, b) -} -func (m *FlavorListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FlavorListResponse.Marshal(b, m, deterministic) -} -func (m *FlavorListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlavorListResponse.Merge(m, src) -} -func (m *FlavorListResponse) XXX_Size() int { - return xxx_messageInfo_FlavorListResponse.Size(m) -} -func (m *FlavorListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FlavorListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FlavorListResponse proto.InternalMessageInfo - -func (m *FlavorListResponse) GetDefault() string { - if m != nil { - return m.Default - } - return "" -} - -func (m *FlavorListResponse) GetFlavors() []*Flavor { - if m != nil { - return m.Flavors - } - return nil -} - -// Cluster represents a single cluster. -type Cluster struct { - // ID is the unique ID for the cluster. - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - // Status is the current status for the cluster. - Status Status `protobuf:"varint,2,opt,name=Status,proto3,enum=v1.Status" json:"Status,omitempty"` - // Flavor is the original flavor ID that launched this cluster. - Flavor string `protobuf:"bytes,3,opt,name=Flavor,proto3" json:"Flavor,omitempty"` - // Owner is the email address for the cluster owner. - Owner string `protobuf:"bytes,4,opt,name=Owner,proto3" json:"Owner,omitempty"` - // CreatedOn is the timestamp on which the cluster started being created. - CreatedOn *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=CreatedOn,proto3" json:"CreatedOn,omitempty"` - // DestroyedOn is the timestamp on which the cluster finished being - // destroyed. - DestroyedOn *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=DestroyedOn,proto3" json:"DestroyedOn,omitempty"` - // Lifespan is the duration for which the cluster should be kept alive. - Lifespan *durationpb.Duration `protobuf:"bytes,7,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` - // Description is a human readable description for the cluster. - Description string `protobuf:"bytes,8,opt,name=Description,proto3" json:"Description,omitempty"` - // URL is an optional URL for this cluster. - URL string `protobuf:"bytes,9,opt,name=URL,proto3" json:"URL,omitempty"` - // Connect is a command to add kube connection information to kubeconfig. - Connect string `protobuf:"bytes,10,opt,name=Connect,proto3" json:"Connect,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster) Reset() { *m = Cluster{} } -func (m *Cluster) String() string { return proto.CompactTextString(m) } -func (*Cluster) ProtoMessage() {} -func (*Cluster) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{11} -} - -func (m *Cluster) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cluster.Unmarshal(m, b) -} -func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cluster.Marshal(b, m, deterministic) -} -func (m *Cluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster.Merge(m, src) -} -func (m *Cluster) XXX_Size() int { - return xxx_messageInfo_Cluster.Size(m) -} -func (m *Cluster) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster proto.InternalMessageInfo - -func (m *Cluster) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Cluster) GetStatus() Status { - if m != nil { - return m.Status - } - return Status_FAILED -} - -func (m *Cluster) GetFlavor() string { - if m != nil { - return m.Flavor - } - return "" -} - -func (m *Cluster) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *Cluster) GetCreatedOn() *timestamppb.Timestamp { - if m != nil { - return m.CreatedOn - } - return nil -} - -func (m *Cluster) GetDestroyedOn() *timestamppb.Timestamp { - if m != nil { - return m.DestroyedOn - } - return nil -} - -func (m *Cluster) GetLifespan() *durationpb.Duration { - if m != nil { - return m.Lifespan - } - return nil -} - -func (m *Cluster) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Cluster) GetURL() string { - if m != nil { - return m.URL - } - return "" -} - -func (m *Cluster) GetConnect() string { - if m != nil { - return m.Connect - } - return "" -} - -// ClusterListRequest represents a request to ClusterService.List. -type ClusterListRequest struct { - // all indicates that all clusters should be returned, not just the ones - // owned by the user. - All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` - // expired indicates that expired clusters should be returned, not just the - // ones that are launching/ready. - Expired bool `protobuf:"varint,2,opt,name=expired,proto3" json:"expired,omitempty"` - // list clusters whose ID matches this prefix. - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterListRequest) Reset() { *m = ClusterListRequest{} } -func (m *ClusterListRequest) String() string { return proto.CompactTextString(m) } -func (*ClusterListRequest) ProtoMessage() {} -func (*ClusterListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{12} -} - -func (m *ClusterListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterListRequest.Unmarshal(m, b) -} -func (m *ClusterListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterListRequest.Marshal(b, m, deterministic) -} -func (m *ClusterListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterListRequest.Merge(m, src) -} -func (m *ClusterListRequest) XXX_Size() int { - return xxx_messageInfo_ClusterListRequest.Size(m) -} -func (m *ClusterListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterListRequest proto.InternalMessageInfo - -func (m *ClusterListRequest) GetAll() bool { - if m != nil { - return m.All - } - return false -} - -func (m *ClusterListRequest) GetExpired() bool { - if m != nil { - return m.Expired - } - return false -} - -func (m *ClusterListRequest) GetPrefix() string { - if m != nil { - return m.Prefix - } - return "" -} - -// ClusterListResponse represents details about all clusters. -type ClusterListResponse struct { - // Clusters is a list of all clusters. - Clusters []*Cluster `protobuf:"bytes,1,rep,name=Clusters,proto3" json:"Clusters,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterListResponse) Reset() { *m = ClusterListResponse{} } -func (m *ClusterListResponse) String() string { return proto.CompactTextString(m) } -func (*ClusterListResponse) ProtoMessage() {} -func (*ClusterListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{13} -} - -func (m *ClusterListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterListResponse.Unmarshal(m, b) -} -func (m *ClusterListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterListResponse.Marshal(b, m, deterministic) -} -func (m *ClusterListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterListResponse.Merge(m, src) -} -func (m *ClusterListResponse) XXX_Size() int { - return xxx_messageInfo_ClusterListResponse.Size(m) -} -func (m *ClusterListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterListResponse proto.InternalMessageInfo - -func (m *ClusterListResponse) GetClusters() []*Cluster { - if m != nil { - return m.Clusters - } - return nil -} - -type LifespanRequest struct { - // ID is the unique ID for the cluster. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Lifespan is the new lifespan. - Lifespan *durationpb.Duration `protobuf:"bytes,2,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` - Method LifespanRequest_Method `protobuf:"varint,3,opt,name=method,proto3,enum=v1.LifespanRequest_Method" json:"method,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LifespanRequest) Reset() { *m = LifespanRequest{} } -func (m *LifespanRequest) String() string { return proto.CompactTextString(m) } -func (*LifespanRequest) ProtoMessage() {} -func (*LifespanRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{14} -} - -func (m *LifespanRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LifespanRequest.Unmarshal(m, b) -} -func (m *LifespanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LifespanRequest.Marshal(b, m, deterministic) -} -func (m *LifespanRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LifespanRequest.Merge(m, src) -} -func (m *LifespanRequest) XXX_Size() int { - return xxx_messageInfo_LifespanRequest.Size(m) -} -func (m *LifespanRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LifespanRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LifespanRequest proto.InternalMessageInfo - -func (m *LifespanRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *LifespanRequest) GetLifespan() *durationpb.Duration { - if m != nil { - return m.Lifespan - } - return nil -} - -func (m *LifespanRequest) GetMethod() LifespanRequest_Method { - if m != nil { - return m.Method - } - return LifespanRequest_REPLACE -} - -// CreateClusterRequest represents details for launching a new cluster. -type CreateClusterRequest struct { - // ID is the flavor ID to launch. - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - // Lifespan is the initial cluster lifespan. - Lifespan *durationpb.Duration `protobuf:"bytes,2,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` - // Parameters is a map of launch parameter names to values. - Parameters map[string]string `protobuf:"bytes,3,rep,name=Parameters,proto3" json:"Parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Description is a human readable description for the cluster. - Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"` - // NoSlack is used to skip sending Slack messages for cluster lifecycle - // events. - NoSlack bool `protobuf:"varint,5,opt,name=NoSlack,proto3" json:"NoSlack,omitempty"` - // SlackDM is used to choose direct messages for cluster lifecycle - // events. - SlackDM bool `protobuf:"varint,6,opt,name=SlackDM,proto3" json:"SlackDM,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateClusterRequest) Reset() { *m = CreateClusterRequest{} } -func (m *CreateClusterRequest) String() string { return proto.CompactTextString(m) } -func (*CreateClusterRequest) ProtoMessage() {} -func (*CreateClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{15} -} - -func (m *CreateClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateClusterRequest.Unmarshal(m, b) -} -func (m *CreateClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateClusterRequest.Marshal(b, m, deterministic) -} -func (m *CreateClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateClusterRequest.Merge(m, src) -} -func (m *CreateClusterRequest) XXX_Size() int { - return xxx_messageInfo_CreateClusterRequest.Size(m) -} -func (m *CreateClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateClusterRequest proto.InternalMessageInfo - -func (m *CreateClusterRequest) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *CreateClusterRequest) GetLifespan() *durationpb.Duration { - if m != nil { - return m.Lifespan - } - return nil -} - -func (m *CreateClusterRequest) GetParameters() map[string]string { - if m != nil { - return m.Parameters - } - return nil -} - -func (m *CreateClusterRequest) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *CreateClusterRequest) GetNoSlack() bool { - if m != nil { - return m.NoSlack - } - return false -} - -func (m *CreateClusterRequest) GetSlackDM() bool { - if m != nil { - return m.SlackDM - } - return false -} - -type Artifact struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` - URL string `protobuf:"bytes,3,opt,name=URL,proto3" json:"URL,omitempty"` - Mode int32 `protobuf:"varint,4,opt,name=Mode,proto3" json:"Mode,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Artifact) Reset() { *m = Artifact{} } -func (m *Artifact) String() string { return proto.CompactTextString(m) } -func (*Artifact) ProtoMessage() {} -func (*Artifact) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{16} -} - -func (m *Artifact) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Artifact.Unmarshal(m, b) -} -func (m *Artifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Artifact.Marshal(b, m, deterministic) -} -func (m *Artifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_Artifact.Merge(m, src) -} -func (m *Artifact) XXX_Size() int { - return xxx_messageInfo_Artifact.Size(m) -} -func (m *Artifact) XXX_DiscardUnknown() { - xxx_messageInfo_Artifact.DiscardUnknown(m) -} - -var xxx_messageInfo_Artifact proto.InternalMessageInfo - -func (m *Artifact) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Artifact) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Artifact) GetURL() string { - if m != nil { - return m.URL - } - return "" -} - -func (m *Artifact) GetMode() int32 { - if m != nil { - return m.Mode - } - return 0 -} - -type ClusterArtifacts struct { - Artifacts []*Artifact `protobuf:"bytes,1,rep,name=Artifacts,proto3" json:"Artifacts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterArtifacts) Reset() { *m = ClusterArtifacts{} } -func (m *ClusterArtifacts) String() string { return proto.CompactTextString(m) } -func (*ClusterArtifacts) ProtoMessage() {} -func (*ClusterArtifacts) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{17} -} - -func (m *ClusterArtifacts) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterArtifacts.Unmarshal(m, b) -} -func (m *ClusterArtifacts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterArtifacts.Marshal(b, m, deterministic) -} -func (m *ClusterArtifacts) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterArtifacts.Merge(m, src) -} -func (m *ClusterArtifacts) XXX_Size() int { - return xxx_messageInfo_ClusterArtifacts.Size(m) -} -func (m *ClusterArtifacts) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterArtifacts.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterArtifacts proto.InternalMessageInfo - -func (m *ClusterArtifacts) GetArtifacts() []*Artifact { - if m != nil { - return m.Artifacts - } - return nil -} - -// Log represents the logs from a specific pod. -type Log struct { - // Name is the name given to this pod in the workflow. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - // Started is the time at which this pod was started. Used for ordering - // between pods. - Started *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=Started,proto3" json:"Started,omitempty"` - // Body is the raw pod logs. - Body []byte `protobuf:"bytes,3,opt,name=Body,proto3" json:"Body,omitempty"` - // Message surfaces step state from Argo. - Message string `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{18} -} - -func (m *Log) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Log.Unmarshal(m, b) -} -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) -} -func (m *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(m, src) -} -func (m *Log) XXX_Size() int { - return xxx_messageInfo_Log.Size(m) -} -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) -} - -var xxx_messageInfo_Log proto.InternalMessageInfo - -func (m *Log) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Log) GetStarted() *timestamppb.Timestamp { - if m != nil { - return m.Started - } - return nil -} - -func (m *Log) GetBody() []byte { - if m != nil { - return m.Body - } - return nil -} - -func (m *Log) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -// LogsResponse represents a collection of logs. -type LogsResponse struct { - // Logs are all of the logs from a cluster. - Logs []*Log `protobuf:"bytes,1,rep,name=Logs,proto3" json:"Logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogsResponse) Reset() { *m = LogsResponse{} } -func (m *LogsResponse) String() string { return proto.CompactTextString(m) } -func (*LogsResponse) ProtoMessage() {} -func (*LogsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{19} -} - -func (m *LogsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogsResponse.Unmarshal(m, b) -} -func (m *LogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogsResponse.Marshal(b, m, deterministic) -} -func (m *LogsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogsResponse.Merge(m, src) -} -func (m *LogsResponse) XXX_Size() int { - return xxx_messageInfo_LogsResponse.Size(m) -} -func (m *LogsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogsResponse proto.InternalMessageInfo - -func (m *LogsResponse) GetLogs() []*Log { - if m != nil { - return m.Logs - } - return nil -} - -type CliUpgradeRequest struct { - Os string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"` - Arch string `protobuf:"bytes,2,opt,name=arch,proto3" json:"arch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CliUpgradeRequest) Reset() { *m = CliUpgradeRequest{} } -func (m *CliUpgradeRequest) String() string { return proto.CompactTextString(m) } -func (*CliUpgradeRequest) ProtoMessage() {} -func (*CliUpgradeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{20} -} - -func (m *CliUpgradeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CliUpgradeRequest.Unmarshal(m, b) -} -func (m *CliUpgradeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CliUpgradeRequest.Marshal(b, m, deterministic) -} -func (m *CliUpgradeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CliUpgradeRequest.Merge(m, src) -} -func (m *CliUpgradeRequest) XXX_Size() int { - return xxx_messageInfo_CliUpgradeRequest.Size(m) -} -func (m *CliUpgradeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CliUpgradeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CliUpgradeRequest proto.InternalMessageInfo - -func (m *CliUpgradeRequest) GetOs() string { - if m != nil { - return m.Os - } - return "" -} - -func (m *CliUpgradeRequest) GetArch() string { - if m != nil { - return m.Arch - } - return "" -} - -type CliUpgradeResponse struct { - FileChunk []byte `protobuf:"bytes,1,opt,name=fileChunk,proto3" json:"fileChunk,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CliUpgradeResponse) Reset() { *m = CliUpgradeResponse{} } -func (m *CliUpgradeResponse) String() string { return proto.CompactTextString(m) } -func (*CliUpgradeResponse) ProtoMessage() {} -func (*CliUpgradeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{21} -} - -func (m *CliUpgradeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CliUpgradeResponse.Unmarshal(m, b) -} -func (m *CliUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CliUpgradeResponse.Marshal(b, m, deterministic) -} -func (m *CliUpgradeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CliUpgradeResponse.Merge(m, src) -} -func (m *CliUpgradeResponse) XXX_Size() int { - return xxx_messageInfo_CliUpgradeResponse.Size(m) -} -func (m *CliUpgradeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CliUpgradeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CliUpgradeResponse proto.InternalMessageInfo - -func (m *CliUpgradeResponse) GetFileChunk() []byte { - if m != nil { - return m.FileChunk - } - return nil -} - -type InfraStatus struct { - // MaintenanceActive is an indicator whether a maintenance is ongoing. - MaintenanceActive bool `protobuf:"varint,1,opt,name=MaintenanceActive,proto3" json:"MaintenanceActive,omitempty"` - // Maintainer is the email of the person currently doing maintenance. - Maintainer string `protobuf:"bytes,2,opt,name=Maintainer,proto3" json:"Maintainer,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InfraStatus) Reset() { *m = InfraStatus{} } -func (m *InfraStatus) String() string { return proto.CompactTextString(m) } -func (*InfraStatus) ProtoMessage() {} -func (*InfraStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_a0b84a42fa06f626, []int{22} -} - -func (m *InfraStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InfraStatus.Unmarshal(m, b) -} -func (m *InfraStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InfraStatus.Marshal(b, m, deterministic) -} -func (m *InfraStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfraStatus.Merge(m, src) -} -func (m *InfraStatus) XXX_Size() int { - return xxx_messageInfo_InfraStatus.Size(m) -} -func (m *InfraStatus) XXX_DiscardUnknown() { - xxx_messageInfo_InfraStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_InfraStatus proto.InternalMessageInfo - -func (m *InfraStatus) GetMaintenanceActive() bool { - if m != nil { - return m.MaintenanceActive - } - return false -} - -func (m *InfraStatus) GetMaintainer() string { - if m != nil { - return m.Maintainer - } - return "" -} - -func init() { - proto.RegisterEnum("v1.Status", Status_name, Status_value) - proto.RegisterEnum("v1.FlavorAvailability", FlavorAvailability_name, FlavorAvailability_value) - proto.RegisterEnum("v1.LifespanRequest_Method", LifespanRequest_Method_name, LifespanRequest_Method_value) - proto.RegisterType((*ResourceByID)(nil), "v1.ResourceByID") - proto.RegisterType((*Version)(nil), "v1.Version") - proto.RegisterType((*WhoamiResponse)(nil), "v1.WhoamiResponse") - proto.RegisterType((*User)(nil), "v1.User") - proto.RegisterType((*ServiceAccount)(nil), "v1.ServiceAccount") - proto.RegisterType((*TokenResponse)(nil), "v1.TokenResponse") - proto.RegisterType((*Parameter)(nil), "v1.Parameter") - proto.RegisterType((*FlavorArtifact)(nil), "v1.FlavorArtifact") - proto.RegisterMapType((map[string]*emptypb.Empty)(nil), "v1.FlavorArtifact.TagsEntry") - proto.RegisterType((*Flavor)(nil), "v1.Flavor") - proto.RegisterMapType((map[string]*FlavorArtifact)(nil), "v1.Flavor.ArtifactsEntry") - proto.RegisterMapType((map[string]*Parameter)(nil), "v1.Flavor.ParametersEntry") - proto.RegisterType((*FlavorListRequest)(nil), "v1.FlavorListRequest") - proto.RegisterType((*FlavorListResponse)(nil), "v1.FlavorListResponse") - proto.RegisterType((*Cluster)(nil), "v1.Cluster") - proto.RegisterType((*ClusterListRequest)(nil), "v1.ClusterListRequest") - proto.RegisterType((*ClusterListResponse)(nil), "v1.ClusterListResponse") - proto.RegisterType((*LifespanRequest)(nil), "v1.LifespanRequest") - proto.RegisterType((*CreateClusterRequest)(nil), "v1.CreateClusterRequest") - proto.RegisterMapType((map[string]string)(nil), "v1.CreateClusterRequest.ParametersEntry") - proto.RegisterType((*Artifact)(nil), "v1.Artifact") - proto.RegisterType((*ClusterArtifacts)(nil), "v1.ClusterArtifacts") - proto.RegisterType((*Log)(nil), "v1.Log") - proto.RegisterType((*LogsResponse)(nil), "v1.LogsResponse") - proto.RegisterType((*CliUpgradeRequest)(nil), "v1.CliUpgradeRequest") - proto.RegisterType((*CliUpgradeResponse)(nil), "v1.CliUpgradeResponse") - proto.RegisterType((*InfraStatus)(nil), "v1.InfraStatus") -} - -func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) } - -var fileDescriptor_a0b84a42fa06f626 = []byte{ - // 1876 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcb, 0x73, 0x1b, 0x49, - 0x19, 0xf7, 0x48, 0xb2, 0x1e, 0x9f, 0x6c, 0x65, 0xdc, 0x71, 0x9c, 0xd9, 0x89, 0xd7, 0xa4, 0x7a, - 0x97, 0x22, 0x65, 0x82, 0xb5, 0x11, 0x50, 0xbb, 0x15, 0xb2, 0x4b, 0xc9, 0x92, 0x1c, 0x0b, 0xe4, - 0x07, 0x2d, 0x7b, 0xb3, 0x0b, 0x07, 0x68, 0x4b, 0x2d, 0x79, 0xca, 0xa3, 0x19, 0x31, 0xd3, 0x52, - 0xd6, 0x95, 0x0a, 0x07, 0xfe, 0x05, 0x4e, 0xfc, 0x1f, 0x9c, 0x28, 0x2e, 0x1c, 0x39, 0x52, 0x14, - 0x57, 0x4e, 0x1c, 0xb8, 0x70, 0xe3, 0x0f, 0xa0, 0xfa, 0x31, 0x0f, 0xbd, 0x92, 0x54, 0xf6, 0x36, - 0xdf, 0xeb, 0xf7, 0xf5, 0xf7, 0xe8, 0xef, 0xeb, 0x81, 0xcd, 0x90, 0x05, 0x53, 0xa7, 0xc7, 0x0e, - 0xc6, 0x81, 0xcf, 0x7d, 0x94, 0x99, 0x3e, 0xb1, 0x77, 0x87, 0xbe, 0x3f, 0x74, 0x59, 0x95, 0x8e, - 0x9d, 0x2a, 0xf5, 0x3c, 0x9f, 0x53, 0xee, 0xf8, 0x5e, 0xa8, 0x34, 0xec, 0x3d, 0x2d, 0x95, 0xd4, - 0xd5, 0x64, 0x50, 0xed, 0x4f, 0x02, 0xa9, 0xa0, 0xe5, 0x0f, 0xe6, 0xe5, 0x6c, 0x34, 0xe6, 0xb7, - 0x5a, 0xf8, 0x9d, 0x79, 0x21, 0x77, 0x46, 0x2c, 0xe4, 0x74, 0x34, 0x56, 0x0a, 0x78, 0x0f, 0x36, - 0x08, 0x0b, 0xfd, 0x49, 0xd0, 0x63, 0x87, 0xb7, 0xed, 0x26, 0xaa, 0x40, 0xc6, 0xe9, 0x5b, 0xc6, - 0x43, 0xe3, 0x51, 0x89, 0x64, 0x9c, 0x3e, 0xfe, 0xbb, 0x01, 0x85, 0x2f, 0x59, 0x10, 0x3a, 0xbe, - 0x87, 0x3e, 0x83, 0xd2, 0xe1, 0xc4, 0x71, 0xfb, 0x4d, 0xca, 0x99, 0x54, 0x29, 0xd7, 0xec, 0x03, - 0xe5, 0xe0, 0x20, 0x72, 0x70, 0x70, 0x11, 0x39, 0x20, 0x89, 0x32, 0xda, 0x85, 0xd2, 0x73, 0x87, - 0x37, 0xfc, 0xd1, 0xc8, 0xe1, 0x56, 0x46, 0x82, 0x27, 0x0c, 0x29, 0xf5, 0xb5, 0x13, 0x2b, 0xab, - 0xa5, 0x11, 0x03, 0xd9, 0x50, 0x3c, 0x77, 0x29, 0x1f, 0xf8, 0xc1, 0xc8, 0xca, 0x49, 0x61, 0x4c, - 0x23, 0x2b, 0x3e, 0x9c, 0xb5, 0x2e, 0x45, 0x85, 0x94, 0xd5, 0x0b, 0x3f, 0xb8, 0x19, 0xb8, 0xfe, - 0x4b, 0x2b, 0xaf, 0xac, 0x22, 0x1a, 0xbf, 0x82, 0xca, 0x8b, 0x6b, 0x9f, 0x8e, 0x1c, 0xc2, 0xc2, - 0xb1, 0xef, 0x85, 0x0c, 0xed, 0x41, 0xee, 0x32, 0x64, 0x81, 0x0e, 0xaa, 0x78, 0x30, 0x7d, 0x72, - 0x20, 0xe8, 0xe3, 0x35, 0x22, 0xf9, 0xe8, 0x19, 0x54, 0xba, 0xaa, 0x6c, 0xf5, 0x5e, 0xcf, 0x9f, - 0x78, 0x2a, 0x88, 0x72, 0x0d, 0x09, 0xcd, 0x59, 0xc9, 0xf1, 0x1a, 0x99, 0xd3, 0x3d, 0x2c, 0x43, - 0x69, 0x1c, 0x38, 0x5e, 0xcf, 0x19, 0x53, 0x17, 0xff, 0x4e, 0xb9, 0x42, 0x35, 0xc8, 0xb7, 0xbe, - 0x19, 0x3b, 0xc1, 0xed, 0x3b, 0x64, 0x52, 0x6b, 0x22, 0x04, 0xb9, 0x53, 0x3a, 0x62, 0x3a, 0x83, - 0xf2, 0x1b, 0x6d, 0xc3, 0x7a, 0x6b, 0x44, 0x1d, 0x57, 0x27, 0x4e, 0x11, 0x22, 0x31, 0xe7, 0x4e, - 0x8f, 0x4f, 0x02, 0xa6, 0x73, 0x16, 0x91, 0xf8, 0x4f, 0xc6, 0x7c, 0x2c, 0x31, 0xac, 0x91, 0x82, - 0x7d, 0x08, 0xe5, 0x26, 0x0b, 0x7b, 0x81, 0x33, 0x16, 0xad, 0xa6, 0x3d, 0xa6, 0x59, 0x2b, 0x1c, - 0xdb, 0x50, 0x6c, 0x87, 0xe1, 0x84, 0xf5, 0xeb, 0x5c, 0x7a, 0xce, 0x92, 0x98, 0x16, 0x75, 0x3e, - 0xf5, 0xf9, 0x21, 0x1b, 0xf8, 0x01, 0x93, 0xf5, 0xca, 0x92, 0x84, 0x21, 0xa4, 0x32, 0x4c, 0x16, - 0xd6, 0xb9, 0x2c, 0x59, 0x96, 0x24, 0x0c, 0xdc, 0x85, 0xcd, 0x0b, 0xff, 0x86, 0x79, 0x71, 0xc9, - 0x1e, 0x43, 0x21, 0xaa, 0x85, 0xb1, 0xaa, 0x16, 0x24, 0x52, 0x11, 0x87, 0x95, 0xe6, 0x3a, 0x10, - 0x45, 0xe0, 0x7f, 0x1a, 0x50, 0x3a, 0xa7, 0x01, 0x1d, 0x31, 0xce, 0x82, 0xf7, 0x4f, 0xc3, 0x97, - 0xd4, 0x9d, 0xb0, 0x28, 0x0d, 0x92, 0x10, 0x69, 0x38, 0x93, 0x72, 0xea, 0xca, 0x34, 0x14, 0x49, - 0x4c, 0xcb, 0x14, 0x79, 0x9c, 0x05, 0x42, 0xb6, 0xae, 0x64, 0x11, 0x2d, 0xd0, 0xce, 0x82, 0x3e, - 0x0b, 0x64, 0x02, 0xd6, 0x89, 0x22, 0xc4, 0xc9, 0x8e, 0x99, 0x3b, 0xb6, 0x0a, 0xea, 0x64, 0xe2, - 0x5b, 0xa0, 0x1c, 0x05, 0xfe, 0xe8, 0xc8, 0x71, 0x99, 0x55, 0x54, 0x28, 0x11, 0x8d, 0xff, 0x66, - 0x40, 0xe5, 0xc8, 0xa5, 0x53, 0x3f, 0xa8, 0x07, 0xdc, 0x19, 0xd0, 0xde, 0xfb, 0xd6, 0xf8, 0x13, - 0xc8, 0x5d, 0xd0, 0x61, 0x68, 0x65, 0x1f, 0x66, 0x1f, 0x95, 0x6b, 0xbb, 0x22, 0xc3, 0xb3, 0xb8, - 0x07, 0x42, 0xdc, 0xf2, 0x78, 0x70, 0x4b, 0xa4, 0xa6, 0x7d, 0x06, 0xa5, 0x98, 0x85, 0x4c, 0xc8, - 0xde, 0xb0, 0x5b, 0xed, 0x53, 0x7c, 0xa2, 0xc7, 0xb0, 0x3e, 0x95, 0xd9, 0x52, 0xf7, 0x67, 0x67, - 0xa1, 0xe9, 0x5b, 0x62, 0x78, 0x11, 0xa5, 0xf4, 0x34, 0xf3, 0x99, 0x81, 0xff, 0x95, 0x85, 0xbc, - 0xf2, 0x29, 0x66, 0x53, 0xbb, 0x19, 0xcd, 0xa6, 0x76, 0x73, 0xe9, 0x75, 0x98, 0x8b, 0x29, 0xbb, - 0x18, 0xd3, 0x4f, 0x60, 0xa3, 0x3e, 0xa5, 0x8e, 0x4b, 0xaf, 0x1c, 0xd7, 0xe1, 0xb7, 0xb2, 0x3c, - 0x95, 0xda, 0xfd, 0x24, 0xb6, 0x03, 0x9a, 0x12, 0x93, 0x19, 0x65, 0xf4, 0x14, 0x20, 0x6e, 0x98, - 0xd0, 0x5a, 0x97, 0x69, 0xb1, 0x53, 0xa6, 0x89, 0x50, 0x25, 0x25, 0xa5, 0x8d, 0x3e, 0x85, 0x52, - 0x94, 0xb6, 0xd0, 0xca, 0x4b, 0xd3, 0x0f, 0x52, 0xa6, 0xb1, 0x4c, 0x59, 0x26, 0xba, 0x76, 0x07, - 0xee, 0xcc, 0xe1, 0x2e, 0xc9, 0xec, 0x47, 0xb3, 0x99, 0xdd, 0x14, 0xc8, 0xb1, 0x55, 0x2a, 0xa1, - 0xf6, 0x39, 0x54, 0x66, 0x5d, 0x2d, 0x01, 0x7b, 0x34, 0x0b, 0x86, 0x16, 0x0b, 0x9f, 0x2e, 0xd1, - 0x33, 0xd8, 0x48, 0xa7, 0x0c, 0x95, 0x60, 0x9d, 0xba, 0xe3, 0x6b, 0x6a, 0xae, 0xa1, 0x22, 0xe4, - 0xae, 0x18, 0xa7, 0xa6, 0x81, 0x00, 0xf2, 0x21, 0xa7, 0x57, 0x2e, 0x33, 0x33, 0xa8, 0x0c, 0x85, - 0x3e, 0x1b, 0xd0, 0x89, 0xcb, 0xcd, 0x2c, 0xfe, 0x2e, 0x6c, 0x29, 0xe8, 0x8e, 0x13, 0x72, 0xc2, - 0x7e, 0x3b, 0x61, 0x21, 0x17, 0x47, 0xa2, 0xae, 0x2b, 0x8f, 0x54, 0x24, 0xe2, 0x13, 0x5f, 0x00, - 0x4a, 0xab, 0xe9, 0x29, 0x60, 0x41, 0xa1, 0xa9, 0x90, 0xf4, 0xf1, 0x23, 0x12, 0x7d, 0x0c, 0x05, - 0xa5, 0x1f, 0x5a, 0x19, 0x99, 0x6b, 0x48, 0x82, 0x20, 0x91, 0x08, 0xff, 0x27, 0x03, 0x85, 0x86, - 0x3b, 0x09, 0xc5, 0xfd, 0x9f, 0x6f, 0x2f, 0x0c, 0xf9, 0x2e, 0xa7, 0x7c, 0x12, 0xca, 0x2c, 0x54, - 0x14, 0x80, 0xe2, 0x10, 0x2d, 0x41, 0x3b, 0x51, 0x73, 0xea, 0x4e, 0x8b, 0x5a, 0x55, 0xdc, 0xe3, - 0x97, 0x1e, 0x0b, 0xf4, 0xf4, 0x55, 0x84, 0x58, 0xa0, 0x8d, 0x80, 0x51, 0xce, 0xfa, 0x67, 0x6a, - 0x61, 0xbd, 0x65, 0x81, 0xc6, 0xca, 0xe8, 0x99, 0x6c, 0x6b, 0x1e, 0xf8, 0xb7, 0xd2, 0x36, 0xff, - 0x56, 0xdb, 0xb4, 0x3a, 0xfa, 0x31, 0x14, 0x3b, 0xce, 0x80, 0x85, 0x63, 0xea, 0xc9, 0x19, 0x22, - 0x1a, 0x6f, 0xde, 0xb4, 0xa9, 0x5f, 0x15, 0x24, 0x56, 0x9d, 0xbf, 0x4b, 0xc5, 0xc5, 0xbb, 0x64, - 0x42, 0xf6, 0x92, 0x74, 0xac, 0x92, 0xea, 0x9c, 0x4b, 0xd2, 0x11, 0x05, 0x69, 0xf8, 0x9e, 0xc7, - 0x7a, 0xdc, 0x02, 0x55, 0x10, 0x4d, 0xe2, 0xaf, 0x00, 0xe9, 0x4c, 0xbf, 0xb1, 0xd0, 0x02, 0x81, - 0xc9, 0xb1, 0xdf, 0x97, 0x79, 0x2f, 0x92, 0x88, 0x14, 0xc9, 0x1e, 0x07, 0x6c, 0xe0, 0x7c, 0x13, - 0x25, 0x5b, 0x51, 0xf8, 0x0b, 0xb8, 0x3b, 0x83, 0xac, 0x7b, 0xe3, 0x7b, 0x50, 0xd4, 0xec, 0xd0, - 0x32, 0x64, 0x0b, 0x94, 0x45, 0x05, 0x35, 0x8f, 0xc4, 0x42, 0xfc, 0x67, 0x03, 0xee, 0x44, 0x41, - 0x47, 0xe7, 0x9a, 0x7b, 0x07, 0xcd, 0xa4, 0x30, 0xf3, 0xee, 0x29, 0xac, 0x41, 0x7e, 0xc4, 0xf8, - 0xb5, 0xdf, 0x97, 0x47, 0xae, 0xa8, 0x59, 0x31, 0xe7, 0xeb, 0xe0, 0x44, 0x6a, 0x10, 0xad, 0x89, - 0x1f, 0x43, 0x5e, 0x71, 0xc4, 0x3d, 0x21, 0xad, 0xf3, 0x4e, 0xbd, 0xd1, 0x32, 0xd7, 0x50, 0x01, - 0xb2, 0xf5, 0x66, 0xd3, 0x34, 0xd0, 0x06, 0x14, 0xbb, 0x97, 0x87, 0x17, 0xa4, 0xde, 0xb8, 0x30, - 0x33, 0xf8, 0x2f, 0x19, 0xd8, 0x56, 0x7d, 0x12, 0x05, 0x96, 0x44, 0x30, 0xd3, 0xce, 0xef, 0x19, - 0xc1, 0xf1, 0xcc, 0xc4, 0x53, 0x8b, 0xe0, 0x91, 0xcc, 0xe3, 0x12, 0xa7, 0x6f, 0x9c, 0x7f, 0x73, - 0xed, 0x94, 0x5b, 0x6c, 0x27, 0x0b, 0x0a, 0xa7, 0x7e, 0xd7, 0xa5, 0xbd, 0x1b, 0xbd, 0x18, 0x23, - 0x52, 0x48, 0xe4, 0x47, 0xf3, 0x44, 0xf6, 0x7e, 0x91, 0x44, 0xa4, 0xfd, 0xf9, 0xbb, 0x0c, 0xc7, - 0xed, 0xf4, 0x3c, 0x2b, 0xa5, 0x67, 0xd7, 0x00, 0x8a, 0xdf, 0x72, 0x47, 0xea, 0x3b, 0x90, 0x4d, - 0xee, 0x00, 0x82, 0xdc, 0x89, 0xdf, 0x57, 0x2f, 0xaf, 0x75, 0x22, 0xbf, 0xf1, 0x17, 0x60, 0xea, - 0x54, 0xc5, 0xc3, 0x17, 0xed, 0xa7, 0x17, 0x82, 0xea, 0xd0, 0x0d, 0x91, 0xd9, 0x78, 0xc6, 0x26, - 0x62, 0xfc, 0x1a, 0xb2, 0x1d, 0x7f, 0xb8, 0xf4, 0x88, 0x3f, 0x82, 0x42, 0x97, 0xd3, 0x80, 0xeb, - 0x0b, 0xf3, 0xe6, 0xb9, 0x10, 0xa9, 0x0a, 0xa4, 0x43, 0xbf, 0x7f, 0x2b, 0xcf, 0xbd, 0x41, 0xe4, - 0xb7, 0xc8, 0xf2, 0x09, 0x0b, 0x43, 0x3a, 0x8c, 0x5f, 0x8d, 0x9a, 0xc4, 0xdf, 0x87, 0x8d, 0x8e, - 0x3f, 0x0c, 0xe3, 0xbb, 0xf5, 0x00, 0x72, 0x82, 0xd6, 0xa7, 0x2e, 0xc8, 0xae, 0xf6, 0x87, 0x44, - 0x32, 0xf1, 0xa7, 0xb0, 0xd5, 0x70, 0x9d, 0xcb, 0xf1, 0x30, 0xa0, 0x7d, 0x96, 0x6a, 0x47, 0x3f, - 0x8c, 0xda, 0xd1, 0x0f, 0x85, 0x7f, 0x1a, 0xf4, 0xae, 0xa3, 0xe5, 0x2d, 0xbe, 0x71, 0x4d, 0x8c, - 0x88, 0xc4, 0x50, 0xfb, 0xda, 0x85, 0xd2, 0xc0, 0x71, 0x59, 0xe3, 0x7a, 0xe2, 0xdd, 0x48, 0x80, - 0x0d, 0x92, 0x30, 0xf0, 0xaf, 0xa0, 0xdc, 0xf6, 0x06, 0x01, 0xd5, 0x03, 0xf9, 0x31, 0x6c, 0x9d, - 0x50, 0xc7, 0xe3, 0xcc, 0xa3, 0x9e, 0x78, 0x07, 0x72, 0x67, 0xca, 0xf4, 0x74, 0x59, 0x14, 0xa0, - 0x3d, 0x00, 0xc9, 0xa4, 0x8e, 0x98, 0xd5, 0xea, 0x28, 0x29, 0xce, 0xfe, 0xcf, 0xa3, 0x15, 0x20, - 0xd6, 0xd7, 0x51, 0xbd, 0xdd, 0x69, 0x35, 0xcd, 0x35, 0x71, 0x01, 0x1b, 0xa4, 0x55, 0xbf, 0x68, - 0x9f, 0x3e, 0x37, 0x0d, 0xb1, 0xed, 0x48, 0xab, 0xde, 0xfc, 0xda, 0xcc, 0xa0, 0x0a, 0x40, 0xb3, - 0xd5, 0xbd, 0x20, 0x67, 0x5f, 0x0b, 0x51, 0x56, 0x28, 0x1e, 0xb5, 0x4f, 0xdb, 0xdd, 0xe3, 0x56, - 0xd3, 0xcc, 0xd5, 0xbe, 0x82, 0x8a, 0xfe, 0x3b, 0xd1, 0xaf, 0x54, 0x74, 0x04, 0xf0, 0x9c, 0xf1, - 0xe8, 0x97, 0x65, 0xc5, 0x63, 0xc8, 0x96, 0x53, 0x4b, 0x2b, 0xe1, 0xbb, 0xbf, 0xff, 0xc7, 0xbf, - 0xff, 0x90, 0xd9, 0x44, 0xe5, 0xea, 0xf4, 0x49, 0x75, 0xaa, 0x98, 0xb5, 0xff, 0x19, 0x50, 0x16, - 0x3f, 0x15, 0x11, 0xee, 0x31, 0xe4, 0xd5, 0x0f, 0xce, 0x4a, 0x4c, 0xb9, 0xd1, 0x67, 0x7f, 0x82, - 0x30, 0x92, 0xd0, 0x1b, 0x08, 0x04, 0xf4, 0x4b, 0x65, 0xff, 0x0b, 0x28, 0xab, 0x7b, 0x2e, 0x1f, - 0xcc, 0x68, 0xc9, 0x1b, 0xdb, 0xde, 0x12, 0xbc, 0x99, 0xb7, 0x39, 0x7e, 0x20, 0x91, 0xee, 0x61, - 0x53, 0x20, 0x71, 0x21, 0xfa, 0x41, 0x4f, 0xa2, 0x3c, 0x35, 0xf6, 0xd1, 0xb1, 0x7e, 0x8a, 0xaf, - 0x3c, 0xdb, 0x12, 0xc0, 0x6d, 0x09, 0x58, 0xc1, 0xa5, 0x18, 0xf0, 0xa9, 0xb1, 0x5f, 0xfb, 0xa3, - 0x01, 0x9b, 0x6a, 0xdf, 0x46, 0x81, 0xb7, 0x21, 0x27, 0x56, 0x00, 0xba, 0x97, 0xec, 0xfa, 0xd4, - 0xb2, 0xb1, 0x77, 0xe6, 0xd9, 0xcb, 0x22, 0x1f, 0xa8, 0x0d, 0xfe, 0x39, 0xe4, 0xda, 0xde, 0xc0, - 0x47, 0xa6, 0xb0, 0x49, 0xff, 0x22, 0xdb, 0xa9, 0x87, 0x04, 0xbe, 0x2f, 0x2d, 0xb7, 0xd0, 0x9d, - 0xc4, 0xb2, 0xfa, 0xca, 0xe9, 0xbf, 0xae, 0xfd, 0x35, 0x07, 0x15, 0x7d, 0xe1, 0xa3, 0xc3, 0xfd, - 0x74, 0x25, 0x62, 0x7a, 0x2f, 0x61, 0x4b, 0x42, 0x22, 0x24, 0x93, 0xd7, 0x53, 0x4c, 0x89, 0x89, - 0x3a, 0x3a, 0xba, 0x9d, 0x94, 0x7a, 0x3a, 0xbc, 0xfb, 0x0b, 0x7c, 0x1d, 0xdf, 0x4c, 0xd3, 0x68, - 0x48, 0xf4, 0x9b, 0x64, 0x1f, 0xa0, 0xbb, 0x4b, 0xd6, 0x92, 0xbd, 0x7a, 0x3d, 0xe0, 0x8f, 0x25, - 0xe0, 0x1e, 0xfe, 0x60, 0xfe, 0x8c, 0x55, 0x57, 0x83, 0x88, 0x4a, 0x77, 0x20, 0xaf, 0x9a, 0x07, - 0x59, 0xab, 0x16, 0x86, 0xbd, 0x90, 0x0c, 0xbc, 0x23, 0xb1, 0x4d, 0x9c, 0x3e, 0xac, 0x40, 0x7b, - 0x91, 0x9a, 0x96, 0x4b, 0x72, 0xb8, 0x9d, 0x0a, 0x3e, 0x19, 0x9b, 0x58, 0x82, 0xed, 0x22, 0x7b, - 0xe1, 0xa0, 0x34, 0xc6, 0xea, 0x40, 0xbe, 0xc9, 0x5c, 0xc6, 0xd9, 0x12, 0xd4, 0x15, 0x3d, 0x1a, - 0x15, 0x69, 0x7f, 0xb1, 0x48, 0x6d, 0x35, 0x19, 0x97, 0x60, 0x99, 0x7a, 0x4a, 0xc6, 0x53, 0x14, - 0x7f, 0x28, 0x51, 0xee, 0xa3, 0x7b, 0x8b, 0x69, 0xf4, 0x87, 0x61, 0x6d, 0x04, 0xd0, 0x70, 0x9d, - 0xa8, 0x7d, 0x7e, 0x0d, 0x05, 0x3d, 0x19, 0x55, 0x7b, 0x2f, 0x8c, 0x58, 0x7b, 0x67, 0x9e, 0xad, - 0xdd, 0x7c, 0x24, 0xdd, 0x7c, 0x88, 0x1e, 0x28, 0x37, 0x4e, 0xf5, 0x95, 0x1f, 0xbe, 0xae, 0xbe, - 0x12, 0x23, 0xf7, 0x75, 0x75, 0xa2, 0x94, 0x3f, 0x31, 0x6a, 0xff, 0x35, 0x00, 0xa5, 0x46, 0x69, - 0x32, 0x4c, 0x4a, 0xcf, 0x19, 0x8f, 0xde, 0xbb, 0x2b, 0xee, 0xec, 0x1d, 0xe1, 0x3a, 0x65, 0x3c, - 0x7b, 0xa5, 0x42, 0x65, 0xfc, 0x33, 0x28, 0x13, 0x16, 0xbe, 0x37, 0xd6, 0x7e, 0x1a, 0xab, 0x0e, - 0xa5, 0x6e, 0x8c, 0x34, 0x6f, 0xb1, 0x12, 0xc2, 0x4e, 0x41, 0x1c, 0xe6, 0x7e, 0x99, 0x99, 0x3e, - 0xb9, 0xca, 0x4b, 0xef, 0x3f, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x3f, 0xda, 0x37, - 0x98, 0x13, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// VersionServiceClient is the client API for VersionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type VersionServiceClient interface { - GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error) -} - -type versionServiceClient struct { - cc *grpc.ClientConn -} - -func NewVersionServiceClient(cc *grpc.ClientConn) VersionServiceClient { - return &versionServiceClient{cc} -} - -func (c *versionServiceClient) GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error) { - out := new(Version) - err := c.cc.Invoke(ctx, "/v1.VersionService/GetVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// VersionServiceServer is the server API for VersionService service. -type VersionServiceServer interface { - GetVersion(context.Context, *emptypb.Empty) (*Version, error) -} - -// UnimplementedVersionServiceServer can be embedded to have forward compatible implementations. -type UnimplementedVersionServiceServer struct { -} - -func (*UnimplementedVersionServiceServer) GetVersion(ctx context.Context, req *emptypb.Empty) (*Version, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") -} - -func RegisterVersionServiceServer(s *grpc.Server, srv VersionServiceServer) { - s.RegisterService(&_VersionService_serviceDesc, srv) -} - -func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VersionServiceServer).GetVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.VersionService/GetVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VersionServiceServer).GetVersion(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _VersionService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.VersionService", - HandlerType: (*VersionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetVersion", - Handler: _VersionService_GetVersion_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service.proto", -} - -// UserServiceClient is the client API for UserService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type UserServiceClient interface { - // Whoami provides information about the currently authenticated principal. - Whoami(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*WhoamiResponse, error) - // CreateToken generates an arbitrary service account token - CreateToken(ctx context.Context, in *ServiceAccount, opts ...grpc.CallOption) (*TokenResponse, error) - // Token generates a service account token for the current user. - Token(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenResponse, error) -} - -type userServiceClient struct { - cc *grpc.ClientConn -} - -func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient { - return &userServiceClient{cc} -} - -func (c *userServiceClient) Whoami(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*WhoamiResponse, error) { - out := new(WhoamiResponse) - err := c.cc.Invoke(ctx, "/v1.UserService/Whoami", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) CreateToken(ctx context.Context, in *ServiceAccount, opts ...grpc.CallOption) (*TokenResponse, error) { - out := new(TokenResponse) - err := c.cc.Invoke(ctx, "/v1.UserService/CreateToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) Token(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenResponse, error) { - out := new(TokenResponse) - err := c.cc.Invoke(ctx, "/v1.UserService/Token", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServiceServer is the server API for UserService service. -type UserServiceServer interface { - // Whoami provides information about the currently authenticated principal. - Whoami(context.Context, *emptypb.Empty) (*WhoamiResponse, error) - // CreateToken generates an arbitrary service account token - CreateToken(context.Context, *ServiceAccount) (*TokenResponse, error) - // Token generates a service account token for the current user. - Token(context.Context, *emptypb.Empty) (*TokenResponse, error) -} - -// UnimplementedUserServiceServer can be embedded to have forward compatible implementations. -type UnimplementedUserServiceServer struct { -} - -func (*UnimplementedUserServiceServer) Whoami(ctx context.Context, req *emptypb.Empty) (*WhoamiResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Whoami not implemented") -} -func (*UnimplementedUserServiceServer) CreateToken(ctx context.Context, req *ServiceAccount) (*TokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented") -} -func (*UnimplementedUserServiceServer) Token(ctx context.Context, req *emptypb.Empty) (*TokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Token not implemented") -} - -func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) { - s.RegisterService(&_UserService_serviceDesc, srv) -} - -func _UserService_Whoami_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Whoami(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.UserService/Whoami", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Whoami(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServiceAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).CreateToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.UserService/CreateToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).CreateToken(ctx, req.(*ServiceAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_Token_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Token(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.UserService/Token", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Token(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _UserService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.UserService", - HandlerType: (*UserServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Whoami", - Handler: _UserService_Whoami_Handler, - }, - { - MethodName: "CreateToken", - Handler: _UserService_CreateToken_Handler, - }, - { - MethodName: "Token", - Handler: _UserService_Token_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service.proto", -} - -// FlavorServiceClient is the client API for FlavorService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type FlavorServiceClient interface { - // List provides information about the available flavors. - List(ctx context.Context, in *FlavorListRequest, opts ...grpc.CallOption) (*FlavorListResponse, error) - // Info provides information about a specific flavor. - Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Flavor, error) -} - -type flavorServiceClient struct { - cc *grpc.ClientConn -} - -func NewFlavorServiceClient(cc *grpc.ClientConn) FlavorServiceClient { - return &flavorServiceClient{cc} -} - -func (c *flavorServiceClient) List(ctx context.Context, in *FlavorListRequest, opts ...grpc.CallOption) (*FlavorListResponse, error) { - out := new(FlavorListResponse) - err := c.cc.Invoke(ctx, "/v1.FlavorService/List", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *flavorServiceClient) Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Flavor, error) { - out := new(Flavor) - err := c.cc.Invoke(ctx, "/v1.FlavorService/Info", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FlavorServiceServer is the server API for FlavorService service. -type FlavorServiceServer interface { - // List provides information about the available flavors. - List(context.Context, *FlavorListRequest) (*FlavorListResponse, error) - // Info provides information about a specific flavor. - Info(context.Context, *ResourceByID) (*Flavor, error) -} - -// UnimplementedFlavorServiceServer can be embedded to have forward compatible implementations. -type UnimplementedFlavorServiceServer struct { -} - -func (*UnimplementedFlavorServiceServer) List(ctx context.Context, req *FlavorListRequest) (*FlavorListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (*UnimplementedFlavorServiceServer) Info(ctx context.Context, req *ResourceByID) (*Flavor, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") -} - -func RegisterFlavorServiceServer(s *grpc.Server, srv FlavorServiceServer) { - s.RegisterService(&_FlavorService_serviceDesc, srv) -} - -func _FlavorService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FlavorListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FlavorServiceServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.FlavorService/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FlavorServiceServer).List(ctx, req.(*FlavorListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _FlavorService_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceByID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FlavorServiceServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.FlavorService/Info", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FlavorServiceServer).Info(ctx, req.(*ResourceByID)) - } - return interceptor(ctx, in, info, handler) -} - -var _FlavorService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.FlavorService", - HandlerType: (*FlavorServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "List", - Handler: _FlavorService_List_Handler, - }, - { - MethodName: "Info", - Handler: _FlavorService_Info_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service.proto", -} - -// ClusterServiceClient is the client API for ClusterService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ClusterServiceClient interface { - // Info provides information about a specific cluster. - Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Cluster, error) - // List provides information about the available clusters. - List(ctx context.Context, in *ClusterListRequest, opts ...grpc.CallOption) (*ClusterListResponse, error) - // Lifespan updates the lifespan for a specific cluster. - Lifespan(ctx context.Context, in *LifespanRequest, opts ...grpc.CallOption) (*durationpb.Duration, error) - // Create launches a new cluster. - Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*ResourceByID, error) - // Artifacts returns the artifacts for a specific cluster. - Artifacts(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*ClusterArtifacts, error) - // Delete deletes an existing cluster. - Delete(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Logs returns the logs for a specific cluster. - Logs(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*LogsResponse, error) -} - -type clusterServiceClient struct { - cc *grpc.ClientConn -} - -func NewClusterServiceClient(cc *grpc.ClientConn) ClusterServiceClient { - return &clusterServiceClient{cc} -} - -func (c *clusterServiceClient) Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Cluster, error) { - out := new(Cluster) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Info", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) List(ctx context.Context, in *ClusterListRequest, opts ...grpc.CallOption) (*ClusterListResponse, error) { - out := new(ClusterListResponse) - err := c.cc.Invoke(ctx, "/v1.ClusterService/List", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) Lifespan(ctx context.Context, in *LifespanRequest, opts ...grpc.CallOption) (*durationpb.Duration, error) { - out := new(durationpb.Duration) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Lifespan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*ResourceByID, error) { - out := new(ResourceByID) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) Artifacts(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*ClusterArtifacts, error) { - out := new(ClusterArtifacts) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Artifacts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) Delete(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterServiceClient) Logs(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*LogsResponse, error) { - out := new(LogsResponse) - err := c.cc.Invoke(ctx, "/v1.ClusterService/Logs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClusterServiceServer is the server API for ClusterService service. -type ClusterServiceServer interface { - // Info provides information about a specific cluster. - Info(context.Context, *ResourceByID) (*Cluster, error) - // List provides information about the available clusters. - List(context.Context, *ClusterListRequest) (*ClusterListResponse, error) - // Lifespan updates the lifespan for a specific cluster. - Lifespan(context.Context, *LifespanRequest) (*durationpb.Duration, error) - // Create launches a new cluster. - Create(context.Context, *CreateClusterRequest) (*ResourceByID, error) - // Artifacts returns the artifacts for a specific cluster. - Artifacts(context.Context, *ResourceByID) (*ClusterArtifacts, error) - // Delete deletes an existing cluster. - Delete(context.Context, *ResourceByID) (*emptypb.Empty, error) - // Logs returns the logs for a specific cluster. - Logs(context.Context, *ResourceByID) (*LogsResponse, error) -} - -// UnimplementedClusterServiceServer can be embedded to have forward compatible implementations. -type UnimplementedClusterServiceServer struct { -} - -func (*UnimplementedClusterServiceServer) Info(ctx context.Context, req *ResourceByID) (*Cluster, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") -} -func (*UnimplementedClusterServiceServer) List(ctx context.Context, req *ClusterListRequest) (*ClusterListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (*UnimplementedClusterServiceServer) Lifespan(ctx context.Context, req *LifespanRequest) (*durationpb.Duration, error) { - return nil, status.Errorf(codes.Unimplemented, "method Lifespan not implemented") -} -func (*UnimplementedClusterServiceServer) Create(ctx context.Context, req *CreateClusterRequest) (*ResourceByID, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (*UnimplementedClusterServiceServer) Artifacts(ctx context.Context, req *ResourceByID) (*ClusterArtifacts, error) { - return nil, status.Errorf(codes.Unimplemented, "method Artifacts not implemented") -} -func (*UnimplementedClusterServiceServer) Delete(ctx context.Context, req *ResourceByID) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (*UnimplementedClusterServiceServer) Logs(ctx context.Context, req *ResourceByID) (*LogsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Logs not implemented") -} - -func RegisterClusterServiceServer(s *grpc.Server, srv ClusterServiceServer) { - s.RegisterService(&_ClusterService_serviceDesc, srv) -} - -func _ClusterService_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceByID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Info", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Info(ctx, req.(*ResourceByID)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClusterListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).List(ctx, req.(*ClusterListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_Lifespan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LifespanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Lifespan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Lifespan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Lifespan(ctx, req.(*LifespanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_Artifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceByID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Artifacts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Artifacts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Artifacts(ctx, req.(*ResourceByID)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceByID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Delete(ctx, req.(*ResourceByID)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterService_Logs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceByID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServiceServer).Logs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ClusterService/Logs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServiceServer).Logs(ctx, req.(*ResourceByID)) - } - return interceptor(ctx, in, info, handler) -} - -var _ClusterService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.ClusterService", - HandlerType: (*ClusterServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Info", - Handler: _ClusterService_Info_Handler, - }, - { - MethodName: "List", - Handler: _ClusterService_List_Handler, - }, - { - MethodName: "Lifespan", - Handler: _ClusterService_Lifespan_Handler, - }, - { - MethodName: "Create", - Handler: _ClusterService_Create_Handler, - }, - { - MethodName: "Artifacts", - Handler: _ClusterService_Artifacts_Handler, - }, - { - MethodName: "Delete", - Handler: _ClusterService_Delete_Handler, - }, - { - MethodName: "Logs", - Handler: _ClusterService_Logs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service.proto", -} - -// CliServiceClient is the client API for CliService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CliServiceClient interface { - // Upgrade - gets an updated binary if it exists. - Upgrade(ctx context.Context, in *CliUpgradeRequest, opts ...grpc.CallOption) (CliService_UpgradeClient, error) -} - -type cliServiceClient struct { - cc *grpc.ClientConn -} - -func NewCliServiceClient(cc *grpc.ClientConn) CliServiceClient { - return &cliServiceClient{cc} -} - -func (c *cliServiceClient) Upgrade(ctx context.Context, in *CliUpgradeRequest, opts ...grpc.CallOption) (CliService_UpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_CliService_serviceDesc.Streams[0], "/v1.CliService/Upgrade", opts...) - if err != nil { - return nil, err - } - x := &cliServiceUpgradeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type CliService_UpgradeClient interface { - Recv() (*CliUpgradeResponse, error) - grpc.ClientStream -} - -type cliServiceUpgradeClient struct { - grpc.ClientStream -} - -func (x *cliServiceUpgradeClient) Recv() (*CliUpgradeResponse, error) { - m := new(CliUpgradeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// CliServiceServer is the server API for CliService service. -type CliServiceServer interface { - // Upgrade - gets an updated binary if it exists. - Upgrade(*CliUpgradeRequest, CliService_UpgradeServer) error -} - -// UnimplementedCliServiceServer can be embedded to have forward compatible implementations. -type UnimplementedCliServiceServer struct { -} - -func (*UnimplementedCliServiceServer) Upgrade(req *CliUpgradeRequest, srv CliService_UpgradeServer) error { - return status.Errorf(codes.Unimplemented, "method Upgrade not implemented") -} - -func RegisterCliServiceServer(s *grpc.Server, srv CliServiceServer) { - s.RegisterService(&_CliService_serviceDesc, srv) -} - -func _CliService_Upgrade_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(CliUpgradeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(CliServiceServer).Upgrade(m, &cliServiceUpgradeServer{stream}) -} - -type CliService_UpgradeServer interface { - Send(*CliUpgradeResponse) error - grpc.ServerStream -} - -type cliServiceUpgradeServer struct { - grpc.ServerStream -} - -func (x *cliServiceUpgradeServer) Send(m *CliUpgradeResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _CliService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.CliService", - HandlerType: (*CliServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Upgrade", - Handler: _CliService_Upgrade_Handler, - ServerStreams: true, - }, - }, - Metadata: "service.proto", -} - -// InfraStatusServiceClient is the client API for InfraStatusService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type InfraStatusServiceClient interface { - // GetStatus gets the maintenance - GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) - // ResetStatus resets the maintenance - ResetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) - // SetStatus sets the maintenance - SetStatus(ctx context.Context, in *InfraStatus, opts ...grpc.CallOption) (*InfraStatus, error) -} - -type infraStatusServiceClient struct { - cc *grpc.ClientConn -} - -func NewInfraStatusServiceClient(cc *grpc.ClientConn) InfraStatusServiceClient { - return &infraStatusServiceClient{cc} -} - -func (c *infraStatusServiceClient) GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) { - out := new(InfraStatus) - err := c.cc.Invoke(ctx, "/v1.InfraStatusService/GetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *infraStatusServiceClient) ResetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) { - out := new(InfraStatus) - err := c.cc.Invoke(ctx, "/v1.InfraStatusService/ResetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *infraStatusServiceClient) SetStatus(ctx context.Context, in *InfraStatus, opts ...grpc.CallOption) (*InfraStatus, error) { - out := new(InfraStatus) - err := c.cc.Invoke(ctx, "/v1.InfraStatusService/SetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// InfraStatusServiceServer is the server API for InfraStatusService service. -type InfraStatusServiceServer interface { - // GetStatus gets the maintenance - GetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) - // ResetStatus resets the maintenance - ResetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) - // SetStatus sets the maintenance - SetStatus(context.Context, *InfraStatus) (*InfraStatus, error) -} - -// UnimplementedInfraStatusServiceServer can be embedded to have forward compatible implementations. -type UnimplementedInfraStatusServiceServer struct { -} - -func (*UnimplementedInfraStatusServiceServer) GetStatus(ctx context.Context, req *emptypb.Empty) (*InfraStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") -} -func (*UnimplementedInfraStatusServiceServer) ResetStatus(ctx context.Context, req *emptypb.Empty) (*InfraStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResetStatus not implemented") -} -func (*UnimplementedInfraStatusServiceServer) SetStatus(ctx context.Context, req *InfraStatus) (*InfraStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetStatus not implemented") -} - -func RegisterInfraStatusServiceServer(s *grpc.Server, srv InfraStatusServiceServer) { - s.RegisterService(&_InfraStatusService_serviceDesc, srv) -} - -func _InfraStatusService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InfraStatusServiceServer).GetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.InfraStatusService/GetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraStatusServiceServer).GetStatus(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _InfraStatusService_ResetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InfraStatusServiceServer).ResetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.InfraStatusService/ResetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraStatusServiceServer).ResetStatus(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _InfraStatusService_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfraStatus) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InfraStatusServiceServer).SetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.InfraStatusService/SetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraStatusServiceServer).SetStatus(ctx, req.(*InfraStatus)) - } - return interceptor(ctx, in, info, handler) -} - -var _InfraStatusService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.InfraStatusService", - HandlerType: (*InfraStatusServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetStatus", - Handler: _InfraStatusService_GetStatus_Handler, - }, - { - MethodName: "ResetStatus", - Handler: _InfraStatusService_ResetStatus_Handler, - }, - { - MethodName: "SetStatus", - Handler: _InfraStatusService_SetStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service.proto", -} diff --git a/generated/proto/api/v1/service.pb.go b/generated/proto/api/v1/service.pb.go new file mode 100644 index 000000000..c38c4c5cc --- /dev/null +++ b/generated/proto/api/v1/service.pb.go @@ -0,0 +1,2604 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/api/v1/service.proto + +package api_v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + 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) +) + +// Status represents the various cluster states. +type Status int32 + +const ( + // FAILED is the state when the cluster has failed in one way or another. + Status_FAILED Status = 0 + // CREATING is the state when the cluster is being created. + Status_CREATING Status = 1 + // READY is the state when the cluster is available and ready for use. + Status_READY Status = 2 + // DESTROYING is the state when the cluster is being destroyed. + Status_DESTROYING Status = 3 + // FINISHED is the state when the cluster has been successfully destroyed. + Status_FINISHED Status = 4 +) + +// Enum value maps for Status. +var ( + Status_name = map[int32]string{ + 0: "FAILED", + 1: "CREATING", + 2: "READY", + 3: "DESTROYING", + 4: "FINISHED", + } + Status_value = map[string]int32{ + "FAILED": 0, + "CREATING": 1, + "READY": 2, + "DESTROYING": 3, + "FINISHED": 4, + } +) + +func (x Status) Enum() *Status { + p := new(Status) + *p = x + return p +} + +func (x Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Status) Descriptor() protoreflect.EnumDescriptor { + return file_proto_api_v1_service_proto_enumTypes[0].Descriptor() +} + +func (Status) Type() protoreflect.EnumType { + return &file_proto_api_v1_service_proto_enumTypes[0] +} + +func (x Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Status.Descriptor instead. +func (Status) EnumDescriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{0} +} + +// availability represents the availability classification levels. +type FlavorAvailability int32 + +const ( + // alpha is completely experemental, and is not expected to work in any way. + Flavor_alpha FlavorAvailability = 0 + // beta is being tested, and is expected to work with minor issues. + Flavor_beta FlavorAvailability = 1 + // stable is available for public consumption, and works without issue. + Flavor_stable FlavorAvailability = 2 + // default is stable, and available for customer demo consumption. + // Exactly 1 flavor should be configured as default. + Flavor_default FlavorAvailability = 3 +) + +// Enum value maps for FlavorAvailability. +var ( + FlavorAvailability_name = map[int32]string{ + 0: "alpha", + 1: "beta", + 2: "stable", + 3: "default", + } + FlavorAvailability_value = map[string]int32{ + "alpha": 0, + "beta": 1, + "stable": 2, + "default": 3, + } +) + +func (x FlavorAvailability) Enum() *FlavorAvailability { + p := new(FlavorAvailability) + *p = x + return p +} + +func (x FlavorAvailability) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlavorAvailability) Descriptor() protoreflect.EnumDescriptor { + return file_proto_api_v1_service_proto_enumTypes[1].Descriptor() +} + +func (FlavorAvailability) Type() protoreflect.EnumType { + return &file_proto_api_v1_service_proto_enumTypes[1] +} + +func (x FlavorAvailability) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlavorAvailability.Descriptor instead. +func (FlavorAvailability) EnumDescriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{8, 0} +} + +// method represents the various lifespan operations. +type LifespanRequest_Method int32 + +const ( + // REPLACE indicates that the given lifespan should replace the current + // lifespan. + LifespanRequest_REPLACE LifespanRequest_Method = 0 + // ADD indicates that the given lifespan should be added to the current + // lifespan. + LifespanRequest_ADD LifespanRequest_Method = 1 + // SUBTRACT indicates that the given lifespan should be subtracted from + // the current lifespan. + LifespanRequest_SUBTRACT LifespanRequest_Method = 2 +) + +// Enum value maps for LifespanRequest_Method. +var ( + LifespanRequest_Method_name = map[int32]string{ + 0: "REPLACE", + 1: "ADD", + 2: "SUBTRACT", + } + LifespanRequest_Method_value = map[string]int32{ + "REPLACE": 0, + "ADD": 1, + "SUBTRACT": 2, + } +) + +func (x LifespanRequest_Method) Enum() *LifespanRequest_Method { + p := new(LifespanRequest_Method) + *p = x + return p +} + +func (x LifespanRequest_Method) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LifespanRequest_Method) Descriptor() protoreflect.EnumDescriptor { + return file_proto_api_v1_service_proto_enumTypes[2].Descriptor() +} + +func (LifespanRequest_Method) Type() protoreflect.EnumType { + return &file_proto_api_v1_service_proto_enumTypes[2] +} + +func (x LifespanRequest_Method) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LifespanRequest_Method.Descriptor instead. +func (LifespanRequest_Method) EnumDescriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{14, 0} +} + +// ResourceByID represents a generic reference to a named/unique resource. +type ResourceByID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ResourceByID) Reset() { + *x = ResourceByID{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceByID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceByID) ProtoMessage() {} + +func (x *ResourceByID) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceByID.ProtoReflect.Descriptor instead. +func (*ResourceByID) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ResourceByID) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Version struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BuildDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=BuildDate,proto3" json:"BuildDate,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"` + GoVersion string `protobuf:"bytes,3,opt,name=GoVersion,proto3" json:"GoVersion,omitempty"` + Platform string `protobuf:"bytes,4,opt,name=Platform,proto3" json:"Platform,omitempty"` + Version string `protobuf:"bytes,5,opt,name=Version,proto3" json:"Version,omitempty"` + Workflow string `protobuf:"bytes,6,opt,name=Workflow,proto3" json:"Workflow,omitempty"` +} + +func (x *Version) Reset() { + *x = Version{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Version) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Version) ProtoMessage() {} + +func (x *Version) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Version.ProtoReflect.Descriptor instead. +func (*Version) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *Version) GetBuildDate() *timestamppb.Timestamp { + if x != nil { + return x.BuildDate + } + return nil +} + +func (x *Version) GetGitCommit() string { + if x != nil { + return x.GitCommit + } + return "" +} + +func (x *Version) GetGoVersion() string { + if x != nil { + return x.GoVersion + } + return "" +} + +func (x *Version) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *Version) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Version) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +// WhoamiResponse represents details about the current authenticated principal. +type WhoamiResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Principal represents a possible type of authenticated principal. + // + // Types that are assignable to Principal: + // *WhoamiResponse_User + // *WhoamiResponse_ServiceAccount + Principal isWhoamiResponse_Principal `protobuf_oneof:"principal"` +} + +func (x *WhoamiResponse) Reset() { + *x = WhoamiResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WhoamiResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhoamiResponse) ProtoMessage() {} + +func (x *WhoamiResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WhoamiResponse.ProtoReflect.Descriptor instead. +func (*WhoamiResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (m *WhoamiResponse) GetPrincipal() isWhoamiResponse_Principal { + if m != nil { + return m.Principal + } + return nil +} + +func (x *WhoamiResponse) GetUser() *User { + if x, ok := x.GetPrincipal().(*WhoamiResponse_User); ok { + return x.User + } + return nil +} + +func (x *WhoamiResponse) GetServiceAccount() *ServiceAccount { + if x, ok := x.GetPrincipal().(*WhoamiResponse_ServiceAccount); ok { + return x.ServiceAccount + } + return nil +} + +type isWhoamiResponse_Principal interface { + isWhoamiResponse_Principal() +} + +type WhoamiResponse_User struct { + // User represents an authenticated human. + User *User `protobuf:"bytes,1,opt,name=User,proto3,oneof"` +} + +type WhoamiResponse_ServiceAccount struct { + // ServiceAccount represents an authenticated service account robot. + ServiceAccount *ServiceAccount `protobuf:"bytes,2,opt,name=ServiceAccount,proto3,oneof"` +} + +func (*WhoamiResponse_User) isWhoamiResponse_Principal() {} + +func (*WhoamiResponse_ServiceAccount) isWhoamiResponse_Principal() {} + +// User represents an authenticated (human) principal. +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Expiry is the expiration date of this user session. Used only as a hint + // to the user and not for enforcement. + Expiry *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=Expiry,proto3" json:"Expiry,omitempty"` + // Name is the full name of the user. + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + // Email is the email address of the user. + Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` + // Picture is a URL linking to this user's profile picture, if available. + Picture string `protobuf:"bytes,4,opt,name=Picture,proto3" json:"Picture,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[3] + 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_proto_api_v1_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && 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_proto_api_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *User) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +func (x *User) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *User) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *User) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +// ServiceAccount represents an authenticated service account (robot) principal. +type ServiceAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is a human readable name for the service account. + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + // Description is a human readable description for the service account. + Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` + // Email is the Red Hat email address for the service account. + Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` + // IssuedAt is the time of issuing the service account token. + IssuedAt int64 `protobuf:"varint,4,opt,name=IssuedAt,proto3" json:"IssuedAt,omitempty"` + // NotBefore is the beginning of service account token valid time period. + NotBefore int64 `protobuf:"varint,5,opt,name=NotBefore,proto3" json:"NotBefore,omitempty"` + // ExpiresAt is the end of service account token valid time period. + ExpiresAt int64 `protobuf:"varint,6,opt,name=ExpiresAt,proto3" json:"ExpiresAt,omitempty"` +} + +func (x *ServiceAccount) Reset() { + *x = ServiceAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccount) ProtoMessage() {} + +func (x *ServiceAccount) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead. +func (*ServiceAccount) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ServiceAccount) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ServiceAccount) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ServiceAccount) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ServiceAccount) GetIssuedAt() int64 { + if x != nil { + return x.IssuedAt + } + return 0 +} + +func (x *ServiceAccount) GetNotBefore() int64 { + if x != nil { + return x.NotBefore + } + return 0 +} + +func (x *ServiceAccount) GetExpiresAt() int64 { + if x != nil { + return x.ExpiresAt + } + return 0 +} + +type TokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Account is the service account the token was generated for. + Account *ServiceAccount `protobuf:"bytes,1,opt,name=Account,proto3" json:"Account,omitempty"` + // Token is the token generated for the service account. + Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` +} + +func (x *TokenResponse) Reset() { + *x = TokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenResponse) ProtoMessage() {} + +func (x *TokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead. +func (*TokenResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *TokenResponse) GetAccount() *ServiceAccount { + if x != nil { + return x.Account + } + return nil +} + +func (x *TokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +// Parameter represents a single parameter that is needed to launch a flavor. +type Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is the unique name of the parameter. + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + // Description is a human readable description for the parameter. + Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` + // Value that this parameter could have. + // If the parameter is not optional, then value serves as an example. + // If the parameter is optional, then value serves as a default. + // If the parameter is internal, then value serves as a hardcoded constant. + Value string `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"` + // Optional indicates that this parameter can be optionally provided by a + // user. If the user does not provide a value, then Value serves as a + // default. + Optional bool `protobuf:"varint,4,opt,name=Optional,proto3" json:"Optional,omitempty"` + // Internal indicates that this parameter should not be provided by a user, + // but rather treats Value as a hardcoded constant. + Internal bool `protobuf:"varint,5,opt,name=Internal,proto3" json:"Internal,omitempty"` + // The relative order of importance of this parameter for when presenting in + // a UI for example. + Order int32 `protobuf:"varint,6,opt,name=Order,proto3" json:"Order,omitempty"` + Help string `protobuf:"bytes,7,opt,name=Help,proto3" json:"Help,omitempty"` + // Indicates that the value for this parameter can be provided from the + // contents of a file. + FromFile bool `protobuf:"varint,8,opt,name=FromFile,proto3" json:"FromFile,omitempty"` +} + +func (x *Parameter) Reset() { + *x = Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameter) ProtoMessage() {} + +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *Parameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Parameter) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Parameter) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Parameter) GetOptional() bool { + if x != nil { + return x.Optional + } + return false +} + +func (x *Parameter) GetInternal() bool { + if x != nil { + return x.Internal + } + return false +} + +func (x *Parameter) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *Parameter) GetHelp() string { + if x != nil { + return x.Help + } + return "" +} + +func (x *Parameter) GetFromFile() bool { + if x != nil { + return x.FromFile + } + return false +} + +// FlavorArtifact represents a single artifact that is produced by a flavor. +type FlavorArtifact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is the unique name of the artifact. + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + // Description is a human readable description for the artifact. + Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` + // Tags is a set of artifact tags. + Tags map[string]*emptypb.Empty `protobuf:"bytes,3,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *FlavorArtifact) Reset() { + *x = FlavorArtifact{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlavorArtifact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlavorArtifact) ProtoMessage() {} + +func (x *FlavorArtifact) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlavorArtifact.ProtoReflect.Descriptor instead. +func (*FlavorArtifact) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *FlavorArtifact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FlavorArtifact) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *FlavorArtifact) GetTags() map[string]*emptypb.Empty { + if x != nil { + return x.Tags + } + return nil +} + +// Flavor represents a configured cluster flavor. +type Flavor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is the unique, human type-able, ID for the flavor. + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + // Name is a human readable name for the flavor. + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + // Description is a human readable description for the flavor. + Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` + // Description is an availability classification for the flavor. + Availability FlavorAvailability `protobuf:"varint,4,opt,name=Availability,proto3,enum=api.v1.FlavorAvailability" json:"Availability,omitempty"` + // Parameters is a map of parameters required for launching this flavor. + Parameters map[string]*Parameter `protobuf:"bytes,5,rep,name=Parameters,proto3" json:"Parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Artifacts is a map of artifacts produced by this flavor. + Artifacts map[string]*FlavorArtifact `protobuf:"bytes,6,rep,name=Artifacts,proto3" json:"Artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Flavor) Reset() { + *x = Flavor{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Flavor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Flavor) ProtoMessage() {} + +func (x *Flavor) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Flavor.ProtoReflect.Descriptor instead. +func (*Flavor) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *Flavor) GetID() string { + if x != nil { + return x.ID + } + return "" +} + +func (x *Flavor) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Flavor) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Flavor) GetAvailability() FlavorAvailability { + if x != nil { + return x.Availability + } + return Flavor_alpha +} + +func (x *Flavor) GetParameters() map[string]*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Flavor) GetArtifacts() map[string]*FlavorArtifact { + if x != nil { + return x.Artifacts + } + return nil +} + +// FlavorListRequest represents a request to FlavorService.List. +type FlavorListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // all indicates that all flavors should be returned, by default + // availability alpha clusters are excluded. + All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` +} + +func (x *FlavorListRequest) Reset() { + *x = FlavorListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlavorListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlavorListRequest) ProtoMessage() {} + +func (x *FlavorListRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlavorListRequest.ProtoReflect.Descriptor instead. +func (*FlavorListRequest) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{9} +} + +func (x *FlavorListRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +// FlavorListResponse represents details about the available cluster flavors. +type FlavorListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Default is the flavor ID of the default cluster flavor. + Default string `protobuf:"bytes,1,opt,name=Default,proto3" json:"Default,omitempty"` + // Flavors is a list of all available cluster flavors. + Flavors []*Flavor `protobuf:"bytes,2,rep,name=Flavors,proto3" json:"Flavors,omitempty"` +} + +func (x *FlavorListResponse) Reset() { + *x = FlavorListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlavorListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlavorListResponse) ProtoMessage() {} + +func (x *FlavorListResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlavorListResponse.ProtoReflect.Descriptor instead. +func (*FlavorListResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *FlavorListResponse) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *FlavorListResponse) GetFlavors() []*Flavor { + if x != nil { + return x.Flavors + } + return nil +} + +// Cluster represents a single cluster. +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is the unique ID for the cluster. + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + // Status is the current status for the cluster. + Status Status `protobuf:"varint,2,opt,name=Status,proto3,enum=api.v1.Status" json:"Status,omitempty"` + // Flavor is the original flavor ID that launched this cluster. + Flavor string `protobuf:"bytes,3,opt,name=Flavor,proto3" json:"Flavor,omitempty"` + // Owner is the email address for the cluster owner. + Owner string `protobuf:"bytes,4,opt,name=Owner,proto3" json:"Owner,omitempty"` + // CreatedOn is the timestamp on which the cluster started being created. + CreatedOn *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=CreatedOn,proto3" json:"CreatedOn,omitempty"` + // DestroyedOn is the timestamp on which the cluster finished being + // destroyed. + DestroyedOn *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=DestroyedOn,proto3" json:"DestroyedOn,omitempty"` + // Lifespan is the duration for which the cluster should be kept alive. + Lifespan *durationpb.Duration `protobuf:"bytes,7,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` + // Description is a human readable description for the cluster. + Description string `protobuf:"bytes,8,opt,name=Description,proto3" json:"Description,omitempty"` + // URL is an optional URL for this cluster. + URL string `protobuf:"bytes,9,opt,name=URL,proto3" json:"URL,omitempty"` + // Connect is a command to add kube connection information to kubeconfig. + Connect string `protobuf:"bytes,10,opt,name=Connect,proto3" json:"Connect,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *Cluster) GetID() string { + if x != nil { + return x.ID + } + return "" +} + +func (x *Cluster) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_FAILED +} + +func (x *Cluster) GetFlavor() string { + if x != nil { + return x.Flavor + } + return "" +} + +func (x *Cluster) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Cluster) GetCreatedOn() *timestamppb.Timestamp { + if x != nil { + return x.CreatedOn + } + return nil +} + +func (x *Cluster) GetDestroyedOn() *timestamppb.Timestamp { + if x != nil { + return x.DestroyedOn + } + return nil +} + +func (x *Cluster) GetLifespan() *durationpb.Duration { + if x != nil { + return x.Lifespan + } + return nil +} + +func (x *Cluster) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Cluster) GetURL() string { + if x != nil { + return x.URL + } + return "" +} + +func (x *Cluster) GetConnect() string { + if x != nil { + return x.Connect + } + return "" +} + +// ClusterListRequest represents a request to ClusterService.List. +type ClusterListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // all indicates that all clusters should be returned, not just the ones + // owned by the user. + All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` + // expired indicates that expired clusters should be returned, not just the + // ones that are launching/ready. + Expired bool `protobuf:"varint,2,opt,name=expired,proto3" json:"expired,omitempty"` + // list clusters whose ID matches this prefix. + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` +} + +func (x *ClusterListRequest) Reset() { + *x = ClusterListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterListRequest) ProtoMessage() {} + +func (x *ClusterListRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterListRequest.ProtoReflect.Descriptor instead. +func (*ClusterListRequest) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{12} +} + +func (x *ClusterListRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *ClusterListRequest) GetExpired() bool { + if x != nil { + return x.Expired + } + return false +} + +func (x *ClusterListRequest) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +// ClusterListResponse represents details about all clusters. +type ClusterListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Clusters is a list of all clusters. + Clusters []*Cluster `protobuf:"bytes,1,rep,name=Clusters,proto3" json:"Clusters,omitempty"` +} + +func (x *ClusterListResponse) Reset() { + *x = ClusterListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterListResponse) ProtoMessage() {} + +func (x *ClusterListResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterListResponse.ProtoReflect.Descriptor instead. +func (*ClusterListResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *ClusterListResponse) GetClusters() []*Cluster { + if x != nil { + return x.Clusters + } + return nil +} + +type LifespanRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is the unique ID for the cluster. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Lifespan is the new lifespan. + Lifespan *durationpb.Duration `protobuf:"bytes,2,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` + Method LifespanRequest_Method `protobuf:"varint,3,opt,name=method,proto3,enum=api.v1.LifespanRequest_Method" json:"method,omitempty"` +} + +func (x *LifespanRequest) Reset() { + *x = LifespanRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifespanRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifespanRequest) ProtoMessage() {} + +func (x *LifespanRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifespanRequest.ProtoReflect.Descriptor instead. +func (*LifespanRequest) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{14} +} + +func (x *LifespanRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *LifespanRequest) GetLifespan() *durationpb.Duration { + if x != nil { + return x.Lifespan + } + return nil +} + +func (x *LifespanRequest) GetMethod() LifespanRequest_Method { + if x != nil { + return x.Method + } + return LifespanRequest_REPLACE +} + +// CreateClusterRequest represents details for launching a new cluster. +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is the flavor ID to launch. + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + // Lifespan is the initial cluster lifespan. + Lifespan *durationpb.Duration `protobuf:"bytes,2,opt,name=Lifespan,proto3" json:"Lifespan,omitempty"` + // Parameters is a map of launch parameter names to values. + Parameters map[string]string `protobuf:"bytes,3,rep,name=Parameters,proto3" json:"Parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Description is a human readable description for the cluster. + Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"` + // NoSlack is used to skip sending Slack messages for cluster lifecycle + // events. + NoSlack bool `protobuf:"varint,5,opt,name=NoSlack,proto3" json:"NoSlack,omitempty"` + // SlackDM is used to choose direct messages for cluster lifecycle + // events. + SlackDM bool `protobuf:"varint,6,opt,name=SlackDM,proto3" json:"SlackDM,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateClusterRequest) GetID() string { + if x != nil { + return x.ID + } + return "" +} + +func (x *CreateClusterRequest) GetLifespan() *durationpb.Duration { + if x != nil { + return x.Lifespan + } + return nil +} + +func (x *CreateClusterRequest) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *CreateClusterRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateClusterRequest) GetNoSlack() bool { + if x != nil { + return x.NoSlack + } + return false +} + +func (x *CreateClusterRequest) GetSlackDM() bool { + if x != nil { + return x.SlackDM + } + return false +} + +type Artifact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` + URL string `protobuf:"bytes,3,opt,name=URL,proto3" json:"URL,omitempty"` + Mode int32 `protobuf:"varint,4,opt,name=Mode,proto3" json:"Mode,omitempty"` +} + +func (x *Artifact) Reset() { + *x = Artifact{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Artifact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Artifact) ProtoMessage() {} + +func (x *Artifact) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Artifact.ProtoReflect.Descriptor instead. +func (*Artifact) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{16} +} + +func (x *Artifact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Artifact) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Artifact) GetURL() string { + if x != nil { + return x.URL + } + return "" +} + +func (x *Artifact) GetMode() int32 { + if x != nil { + return x.Mode + } + return 0 +} + +type ClusterArtifacts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Artifacts []*Artifact `protobuf:"bytes,1,rep,name=Artifacts,proto3" json:"Artifacts,omitempty"` +} + +func (x *ClusterArtifacts) Reset() { + *x = ClusterArtifacts{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterArtifacts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterArtifacts) ProtoMessage() {} + +func (x *ClusterArtifacts) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterArtifacts.ProtoReflect.Descriptor instead. +func (*ClusterArtifacts) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{17} +} + +func (x *ClusterArtifacts) GetArtifacts() []*Artifact { + if x != nil { + return x.Artifacts + } + return nil +} + +// Log represents the logs from a specific pod. +type Log struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is the name given to this pod in the workflow. + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + // Started is the time at which this pod was started. Used for ordering + // between pods. + Started *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=Started,proto3" json:"Started,omitempty"` + // Body is the raw pod logs. + Body []byte `protobuf:"bytes,3,opt,name=Body,proto3" json:"Body,omitempty"` + // Message surfaces step state from Argo. + Message string `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"` +} + +func (x *Log) Reset() { + *x = Log{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Log) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Log) ProtoMessage() {} + +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{18} +} + +func (x *Log) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Log) GetStarted() *timestamppb.Timestamp { + if x != nil { + return x.Started + } + return nil +} + +func (x *Log) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +func (x *Log) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// LogsResponse represents a collection of logs. +type LogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Logs are all of the logs from a cluster. + Logs []*Log `protobuf:"bytes,1,rep,name=Logs,proto3" json:"Logs,omitempty"` +} + +func (x *LogsResponse) Reset() { + *x = LogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogsResponse) ProtoMessage() {} + +func (x *LogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogsResponse.ProtoReflect.Descriptor instead. +func (*LogsResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{19} +} + +func (x *LogsResponse) GetLogs() []*Log { + if x != nil { + return x.Logs + } + return nil +} + +type CliUpgradeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Os string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"` + Arch string `protobuf:"bytes,2,opt,name=arch,proto3" json:"arch,omitempty"` +} + +func (x *CliUpgradeRequest) Reset() { + *x = CliUpgradeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CliUpgradeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CliUpgradeRequest) ProtoMessage() {} + +func (x *CliUpgradeRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CliUpgradeRequest.ProtoReflect.Descriptor instead. +func (*CliUpgradeRequest) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{20} +} + +func (x *CliUpgradeRequest) GetOs() string { + if x != nil { + return x.Os + } + return "" +} + +func (x *CliUpgradeRequest) GetArch() string { + if x != nil { + return x.Arch + } + return "" +} + +type CliUpgradeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileChunk []byte `protobuf:"bytes,1,opt,name=fileChunk,proto3" json:"fileChunk,omitempty"` +} + +func (x *CliUpgradeResponse) Reset() { + *x = CliUpgradeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CliUpgradeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CliUpgradeResponse) ProtoMessage() {} + +func (x *CliUpgradeResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CliUpgradeResponse.ProtoReflect.Descriptor instead. +func (*CliUpgradeResponse) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{21} +} + +func (x *CliUpgradeResponse) GetFileChunk() []byte { + if x != nil { + return x.FileChunk + } + return nil +} + +type InfraStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MaintenanceActive is an indicator whether a maintenance is ongoing. + MaintenanceActive bool `protobuf:"varint,1,opt,name=MaintenanceActive,proto3" json:"MaintenanceActive,omitempty"` + // Maintainer is the email of the person currently doing maintenance. + Maintainer string `protobuf:"bytes,2,opt,name=Maintainer,proto3" json:"Maintainer,omitempty"` +} + +func (x *InfraStatus) Reset() { + *x = InfraStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InfraStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InfraStatus) ProtoMessage() {} + +func (x *InfraStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_v1_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InfraStatus.ProtoReflect.Descriptor instead. +func (*InfraStatus) Descriptor() ([]byte, []int) { + return file_proto_api_v1_service_proto_rawDescGZIP(), []int{22} +} + +func (x *InfraStatus) GetMaintenanceActive() bool { + if x != nil { + return x.MaintenanceActive + } + return false +} + +func (x *InfraStatus) GetMaintainer() string { + if x != nil { + return x.Maintainer + } + return "" +} + +var File_proto_api_v1_service_proto protoreflect.FileDescriptor + +var file_proto_api_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 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, + 0x22, 0x1e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0xd1, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 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, 0x09, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, + 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x68, 0x6f, 0x61, 0x6d, 0x69, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x0a, + 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x7e, 0x0a, 0x04, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 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, 0x06, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x18, 0x0a, 0x07, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x0e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4e, 0x6f, 0x74, 0x42, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, + 0x74, 0x22, 0x57, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd5, 0x01, 0x0a, 0x09, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x48, 0x65, 0x6c, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, + 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, + 0x6c, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x54, + 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x54, 0x61, 0x67, + 0x73, 0x1a, 0x4f, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xf2, 0x03, 0x0a, 0x06, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x12, 0x0a, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x1a, 0x50, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x54, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x0c, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x65, 0x74, 0x61, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x03, 0x22, 0x25, 0x0a, 0x11, 0x46, 0x6c, 0x61, 0x76, 0x6f, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x58, + 0x0a, 0x12, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x28, + 0x0a, 0x07, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x52, + 0x07, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x73, 0x22, 0xec, 0x02, 0x0a, 0x07, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x46, 0x6c, + 0x61, 0x76, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 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, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x3c, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x65, + 0x64, 0x4f, 0x6e, 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, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x65, 0x64, + 0x4f, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x55, + 0x52, 0x4c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x52, 0x4c, 0x12, 0x18, 0x0a, + 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0x58, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x22, 0x42, 0x0a, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, + 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x4c, 0x69, 0x66, + 0x65, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, + 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, + 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x2c, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x55, 0x42, 0x54, + 0x52, 0x41, 0x43, 0x54, 0x10, 0x02, 0x22, 0xc0, 0x02, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, + 0x35, 0x0a, 0x08, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x4c, 0x69, + 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x4c, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x6f, 0x53, 0x6c, 0x61, 0x63, + 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x4e, 0x6f, 0x53, 0x6c, 0x61, 0x63, 0x6b, + 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x44, 0x4d, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x44, 0x4d, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x66, 0x0a, 0x08, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x55, + 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x52, 0x4c, 0x12, 0x12, 0x0a, + 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x4d, 0x6f, 0x64, + 0x65, 0x22, 0x42, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x09, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x7d, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x34, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 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, 0x07, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x52, + 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x37, 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, + 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x22, 0x32, + 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x22, 0x5b, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x4d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2a, + 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0e, + 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x32, 0x5c, 0x0a, 0x0e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, + 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x84, 0x02, 0x0a, 0x0b, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x57, 0x68, + 0x6f, 0x61, 0x6d, 0x69, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x68, 0x6f, 0x61, 0x6d, 0x69, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, + 0x31, 0x2f, 0x77, 0x68, 0x6f, 0x61, 0x6d, 0x69, 0x12, 0x59, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, + 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, + 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x32, 0xa9, 0x01, 0x0a, 0x0d, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x79, 0x49, 0x44, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, + 0x61, 0x76, 0x6f, 0x72, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, + 0x31, 0x2f, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xf1, 0x04, + 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x47, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x1a, 0x0f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, + 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x04, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x64, 0x0a, 0x08, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x69, 0x66, + 0x65, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x54, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, + 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x79, 0x49, 0x44, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x09, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x1a, 0x18, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, + 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x06, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x2a, 0x10, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x51, + 0x0a, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x1a, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, + 0x73, 0x32, 0x75, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x67, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6c, 0x69, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6c, 0x69, 0x2f, 0x7b, 0x6f, 0x73, 0x7d, 0x2f, 0x7b, 0x61, 0x72, 0x63, 0x68, 0x7d, 0x2f, 0x75, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x30, 0x01, 0x32, 0xfd, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x66, + 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x66, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, + 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x66, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0c, 0x2a, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a, + 0x09, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, + 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x1a, 0x0a, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x5a, 0x06, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_api_v1_service_proto_rawDescOnce sync.Once + file_proto_api_v1_service_proto_rawDescData = file_proto_api_v1_service_proto_rawDesc +) + +func file_proto_api_v1_service_proto_rawDescGZIP() []byte { + file_proto_api_v1_service_proto_rawDescOnce.Do(func() { + file_proto_api_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_api_v1_service_proto_rawDescData) + }) + return file_proto_api_v1_service_proto_rawDescData +} + +var file_proto_api_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_proto_api_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_proto_api_v1_service_proto_goTypes = []interface{}{ + (Status)(0), // 0: api.v1.Status + (FlavorAvailability)(0), // 1: api.v1.Flavor.availability + (LifespanRequest_Method)(0), // 2: api.v1.LifespanRequest.Method + (*ResourceByID)(nil), // 3: api.v1.ResourceByID + (*Version)(nil), // 4: api.v1.Version + (*WhoamiResponse)(nil), // 5: api.v1.WhoamiResponse + (*User)(nil), // 6: api.v1.User + (*ServiceAccount)(nil), // 7: api.v1.ServiceAccount + (*TokenResponse)(nil), // 8: api.v1.TokenResponse + (*Parameter)(nil), // 9: api.v1.Parameter + (*FlavorArtifact)(nil), // 10: api.v1.FlavorArtifact + (*Flavor)(nil), // 11: api.v1.Flavor + (*FlavorListRequest)(nil), // 12: api.v1.FlavorListRequest + (*FlavorListResponse)(nil), // 13: api.v1.FlavorListResponse + (*Cluster)(nil), // 14: api.v1.Cluster + (*ClusterListRequest)(nil), // 15: api.v1.ClusterListRequest + (*ClusterListResponse)(nil), // 16: api.v1.ClusterListResponse + (*LifespanRequest)(nil), // 17: api.v1.LifespanRequest + (*CreateClusterRequest)(nil), // 18: api.v1.CreateClusterRequest + (*Artifact)(nil), // 19: api.v1.Artifact + (*ClusterArtifacts)(nil), // 20: api.v1.ClusterArtifacts + (*Log)(nil), // 21: api.v1.Log + (*LogsResponse)(nil), // 22: api.v1.LogsResponse + (*CliUpgradeRequest)(nil), // 23: api.v1.CliUpgradeRequest + (*CliUpgradeResponse)(nil), // 24: api.v1.CliUpgradeResponse + (*InfraStatus)(nil), // 25: api.v1.InfraStatus + nil, // 26: api.v1.FlavorArtifact.TagsEntry + nil, // 27: api.v1.Flavor.ParametersEntry + nil, // 28: api.v1.Flavor.ArtifactsEntry + nil, // 29: api.v1.CreateClusterRequest.ParametersEntry + (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 31: google.protobuf.Duration + (*emptypb.Empty)(nil), // 32: google.protobuf.Empty +} +var file_proto_api_v1_service_proto_depIdxs = []int32{ + 30, // 0: api.v1.Version.BuildDate:type_name -> google.protobuf.Timestamp + 6, // 1: api.v1.WhoamiResponse.User:type_name -> api.v1.User + 7, // 2: api.v1.WhoamiResponse.ServiceAccount:type_name -> api.v1.ServiceAccount + 30, // 3: api.v1.User.Expiry:type_name -> google.protobuf.Timestamp + 7, // 4: api.v1.TokenResponse.Account:type_name -> api.v1.ServiceAccount + 26, // 5: api.v1.FlavorArtifact.Tags:type_name -> api.v1.FlavorArtifact.TagsEntry + 1, // 6: api.v1.Flavor.Availability:type_name -> api.v1.Flavor.availability + 27, // 7: api.v1.Flavor.Parameters:type_name -> api.v1.Flavor.ParametersEntry + 28, // 8: api.v1.Flavor.Artifacts:type_name -> api.v1.Flavor.ArtifactsEntry + 11, // 9: api.v1.FlavorListResponse.Flavors:type_name -> api.v1.Flavor + 0, // 10: api.v1.Cluster.Status:type_name -> api.v1.Status + 30, // 11: api.v1.Cluster.CreatedOn:type_name -> google.protobuf.Timestamp + 30, // 12: api.v1.Cluster.DestroyedOn:type_name -> google.protobuf.Timestamp + 31, // 13: api.v1.Cluster.Lifespan:type_name -> google.protobuf.Duration + 14, // 14: api.v1.ClusterListResponse.Clusters:type_name -> api.v1.Cluster + 31, // 15: api.v1.LifespanRequest.Lifespan:type_name -> google.protobuf.Duration + 2, // 16: api.v1.LifespanRequest.method:type_name -> api.v1.LifespanRequest.Method + 31, // 17: api.v1.CreateClusterRequest.Lifespan:type_name -> google.protobuf.Duration + 29, // 18: api.v1.CreateClusterRequest.Parameters:type_name -> api.v1.CreateClusterRequest.ParametersEntry + 19, // 19: api.v1.ClusterArtifacts.Artifacts:type_name -> api.v1.Artifact + 30, // 20: api.v1.Log.Started:type_name -> google.protobuf.Timestamp + 21, // 21: api.v1.LogsResponse.Logs:type_name -> api.v1.Log + 32, // 22: api.v1.FlavorArtifact.TagsEntry.value:type_name -> google.protobuf.Empty + 9, // 23: api.v1.Flavor.ParametersEntry.value:type_name -> api.v1.Parameter + 10, // 24: api.v1.Flavor.ArtifactsEntry.value:type_name -> api.v1.FlavorArtifact + 32, // 25: api.v1.VersionService.GetVersion:input_type -> google.protobuf.Empty + 32, // 26: api.v1.UserService.Whoami:input_type -> google.protobuf.Empty + 7, // 27: api.v1.UserService.CreateToken:input_type -> api.v1.ServiceAccount + 32, // 28: api.v1.UserService.Token:input_type -> google.protobuf.Empty + 12, // 29: api.v1.FlavorService.List:input_type -> api.v1.FlavorListRequest + 3, // 30: api.v1.FlavorService.Info:input_type -> api.v1.ResourceByID + 3, // 31: api.v1.ClusterService.Info:input_type -> api.v1.ResourceByID + 15, // 32: api.v1.ClusterService.List:input_type -> api.v1.ClusterListRequest + 17, // 33: api.v1.ClusterService.Lifespan:input_type -> api.v1.LifespanRequest + 18, // 34: api.v1.ClusterService.Create:input_type -> api.v1.CreateClusterRequest + 3, // 35: api.v1.ClusterService.Artifacts:input_type -> api.v1.ResourceByID + 3, // 36: api.v1.ClusterService.Delete:input_type -> api.v1.ResourceByID + 3, // 37: api.v1.ClusterService.Logs:input_type -> api.v1.ResourceByID + 23, // 38: api.v1.CliService.Upgrade:input_type -> api.v1.CliUpgradeRequest + 32, // 39: api.v1.InfraStatusService.GetStatus:input_type -> google.protobuf.Empty + 32, // 40: api.v1.InfraStatusService.ResetStatus:input_type -> google.protobuf.Empty + 25, // 41: api.v1.InfraStatusService.SetStatus:input_type -> api.v1.InfraStatus + 4, // 42: api.v1.VersionService.GetVersion:output_type -> api.v1.Version + 5, // 43: api.v1.UserService.Whoami:output_type -> api.v1.WhoamiResponse + 8, // 44: api.v1.UserService.CreateToken:output_type -> api.v1.TokenResponse + 8, // 45: api.v1.UserService.Token:output_type -> api.v1.TokenResponse + 13, // 46: api.v1.FlavorService.List:output_type -> api.v1.FlavorListResponse + 11, // 47: api.v1.FlavorService.Info:output_type -> api.v1.Flavor + 14, // 48: api.v1.ClusterService.Info:output_type -> api.v1.Cluster + 16, // 49: api.v1.ClusterService.List:output_type -> api.v1.ClusterListResponse + 31, // 50: api.v1.ClusterService.Lifespan:output_type -> google.protobuf.Duration + 3, // 51: api.v1.ClusterService.Create:output_type -> api.v1.ResourceByID + 20, // 52: api.v1.ClusterService.Artifacts:output_type -> api.v1.ClusterArtifacts + 32, // 53: api.v1.ClusterService.Delete:output_type -> google.protobuf.Empty + 22, // 54: api.v1.ClusterService.Logs:output_type -> api.v1.LogsResponse + 24, // 55: api.v1.CliService.Upgrade:output_type -> api.v1.CliUpgradeResponse + 25, // 56: api.v1.InfraStatusService.GetStatus:output_type -> api.v1.InfraStatus + 25, // 57: api.v1.InfraStatusService.ResetStatus:output_type -> api.v1.InfraStatus + 25, // 58: api.v1.InfraStatusService.SetStatus:output_type -> api.v1.InfraStatus + 42, // [42:59] is the sub-list for method output_type + 25, // [25:42] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name +} + +func init() { file_proto_api_v1_service_proto_init() } +func file_proto_api_v1_service_proto_init() { + if File_proto_api_v1_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_api_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceByID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WhoamiResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlavorArtifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Flavor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlavorListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlavorListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifespanRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Artifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterArtifacts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CliUpgradeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CliUpgradeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_api_v1_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InfraStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_proto_api_v1_service_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*WhoamiResponse_User)(nil), + (*WhoamiResponse_ServiceAccount)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_api_v1_service_proto_rawDesc, + NumEnums: 3, + NumMessages: 27, + NumExtensions: 0, + NumServices: 6, + }, + GoTypes: file_proto_api_v1_service_proto_goTypes, + DependencyIndexes: file_proto_api_v1_service_proto_depIdxs, + EnumInfos: file_proto_api_v1_service_proto_enumTypes, + MessageInfos: file_proto_api_v1_service_proto_msgTypes, + }.Build() + File_proto_api_v1_service_proto = out.File + file_proto_api_v1_service_proto_rawDesc = nil + file_proto_api_v1_service_proto_goTypes = nil + file_proto_api_v1_service_proto_depIdxs = nil +} diff --git a/generated/api/v1/service.pb.gw.go b/generated/proto/api/v1/service.pb.gw.go similarity index 85% rename from generated/api/v1/service.pb.gw.go rename to generated/proto/api/v1/service.pb.gw.go index 9f92bd7ee..17a5d5a4d 100644 --- a/generated/api/v1/service.pb.gw.go +++ b/generated/proto/api/v1/service.pb.gw.go @@ -1,26 +1,26 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: service.proto +// source: proto/api/v1/service.proto /* -Package v1 is a reverse proxy. +Package api_v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1 +package api_v1 import ( "context" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) @@ -30,7 +30,7 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage +var _ = metadata.Join func request_VersionService_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client VersionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty @@ -160,7 +160,10 @@ func local_request_FlavorService_List_0(ctx context.Context, marshaler runtime.M var protoReq FlavorListRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_FlavorService_List_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FlavorService_List_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -186,7 +189,6 @@ func request_FlavorService_Info_0(ctx context.Context, marshaler runtime.Marshal } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -213,7 +215,6 @@ func local_request_FlavorService_Info_0(ctx context.Context, marshaler runtime.M } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -240,7 +241,6 @@ func request_ClusterService_Info_0(ctx context.Context, marshaler runtime.Marsha } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -267,7 +267,6 @@ func local_request_ClusterService_Info_0(ctx context.Context, marshaler runtime. } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -301,7 +300,10 @@ func local_request_ClusterService_List_0(ctx context.Context, marshaler runtime. var protoReq ClusterListRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterService_List_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterService_List_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -335,7 +337,6 @@ func request_ClusterService_Lifespan_0(ctx context.Context, marshaler runtime.Ma } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -370,7 +371,6 @@ func local_request_ClusterService_Lifespan_0(ctx context.Context, marshaler runt } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -431,7 +431,6 @@ func request_ClusterService_Artifacts_0(ctx context.Context, marshaler runtime.M } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -458,7 +457,6 @@ func local_request_ClusterService_Artifacts_0(ctx context.Context, marshaler run } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -485,7 +483,6 @@ func request_ClusterService_Delete_0(ctx context.Context, marshaler runtime.Mars } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -512,7 +509,6 @@ func local_request_ClusterService_Delete_0(ctx context.Context, marshaler runtim } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -539,7 +535,6 @@ func request_ClusterService_Logs_0(ctx context.Context, marshaler runtime.Marsha } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -566,7 +561,6 @@ func local_request_ClusterService_Logs_0(ctx context.Context, marshaler runtime. } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -593,7 +587,6 @@ func request_CliService_Upgrade_0(ctx context.Context, marshaler runtime.Marshal } protoReq.Os, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "os", err) } @@ -604,7 +597,6 @@ func request_CliService_Upgrade_0(ctx context.Context, marshaler runtime.Marshal } protoReq.Arch, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "arch", err) } @@ -682,7 +674,10 @@ func local_request_InfraStatusService_SetStatus_0(ctx context.Context, marshaler var protoReq InfraStatus var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_InfraStatusService_SetStatus_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InfraStatusService_SetStatus_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -694,18 +689,22 @@ func local_request_InfraStatusService_SetStatus_0(ctx context.Context, marshaler // RegisterVersionServiceHandlerServer registers the http handlers for service VersionService to "mux". // UnaryRPC :call VersionServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVersionServiceHandlerFromEndpoint instead. func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error { mux.Handle("GET", pattern_VersionService_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.VersionService/GetVersion", runtime.WithHTTPPathPattern("/v1/version")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_VersionService_GetVersion_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -722,18 +721,22 @@ func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". // UnaryRPC :call UserServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { mux.Handle("GET", pattern_UserService_Whoami_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.UserService/Whoami", runtime.WithHTTPPathPattern("/v1/whoami")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_UserService_Whoami_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -747,13 +750,16 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_UserService_CreateToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.UserService/CreateToken", runtime.WithHTTPPathPattern("/v1/token-create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_UserService_CreateToken_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -767,13 +773,16 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_UserService_Token_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.UserService/Token", runtime.WithHTTPPathPattern("/v1/token")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_UserService_Token_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -790,18 +799,22 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterFlavorServiceHandlerServer registers the http handlers for service FlavorService to "mux". // UnaryRPC :call FlavorServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFlavorServiceHandlerFromEndpoint instead. func RegisterFlavorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FlavorServiceServer) error { mux.Handle("GET", pattern_FlavorService_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.FlavorService/List", runtime.WithHTTPPathPattern("/v1/flavor")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_FlavorService_List_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -815,13 +828,16 @@ func RegisterFlavorServiceHandlerServer(ctx context.Context, mux *runtime.ServeM mux.Handle("GET", pattern_FlavorService_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.FlavorService/Info", runtime.WithHTTPPathPattern("/v1/flavor/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_FlavorService_Info_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -838,18 +854,22 @@ func RegisterFlavorServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterClusterServiceHandlerServer registers the http handlers for service ClusterService to "mux". // UnaryRPC :call ClusterServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterServiceHandlerFromEndpoint instead. func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterServiceServer) error { mux.Handle("GET", pattern_ClusterService_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Info", runtime.WithHTTPPathPattern("/v1/cluster/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Info_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -863,13 +883,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("GET", pattern_ClusterService_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/List", runtime.WithHTTPPathPattern("/v1/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_List_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -883,13 +906,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("POST", pattern_ClusterService_Lifespan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Lifespan", runtime.WithHTTPPathPattern("/v1/cluster/{id}/lifespan")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Lifespan_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -903,13 +929,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("POST", pattern_ClusterService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Create", runtime.WithHTTPPathPattern("/v1/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Create_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -923,13 +952,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("GET", pattern_ClusterService_Artifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Artifacts", runtime.WithHTTPPathPattern("/v1/cluster/{id}/artifacts")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Artifacts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -943,13 +975,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("DELETE", pattern_ClusterService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Delete", runtime.WithHTTPPathPattern("/v1/cluster/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -963,13 +998,16 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve mux.Handle("GET", pattern_ClusterService_Logs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.ClusterService/Logs", runtime.WithHTTPPathPattern("/v1/cluster/{id}/logs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_ClusterService_Logs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -986,6 +1024,7 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterCliServiceHandlerServer registers the http handlers for service CliService to "mux". // UnaryRPC :call CliServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCliServiceHandlerFromEndpoint instead. func RegisterCliServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CliServiceServer) error { mux.Handle("GET", pattern_CliService_Upgrade_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1001,18 +1040,22 @@ func RegisterCliServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterInfraStatusServiceHandlerServer registers the http handlers for service InfraStatusService to "mux". // UnaryRPC :call InfraStatusServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInfraStatusServiceHandlerFromEndpoint instead. func RegisterInfraStatusServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfraStatusServiceServer) error { mux.Handle("GET", pattern_InfraStatusService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.InfraStatusService/GetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_InfraStatusService_GetStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1026,13 +1069,16 @@ func RegisterInfraStatusServiceHandlerServer(ctx context.Context, mux *runtime.S mux.Handle("DELETE", pattern_InfraStatusService_ResetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.InfraStatusService/ResetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_InfraStatusService_ResetStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1046,13 +1092,16 @@ func RegisterInfraStatusServiceHandlerServer(ctx context.Context, mux *runtime.S mux.Handle("PUT", pattern_InfraStatusService_SetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.v1.InfraStatusService/SetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } resp, md, err := local_request_InfraStatusService_SetStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1108,7 +1157,7 @@ func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.VersionService/GetVersion", runtime.WithHTTPPathPattern("/v1/version")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1128,7 +1177,7 @@ func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.Serve } var ( - pattern_VersionService_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "version"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_VersionService_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "version"}, "")) ) var ( @@ -1177,7 +1226,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.UserService/Whoami", runtime.WithHTTPPathPattern("/v1/whoami")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1197,7 +1246,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.UserService/CreateToken", runtime.WithHTTPPathPattern("/v1/token-create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1217,7 +1266,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.UserService/Token", runtime.WithHTTPPathPattern("/v1/token")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1237,11 +1286,11 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_UserService_Whoami_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "whoami"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_UserService_Whoami_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "whoami"}, "")) - pattern_UserService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "token-create"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_UserService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "token-create"}, "")) - pattern_UserService_Token_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "token"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_UserService_Token_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "token"}, "")) ) var ( @@ -1294,7 +1343,7 @@ func RegisterFlavorServiceHandlerClient(ctx context.Context, mux *runtime.ServeM ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.FlavorService/List", runtime.WithHTTPPathPattern("/v1/flavor")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1314,7 +1363,7 @@ func RegisterFlavorServiceHandlerClient(ctx context.Context, mux *runtime.ServeM ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.FlavorService/Info", runtime.WithHTTPPathPattern("/v1/flavor/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1334,9 +1383,9 @@ func RegisterFlavorServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } var ( - pattern_FlavorService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "flavor"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_FlavorService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "flavor"}, "")) - pattern_FlavorService_Info_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "flavor", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_FlavorService_Info_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "flavor", "id"}, "")) ) var ( @@ -1387,7 +1436,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Info", runtime.WithHTTPPathPattern("/v1/cluster/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1407,7 +1456,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/List", runtime.WithHTTPPathPattern("/v1/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1427,7 +1476,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Lifespan", runtime.WithHTTPPathPattern("/v1/cluster/{id}/lifespan")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1447,7 +1496,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Create", runtime.WithHTTPPathPattern("/v1/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1467,7 +1516,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Artifacts", runtime.WithHTTPPathPattern("/v1/cluster/{id}/artifacts")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1487,7 +1536,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Delete", runtime.WithHTTPPathPattern("/v1/cluster/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1507,7 +1556,7 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.ClusterService/Logs", runtime.WithHTTPPathPattern("/v1/cluster/{id}/logs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1527,19 +1576,19 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve } var ( - pattern_ClusterService_Info_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "cluster", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Info_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "cluster", "id"}, "")) - pattern_ClusterService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cluster"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cluster"}, "")) - pattern_ClusterService_Lifespan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "lifespan"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Lifespan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "lifespan"}, "")) - pattern_ClusterService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cluster"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cluster"}, "")) - pattern_ClusterService_Artifacts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "artifacts"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Artifacts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "artifacts"}, "")) - pattern_ClusterService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "cluster", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "cluster", "id"}, "")) - pattern_ClusterService_Logs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "logs"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterService_Logs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "cluster", "id", "logs"}, "")) ) var ( @@ -1600,7 +1649,7 @@ func RegisterCliServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.CliService/Upgrade", runtime.WithHTTPPathPattern("/v1/cli/{os}/{arch}/upgrade")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1620,7 +1669,7 @@ func RegisterCliServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_CliService_Upgrade_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "cli", "os", "arch", "upgrade"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_CliService_Upgrade_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "cli", "os", "arch", "upgrade"}, "")) ) var ( @@ -1669,7 +1718,7 @@ func RegisterInfraStatusServiceHandlerClient(ctx context.Context, mux *runtime.S ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.InfraStatusService/GetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1689,7 +1738,7 @@ func RegisterInfraStatusServiceHandlerClient(ctx context.Context, mux *runtime.S ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.InfraStatusService/ResetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1709,7 +1758,7 @@ func RegisterInfraStatusServiceHandlerClient(ctx context.Context, mux *runtime.S ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.v1.InfraStatusService/SetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1729,11 +1778,11 @@ func RegisterInfraStatusServiceHandlerClient(ctx context.Context, mux *runtime.S } var ( - pattern_InfraStatusService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraStatusService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "")) - pattern_InfraStatusService_ResetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraStatusService_ResetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "")) - pattern_InfraStatusService_SetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraStatusService_SetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "")) ) var ( diff --git a/generated/api/v1/service.swagger.json b/generated/proto/api/v1/service.swagger.json similarity index 80% rename from generated/api/v1/service.swagger.json rename to generated/proto/api/v1/service.swagger.json index e3f68bed3..fe27da174 100644 --- a/generated/api/v1/service.swagger.json +++ b/generated/proto/api/v1/service.swagger.json @@ -1,9 +1,29 @@ { "swagger": "2.0", "info": { - "title": "service.proto", + "title": "proto/api/v1/service.proto", "version": "version not set" }, + "tags": [ + { + "name": "VersionService" + }, + { + "name": "UserService" + }, + { + "name": "FlavorService" + }, + { + "name": "ClusterService" + }, + { + "name": "CliService" + }, + { + "name": "InfraStatusService" + } + ], "consumes": [ "application/json" ], @@ -13,12 +33,28 @@ "paths": { "/v1/cli/{os}/{arch}/upgrade": { "get": { - "operationId": "Upgrade", + "summary": "Upgrade - gets an updated binary if it exists.", + "operationId": "CliService_Upgrade", "responses": { "200": { "description": "A successful response.(streaming responses)", "schema": { - "$ref": "#/x-stream-definitions/v1CliUpgradeResponse" + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1CliUpgradeResponse" + }, + "error": { + "$ref": "#/definitions/googlerpcStatus" + } + }, + "title": "Stream result of v1CliUpgradeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -43,14 +79,20 @@ }, "/v1/cluster": { "get": { - "summary": "CreateToken generates an arbitrary service account token", - "operationId": "List", + "summary": "List provides information about the available clusters.", + "operationId": "ClusterService_List", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ClusterListResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -59,16 +101,14 @@ "description": "all indicates that all clusters should be returned, not just the ones\nowned by the user.", "in": "query", "required": false, - "type": "boolean", - "format": "boolean" + "type": "boolean" }, { "name": "expired", "description": "expired indicates that expired clusters should be returned, not just the\nones that are launching/ready.", "in": "query", "required": false, - "type": "boolean", - "format": "boolean" + "type": "boolean" }, { "name": "prefix", @@ -84,13 +124,19 @@ }, "post": { "summary": "Create launches a new cluster.", - "operationId": "Create", + "operationId": "ClusterService_Create", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ResourceByID" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -110,13 +156,20 @@ }, "/v1/cluster/{id}": { "get": { - "operationId": "Info", + "summary": "Info provides information about a specific cluster.", + "operationId": "ClusterService_Info", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Cluster" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -133,13 +186,19 @@ }, "delete": { "summary": "Delete deletes an existing cluster.", - "operationId": "Delete", + "operationId": "ClusterService_Delete", "responses": { "200": { "description": "A successful response.", "schema": { "properties": {} } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -158,13 +217,19 @@ "/v1/cluster/{id}/artifacts": { "get": { "summary": "Artifacts returns the artifacts for a specific cluster.", - "operationId": "Artifacts", + "operationId": "ClusterService_Artifacts", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ClusterArtifacts" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -182,14 +247,20 @@ }, "/v1/cluster/{id}/lifespan": { "post": { - "summary": "Token generates a service account token for the current user.", - "operationId": "Lifespan", + "summary": "Lifespan updates the lifespan for a specific cluster.", + "operationId": "ClusterService_Lifespan", "responses": { "200": { "description": "A successful response.", "schema": { "type": "string" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -205,7 +276,16 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1LifespanRequest" + "type": "object", + "properties": { + "Lifespan": { + "type": "string", + "description": "Lifespan is the new lifespan." + }, + "method": { + "$ref": "#/definitions/LifespanRequestMethod" + } + } } } ], @@ -217,13 +297,19 @@ "/v1/cluster/{id}/logs": { "get": { "summary": "Logs returns the logs for a specific cluster.", - "operationId": "Logs", + "operationId": "ClusterService_Logs", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1LogsResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -241,13 +327,20 @@ }, "/v1/flavor": { "get": { - "operationId": "List", + "summary": "List provides information about the available flavors.", + "operationId": "FlavorService_List", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1FlavorListResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -256,8 +349,7 @@ "description": "all indicates that all flavors should be returned, by default\navailability alpha clusters are excluded.", "in": "query", "required": false, - "type": "boolean", - "format": "boolean" + "type": "boolean" } ], "tags": [ @@ -267,14 +359,20 @@ }, "/v1/flavor/{id}": { "get": { - "summary": "CreateToken generates an arbitrary service account token", - "operationId": "Info", + "summary": "Info provides information about a specific flavor.", + "operationId": "FlavorService_Info", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Flavor" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -292,13 +390,20 @@ }, "/v1/status": { "get": { - "operationId": "GetStatus", + "summary": "GetStatus gets the maintenance", + "operationId": "InfraStatusService_GetStatus", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1InfraStatus" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "tags": [ @@ -306,14 +411,20 @@ ] }, "delete": { - "summary": "CreateToken generates an arbitrary service account token", - "operationId": "ResetStatus", + "summary": "ResetStatus resets the maintenance", + "operationId": "InfraStatusService_ResetStatus", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1InfraStatus" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "tags": [ @@ -321,14 +432,20 @@ ] }, "put": { - "summary": "Token generates a service account token for the current user.", - "operationId": "SetStatus", + "summary": "SetStatus sets the maintenance", + "operationId": "InfraStatusService_SetStatus", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1InfraStatus" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "tags": [ @@ -339,13 +456,19 @@ "/v1/token": { "post": { "summary": "Token generates a service account token for the current user.", - "operationId": "Token", + "operationId": "UserService_Token", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1TokenResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -366,13 +489,19 @@ "/v1/token-create": { "post": { "summary": "CreateToken generates an arbitrary service account token", - "operationId": "CreateToken", + "operationId": "UserService_CreateToken", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1TokenResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -392,13 +521,19 @@ }, "/v1/version": { "get": { - "operationId": "GetVersion", + "operationId": "VersionService_GetVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Version" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "tags": [ @@ -408,13 +543,20 @@ }, "/v1/whoami": { "get": { - "operationId": "Whoami", + "summary": "Whoami provides information about the currently authenticated principal.", + "operationId": "UserService_Whoami", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1WhoamiResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "tags": [ @@ -445,35 +587,28 @@ "default": "REPLACE", "description": "method represents the various lifespan operations.\n\n - REPLACE: REPLACE indicates that the given lifespan should replace the current\nlifespan.\n - ADD: ADD indicates that the given lifespan should be added to the current\nlifespan.\n - SUBTRACT: SUBTRACT indicates that the given lifespan should be subtracted from\nthe current lifespan." }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } + "apiv1Status": { + "type": "string", + "enum": [ + "FAILED", + "CREATING", + "READY", + "DESTROYING", + "FINISHED" + ], + "default": "FAILED", + "description": "Status represents the various cluster states.\n\n - FAILED: FAILED is the state when the cluster has failed in one way or another.\n - CREATING: CREATING is the state when the cluster is being created.\n - READY: READY is the state when the cluster is available and ready for use.\n - DESTROYING: DESTROYING is the state when the cluster is being destroyed.\n - FINISHED: FINISHED is the state when the cluster has been successfully destroyed." }, - "runtimeStreamError": { + "googlerpcStatus": { "type": "object", "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { + "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, - "http_status": { - "type": "string" - }, "details": { "type": "array", "items": { @@ -482,6 +617,15 @@ } } }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, "v1Artifact": { "type": "object", "properties": { @@ -517,7 +661,7 @@ "description": "ID is the unique ID for the cluster." }, "Status": { - "$ref": "#/definitions/v1Status", + "$ref": "#/definitions/apiv1Status", "description": "Status is the current status for the cluster." }, "Flavor": { @@ -605,12 +749,10 @@ }, "NoSlack": { "type": "boolean", - "format": "boolean", "description": "NoSlack is used to skip sending Slack messages for cluster lifecycle\nevents." }, "SlackDM": { "type": "boolean", - "format": "boolean", "description": "SlackDM is used to choose direct messages for cluster lifecycle\nevents." } }, @@ -695,7 +837,6 @@ "properties": { "MaintenanceActive": { "type": "boolean", - "format": "boolean", "description": "MaintenanceActive is an indicator whether a maintenance is ongoing." }, "Maintainer": { @@ -704,22 +845,6 @@ } } }, - "v1LifespanRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID is the unique ID for the cluster." - }, - "Lifespan": { - "type": "string", - "description": "Lifespan is the new lifespan." - }, - "method": { - "$ref": "#/definitions/LifespanRequestMethod" - } - } - }, "v1Log": { "type": "object", "properties": { @@ -774,12 +899,10 @@ }, "Optional": { "type": "boolean", - "format": "boolean", "description": "Optional indicates that this parameter can be optionally provided by a\nuser. If the user does not provide a value, then Value serves as a\ndefault." }, "Internal": { "type": "boolean", - "format": "boolean", "description": "Internal indicates that this parameter should not be provided by a user,\nbut rather treats Value as a hardcoded constant." }, "Order": { @@ -792,7 +915,6 @@ }, "FromFile": { "type": "boolean", - "format": "boolean", "description": "Indicates that the value for this parameter can be provided from the\ncontents of a file." } }, @@ -840,18 +962,6 @@ }, "description": "ServiceAccount represents an authenticated service account (robot) principal." }, - "v1Status": { - "type": "string", - "enum": [ - "FAILED", - "CREATING", - "READY", - "DESTROYING", - "FINISHED" - ], - "default": "FAILED", - "description": "Status represents the various cluster states.\n\n - FAILED: FAILED is the state when the cluster has failed in one way or another.\n - CREATING: CREATING is the state when the cluster is being created.\n - READY: READY is the state when the cluster is available and ready for use.\n - DESTROYING: DESTROYING is the state when the cluster is being destroyed.\n - FINISHED: FINISHED is the state when the cluster has been successfully destroyed." - }, "v1TokenResponse": { "type": "object", "properties": { @@ -926,19 +1036,5 @@ }, "description": "WhoamiResponse represents details about the current authenticated principal." } - }, - "x-stream-definitions": { - "v1CliUpgradeResponse": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/v1CliUpgradeResponse" - }, - "error": { - "$ref": "#/definitions/runtimeStreamError" - } - }, - "title": "Stream result of v1CliUpgradeResponse" - } } } diff --git a/generated/proto/api/v1/service_grpc.pb.go b/generated/proto/api/v1/service_grpc.pb.go new file mode 100644 index 000000000..6c50b1004 --- /dev/null +++ b/generated/proto/api/v1/service_grpc.pb.go @@ -0,0 +1,976 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package api_v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// VersionServiceClient is the client API for VersionService 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 VersionServiceClient interface { + GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error) +} + +type versionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient { + return &versionServiceClient{cc} +} + +func (c *versionServiceClient) GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error) { + out := new(Version) + err := c.cc.Invoke(ctx, "/api.v1.VersionService/GetVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VersionServiceServer is the server API for VersionService service. +// All implementations should embed UnimplementedVersionServiceServer +// for forward compatibility +type VersionServiceServer interface { + GetVersion(context.Context, *emptypb.Empty) (*Version, error) +} + +// UnimplementedVersionServiceServer should be embedded to have forward compatible implementations. +type UnimplementedVersionServiceServer struct { +} + +func (UnimplementedVersionServiceServer) GetVersion(context.Context, *emptypb.Empty) (*Version, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") +} + +// UnsafeVersionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VersionServiceServer will +// result in compilation errors. +type UnsafeVersionServiceServer interface { + mustEmbedUnimplementedVersionServiceServer() +} + +func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer) { + s.RegisterService(&VersionService_ServiceDesc, srv) +} + +func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VersionServiceServer).GetVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.VersionService/GetVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VersionServiceServer).GetVersion(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// VersionService_ServiceDesc is the grpc.ServiceDesc for VersionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VersionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.VersionService", + HandlerType: (*VersionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetVersion", + Handler: _VersionService_GetVersion_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/api/v1/service.proto", +} + +// 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 { + // Whoami provides information about the currently authenticated principal. + Whoami(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*WhoamiResponse, error) + // CreateToken generates an arbitrary service account token + CreateToken(ctx context.Context, in *ServiceAccount, opts ...grpc.CallOption) (*TokenResponse, error) + // Token generates a service account token for the current user. + Token(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenResponse, error) +} + +type userServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { + return &userServiceClient{cc} +} + +func (c *userServiceClient) Whoami(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*WhoamiResponse, error) { + out := new(WhoamiResponse) + err := c.cc.Invoke(ctx, "/api.v1.UserService/Whoami", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) CreateToken(ctx context.Context, in *ServiceAccount, opts ...grpc.CallOption) (*TokenResponse, error) { + out := new(TokenResponse) + err := c.cc.Invoke(ctx, "/api.v1.UserService/CreateToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) Token(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenResponse, error) { + out := new(TokenResponse) + err := c.cc.Invoke(ctx, "/api.v1.UserService/Token", in, out, opts...) + 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 { + // Whoami provides information about the currently authenticated principal. + Whoami(context.Context, *emptypb.Empty) (*WhoamiResponse, error) + // CreateToken generates an arbitrary service account token + CreateToken(context.Context, *ServiceAccount) (*TokenResponse, error) + // Token generates a service account token for the current user. + Token(context.Context, *emptypb.Empty) (*TokenResponse, error) +} + +// UnimplementedUserServiceServer should be embedded to have forward compatible implementations. +type UnimplementedUserServiceServer struct { +} + +func (UnimplementedUserServiceServer) Whoami(context.Context, *emptypb.Empty) (*WhoamiResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Whoami not implemented") +} +func (UnimplementedUserServiceServer) CreateToken(context.Context, *ServiceAccount) (*TokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented") +} +func (UnimplementedUserServiceServer) Token(context.Context, *emptypb.Empty) (*TokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Token not implemented") +} + +// 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) { + s.RegisterService(&UserService_ServiceDesc, srv) +} + +func _UserService_Whoami_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).Whoami(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.UserService/Whoami", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).Whoami(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServiceAccount) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).CreateToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.UserService/CreateToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).CreateToken(ctx, req.(*ServiceAccount)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_Token_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).Token(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.UserService/Token", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).Token(ctx, req.(*emptypb.Empty)) + } + 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: "api.v1.UserService", + HandlerType: (*UserServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Whoami", + Handler: _UserService_Whoami_Handler, + }, + { + MethodName: "CreateToken", + Handler: _UserService_CreateToken_Handler, + }, + { + MethodName: "Token", + Handler: _UserService_Token_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/api/v1/service.proto", +} + +// FlavorServiceClient is the client API for FlavorService 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 FlavorServiceClient interface { + // List provides information about the available flavors. + List(ctx context.Context, in *FlavorListRequest, opts ...grpc.CallOption) (*FlavorListResponse, error) + // Info provides information about a specific flavor. + Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Flavor, error) +} + +type flavorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFlavorServiceClient(cc grpc.ClientConnInterface) FlavorServiceClient { + return &flavorServiceClient{cc} +} + +func (c *flavorServiceClient) List(ctx context.Context, in *FlavorListRequest, opts ...grpc.CallOption) (*FlavorListResponse, error) { + out := new(FlavorListResponse) + err := c.cc.Invoke(ctx, "/api.v1.FlavorService/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flavorServiceClient) Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Flavor, error) { + out := new(Flavor) + err := c.cc.Invoke(ctx, "/api.v1.FlavorService/Info", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FlavorServiceServer is the server API for FlavorService service. +// All implementations should embed UnimplementedFlavorServiceServer +// for forward compatibility +type FlavorServiceServer interface { + // List provides information about the available flavors. + List(context.Context, *FlavorListRequest) (*FlavorListResponse, error) + // Info provides information about a specific flavor. + Info(context.Context, *ResourceByID) (*Flavor, error) +} + +// UnimplementedFlavorServiceServer should be embedded to have forward compatible implementations. +type UnimplementedFlavorServiceServer struct { +} + +func (UnimplementedFlavorServiceServer) List(context.Context, *FlavorListRequest) (*FlavorListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedFlavorServiceServer) Info(context.Context, *ResourceByID) (*Flavor, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} + +// UnsafeFlavorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FlavorServiceServer will +// result in compilation errors. +type UnsafeFlavorServiceServer interface { + mustEmbedUnimplementedFlavorServiceServer() +} + +func RegisterFlavorServiceServer(s grpc.ServiceRegistrar, srv FlavorServiceServer) { + s.RegisterService(&FlavorService_ServiceDesc, srv) +} + +func _FlavorService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FlavorListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlavorServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.FlavorService/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlavorServiceServer).List(ctx, req.(*FlavorListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FlavorService_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceByID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlavorServiceServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.FlavorService/Info", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlavorServiceServer).Info(ctx, req.(*ResourceByID)) + } + return interceptor(ctx, in, info, handler) +} + +// FlavorService_ServiceDesc is the grpc.ServiceDesc for FlavorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FlavorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.FlavorService", + HandlerType: (*FlavorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _FlavorService_List_Handler, + }, + { + MethodName: "Info", + Handler: _FlavorService_Info_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/api/v1/service.proto", +} + +// ClusterServiceClient is the client API for ClusterService 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 ClusterServiceClient interface { + // Info provides information about a specific cluster. + Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Cluster, error) + // List provides information about the available clusters. + List(ctx context.Context, in *ClusterListRequest, opts ...grpc.CallOption) (*ClusterListResponse, error) + // Lifespan updates the lifespan for a specific cluster. + Lifespan(ctx context.Context, in *LifespanRequest, opts ...grpc.CallOption) (*durationpb.Duration, error) + // Create launches a new cluster. + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*ResourceByID, error) + // Artifacts returns the artifacts for a specific cluster. + Artifacts(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*ClusterArtifacts, error) + // Delete deletes an existing cluster. + Delete(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Logs returns the logs for a specific cluster. + Logs(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*LogsResponse, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Info(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Info", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ClusterListRequest, opts ...grpc.CallOption) (*ClusterListResponse, error) { + out := new(ClusterListResponse) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Lifespan(ctx context.Context, in *LifespanRequest, opts ...grpc.CallOption) (*durationpb.Duration, error) { + out := new(durationpb.Duration) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Lifespan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*ResourceByID, error) { + out := new(ResourceByID) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Artifacts(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*ClusterArtifacts, error) { + out := new(ClusterArtifacts) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Artifacts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Logs(ctx context.Context, in *ResourceByID, opts ...grpc.CallOption) (*LogsResponse, error) { + out := new(LogsResponse) + err := c.cc.Invoke(ctx, "/api.v1.ClusterService/Logs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + // Info provides information about a specific cluster. + Info(context.Context, *ResourceByID) (*Cluster, error) + // List provides information about the available clusters. + List(context.Context, *ClusterListRequest) (*ClusterListResponse, error) + // Lifespan updates the lifespan for a specific cluster. + Lifespan(context.Context, *LifespanRequest) (*durationpb.Duration, error) + // Create launches a new cluster. + Create(context.Context, *CreateClusterRequest) (*ResourceByID, error) + // Artifacts returns the artifacts for a specific cluster. + Artifacts(context.Context, *ResourceByID) (*ClusterArtifacts, error) + // Delete deletes an existing cluster. + Delete(context.Context, *ResourceByID) (*emptypb.Empty, error) + // Logs returns the logs for a specific cluster. + Logs(context.Context, *ResourceByID) (*LogsResponse, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Info(context.Context, *ResourceByID) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ClusterListRequest) (*ClusterListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Lifespan(context.Context, *LifespanRequest) (*durationpb.Duration, error) { + return nil, status.Errorf(codes.Unimplemented, "method Lifespan not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*ResourceByID, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Artifacts(context.Context, *ResourceByID) (*ClusterArtifacts, error) { + return nil, status.Errorf(codes.Unimplemented, "method Artifacts not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *ResourceByID) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedClusterServiceServer) Logs(context.Context, *ResourceByID) (*LogsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Logs not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceByID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Info", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Info(ctx, req.(*ResourceByID)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ClusterListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Lifespan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LifespanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Lifespan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Lifespan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Lifespan(ctx, req.(*LifespanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Artifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceByID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Artifacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Artifacts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Artifacts(ctx, req.(*ResourceByID)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceByID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*ResourceByID)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Logs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceByID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Logs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.ClusterService/Logs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Logs(ctx, req.(*ResourceByID)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Info", + Handler: _ClusterService_Info_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Lifespan", + Handler: _ClusterService_Lifespan_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Artifacts", + Handler: _ClusterService_Artifacts_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + { + MethodName: "Logs", + Handler: _ClusterService_Logs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/api/v1/service.proto", +} + +// CliServiceClient is the client API for CliService 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 CliServiceClient interface { + // Upgrade - gets an updated binary if it exists. + Upgrade(ctx context.Context, in *CliUpgradeRequest, opts ...grpc.CallOption) (CliService_UpgradeClient, error) +} + +type cliServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCliServiceClient(cc grpc.ClientConnInterface) CliServiceClient { + return &cliServiceClient{cc} +} + +func (c *cliServiceClient) Upgrade(ctx context.Context, in *CliUpgradeRequest, opts ...grpc.CallOption) (CliService_UpgradeClient, error) { + stream, err := c.cc.NewStream(ctx, &CliService_ServiceDesc.Streams[0], "/api.v1.CliService/Upgrade", opts...) + if err != nil { + return nil, err + } + x := &cliServiceUpgradeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type CliService_UpgradeClient interface { + Recv() (*CliUpgradeResponse, error) + grpc.ClientStream +} + +type cliServiceUpgradeClient struct { + grpc.ClientStream +} + +func (x *cliServiceUpgradeClient) Recv() (*CliUpgradeResponse, error) { + m := new(CliUpgradeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// CliServiceServer is the server API for CliService service. +// All implementations should embed UnimplementedCliServiceServer +// for forward compatibility +type CliServiceServer interface { + // Upgrade - gets an updated binary if it exists. + Upgrade(*CliUpgradeRequest, CliService_UpgradeServer) error +} + +// UnimplementedCliServiceServer should be embedded to have forward compatible implementations. +type UnimplementedCliServiceServer struct { +} + +func (UnimplementedCliServiceServer) Upgrade(*CliUpgradeRequest, CliService_UpgradeServer) error { + return status.Errorf(codes.Unimplemented, "method Upgrade not implemented") +} + +// UnsafeCliServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CliServiceServer will +// result in compilation errors. +type UnsafeCliServiceServer interface { + mustEmbedUnimplementedCliServiceServer() +} + +func RegisterCliServiceServer(s grpc.ServiceRegistrar, srv CliServiceServer) { + s.RegisterService(&CliService_ServiceDesc, srv) +} + +func _CliService_Upgrade_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(CliUpgradeRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(CliServiceServer).Upgrade(m, &cliServiceUpgradeServer{stream}) +} + +type CliService_UpgradeServer interface { + Send(*CliUpgradeResponse) error + grpc.ServerStream +} + +type cliServiceUpgradeServer struct { + grpc.ServerStream +} + +func (x *cliServiceUpgradeServer) Send(m *CliUpgradeResponse) error { + return x.ServerStream.SendMsg(m) +} + +// CliService_ServiceDesc is the grpc.ServiceDesc for CliService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CliService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.CliService", + HandlerType: (*CliServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Upgrade", + Handler: _CliService_Upgrade_Handler, + ServerStreams: true, + }, + }, + Metadata: "proto/api/v1/service.proto", +} + +// InfraStatusServiceClient is the client API for InfraStatusService 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 InfraStatusServiceClient interface { + // GetStatus gets the maintenance + GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) + // ResetStatus resets the maintenance + ResetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) + // SetStatus sets the maintenance + SetStatus(ctx context.Context, in *InfraStatus, opts ...grpc.CallOption) (*InfraStatus, error) +} + +type infraStatusServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInfraStatusServiceClient(cc grpc.ClientConnInterface) InfraStatusServiceClient { + return &infraStatusServiceClient{cc} +} + +func (c *infraStatusServiceClient) GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) { + out := new(InfraStatus) + err := c.cc.Invoke(ctx, "/api.v1.InfraStatusService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraStatusServiceClient) ResetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfraStatus, error) { + out := new(InfraStatus) + err := c.cc.Invoke(ctx, "/api.v1.InfraStatusService/ResetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraStatusServiceClient) SetStatus(ctx context.Context, in *InfraStatus, opts ...grpc.CallOption) (*InfraStatus, error) { + out := new(InfraStatus) + err := c.cc.Invoke(ctx, "/api.v1.InfraStatusService/SetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InfraStatusServiceServer is the server API for InfraStatusService service. +// All implementations should embed UnimplementedInfraStatusServiceServer +// for forward compatibility +type InfraStatusServiceServer interface { + // GetStatus gets the maintenance + GetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) + // ResetStatus resets the maintenance + ResetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) + // SetStatus sets the maintenance + SetStatus(context.Context, *InfraStatus) (*InfraStatus, error) +} + +// UnimplementedInfraStatusServiceServer should be embedded to have forward compatible implementations. +type UnimplementedInfraStatusServiceServer struct { +} + +func (UnimplementedInfraStatusServiceServer) GetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} +func (UnimplementedInfraStatusServiceServer) ResetStatus(context.Context, *emptypb.Empty) (*InfraStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetStatus not implemented") +} +func (UnimplementedInfraStatusServiceServer) SetStatus(context.Context, *InfraStatus) (*InfraStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetStatus not implemented") +} + +// UnsafeInfraStatusServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InfraStatusServiceServer will +// result in compilation errors. +type UnsafeInfraStatusServiceServer interface { + mustEmbedUnimplementedInfraStatusServiceServer() +} + +func RegisterInfraStatusServiceServer(s grpc.ServiceRegistrar, srv InfraStatusServiceServer) { + s.RegisterService(&InfraStatusService_ServiceDesc, srv) +} + +func _InfraStatusService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraStatusServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.InfraStatusService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraStatusServiceServer).GetStatus(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfraStatusService_ResetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraStatusServiceServer).ResetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.InfraStatusService/ResetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraStatusServiceServer).ResetStatus(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfraStatusService_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InfraStatus) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraStatusServiceServer).SetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.InfraStatusService/SetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraStatusServiceServer).SetStatus(ctx, req.(*InfraStatus)) + } + return interceptor(ctx, in, info, handler) +} + +// InfraStatusService_ServiceDesc is the grpc.ServiceDesc for InfraStatusService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InfraStatusService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.InfraStatusService", + HandlerType: (*InfraStatusServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetStatus", + Handler: _InfraStatusService_GetStatus_Handler, + }, + { + MethodName: "ResetStatus", + Handler: _InfraStatusService_ResetStatus_Handler, + }, + { + MethodName: "SetStatus", + Handler: _InfraStatusService_SetStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/api/v1/service.proto", +} diff --git a/go.mod b/go.mod index ef9fb4549..f08f8c30e 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/jeremywohl/flatten/v2 v2.0.0-20211013061545-07e4a09fb8e4 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.13.0 @@ -21,11 +20,11 @@ require ( github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 - golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 - google.golang.org/api v0.103.0 - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c - google.golang.org/grpc v1.50.1 + golang.org/x/net v0.7.0 + golang.org/x/oauth2 v0.5.0 + google.golang.org/api v0.110.0 + google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 + google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 gopkg.in/square/go-jose.v2 v2.6.0 k8s.io/api v0.26.1 @@ -33,11 +32,13 @@ require ( k8s.io/client-go v0.26.1 ) +require github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + require ( - cloud.google.com/go v0.105.0 // indirect - cloud.google.com/go/compute v1.12.1 // indirect - cloud.google.com/go/compute/metadata v0.2.1 // indirect - cloud.google.com/go/iam v0.6.0 // indirect + cloud.google.com/go v0.107.0 // indirect + cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v0.11.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.2 // indirect @@ -45,7 +46,7 @@ require ( github.com/argoproj/argo-events v1.7.3 // indirect github.com/argoproj/pkg v0.13.6 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/colinmarc/hdfs v1.1.4-0.20180805212432-9746310a4d31 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/doublerebel/bellows v0.0.0-20160303004610-f177d92a03d3 // indirect @@ -63,9 +64,10 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.13 // indirect @@ -99,9 +101,9 @@ require ( go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect golang.org/x/exp v0.0.0-20220602145555-4a0574d9293f // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 1f4af5290..52d7276a1 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Ud cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -42,16 +42,16 @@ cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6m cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= +cloud.google.com/go/iam v0.11.0 h1:kwCWfKwB6ePZoZnGLwrd3B6Ru/agoHANTUBWpVNIdnM= +cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= +cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -110,8 +110,9 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -211,6 +212,7 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -297,8 +299,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -322,6 +324,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2/go.mod h1:7pdNwVWBBHGiCxa9lAszqCJMbfTISJ7oMftp8+UGV08= github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -645,8 +649,8 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -668,8 +672,8 @@ golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -757,13 +761,13 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -774,8 +778,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -885,8 +889,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -975,8 +979,8 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 h1:znp6mq/drrY+6khTAlJUDNFFcDGV2ENLYKpMq8SyCds= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1008,8 +1012,8 @@ google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11 google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/pkg/buildinfo/buildinfo.go b/pkg/buildinfo/buildinfo.go index f38cabe30..1b45e1117 100644 --- a/pkg/buildinfo/buildinfo.go +++ b/pkg/buildinfo/buildinfo.go @@ -6,7 +6,7 @@ import ( "runtime" "github.com/golang/protobuf/ptypes" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/buildinfo/internal" ) diff --git a/proto/api/v1/service.proto b/proto/api/v1/service.proto index 2ab3ba02d..3eccd9fe9 100644 --- a/proto/api/v1/service.proto +++ b/proto/api/v1/service.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -option go_package = "v1"; +option go_package = "api.v1"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -package v1; +package api.v1; // ResourceByID represents a generic reference to a named/unique resource. message ResourceByID { diff --git a/proto/third_party/google/api/annotations.proto b/proto/third_party/google/api/annotations.proto deleted file mode 100644 index 85c361b47..000000000 --- a/proto/third_party/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/proto/third_party/google/api/http.proto b/proto/third_party/google/api/http.proto deleted file mode 100644 index 69460cf79..000000000 --- a/proto/third_party/google/api/http.proto +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/proto/third_party/google/protobuf/descriptor.proto b/proto/third_party/google/protobuf/descriptor.proto deleted file mode 100644 index 9f0ce6cde..000000000 --- a/proto/third_party/google/protobuf/descriptor.proto +++ /dev/null @@ -1,909 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - -syntax = "proto2"; - -package google.protobuf; - -option go_package = "google.golang.org/protobuf/types/descriptorpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - - optional ExtensionRangeOptions options = 3; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -message ExtensionRangeOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - } - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - } - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - - optional FieldOptions options = 8; - - // If true, this is a proto3 "optional". When a proto3 field is optional, it - // tracks presence regardless of field type. - // - // When proto3_optional is true, this field must be belong to a oneof to - // signal to old proto3 clients that presence is tracked for this field. This - // oneof is known as a "synthetic" oneof, and this field must be its sole - // member (each proto3 optional field gets its own synthetic oneof). Synthetic - // oneofs exist in the descriptor only, and do not generate any API. Synthetic - // oneofs must be ordered after all "real" oneofs. - // - // For message fields, proto3_optional doesn't create any semantic change, - // since non-repeated message fields always track presence. However it still - // indicates the semantic detail of whether the user wrote "optional" or not. - // This can be useful for round-tripping the .proto file. For consistency we - // give message fields a synthetic oneof also, even though it is not required - // to track presence. This is especially important because the parser can't - // tell if a field is a message or an enum, so it must always create a - // synthetic oneof. - // - // Proto2 optional fields do not set this flag, because they already indicate - // optional with `LABEL_OPTIONAL`. - optional bool proto3_optional = 17; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; - optional OneofOptions options = 2; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; - - // Range of reserved numeric values. Reserved values may not be used by - // entries in the same enum. Reserved ranges may not overlap. - // - // Note that this is distinct from DescriptorProto.ReservedRange in that it - // is inclusive such that it can appropriately represent the entire int32 - // domain. - message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. - } - - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - repeated EnumReservedRange reserved_range = 4; - - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - repeated string reserved_name = 5; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default = false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default = false]; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default = false]; - - // This option does nothing. - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default = false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default = SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - optional string go_package = 11; - - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default = false]; - optional bool java_generic_services = 17 [default = false]; - optional bool py_generic_services = 18 [default = false]; - optional bool php_generic_services = 42 [default = false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default = false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default = true]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - optional string swift_prefix = 39; - - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - optional string php_class_prefix = 40; - - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - optional string php_namespace = 41; - - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be - // used for determining the namespace. - optional string php_metadata_namespace = 44; - - // Use this option to change the package of ruby generated classes. Default - // is empty. When this option is not set, the package name will be used for - // determining the ruby package. - optional string ruby_package = 45; - - - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. - // See the documentation for the "Options" section above. - extensions 1000 to max; - - reserved 38; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default = false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default = false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default = false]; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementations still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - reserved 8; // javalite_serializable - reserved 9; // javanano_as_lite - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - optional bool packed = 2; - - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default = false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default = false]; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default = false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; - - reserved 4; // removed jtype -} - -message OneofOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default = false]; - - reserved 5; // javanano_as_lite - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default = false]; - - // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - // or neither? HTTP based RPC implementation may choose GET verb for safe - // methods, and PUT verb for idempotent methods instead of the default POST. - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects - } - optional IdempotencyLevel idempotency_level = 34 - [default = IDEMPOTENCY_UNKNOWN]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed = true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed = true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -message GeneratedCodeInfo { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - repeated Annotation annotation = 1; - message Annotation { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed = true]; - - // Identifies the filesystem path to the original source .proto. - optional string source_file = 2; - - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - optional int32 begin = 3; - - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - optional int32 end = 4; - } -} diff --git a/proto/third_party/google/protobuf/duration.proto b/proto/third_party/google/protobuf/duration.proto deleted file mode 100644 index 81c3e369f..000000000 --- a/proto/third_party/google/protobuf/duration.proto +++ /dev/null @@ -1,116 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "google.golang.org/protobuf/types/known/durationpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DurationProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Duration represents a signed, fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". It is related to Timestamp in that the difference between -// two Timestamp values is a Duration and it can be added or subtracted -// from a Timestamp. Range is approximately +-10,000 years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo code. -// -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; -// -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; -// -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (duration.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -// -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; -// -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; -// -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than an -// object, where the string ends in the suffix "s" (indicating seconds) and -// is preceded by the number of seconds, with nanoseconds expressed as -// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -// microsecond should be expressed in JSON format as "3.000001s". -// -// -message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} diff --git a/proto/third_party/google/protobuf/empty.proto b/proto/third_party/google/protobuf/empty.proto deleted file mode 100644 index 5f992de94..000000000 --- a/proto/third_party/google/protobuf/empty.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "google.golang.org/protobuf/types/known/emptypb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "EmptyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -message Empty {} diff --git a/proto/third_party/google/protobuf/timestamp.proto b/proto/third_party/google/protobuf/timestamp.proto deleted file mode 100644 index 3b2df6d91..000000000 --- a/proto/third_party/google/protobuf/timestamp.proto +++ /dev/null @@ -1,147 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "google.golang.org/protobuf/types/known/timestamppb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "TimestampProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Timestamp represents a point in time independent of any time zone or local -// calendar, encoded as a count of seconds and fractions of seconds at -// nanosecond resolution. The count is relative to an epoch at UTC midnight on -// January 1, 1970, in the proleptic Gregorian calendar which extends the -// Gregorian calendar backwards to year one. -// -// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -// second table is needed for interpretation, using a [24-hour linear -// smear](https://developers.google.com/time/smear). -// -// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// -// Example 5: Compute Timestamp from Java `Instant.now()`. -// -// Instant now = Instant.now(); -// -// Timestamp timestamp = -// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) -// .setNanos(now.getNano()).build(); -// -// -// Example 6: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required. A proto3 JSON serializer should always use UTC (as indicated by -// "Z") when printing the Timestamp type and a proto3 JSON parser should be -// able to accept both UTC and other timezones (as indicated by an offset). -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D -// ) to obtain a formatter capable of generating timestamps in this format. -// -// -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} diff --git a/scripts/install-buf.sh b/scripts/install-buf.sh new file mode 100755 index 000000000..09e877c23 --- /dev/null +++ b/scripts/install-buf.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +GO_BIN_DIR="$(go env GOPATH)/bin" + +BUF_VERSION="1.16.0" +INSTALLED_BUF_VERSION=$(buf --version || echo "not installed") + +if [ "$BUF_VERSION" != "${INSTALLED_BUF_VERSION}" ]; then + mkdir -p "${GO_BIN_DIR}" + curl -sSL \ + "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-$(uname -s)-$(uname -m)" \ + -o "${GO_BIN_DIR}/buf" && \ + chmod +x "${GO_BIN_DIR}/buf" +fi diff --git a/server/server.go b/server/server.go index 25b66b538..32ca6876e 100644 --- a/server/server.go +++ b/server/server.go @@ -16,7 +16,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" "github.com/stackrox/infra/auth" "github.com/stackrox/infra/config" @@ -114,7 +114,7 @@ func (s *server) RunServer() (<-chan error, error) { } gwMux := runtime.NewServeMux( - runtime.WithMarshalerOption("*", &runtime.JSONPb{Indent: " "}), + runtime.WithMarshalerOption("*", &runtime.JSONPb{}), ) // Register each service diff --git a/service/cli.go b/service/cli.go index e1cd01643..0bec5d048 100644 --- a/service/cli.go +++ b/service/cli.go @@ -6,8 +6,8 @@ import ( "log" "os" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - v1 "github.com/stackrox/infra/generated/api/v1" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/platform" "github.com/stackrox/infra/service/middleware" "google.golang.org/grpc" @@ -63,7 +63,7 @@ func (s *cliImpl) Upgrade(request *v1.CliUpgradeRequest, stream v1.CliService_Up // Access configures access for this service. func (s *cliImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.CliUpgradeService/Download": middleware.Authenticated, + "/api.v1.CliUpgradeService/Download": middleware.Authenticated, } } diff --git a/service/cluster/cluster.go b/service/cluster/cluster.go index b565960dd..8a867bde5 100644 --- a/service/cluster/cluster.go +++ b/service/cluster/cluster.go @@ -21,12 +21,12 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/duration" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" "github.com/stackrox/infra/calendar" "github.com/stackrox/infra/cmd/infractl/common" "github.com/stackrox/infra/flavor" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/kube" "github.com/stackrox/infra/service/middleware" "github.com/stackrox/infra/signer" @@ -145,7 +145,7 @@ func (s *clusterImpl) Info(ctx context.Context, clusterID *v1.ResourceByID) (*v1 return nil, err } - return &metacluster.Cluster, nil + return metacluster.Cluster, nil } // List implements ClusterService.List. @@ -195,7 +195,7 @@ func (s *clusterImpl) List(ctx context.Context, request *v1.ClusterListRequest) } // This cluster wasn't rejected, so we'll keep it for the response. - clusters = append(clusters, &metacluster.Cluster) + clusters = append(clusters, metacluster.Cluster) } resp := &v1.ClusterListResponse{ @@ -390,7 +390,7 @@ func (s *clusterImpl) create(req *v1.CreateClusterRequest, owner, eventID string log.Printf("[INFO] Will create a %q infra cluster %q for %s", flav.ID, clusterID, owner) created, err := s.argoWorkflowsClient.CreateWorkflow(s.argoClientCtx, &workflowpkg.WorkflowCreateRequest{ - Workflow: &workflow, + Workflow: workflow, Namespace: s.workflowNamespace, }) if err != nil { @@ -468,13 +468,13 @@ func (s *clusterImpl) Artifacts(ctx context.Context, clusterID *v1.ResourceByID) // Access configures access for this service. func (s *clusterImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.ClusterService/Info": middleware.Authenticated, - "/v1.ClusterService/List": middleware.Authenticated, - "/v1.ClusterService/Lifespan": middleware.Authenticated, - "/v1.ClusterService/Create": middleware.Authenticated, - "/v1.ClusterService/Artifacts": middleware.Authenticated, - "/v1.ClusterService/Delete": middleware.Authenticated, - "/v1.ClusterService/Logs": middleware.Authenticated, + "/api.v1.ClusterService/Info": middleware.Authenticated, + "/api.v1.ClusterService/List": middleware.Authenticated, + "/api.v1.ClusterService/Lifespan": middleware.Authenticated, + "/api.v1.ClusterService/Create": middleware.Authenticated, + "/api.v1.ClusterService/Artifacts": middleware.Authenticated, + "/api.v1.ClusterService/Delete": middleware.Authenticated, + "/api.v1.ClusterService/Logs": middleware.Authenticated, } } diff --git a/service/cluster/helpers.go b/service/cluster/helpers.go index 50abcce10..9dcd22edd 100644 --- a/service/cluster/helpers.go +++ b/service/cluster/helpers.go @@ -10,7 +10,7 @@ import ( "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" "github.com/golang/protobuf/ptypes" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/slack" ) @@ -58,7 +58,7 @@ func isNearingExpiry(workflow v1alpha1.Workflow) bool { } type metaCluster struct { - v1.Cluster + *v1.Cluster EventID string Expired bool @@ -87,7 +87,7 @@ func (s *clusterImpl) metaClusterFromWorkflow(workflow v1alpha1.Workflow) (*meta } return &metaCluster{ - Cluster: *cluster, + Cluster: cluster, Slack: slack.Status(GetSlack(&workflow)), SlackDM: GetSlackDM(&workflow), Expired: expired, diff --git a/service/cluster/naming_test.go b/service/cluster/naming_test.go index 5377f3581..e24f0d415 100644 --- a/service/cluster/naming_test.go +++ b/service/cluster/naming_test.go @@ -33,11 +33,12 @@ func TestSimpleName(t *testing.T) { } for index, test := range tests { - name := fmt.Sprintf("%d %s", index+1, test.title) + currentTest := test + name := fmt.Sprintf("%d %s", index+1, currentTest.title) t.Run(name, func(t *testing.T) { t.Parallel() - actual := simpleName(test.input) - assert.Equal(t, actual, test.expected) + actual := simpleName(currentTest.input) + assert.Equal(t, actual, currentTest.expected) }) } } diff --git a/service/flavor.go b/service/flavor.go index e2159e23e..ede7a969d 100644 --- a/service/flavor.go +++ b/service/flavor.go @@ -3,9 +3,9 @@ package service import ( "context" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/stackrox/infra/flavor" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/service/middleware" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -34,12 +34,11 @@ func NewFlavorService(registry *flavor.Registry) (middleware.APIService, error) func (s *flavorImpl) List(_ context.Context, request *v1.FlavorListRequest) (*v1.FlavorListResponse, error) { var resp v1.FlavorListResponse for _, flavor := range s.registry.Flavors() { - flavor := flavor if !request.All && flavor.Availability == v1.Flavor_alpha { continue } - scrubInternalParameters(&flavor) - resp.Flavors = append(resp.Flavors, &flavor) + scrubInternalParameters(flavor) + resp.Flavors = append(resp.Flavors, flavor) } return &resp, nil @@ -51,9 +50,9 @@ func (s *flavorImpl) Info(_ context.Context, flavorID *v1.ResourceByID) (*v1.Fla if !found { return nil, status.Errorf(codes.NotFound, "flavor %q not found", flavorID.Id) } - scrubInternalParameters(&flavor) + scrubInternalParameters(flavor) - return &flavor, nil + return flavor, nil } // scrubInternalParameters drops any internal parameters from the given flavor, @@ -73,8 +72,8 @@ func scrubInternalParameters(flavor *v1.Flavor) { // Access configures access for this service. func (s *flavorImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.FlavorService/Info": middleware.Authenticated, - "/v1.FlavorService/List": middleware.Authenticated, + "/api.v1.FlavorService/Info": middleware.Authenticated, + "/api.v1.FlavorService/List": middleware.Authenticated, } } diff --git a/service/middleware/service-account.go b/service/middleware/service-account.go index 5ac83968f..eca80b7c1 100644 --- a/service/middleware/service-account.go +++ b/service/middleware/service-account.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/pkg/errors" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) @@ -16,7 +16,7 @@ type serviceAccountContextKey struct{} // v1.ServiceAccount struct, if possible. If there is no service account, this // function does not return an error, as anonymous API calls are a possibility. // Authorization must be independently enforced. -func ServiceAccountEnricher(validator func(string) (v1.ServiceAccount, error)) contextFunc { +func ServiceAccountEnricher(validator func(string) (*v1.ServiceAccount, error)) contextFunc { return func(ctx context.Context, _ *grpc.UnaryServerInfo) (context.Context, error) { // Extract request metadata (proxied http headers) from given context. meta, ok := metadata.FromIncomingContext(ctx) @@ -36,7 +36,7 @@ func ServiceAccountEnricher(validator func(string) (v1.ServiceAccount, error)) c return ctx, nil } - return contextWithServiceAccount(ctx, &svcacct), nil + return contextWithServiceAccount(ctx, svcacct), nil } } diff --git a/service/middleware/service.go b/service/middleware/service.go index 4a6e96e7d..bd655e7c1 100644 --- a/service/middleware/service.go +++ b/service/middleware/service.go @@ -3,7 +3,7 @@ package middleware import ( "context" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" ) diff --git a/service/middleware/user.go b/service/middleware/user.go index 436ecd0aa..d83b38272 100644 --- a/service/middleware/user.go +++ b/service/middleware/user.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" "github.com/stackrox/infra/auth" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/service/status.go b/service/status.go index 534385d13..fbd4f2053 100644 --- a/service/status.go +++ b/service/status.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - v1 "github.com/stackrox/infra/generated/api/v1" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/kube" "github.com/stackrox/infra/service/middleware" "google.golang.org/grpc" @@ -131,10 +131,10 @@ func (s *statusImpl) ResetStatus(ctx context.Context, _ *empty.Empty) (*v1.Infra // Access configures access for this service. func (s *statusImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.InfraStatusService/GetStatus": middleware.Anonymous, + "/api.v1.InfraStatusService/GetStatus": middleware.Anonymous, // TODO: change both modifying commands to middleware.Admin - "/v1.InfraStatusService/ResetStatus": middleware.Authenticated, - "/v1.InfraStatusService/SetStatus": middleware.Authenticated, + "/api.v1.InfraStatusService/ResetStatus": middleware.Authenticated, + "/api.v1.InfraStatusService/SetStatus": middleware.Authenticated, } } diff --git a/service/user.go b/service/user.go index c06ba4c39..93a7e33ad 100644 --- a/service/user.go +++ b/service/user.go @@ -4,15 +4,15 @@ import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/service/middleware" "google.golang.org/grpc" ) type userImpl struct { - generate func(v1.ServiceAccount) (string, error) + generate func(*v1.ServiceAccount) (string, error) } var ( @@ -21,7 +21,7 @@ var ( ) // NewUserService creates a new UserService. -func NewUserService(generator func(v1.ServiceAccount) (string, error)) (middleware.APIService, error) { +func NewUserService(generator func(*v1.ServiceAccount) (string, error)) (middleware.APIService, error) { return &userImpl{ generate: generator, }, nil @@ -30,7 +30,7 @@ func NewUserService(generator func(v1.ServiceAccount) (string, error)) (middlewa // CreateToken implements UserService.CreateToken. func (s *userImpl) CreateToken(_ context.Context, req *v1.ServiceAccount) (*v1.TokenResponse, error) { // Generate the service account token. - token, err := s.generate(*req) + token, err := s.generate(req) if err != nil { return nil, errors.Wrap(err, "failed to generate token") } @@ -83,9 +83,9 @@ func (s *userImpl) Whoami(ctx context.Context, _ *empty.Empty) (*v1.WhoamiRespon // Access configures access for this service. func (s *userImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.UserService/Token": middleware.Authenticated, - "/v1.UserService/CreateToken": middleware.Admin, - "/v1.UserService/Whoami": middleware.Anonymous, + "/api.v1.UserService/Token": middleware.Authenticated, + "/api.v1.UserService/CreateToken": middleware.Admin, + "/api.v1.UserService/Whoami": middleware.Anonymous, } } diff --git a/service/version.go b/service/version.go index 7a2186220..9f46ee9a2 100644 --- a/service/version.go +++ b/service/version.go @@ -4,8 +4,8 @@ import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - v1 "github.com/stackrox/infra/generated/api/v1" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stackrox/infra/pkg/buildinfo" "github.com/stackrox/infra/service/middleware" "google.golang.org/grpc" @@ -31,7 +31,7 @@ func (s *versionImpl) GetVersion(ctx context.Context, _ *empty.Empty) (*v1.Versi // Access configures access for this service. func (s *versionImpl) Access() map[string]middleware.Access { return map[string]middleware.Access{ - "/v1.VersionService/GetVersion": middleware.Anonymous, + "/api.v1.VersionService/GetVersion": middleware.Anonymous, } } diff --git a/slack/template.go b/slack/template.go index 8469ac20c..ea68efdec 100644 --- a/slack/template.go +++ b/slack/template.go @@ -6,7 +6,7 @@ import ( "text/template" "github.com/slack-go/slack" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" ) // TemplateData represents the available context that is passed when executing diff --git a/slack/template_test.go b/slack/template_test.go index 6344c4e24..e64afaeca 100644 --- a/slack/template_test.go +++ b/slack/template_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - v1 "github.com/stackrox/infra/generated/api/v1" + v1 "github.com/stackrox/infra/generated/proto/api/v1" "github.com/stretchr/testify/assert" ) diff --git a/test/e2e/types.go b/test/e2e/types.go index eea299a1e..751d8f3e6 100644 --- a/test/e2e/types.go +++ b/test/e2e/types.go @@ -1,6 +1,6 @@ package e2e -import v1 "github.com/stackrox/infra/generated/api/v1" +import v1 "github.com/stackrox/infra/generated/proto/api/v1" // StatusResponse helper maps to the JSON response for infractl status operations. type StatusResponse struct { diff --git a/ui/README.md b/ui/README.md index 5aaa03d7e..c68fbe35d 100644 --- a/ui/README.md +++ b/ui/README.md @@ -47,4 +47,4 @@ client and models. To re-generate the sources run `make gen-src` or `yarn gen:src`. _Hint: for the API client to generate new Swagger definitions from protos in the -parent dir run `make proto-generated-srcs`._ +parent dir run `make buf-generated-srcs`._ diff --git a/ui/scripts/generate-client.sh b/ui/scripts/generate-client.sh index bb7b57e2c..60eb4c2cc 100755 --- a/ui/scripts/generate-client.sh +++ b/ui/scripts/generate-client.sh @@ -9,7 +9,7 @@ OPENAPI_GENERATOR_CLI_IMAGE="openapitools/openapi-generator-cli:${OPENAPI_GENERA CLIENT_DIR="src/generated/client" # paths below are relative to the git root "infra" -SWAGGER_FILE="generated/api/v1/service.swagger.json" +SWAGGER_FILE="generated/proto/api/v1/service.swagger.json" GENERATOR_OUTPUT_DIR="ui/${CLIENT_DIR}" set -x diff --git a/ui/src/containers/AppHeader/Version.tsx b/ui/src/containers/AppHeader/Version.tsx index f766ae8cd..6b9ce2527 100644 --- a/ui/src/containers/AppHeader/Version.tsx +++ b/ui/src/containers/AppHeader/Version.tsx @@ -11,7 +11,7 @@ import useApiQuery from 'client/useApiQuery'; const versionService = new VersionServiceApi(configuration); -const fetchVersion = (): AxiosPromise => versionService.getVersion(); +const fetchVersion = (): AxiosPromise => versionService.versionServiceGetVersion(); function TooltipContentRow(props: { label: string; value?: string }): ReactElement { const { label, value = 'unknown' } = props; diff --git a/ui/src/containers/ClusterInfoPage/ClusterInfoPage.tsx b/ui/src/containers/ClusterInfoPage/ClusterInfoPage.tsx index b17e25967..d01392aea 100644 --- a/ui/src/containers/ClusterInfoPage/ClusterInfoPage.tsx +++ b/ui/src/containers/ClusterInfoPage/ClusterInfoPage.tsx @@ -2,7 +2,7 @@ import React, { useState, useCallback, ReactElement } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import { Download, Trash2 } from 'react-feather'; -import { ClusterServiceApi, V1Status } from 'generated/client'; +import { ClusterServiceApi, Apiv1Status } from 'generated/client'; import useApiQuery from 'client/useApiQuery'; import configuration from 'client/configuration'; import PageSection from 'components/PageSection'; @@ -19,7 +19,9 @@ const clusterService = new ClusterServiceApi(configuration); export default function ClusterInfoPage(): ReactElement { const navigate = useNavigate(); const { clusterId = '' } = useParams(); - const fetchClusterInfo = useCallback(() => clusterService.info(clusterId), [clusterId]); + const fetchClusterInfo = useCallback(() => clusterService.clusterServiceInfo(clusterId), [ + clusterId, + ]); const { loading, error, data: cluster } = useApiQuery(fetchClusterInfo, { pollInterval: 10000 }); const [deletionModalOpen, setDeletionModalOpen] = useState(false); const [downloadArtifactsOpen, setDownloadArtifactsOpen] = useState(false); @@ -39,7 +41,7 @@ export default function ClusterInfoPage(): ReactElement { {cluster.ID} {cluster.Description && ` (${cluster.Description})`} -{' '} - {cluster.Status || V1Status.Failed} + {cluster.Status || Apiv1Status.Failed} {!!cluster && } @@ -61,7 +63,7 @@ export default function ClusterInfoPage(): ReactElement { ); - const clusterIsReady = cluster.Status === V1Status.Ready; + const clusterIsReady = cluster.Status === Apiv1Status.Ready; return ( <> diff --git a/ui/src/containers/ClusterInfoPage/ClusterLogs.tsx b/ui/src/containers/ClusterInfoPage/ClusterLogs.tsx index e88e9e0e5..7c5e24d99 100644 --- a/ui/src/containers/ClusterInfoPage/ClusterLogs.tsx +++ b/ui/src/containers/ClusterInfoPage/ClusterLogs.tsx @@ -13,7 +13,9 @@ type Props = { }; export default function ClusterLogs({ clusterId }: Props): ReactElement { - const fetchClusterLogs = useCallback(() => clusterService.logs(clusterId), [clusterId]); + const fetchClusterLogs = useCallback(() => clusterService.clusterServiceLogs(clusterId), [ + clusterId, + ]); const { loading, error, data } = useApiQuery(fetchClusterLogs, { pollInterval: 10000 }); if (loading) { diff --git a/ui/src/containers/ClusterInfoPage/DeleteClusterModal.tsx b/ui/src/containers/ClusterInfoPage/DeleteClusterModal.tsx index f025fc829..d4a3e3727 100644 --- a/ui/src/containers/ClusterInfoPage/DeleteClusterModal.tsx +++ b/ui/src/containers/ClusterInfoPage/DeleteClusterModal.tsx @@ -20,7 +20,7 @@ type Props = { export default function DeleteClusterModal({ cluster, onCancel, onDeleted }: Props): ReactElement { const [deleteCluster, { called, loading, error }] = useApiOperation(() => { assertDefined(cluster.ID); // swagger definitions are too permitting - return clusterService._delete(cluster.ID); // eslint-disable-line no-underscore-dangle + return clusterService.clusterServiceDelete(cluster.ID); // eslint-disable-line no-underscore-dangle }); assertDefined(cluster.ID); // swagger definitions are too permitting diff --git a/ui/src/containers/ClusterInfoPage/DownloadArtifactsModal.tsx b/ui/src/containers/ClusterInfoPage/DownloadArtifactsModal.tsx index 6fe89d9aa..cabf43f4e 100644 --- a/ui/src/containers/ClusterInfoPage/DownloadArtifactsModal.tsx +++ b/ui/src/containers/ClusterInfoPage/DownloadArtifactsModal.tsx @@ -33,9 +33,10 @@ type ArtifactsProps = { }; function Artifacts({ cluster }: ArtifactsProps): ReactElement { - const fetchArtifacts = useCallback(() => clusterService.artifacts(cluster.ID || ''), [ - cluster.ID, - ]); + const fetchArtifacts = useCallback( + () => clusterService.clusterServiceArtifacts(cluster.ID || ''), + [cluster.ID] + ); const { loading, error, data: artifacts } = useApiQuery(fetchArtifacts); if (loading) { diff --git a/ui/src/containers/ClusterInfoPage/MutableLifespan.tsx b/ui/src/containers/ClusterInfoPage/MutableLifespan.tsx index e595693e8..9ef4418c5 100644 --- a/ui/src/containers/ClusterInfoPage/MutableLifespan.tsx +++ b/ui/src/containers/ClusterInfoPage/MutableLifespan.tsx @@ -65,7 +65,7 @@ export default function MutableLifespan({ cluster }: Props): ReactElement { } setClientSideLifespan(`${update.asSeconds()}s`); clusterService - .lifespan(modifiedCluster.ID, { Lifespan: `${update.asSeconds()}s` }) + .clusterServiceLifespan(modifiedCluster.ID, { Lifespan: `${update.asSeconds()}s` }) .then(() => { if (clearClientSideUpdate) clearTimeout(clearClientSideUpdate); setClearClientSideUpdate( diff --git a/ui/src/containers/DownloadsPage/UserServiceAccountToken.tsx b/ui/src/containers/DownloadsPage/UserServiceAccountToken.tsx index b60450beb..ee043e15a 100644 --- a/ui/src/containers/DownloadsPage/UserServiceAccountToken.tsx +++ b/ui/src/containers/DownloadsPage/UserServiceAccountToken.tsx @@ -11,7 +11,7 @@ import { ClipLoader } from 'react-spinners'; const userService = new UserServiceApi(configuration); -const fetchToken = (): AxiosPromise => userService.token({}); +const fetchToken = (): AxiosPromise => userService.userServiceToken({}); export default function UserServiceAccountToken(): ReactElement { const { loading, error, data } = useApiQuery(fetchToken); diff --git a/ui/src/containers/HomePage/LaunchPageSection.tsx b/ui/src/containers/HomePage/LaunchPageSection.tsx index 94ac620da..68446c6c6 100644 --- a/ui/src/containers/HomePage/LaunchPageSection.tsx +++ b/ui/src/containers/HomePage/LaunchPageSection.tsx @@ -13,8 +13,10 @@ import assertDefined from 'utils/assertDefined'; const flavorService = new FlavorServiceApi(configuration); -const fetchFlavors = (): AxiosPromise => flavorService.list(false); -const fetchAllFlavors = (): AxiosPromise => flavorService.list(true); +const fetchFlavors = (): AxiosPromise => + flavorService.flavorServiceList(false); +const fetchAllFlavors = (): AxiosPromise => + flavorService.flavorServiceList(true); type FlavorCardsProps = { showAllFlavors: boolean; diff --git a/ui/src/containers/HomePage/MyClustersPageSection.tsx b/ui/src/containers/HomePage/MyClustersPageSection.tsx index fdf4e91bc..d7da897be 100644 --- a/ui/src/containers/HomePage/MyClustersPageSection.tsx +++ b/ui/src/containers/HomePage/MyClustersPageSection.tsx @@ -18,7 +18,7 @@ const clusterService = new ClusterServiceApi(configuration); const FETCH_ALL_CLUSTERS = true; const fetchClusters = (): AxiosPromise => - clusterService.list(FETCH_ALL_CLUSTERS); + clusterService.clusterServiceList(FETCH_ALL_CLUSTERS); function NoClustersMessage(): ReactElement { return ( diff --git a/ui/src/containers/LaunchClusterPage/ClusterForm.tsx b/ui/src/containers/LaunchClusterPage/ClusterForm.tsx index 760ef2ab0..87c698e82 100644 --- a/ui/src/containers/LaunchClusterPage/ClusterForm.tsx +++ b/ui/src/containers/LaunchClusterPage/ClusterForm.tsx @@ -252,7 +252,7 @@ export default function ClusterForm({ actions: FormikHelpers ): Promise => { try { - const response = await clusterService.create({ + const response = await clusterService.clusterServiceCreate({ ...values, Parameters: adjustParametersBeforeSubmit(values.Parameters), }); diff --git a/ui/src/containers/LaunchClusterPage/LaunchClusterPage.tsx b/ui/src/containers/LaunchClusterPage/LaunchClusterPage.tsx index a1e5a354a..59e341fd4 100644 --- a/ui/src/containers/LaunchClusterPage/LaunchClusterPage.tsx +++ b/ui/src/containers/LaunchClusterPage/LaunchClusterPage.tsx @@ -15,7 +15,7 @@ const flavorService = new FlavorServiceApi(configuration); export default function LaunchClusterPage(): ReactElement { const { flavorId = '' } = useParams(); const navigate = useNavigate(); - const fetchFlavorInfo = useCallback(() => flavorService.info(flavorId), [flavorId]); + const fetchFlavorInfo = useCallback(() => flavorService.flavorServiceInfo(flavorId), [flavorId]); const { loading, error, data } = useApiQuery(fetchFlavorInfo); if (loading) { diff --git a/ui/src/containers/UserAuthProvider.tsx b/ui/src/containers/UserAuthProvider.tsx index 6b892bca0..5014413eb 100644 --- a/ui/src/containers/UserAuthProvider.tsx +++ b/ui/src/containers/UserAuthProvider.tsx @@ -9,7 +9,7 @@ import FullPageError from 'components/FullPageError'; const userService = new UserServiceApi(configuration); -const fetchWhoami = (): AxiosPromise => userService.whoami(); +const fetchWhoami = (): AxiosPromise => userService.userServiceWhoami(); const logout = (): void => { window.location.href = '/logout'; diff --git a/ui/src/generated/client/api.ts b/ui/src/generated/client/api.ts index edb11f34a..f57327e60 100644 --- a/ui/src/generated/client/api.ts +++ b/ui/src/generated/client/api.ts @@ -1,145 +1,181 @@ /* tslint:disable */ /* eslint-disable */ /** - * service.proto + * proto/api/v1/service.proto * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: version not set - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + import { Configuration } from './configuration'; import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +/** + * Status represents the various cluster states. - FAILED: FAILED is the state when the cluster has failed in one way or another. - CREATING: CREATING is the state when the cluster is being created. - READY: READY is the state when the cluster is available and ready for use. - DESTROYING: DESTROYING is the state when the cluster is being destroyed. - FINISHED: FINISHED is the state when the cluster has been successfully destroyed. + * @export + * @enum {string} + */ +export enum Apiv1Status { + Failed = 'FAILED', + Creating = 'CREATING', + Ready = 'READY', + Destroying = 'DESTROYING', + Finished = 'FINISHED' +} + /** * availability represents the availability classification levels. - alpha: alpha is completely experemental, and is not expected to work in any way. - beta: beta is being tested, and is expected to work with minor issues. - stable: stable is available for public consumption, and works without issue. - default: default is stable, and available for customer demo consumption. Exactly 1 flavor should be configured as default. * @export * @enum {string} */ export enum Flavoravailability { - Alpha = 'alpha', - Beta = 'beta', - Stable = 'stable', - Default = 'default', + Alpha = 'alpha', + Beta = 'beta', + Stable = 'stable', + Default = 'default' } +/** + * + * @export + * @interface GooglerpcStatus + */ +export interface GooglerpcStatus { + /** + * + * @type {number} + * @memberof GooglerpcStatus + */ + code?: number; + /** + * + * @type {string} + * @memberof GooglerpcStatus + */ + message?: string; + /** + * + * @type {Array} + * @memberof GooglerpcStatus + */ + details?: Array; +} +/** + * + * @export + * @interface InlineObject + */ +export interface InlineObject { + /** + * Lifespan is the new lifespan. + * @type {string} + * @memberof InlineObject + */ + Lifespan?: string; + /** + * + * @type {LifespanRequestMethod} + * @memberof InlineObject + */ + method?: LifespanRequestMethod; +} /** * method represents the various lifespan operations. - REPLACE: REPLACE indicates that the given lifespan should replace the current lifespan. - ADD: ADD indicates that the given lifespan should be added to the current lifespan. - SUBTRACT: SUBTRACT indicates that the given lifespan should be subtracted from the current lifespan. * @export * @enum {string} */ export enum LifespanRequestMethod { - Replace = 'REPLACE', - Add = 'ADD', - Subtract = 'SUBTRACT', + Replace = 'REPLACE', + Add = 'ADD', + Subtract = 'SUBTRACT' } /** - * + * * @export * @interface ProtobufAny */ export interface ProtobufAny { - /** - * - * @type {string} - * @memberof ProtobufAny - */ - type_url?: string; - /** - * - * @type {string} - * @memberof ProtobufAny - */ - value?: string; + [key: string]: object | any; + + /** + * + * @type {string} + * @memberof ProtobufAny + */ + type?: string; } /** - * + * * @export - * @interface RuntimeStreamError + * @interface StreamResultOfV1CliUpgradeResponse */ -export interface RuntimeStreamError { - /** - * - * @type {number} - * @memberof RuntimeStreamError - */ - grpc_code?: number; - /** - * - * @type {number} - * @memberof RuntimeStreamError - */ - http_code?: number; - /** - * - * @type {string} - * @memberof RuntimeStreamError - */ - message?: string; - /** - * - * @type {string} - * @memberof RuntimeStreamError - */ - http_status?: string; - /** - * - * @type {Array} - * @memberof RuntimeStreamError - */ - details?: Array; +export interface StreamResultOfV1CliUpgradeResponse { + /** + * + * @type {V1CliUpgradeResponse} + * @memberof StreamResultOfV1CliUpgradeResponse + */ + result?: V1CliUpgradeResponse; + /** + * + * @type {GooglerpcStatus} + * @memberof StreamResultOfV1CliUpgradeResponse + */ + error?: GooglerpcStatus; } /** - * + * * @export * @interface V1Artifact */ export interface V1Artifact { - /** - * - * @type {string} - * @memberof V1Artifact - */ - Name?: string; - /** - * - * @type {string} - * @memberof V1Artifact - */ - Description?: string; - /** - * - * @type {string} - * @memberof V1Artifact - */ - URL?: string; - /** - * - * @type {number} - * @memberof V1Artifact - */ - Mode?: number; + /** + * + * @type {string} + * @memberof V1Artifact + */ + Name?: string; + /** + * + * @type {string} + * @memberof V1Artifact + */ + Description?: string; + /** + * + * @type {string} + * @memberof V1Artifact + */ + URL?: string; + /** + * + * @type {number} + * @memberof V1Artifact + */ + Mode?: number; } /** - * + * * @export * @interface V1CliUpgradeResponse */ export interface V1CliUpgradeResponse { - /** - * - * @type {string} - * @memberof V1CliUpgradeResponse - */ - fileChunk?: string; + /** + * + * @type {string} + * @memberof V1CliUpgradeResponse + */ + fileChunk?: string; } /** * Cluster represents a single cluster. @@ -147,79 +183,79 @@ export interface V1CliUpgradeResponse { * @interface V1Cluster */ export interface V1Cluster { - /** - * ID is the unique ID for the cluster. - * @type {string} - * @memberof V1Cluster - */ - ID?: string; - /** - * - * @type {V1Status} - * @memberof V1Cluster - */ - Status?: V1Status; - /** - * Flavor is the original flavor ID that launched this cluster. - * @type {string} - * @memberof V1Cluster - */ - Flavor?: string; - /** - * Owner is the email address for the cluster owner. - * @type {string} - * @memberof V1Cluster - */ - Owner?: string; - /** - * CreatedOn is the timestamp on which the cluster started being created. - * @type {string} - * @memberof V1Cluster - */ - CreatedOn?: string; - /** - * DestroyedOn is the timestamp on which the cluster finished being destroyed. - * @type {string} - * @memberof V1Cluster - */ - DestroyedOn?: string; - /** - * Lifespan is the duration for which the cluster should be kept alive. - * @type {string} - * @memberof V1Cluster - */ - Lifespan?: string; - /** - * Description is a human readable description for the cluster. - * @type {string} - * @memberof V1Cluster - */ - Description?: string; - /** - * URL is an optional URL for this cluster. - * @type {string} - * @memberof V1Cluster - */ - URL?: string; - /** - * Connect is a command to add kube connection information to kubeconfig. - * @type {string} - * @memberof V1Cluster - */ - Connect?: string; + /** + * ID is the unique ID for the cluster. + * @type {string} + * @memberof V1Cluster + */ + ID?: string; + /** + * + * @type {Apiv1Status} + * @memberof V1Cluster + */ + Status?: Apiv1Status; + /** + * Flavor is the original flavor ID that launched this cluster. + * @type {string} + * @memberof V1Cluster + */ + Flavor?: string; + /** + * Owner is the email address for the cluster owner. + * @type {string} + * @memberof V1Cluster + */ + Owner?: string; + /** + * CreatedOn is the timestamp on which the cluster started being created. + * @type {string} + * @memberof V1Cluster + */ + CreatedOn?: string; + /** + * DestroyedOn is the timestamp on which the cluster finished being destroyed. + * @type {string} + * @memberof V1Cluster + */ + DestroyedOn?: string; + /** + * Lifespan is the duration for which the cluster should be kept alive. + * @type {string} + * @memberof V1Cluster + */ + Lifespan?: string; + /** + * Description is a human readable description for the cluster. + * @type {string} + * @memberof V1Cluster + */ + Description?: string; + /** + * URL is an optional URL for this cluster. + * @type {string} + * @memberof V1Cluster + */ + URL?: string; + /** + * Connect is a command to add kube connection information to kubeconfig. + * @type {string} + * @memberof V1Cluster + */ + Connect?: string; } /** - * + * * @export * @interface V1ClusterArtifacts */ export interface V1ClusterArtifacts { - /** - * - * @type {Array} - * @memberof V1ClusterArtifacts - */ - Artifacts?: Array; + /** + * + * @type {Array} + * @memberof V1ClusterArtifacts + */ + Artifacts?: Array; } /** * ClusterListResponse represents details about all clusters. @@ -227,12 +263,12 @@ export interface V1ClusterArtifacts { * @interface V1ClusterListResponse */ export interface V1ClusterListResponse { - /** - * Clusters is a list of all clusters. - * @type {Array} - * @memberof V1ClusterListResponse - */ - Clusters?: Array; + /** + * Clusters is a list of all clusters. + * @type {Array} + * @memberof V1ClusterListResponse + */ + Clusters?: Array; } /** * CreateClusterRequest represents details for launching a new cluster. @@ -240,42 +276,42 @@ export interface V1ClusterListResponse { * @interface V1CreateClusterRequest */ export interface V1CreateClusterRequest { - /** - * ID is the flavor ID to launch. - * @type {string} - * @memberof V1CreateClusterRequest - */ - ID?: string; - /** - * Lifespan is the initial cluster lifespan. - * @type {string} - * @memberof V1CreateClusterRequest - */ - Lifespan?: string; - /** - * Parameters is a map of launch parameter names to values. - * @type {{ [key: string]: string; }} - * @memberof V1CreateClusterRequest - */ - Parameters?: { [key: string]: string }; - /** - * Description is a human readable description for the cluster. - * @type {string} - * @memberof V1CreateClusterRequest - */ - Description?: string; - /** - * NoSlack is used to skip sending Slack messages for cluster lifecycle events. - * @type {boolean} - * @memberof V1CreateClusterRequest - */ - NoSlack?: boolean; - /** - * SlackDM is used to choose direct messages for cluster lifecycle events. - * @type {boolean} - * @memberof V1CreateClusterRequest - */ - SlackDM?: boolean; + /** + * ID is the flavor ID to launch. + * @type {string} + * @memberof V1CreateClusterRequest + */ + ID?: string; + /** + * Lifespan is the initial cluster lifespan. + * @type {string} + * @memberof V1CreateClusterRequest + */ + Lifespan?: string; + /** + * Parameters is a map of launch parameter names to values. + * @type {{ [key: string]: string; }} + * @memberof V1CreateClusterRequest + */ + Parameters?: { [key: string]: string; }; + /** + * Description is a human readable description for the cluster. + * @type {string} + * @memberof V1CreateClusterRequest + */ + Description?: string; + /** + * NoSlack is used to skip sending Slack messages for cluster lifecycle events. + * @type {boolean} + * @memberof V1CreateClusterRequest + */ + NoSlack?: boolean; + /** + * SlackDM is used to choose direct messages for cluster lifecycle events. + * @type {boolean} + * @memberof V1CreateClusterRequest + */ + SlackDM?: boolean; } /** * Flavor represents a configured cluster flavor. @@ -283,42 +319,42 @@ export interface V1CreateClusterRequest { * @interface V1Flavor */ export interface V1Flavor { - /** - * ID is the unique, human type-able, ID for the flavor. - * @type {string} - * @memberof V1Flavor - */ - ID?: string; - /** - * Name is a human readable name for the flavor. - * @type {string} - * @memberof V1Flavor - */ - Name?: string; - /** - * Description is a human readable description for the flavor. - * @type {string} - * @memberof V1Flavor - */ - Description?: string; - /** - * - * @type {Flavoravailability} - * @memberof V1Flavor - */ - Availability?: Flavoravailability; - /** - * Parameters is a map of parameters required for launching this flavor. - * @type {{ [key: string]: V1Parameter; }} - * @memberof V1Flavor - */ - Parameters?: { [key: string]: V1Parameter }; - /** - * Artifacts is a map of artifacts produced by this flavor. - * @type {{ [key: string]: V1FlavorArtifact; }} - * @memberof V1Flavor - */ - Artifacts?: { [key: string]: V1FlavorArtifact }; + /** + * ID is the unique, human type-able, ID for the flavor. + * @type {string} + * @memberof V1Flavor + */ + ID?: string; + /** + * Name is a human readable name for the flavor. + * @type {string} + * @memberof V1Flavor + */ + Name?: string; + /** + * Description is a human readable description for the flavor. + * @type {string} + * @memberof V1Flavor + */ + Description?: string; + /** + * + * @type {Flavoravailability} + * @memberof V1Flavor + */ + Availability?: Flavoravailability; + /** + * Parameters is a map of parameters required for launching this flavor. + * @type {{ [key: string]: V1Parameter; }} + * @memberof V1Flavor + */ + Parameters?: { [key: string]: V1Parameter; }; + /** + * Artifacts is a map of artifacts produced by this flavor. + * @type {{ [key: string]: V1FlavorArtifact; }} + * @memberof V1Flavor + */ + Artifacts?: { [key: string]: V1FlavorArtifact; }; } /** * FlavorArtifact represents a single artifact that is produced by a flavor. @@ -326,24 +362,24 @@ export interface V1Flavor { * @interface V1FlavorArtifact */ export interface V1FlavorArtifact { - /** - * Name is the unique name of the artifact. - * @type {string} - * @memberof V1FlavorArtifact - */ - Name?: string; - /** - * Description is a human readable description for the artifact. - * @type {string} - * @memberof V1FlavorArtifact - */ - Description?: string; - /** - * Tags is a set of artifact tags. - * @type {{ [key: string]: object; }} - * @memberof V1FlavorArtifact - */ - Tags?: { [key: string]: object }; + /** + * Name is the unique name of the artifact. + * @type {string} + * @memberof V1FlavorArtifact + */ + Name?: string; + /** + * Description is a human readable description for the artifact. + * @type {string} + * @memberof V1FlavorArtifact + */ + Description?: string; + /** + * Tags is a set of artifact tags. + * @type {{ [key: string]: object; }} + * @memberof V1FlavorArtifact + */ + Tags?: { [key: string]: object; }; } /** * FlavorListResponse represents details about the available cluster flavors. @@ -351,43 +387,37 @@ export interface V1FlavorArtifact { * @interface V1FlavorListResponse */ export interface V1FlavorListResponse { - /** - * Default is the flavor ID of the default cluster flavor. - * @type {string} - * @memberof V1FlavorListResponse - */ - Default?: string; - /** - * Flavors is a list of all available cluster flavors. - * @type {Array} - * @memberof V1FlavorListResponse - */ - Flavors?: Array; + /** + * Default is the flavor ID of the default cluster flavor. + * @type {string} + * @memberof V1FlavorListResponse + */ + Default?: string; + /** + * Flavors is a list of all available cluster flavors. + * @type {Array} + * @memberof V1FlavorListResponse + */ + Flavors?: Array; } /** - * + * * @export - * @interface V1LifespanRequest + * @interface V1InfraStatus */ -export interface V1LifespanRequest { - /** - * ID is the unique ID for the cluster. - * @type {string} - * @memberof V1LifespanRequest - */ - id?: string; - /** - * Lifespan is the new lifespan. - * @type {string} - * @memberof V1LifespanRequest - */ - Lifespan?: string; - /** - * - * @type {LifespanRequestMethod} - * @memberof V1LifespanRequest - */ - method?: LifespanRequestMethod; +export interface V1InfraStatus { + /** + * MaintenanceActive is an indicator whether a maintenance is ongoing. + * @type {boolean} + * @memberof V1InfraStatus + */ + MaintenanceActive?: boolean; + /** + * Maintainer is the email of the person currently doing maintenance. + * @type {string} + * @memberof V1InfraStatus + */ + Maintainer?: string; } /** * Log represents the logs from a specific pod. @@ -395,30 +425,30 @@ export interface V1LifespanRequest { * @interface V1Log */ export interface V1Log { - /** - * Name is the name given to this pod in the workflow. - * @type {string} - * @memberof V1Log - */ - Name?: string; - /** - * Started is the time at which this pod was started. Used for ordering between pods. - * @type {string} - * @memberof V1Log - */ - Started?: string; - /** - * Body is the raw pod logs. - * @type {string} - * @memberof V1Log - */ - Body?: string; - /** - * Message surfaces step state from Argo. - * @type {string} - * @memberof V1Log - */ - Message?: string; + /** + * Name is the name given to this pod in the workflow. + * @type {string} + * @memberof V1Log + */ + Name?: string; + /** + * Started is the time at which this pod was started. Used for ordering between pods. + * @type {string} + * @memberof V1Log + */ + Started?: string; + /** + * Body is the raw pod logs. + * @type {string} + * @memberof V1Log + */ + Body?: string; + /** + * Message surfaces step state from Argo. + * @type {string} + * @memberof V1Log + */ + Message?: string; } /** * LogsResponse represents a collection of logs. @@ -426,12 +456,12 @@ export interface V1Log { * @interface V1LogsResponse */ export interface V1LogsResponse { - /** - * Logs are all of the logs from a cluster. - * @type {Array} - * @memberof V1LogsResponse - */ - Logs?: Array; + /** + * Logs are all of the logs from a cluster. + * @type {Array} + * @memberof V1LogsResponse + */ + Logs?: Array; } /** * Parameter represents a single parameter that is needed to launch a flavor. @@ -439,54 +469,54 @@ export interface V1LogsResponse { * @interface V1Parameter */ export interface V1Parameter { - /** - * Name is the unique name of the parameter. - * @type {string} - * @memberof V1Parameter - */ - Name?: string; - /** - * Description is a human readable description for the parameter. - * @type {string} - * @memberof V1Parameter - */ - Description?: string; - /** - * Value that this parameter could have. If the parameter is not optional, then value serves as an example. If the parameter is optional, then value serves as a default. If the parameter is internal, then value serves as a hardcoded constant. - * @type {string} - * @memberof V1Parameter - */ - Value?: string; - /** - * Optional indicates that this parameter can be optionally provided by a user. If the user does not provide a value, then Value serves as a default. - * @type {boolean} - * @memberof V1Parameter - */ - Optional?: boolean; - /** - * Internal indicates that this parameter should not be provided by a user, but rather treats Value as a hardcoded constant. - * @type {boolean} - * @memberof V1Parameter - */ - Internal?: boolean; - /** - * The relative order of importance of this parameter for when presenting in a UI for example. - * @type {number} - * @memberof V1Parameter - */ - Order?: number; - /** - * - * @type {string} - * @memberof V1Parameter - */ - Help?: string; - /** - * Indicates that the value for this parameter can be provided from the contents of a file. - * @type {boolean} - * @memberof V1Parameter - */ - FromFile?: boolean; + /** + * Name is the unique name of the parameter. + * @type {string} + * @memberof V1Parameter + */ + Name?: string; + /** + * Description is a human readable description for the parameter. + * @type {string} + * @memberof V1Parameter + */ + Description?: string; + /** + * Value that this parameter could have. If the parameter is not optional, then value serves as an example. If the parameter is optional, then value serves as a default. If the parameter is internal, then value serves as a hardcoded constant. + * @type {string} + * @memberof V1Parameter + */ + Value?: string; + /** + * Optional indicates that this parameter can be optionally provided by a user. If the user does not provide a value, then Value serves as a default. + * @type {boolean} + * @memberof V1Parameter + */ + Optional?: boolean; + /** + * Internal indicates that this parameter should not be provided by a user, but rather treats Value as a hardcoded constant. + * @type {boolean} + * @memberof V1Parameter + */ + Internal?: boolean; + /** + * The relative order of importance of this parameter for when presenting in a UI for example. + * @type {number} + * @memberof V1Parameter + */ + Order?: number; + /** + * + * @type {string} + * @memberof V1Parameter + */ + Help?: string; + /** + * Indicates that the value for this parameter can be provided from the contents of a file. + * @type {boolean} + * @memberof V1Parameter + */ + FromFile?: boolean; } /** * ResourceByID represents a generic reference to a named/unique resource. @@ -494,12 +524,12 @@ export interface V1Parameter { * @interface V1ResourceByID */ export interface V1ResourceByID { - /** - * - * @type {string} - * @memberof V1ResourceByID - */ - id?: string; + /** + * + * @type {string} + * @memberof V1ResourceByID + */ + id?: string; } /** * ServiceAccount represents an authenticated service account (robot) principal. @@ -507,56 +537,61 @@ export interface V1ResourceByID { * @interface V1ServiceAccount */ export interface V1ServiceAccount { - /** - * Name is a human readable name for the service account. - * @type {string} - * @memberof V1ServiceAccount - */ - Name?: string; - /** - * Description is a human readable description for the service account. - * @type {string} - * @memberof V1ServiceAccount - */ - Description?: string; - /** - * Email is the StackRox email address for the service account. - * @type {string} - * @memberof V1ServiceAccount - */ - Email?: string; -} -/** - * Status represents the various cluster states. - FAILED: FAILED is the state when the cluster has failed in one way or another. - CREATING: CREATING is the state when the cluster is being created. - READY: READY is the state when the cluster is available and ready for use. - DESTROYING: DESTROYING is the state when the cluster is being destroyed. - FINISHED: FINISHED is the state when the cluster has been successfully destroyed. - * @export - * @enum {string} - */ -export enum V1Status { - Failed = 'FAILED', - Creating = 'CREATING', - Ready = 'READY', - Destroying = 'DESTROYING', - Finished = 'FINISHED', + /** + * Name is a human readable name for the service account. + * @type {string} + * @memberof V1ServiceAccount + */ + Name?: string; + /** + * Description is a human readable description for the service account. + * @type {string} + * @memberof V1ServiceAccount + */ + Description?: string; + /** + * Email is the Red Hat email address for the service account. + * @type {string} + * @memberof V1ServiceAccount + */ + Email?: string; + /** + * IssuedAt is the time of issuing the service account token. + * @type {string} + * @memberof V1ServiceAccount + */ + IssuedAt?: string; + /** + * NotBefore is the beginning of service account token valid time period. + * @type {string} + * @memberof V1ServiceAccount + */ + NotBefore?: string; + /** + * ExpiresAt is the end of service account token valid time period. + * @type {string} + * @memberof V1ServiceAccount + */ + ExpiresAt?: string; } - /** - * + * * @export * @interface V1TokenResponse */ export interface V1TokenResponse { - /** - * - * @type {V1ServiceAccount} - * @memberof V1TokenResponse - */ - Account?: V1ServiceAccount; - /** - * Token is the token generated for the service account. - * @type {string} - * @memberof V1TokenResponse - */ - Token?: string; + /** + * + * @type {V1ServiceAccount} + * @memberof V1TokenResponse + */ + Account?: V1ServiceAccount; + /** + * Token is the token generated for the service account. + * @type {string} + * @memberof V1TokenResponse + */ + Token?: string; } /** * User represents an authenticated (human) principal. @@ -564,73 +599,73 @@ export interface V1TokenResponse { * @interface V1User */ export interface V1User { - /** - * Expiry is the expiration date of this user session. Used only as a hint to the user and not for enforcement. - * @type {string} - * @memberof V1User - */ - Expiry?: string; - /** - * Name is the full name of the user. - * @type {string} - * @memberof V1User - */ - Name?: string; - /** - * Email is the email address of the user. - * @type {string} - * @memberof V1User - */ - Email?: string; - /** - * Picture is a URL linking to this user\'s profile picture, if available. - * @type {string} - * @memberof V1User - */ - Picture?: string; + /** + * Expiry is the expiration date of this user session. Used only as a hint to the user and not for enforcement. + * @type {string} + * @memberof V1User + */ + Expiry?: string; + /** + * Name is the full name of the user. + * @type {string} + * @memberof V1User + */ + Name?: string; + /** + * Email is the email address of the user. + * @type {string} + * @memberof V1User + */ + Email?: string; + /** + * Picture is a URL linking to this user\'s profile picture, if available. + * @type {string} + * @memberof V1User + */ + Picture?: string; } /** - * + * * @export * @interface V1Version */ export interface V1Version { - /** - * - * @type {string} - * @memberof V1Version - */ - BuildDate?: string; - /** - * - * @type {string} - * @memberof V1Version - */ - GitCommit?: string; - /** - * - * @type {string} - * @memberof V1Version - */ - GoVersion?: string; - /** - * - * @type {string} - * @memberof V1Version - */ - Platform?: string; - /** - * - * @type {string} - * @memberof V1Version - */ - Version?: string; - /** - * - * @type {string} - * @memberof V1Version - */ - Workflow?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + BuildDate?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + GitCommit?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + GoVersion?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + Platform?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + Version?: string; + /** + * + * @type {string} + * @memberof V1Version + */ + Workflow?: string; } /** * WhoamiResponse represents details about the current authenticated principal. @@ -638,18 +673,18 @@ export interface V1Version { * @interface V1WhoamiResponse */ export interface V1WhoamiResponse { - /** - * - * @type {V1User} - * @memberof V1WhoamiResponse - */ - User?: V1User; - /** - * - * @type {V1ServiceAccount} - * @memberof V1WhoamiResponse - */ - ServiceAccount?: V1ServiceAccount; + /** + * + * @type {V1User} + * @memberof V1WhoamiResponse + */ + User?: V1User; + /** + * + * @type {V1ServiceAccount} + * @memberof V1WhoamiResponse + */ + ServiceAccount?: V1ServiceAccount; } /** @@ -657,123 +692,101 @@ export interface V1WhoamiResponse { * @export */ export const CliServiceApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {string} os - * @param {string} arch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - upgrade: async (os: string, arch: string, options: any = {}): Promise => { - // verify required parameter 'os' is not null or undefined - if (os === null || os === undefined) { - throw new RequiredError( - 'os', - 'Required parameter os was null or undefined when calling upgrade.' - ); - } - // verify required parameter 'arch' is not null or undefined - if (arch === null || arch === undefined) { - throw new RequiredError( - 'arch', - 'Required parameter arch was null or undefined when calling upgrade.' - ); - } - const localVarPath = `/v1/cli/{os}/{arch}/upgrade` - .replace(`{${'os'}}`, encodeURIComponent(String(os))) - .replace(`{${'arch'}}`, encodeURIComponent(String(arch))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - }; + return { + /** + * + * @summary Upgrade - gets an updated binary if it exists. + * @param {string} os + * @param {string} arch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cliServiceUpgrade: async (os: string, arch: string, options: any = {}): Promise => { + // verify required parameter 'os' is not null or undefined + if (os === null || os === undefined) { + throw new RequiredError('os','Required parameter os was null or undefined when calling cliServiceUpgrade.'); + } + // verify required parameter 'arch' is not null or undefined + if (arch === null || arch === undefined) { + throw new RequiredError('arch','Required parameter arch was null or undefined when calling cliServiceUpgrade.'); + } + const localVarPath = `/v1/cli/{os}/{arch}/upgrade` + .replace(`{${"os"}}`, encodeURIComponent(String(os))) + .replace(`{${"arch"}}`, encodeURIComponent(String(arch))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** * CliServiceApi - functional programming interface * @export */ -export const CliServiceApiFp = function (configuration?: Configuration) { - return { - /** - * - * @param {string} os - * @param {string} arch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async upgrade( - os: string, - arch: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await CliServiceApiAxiosParamCreator(configuration).upgrade( - os, - arch, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - }; +export const CliServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary Upgrade - gets an updated binary if it exists. + * @param {string} os + * @param {string} arch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cliServiceUpgrade(os: string, arch: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await CliServiceApiAxiosParamCreator(configuration).cliServiceUpgrade(os, arch, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } }; /** * CliServiceApi - factory interface * @export */ -export const CliServiceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance -) { - return { - /** - * - * @param {string} os - * @param {string} arch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - upgrade(os: string, arch: string, options?: any): AxiosPromise { - return CliServiceApiFp(configuration) - .upgrade(os, arch, options) - .then((request) => request(axios, basePath)); - }, - }; +export const CliServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary Upgrade - gets an updated binary if it exists. + * @param {string} os + * @param {string} arch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cliServiceUpgrade(os: string, arch: string, options?: any): AxiosPromise { + return CliServiceApiFp(configuration).cliServiceUpgrade(os, arch, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -783,1431 +796,1450 @@ export const CliServiceApiFactory = function ( * @extends {BaseAPI} */ export class CliServiceApi extends BaseAPI { - /** - * - * @param {string} os - * @param {string} arch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CliServiceApi - */ - public upgrade(os: string, arch: string, options?: any) { - return CliServiceApiFp(this.configuration) - .upgrade(os, arch, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * + * @summary Upgrade - gets an updated binary if it exists. + * @param {string} os + * @param {string} arch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CliServiceApi + */ + public cliServiceUpgrade(os: string, arch: string, options?: any) { + return CliServiceApiFp(this.configuration).cliServiceUpgrade(os, arch, options).then((request) => request(this.axios, this.basePath)); + } } + /** * ClusterServiceApi - axios parameter creator * @export */ export const ClusterServiceApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Delete deletes an existing cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - _delete: async (id: string, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling _delete.' - ); - } - const localVarPath = `/v1/cluster/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Artifacts returns the artifacts for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - artifacts: async (id: string, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling artifacts.' - ); - } - const localVarPath = `/v1/cluster/{id}/artifacts`.replace( - `{${'id'}}`, - encodeURIComponent(String(id)) - ); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Create launches a new cluster. - * @param {V1CreateClusterRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - create: async (body: V1CreateClusterRequest, options: any = {}): Promise => { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError( - 'body', - 'Required parameter body was null or undefined when calling create.' - ); - } - const localVarPath = `/v1/cluster`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - const nonString = typeof body !== 'string'; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) - : nonString; - localVarRequestOptions.data = needsSerialization - ? JSON.stringify(body !== undefined ? body : {}) - : body || ''; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - info: async (id: string, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling info.' - ); - } - const localVarPath = `/v1/cluster/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Token generates a service account token for the current user. - * @param {string} id ID is the unique ID for the cluster. - * @param {V1LifespanRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lifespan: async ( - id: string, - body: V1LifespanRequest, - options: any = {} - ): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling lifespan.' - ); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError( - 'body', - 'Required parameter body was null or undefined when calling lifespan.' - ); - } - const localVarPath = `/v1/cluster/{id}/lifespan`.replace( - `{${'id'}}`, - encodeURIComponent(String(id)) - ); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - const nonString = typeof body !== 'string'; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) - : nonString; - localVarRequestOptions.data = needsSerialization - ? JSON.stringify(body !== undefined ? body : {}) - : body || ''; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. - * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - list: async (all?: boolean, expired?: boolean, options: any = {}): Promise => { - const localVarPath = `/v1/cluster`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (all !== undefined) { - localVarQueryParameter['all'] = all; - } - - if (expired !== undefined) { - localVarQueryParameter['expired'] = expired; - } - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Logs returns the logs for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logs: async (id: string, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling logs.' - ); - } - const localVarPath = `/v1/cluster/{id}/logs`.replace( - `{${'id'}}`, - encodeURIComponent(String(id)) - ); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - }; + return { + /** + * + * @summary Artifacts returns the artifacts for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceArtifacts: async (id: string, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling clusterServiceArtifacts.'); + } + const localVarPath = `/v1/cluster/{id}/artifacts` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create launches a new cluster. + * @param {V1CreateClusterRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceCreate: async (body: V1CreateClusterRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling clusterServiceCreate.'); + } + const localVarPath = `/v1/cluster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const nonString = typeof body !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) + : nonString; + localVarRequestOptions.data = needsSerialization + ? JSON.stringify(body !== undefined ? body : {}) + : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete deletes an existing cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceDelete: async (id: string, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling clusterServiceDelete.'); + } + const localVarPath = `/v1/cluster/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Info provides information about a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceInfo: async (id: string, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling clusterServiceInfo.'); + } + const localVarPath = `/v1/cluster/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Lifespan updates the lifespan for a specific cluster. + * @param {string} id ID is the unique ID for the cluster. + * @param {InlineObject} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceLifespan: async (id: string, body: InlineObject, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling clusterServiceLifespan.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling clusterServiceLifespan.'); + } + const localVarPath = `/v1/cluster/{id}/lifespan` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const nonString = typeof body !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) + : nonString; + localVarRequestOptions.data = needsSerialization + ? JSON.stringify(body !== undefined ? body : {}) + : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List provides information about the available clusters. + * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. + * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. + * @param {string} [prefix] list clusters whose ID matches this prefix. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceList: async (all?: boolean, expired?: boolean, prefix?: string, options: any = {}): Promise => { + const localVarPath = `/v1/cluster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (all !== undefined) { + localVarQueryParameter['all'] = all; + } + + if (expired !== undefined) { + localVarQueryParameter['expired'] = expired; + } + + if (prefix !== undefined) { + localVarQueryParameter['prefix'] = prefix; + } + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs returns the logs for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceLogs: async (id: string, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling clusterServiceLogs.'); + } + const localVarPath = `/v1/cluster/{id}/logs` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** * ClusterServiceApi - functional programming interface * @export */ -export const ClusterServiceApiFp = function (configuration?: Configuration) { - return { - /** - * - * @summary Delete deletes an existing cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async _delete( - id: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration)._delete( - id, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Artifacts returns the artifacts for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async artifacts( - id: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).artifacts( - id, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Create launches a new cluster. - * @param {V1CreateClusterRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async create( - body: V1CreateClusterRequest, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).create( - body, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async info( - id: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).info( - id, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Token generates a service account token for the current user. - * @param {string} id ID is the unique ID for the cluster. - * @param {V1LifespanRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async lifespan( - id: string, - body: V1LifespanRequest, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).lifespan( - id, - body, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. - * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async list( - all?: boolean, - expired?: boolean, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).list( - all, - expired, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Logs returns the logs for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async logs( - id: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).logs( - id, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - }; +export const ClusterServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary Artifacts returns the artifacts for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceArtifacts(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceArtifacts(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Create launches a new cluster. + * @param {V1CreateClusterRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceCreate(body: V1CreateClusterRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceCreate(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Delete deletes an existing cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceDelete(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceDelete(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Info provides information about a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceInfo(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceInfo(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Lifespan updates the lifespan for a specific cluster. + * @param {string} id ID is the unique ID for the cluster. + * @param {InlineObject} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceLifespan(id: string, body: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceLifespan(id, body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary List provides information about the available clusters. + * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. + * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. + * @param {string} [prefix] list clusters whose ID matches this prefix. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceList(all?: boolean, expired?: boolean, prefix?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceList(all, expired, prefix, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Logs returns the logs for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async clusterServiceLogs(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await ClusterServiceApiAxiosParamCreator(configuration).clusterServiceLogs(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } }; /** * ClusterServiceApi - factory interface * @export */ -export const ClusterServiceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance -) { - return { - /** - * - * @summary Delete deletes an existing cluster. - * @param {string} id +export const ClusterServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary Artifacts returns the artifacts for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceArtifacts(id: string, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceArtifacts(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create launches a new cluster. + * @param {V1CreateClusterRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceCreate(body: V1CreateClusterRequest, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceCreate(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Delete deletes an existing cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceDelete(id: string, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceDelete(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Info provides information about a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceInfo(id: string, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceInfo(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Lifespan updates the lifespan for a specific cluster. + * @param {string} id ID is the unique ID for the cluster. + * @param {InlineObject} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceLifespan(id: string, body: InlineObject, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceLifespan(id, body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List provides information about the available clusters. + * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. + * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. + * @param {string} [prefix] list clusters whose ID matches this prefix. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceList(all?: boolean, expired?: boolean, prefix?: string, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceList(all, expired, prefix, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs returns the logs for a specific cluster. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + clusterServiceLogs(id: string, options?: any): AxiosPromise { + return ClusterServiceApiFp(configuration).clusterServiceLogs(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ClusterServiceApi - object-oriented interface + * @export + * @class ClusterServiceApi + * @extends {BaseAPI} + */ +export class ClusterServiceApi extends BaseAPI { + /** + * + * @summary Artifacts returns the artifacts for a specific cluster. + * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - _delete(id: string, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - ._delete(id, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceArtifacts(id: string, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceArtifacts(id, options).then((request) => request(this.axios, this.basePath)); + } + /** - * - * @summary Artifacts returns the artifacts for a specific cluster. - * @param {string} id + * + * @summary Create launches a new cluster. + * @param {V1CreateClusterRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - artifacts(id: string, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .artifacts(id, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceCreate(body: V1CreateClusterRequest, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceCreate(body, options).then((request) => request(this.axios, this.basePath)); + } + /** - * - * @summary Create launches a new cluster. - * @param {V1CreateClusterRequest} body + * + * @summary Delete deletes an existing cluster. + * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - create(body: V1CreateClusterRequest, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .create(body, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceDelete(id: string, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceDelete(id, options).then((request) => request(this.axios, this.basePath)); + } + /** - * - * @param {string} id + * + * @summary Info provides information about a specific cluster. + * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - info(id: string, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .info(id, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceInfo(id: string, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceInfo(id, options).then((request) => request(this.axios, this.basePath)); + } + /** - * - * @summary Token generates a service account token for the current user. + * + * @summary Lifespan updates the lifespan for a specific cluster. * @param {string} id ID is the unique ID for the cluster. - * @param {V1LifespanRequest} body + * @param {InlineObject} body * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - lifespan(id: string, body: V1LifespanRequest, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .lifespan(id, body, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceLifespan(id: string, body: InlineObject, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceLifespan(id, body, options).then((request) => request(this.axios, this.basePath)); + } + /** - * - * @summary CreateToken generates an arbitrary service account token + * + * @summary List provides information about the available clusters. * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. + * @param {string} [prefix] list clusters whose ID matches this prefix. * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - list(all?: boolean, expired?: boolean, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .list(all, expired, options) - .then((request) => request(axios, basePath)); - }, + public clusterServiceList(all?: boolean, expired?: boolean, prefix?: string, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceList(all, expired, prefix, options).then((request) => request(this.axios, this.basePath)); + } + /** - * + * * @summary Logs returns the logs for a specific cluster. - * @param {string} id + * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof ClusterServiceApi */ - logs(id: string, options?: any): AxiosPromise { - return ClusterServiceApiFp(configuration) - .logs(id, options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ClusterServiceApi - object-oriented interface - * @export - * @class ClusterServiceApi - * @extends {BaseAPI} - */ -export class ClusterServiceApi extends BaseAPI { - /** - * - * @summary Delete deletes an existing cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public _delete(id: string, options?: any) { - return ClusterServiceApiFp(this.configuration) - ._delete(id, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Artifacts returns the artifacts for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public artifacts(id: string, options?: any) { - return ClusterServiceApiFp(this.configuration) - .artifacts(id, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Create launches a new cluster. - * @param {V1CreateClusterRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public create(body: V1CreateClusterRequest, options?: any) { - return ClusterServiceApiFp(this.configuration) - .create(body, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public info(id: string, options?: any) { - return ClusterServiceApiFp(this.configuration) - .info(id, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Token generates a service account token for the current user. - * @param {string} id ID is the unique ID for the cluster. - * @param {V1LifespanRequest} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public lifespan(id: string, body: V1LifespanRequest, options?: any) { - return ClusterServiceApiFp(this.configuration) - .lifespan(id, body, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {boolean} [all] all indicates that all clusters should be returned, not just the ones owned by the user. - * @param {boolean} [expired] expired indicates that expired clusters should be returned, not just the ones that are launching/ready. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public list(all?: boolean, expired?: boolean, options?: any) { - return ClusterServiceApiFp(this.configuration) - .list(all, expired, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Logs returns the logs for a specific cluster. - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ClusterServiceApi - */ - public logs(id: string, options?: any) { - return ClusterServiceApiFp(this.configuration) - .logs(id, options) - .then((request) => request(this.axios, this.basePath)); - } + public clusterServiceLogs(id: string, options?: any) { + return ClusterServiceApiFp(this.configuration).clusterServiceLogs(id, options).then((request) => request(this.axios, this.basePath)); + } } + /** * FlavorServiceApi - axios parameter creator * @export */ export const FlavorServiceApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - info: async (id: string, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError( - 'id', - 'Required parameter id was null or undefined when calling info.' - ); - } - const localVarPath = `/v1/flavor/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - list: async (all?: boolean, options: any = {}): Promise => { - const localVarPath = `/v1/flavor`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (all !== undefined) { - localVarQueryParameter['all'] = all; - } - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - }; + return { + /** + * + * @summary Info provides information about a specific flavor. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + flavorServiceInfo: async (id: string, options: any = {}): Promise => { + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError('id','Required parameter id was null or undefined when calling flavorServiceInfo.'); + } + const localVarPath = `/v1/flavor/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List provides information about the available flavors. + * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + flavorServiceList: async (all?: boolean, options: any = {}): Promise => { + const localVarPath = `/v1/flavor`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (all !== undefined) { + localVarQueryParameter['all'] = all; + } + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** * FlavorServiceApi - functional programming interface * @export */ -export const FlavorServiceApiFp = function (configuration?: Configuration) { - return { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async info( - id: string, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await FlavorServiceApiAxiosParamCreator(configuration).info( - id, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async list( - all?: boolean, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await FlavorServiceApiAxiosParamCreator(configuration).list( - all, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - }; +export const FlavorServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary Info provides information about a specific flavor. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async flavorServiceInfo(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await FlavorServiceApiAxiosParamCreator(configuration).flavorServiceInfo(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary List provides information about the available flavors. + * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async flavorServiceList(all?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await FlavorServiceApiAxiosParamCreator(configuration).flavorServiceList(all, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } }; /** * FlavorServiceApi - factory interface * @export */ -export const FlavorServiceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance -) { - return { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {string} id +export const FlavorServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary Info provides information about a specific flavor. + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + flavorServiceInfo(id: string, options?: any): AxiosPromise { + return FlavorServiceApiFp(configuration).flavorServiceInfo(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List provides information about the available flavors. + * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + flavorServiceList(all?: boolean, options?: any): AxiosPromise { + return FlavorServiceApiFp(configuration).flavorServiceList(all, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FlavorServiceApi - object-oriented interface + * @export + * @class FlavorServiceApi + * @extends {BaseAPI} + */ +export class FlavorServiceApi extends BaseAPI { + /** + * + * @summary Info provides information about a specific flavor. + * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof FlavorServiceApi */ - info(id: string, options?: any): AxiosPromise { - return FlavorServiceApiFp(configuration) - .info(id, options) - .then((request) => request(axios, basePath)); - }, + public flavorServiceInfo(id: string, options?: any) { + return FlavorServiceApiFp(this.configuration).flavorServiceInfo(id, options).then((request) => request(this.axios, this.basePath)); + } + /** - * + * + * @summary List provides information about the available flavors. * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof FlavorServiceApi */ - list(all?: boolean, options?: any): AxiosPromise { - return FlavorServiceApiFp(configuration) - .list(all, options) - .then((request) => request(axios, basePath)); - }, - }; + public flavorServiceList(all?: boolean, options?: any) { + return FlavorServiceApiFp(this.configuration).flavorServiceList(all, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * InfraStatusServiceApi - axios parameter creator + * @export + */ +export const InfraStatusServiceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary GetStatus gets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceGetStatus: async (options: any = {}): Promise => { + const localVarPath = `/v1/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary ResetStatus resets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceResetStatus: async (options: any = {}): Promise => { + const localVarPath = `/v1/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary SetStatus sets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceSetStatus: async (options: any = {}): Promise => { + const localVarPath = `/v1/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** - * FlavorServiceApi - object-oriented interface + * InfraStatusServiceApi - functional programming interface * @export - * @class FlavorServiceApi - * @extends {BaseAPI} */ -export class FlavorServiceApi extends BaseAPI { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FlavorServiceApi - */ - public info(id: string, options?: any) { - return FlavorServiceApiFp(this.configuration) - .info(id, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {boolean} [all] all indicates that all flavors should be returned, by default availability alpha clusters are excluded. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FlavorServiceApi - */ - public list(all?: boolean, options?: any) { - return FlavorServiceApiFp(this.configuration) - .list(all, options) - .then((request) => request(this.axios, this.basePath)); - } -} +export const InfraStatusServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary GetStatus gets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async infraStatusServiceGetStatus(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await InfraStatusServiceApiAxiosParamCreator(configuration).infraStatusServiceGetStatus(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary ResetStatus resets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async infraStatusServiceResetStatus(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await InfraStatusServiceApiAxiosParamCreator(configuration).infraStatusServiceResetStatus(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary SetStatus sets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async infraStatusServiceSetStatus(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await InfraStatusServiceApiAxiosParamCreator(configuration).infraStatusServiceSetStatus(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; /** - * UserServiceApi - axios parameter creator + * InfraStatusServiceApi - factory interface * @export */ -export const UserServiceApiAxiosParamCreator = function (configuration?: Configuration) { - return { +export const InfraStatusServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary GetStatus gets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceGetStatus(options?: any): AxiosPromise { + return InfraStatusServiceApiFp(configuration).infraStatusServiceGetStatus(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary ResetStatus resets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceResetStatus(options?: any): AxiosPromise { + return InfraStatusServiceApiFp(configuration).infraStatusServiceResetStatus(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary SetStatus sets the maintenance + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + infraStatusServiceSetStatus(options?: any): AxiosPromise { + return InfraStatusServiceApiFp(configuration).infraStatusServiceSetStatus(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * InfraStatusServiceApi - object-oriented interface + * @export + * @class InfraStatusServiceApi + * @extends {BaseAPI} + */ +export class InfraStatusServiceApi extends BaseAPI { /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {V1ServiceAccount} body + * + * @summary GetStatus gets the maintenance * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof InfraStatusServiceApi */ - createToken: async (body: V1ServiceAccount, options: any = {}): Promise => { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError( - 'body', - 'Required parameter body was null or undefined when calling createToken.' - ); - } - const localVarPath = `/v1/token-create`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - const nonString = typeof body !== 'string'; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) - : nonString; - localVarRequestOptions.data = needsSerialization - ? JSON.stringify(body !== undefined ? body : {}) - : body || ''; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Token generates a service account token for the current user. - * @param {object} body + public infraStatusServiceGetStatus(options?: any) { + return InfraStatusServiceApiFp(this.configuration).infraStatusServiceGetStatus(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary ResetStatus resets the maintenance * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof InfraStatusServiceApi */ - token: async (body: object, options: any = {}): Promise => { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError( - 'body', - 'Required parameter body was null or undefined when calling token.' - ); - } - const localVarPath = `/v1/token`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - const nonString = typeof body !== 'string'; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) - : nonString; - localVarRequestOptions.data = needsSerialization - ? JSON.stringify(body !== undefined ? body : {}) - : body || ''; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * + public infraStatusServiceResetStatus(options?: any) { + return InfraStatusServiceApiFp(this.configuration).infraStatusServiceResetStatus(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary SetStatus sets the maintenance * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof InfraStatusServiceApi */ - whoami: async (options: any = {}): Promise => { - const localVarPath = `/v1/whoami`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - }; + public infraStatusServiceSetStatus(options?: any) { + return InfraStatusServiceApiFp(this.configuration).infraStatusServiceSetStatus(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * UserServiceApi - axios parameter creator + * @export + */ +export const UserServiceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary CreateToken generates an arbitrary service account token + * @param {V1ServiceAccount} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceCreateToken: async (body: V1ServiceAccount, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling userServiceCreateToken.'); + } + const localVarPath = `/v1/token-create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const nonString = typeof body !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) + : nonString; + localVarRequestOptions.data = needsSerialization + ? JSON.stringify(body !== undefined ? body : {}) + : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Token generates a service account token for the current user. + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceToken: async (body: object, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling userServiceToken.'); + } + const localVarPath = `/v1/token`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const nonString = typeof body !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type']) + : nonString; + localVarRequestOptions.data = needsSerialization + ? JSON.stringify(body !== undefined ? body : {}) + : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Whoami provides information about the currently authenticated principal. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceWhoami: async (options: any = {}): Promise => { + const localVarPath = `/v1/whoami`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** * UserServiceApi - functional programming interface * @export */ -export const UserServiceApiFp = function (configuration?: Configuration) { - return { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {V1ServiceAccount} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createToken( - body: V1ServiceAccount, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).createToken( - body, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Token generates a service account token for the current user. - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async token( - body: object, - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).token( - body, - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async whoami( - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).whoami( - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - }; +export const UserServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary CreateToken generates an arbitrary service account token + * @param {V1ServiceAccount} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userServiceCreateToken(body: V1ServiceAccount, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).userServiceCreateToken(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Token generates a service account token for the current user. + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userServiceToken(body: object, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).userServiceToken(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Whoami provides information about the currently authenticated principal. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userServiceWhoami(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserServiceApiAxiosParamCreator(configuration).userServiceWhoami(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } }; /** * UserServiceApi - factory interface * @export */ -export const UserServiceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance -) { - return { - /** - * +export const UserServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary CreateToken generates an arbitrary service account token + * @param {V1ServiceAccount} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceCreateToken(body: V1ServiceAccount, options?: any): AxiosPromise { + return UserServiceApiFp(configuration).userServiceCreateToken(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Token generates a service account token for the current user. + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceToken(body: object, options?: any): AxiosPromise { + return UserServiceApiFp(configuration).userServiceToken(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Whoami provides information about the currently authenticated principal. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userServiceWhoami(options?: any): AxiosPromise { + return UserServiceApiFp(configuration).userServiceWhoami(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserServiceApi - object-oriented interface + * @export + * @class UserServiceApi + * @extends {BaseAPI} + */ +export class UserServiceApi extends BaseAPI { + /** + * * @summary CreateToken generates an arbitrary service account token - * @param {V1ServiceAccount} body + * @param {V1ServiceAccount} body * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof UserServiceApi */ - createToken(body: V1ServiceAccount, options?: any): AxiosPromise { - return UserServiceApiFp(configuration) - .createToken(body, options) - .then((request) => request(axios, basePath)); - }, + public userServiceCreateToken(body: V1ServiceAccount, options?: any) { + return UserServiceApiFp(this.configuration).userServiceCreateToken(body, options).then((request) => request(this.axios, this.basePath)); + } + /** - * + * * @summary Token generates a service account token for the current user. - * @param {object} body + * @param {object} body * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof UserServiceApi */ - token(body: object, options?: any): AxiosPromise { - return UserServiceApiFp(configuration) - .token(body, options) - .then((request) => request(axios, basePath)); - }, + public userServiceToken(body: object, options?: any) { + return UserServiceApiFp(this.configuration).userServiceToken(body, options).then((request) => request(this.axios, this.basePath)); + } + /** - * + * + * @summary Whoami provides information about the currently authenticated principal. * @param {*} [options] Override http request option. * @throws {RequiredError} + * @memberof UserServiceApi */ - whoami(options?: any): AxiosPromise { - return UserServiceApiFp(configuration) - .whoami(options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * UserServiceApi - object-oriented interface - * @export - * @class UserServiceApi - * @extends {BaseAPI} - */ -export class UserServiceApi extends BaseAPI { - /** - * - * @summary CreateToken generates an arbitrary service account token - * @param {V1ServiceAccount} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserServiceApi - */ - public createToken(body: V1ServiceAccount, options?: any) { - return UserServiceApiFp(this.configuration) - .createToken(body, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Token generates a service account token for the current user. - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserServiceApi - */ - public token(body: object, options?: any) { - return UserServiceApiFp(this.configuration) - .token(body, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserServiceApi - */ - public whoami(options?: any) { - return UserServiceApiFp(this.configuration) - .whoami(options) - .then((request) => request(this.axios, this.basePath)); - } + public userServiceWhoami(options?: any) { + return UserServiceApiFp(this.configuration).userServiceWhoami(options).then((request) => request(this.axios, this.basePath)); + } } + /** * VersionServiceApi - axios parameter creator * @export */ export const VersionServiceApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getVersion: async (options: any = {}): Promise => { - const localVarPath = `/v1/version`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - const queryParameters = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - queryParameters.set(key, localVarQueryParameter[key]); - } - for (const key in options.query) { - queryParameters.set(key, options.query[key]); - } - localVarUrlObj.search = new URLSearchParams(queryParameters).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - }; + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + versionServiceGetVersion: async (options: any = {}): Promise => { + const localVarPath = `/v1/version`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + const queryParameters = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + queryParameters.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + queryParameters.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } }; /** * VersionServiceApi - functional programming interface * @export */ -export const VersionServiceApiFp = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getVersion( - options?: any - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await VersionServiceApiAxiosParamCreator(configuration).getVersion( - options - ); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = { - ...localVarAxiosArgs.options, - url: (configuration?.basePath || basePath) + localVarAxiosArgs.url, - }; - return axios.request(axiosRequestArgs); - }; - }, - }; +export const VersionServiceApiFp = function(configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async versionServiceGetVersion(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await VersionServiceApiAxiosParamCreator(configuration).versionServiceGetVersion(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } }; /** * VersionServiceApi - factory interface * @export */ -export const VersionServiceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance -) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getVersion(options?: any): AxiosPromise { - return VersionServiceApiFp(configuration) - .getVersion(options) - .then((request) => request(axios, basePath)); - }, - }; +export const VersionServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + versionServiceGetVersion(options?: any): AxiosPromise { + return VersionServiceApiFp(configuration).versionServiceGetVersion(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -2217,15 +2249,15 @@ export const VersionServiceApiFactory = function ( * @extends {BaseAPI} */ export class VersionServiceApi extends BaseAPI { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VersionServiceApi - */ - public getVersion(options?: any) { - return VersionServiceApiFp(this.configuration) - .getVersion(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VersionServiceApi + */ + public versionServiceGetVersion(options?: any) { + return VersionServiceApiFp(this.configuration).versionServiceGetVersion(options).then((request) => request(this.axios, this.basePath)); + } } + + diff --git a/ui/src/generated/client/base.ts b/ui/src/generated/client/base.ts index 1925749a8..d327f1eae 100644 --- a/ui/src/generated/client/base.ts +++ b/ui/src/generated/client/base.ts @@ -1,33 +1,34 @@ /* tslint:disable */ /* eslint-disable */ /** - * service.proto + * proto/api/v1/service.proto * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: version not set - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { Configuration } from './configuration'; + +import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; -export const BASE_PATH = 'http://localhost'.replace(/\/+$/, ''); +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); /** * * @export */ export const COLLECTION_FORMATS = { - csv: ',', - ssv: ' ', - tsv: '\t', - pipes: '|', + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; /** @@ -36,8 +37,8 @@ export const COLLECTION_FORMATS = { * @interface RequestArgs */ export interface RequestArgs { - url: string; - options: any; + url: string; + options: any; } /** @@ -46,19 +47,15 @@ export interface RequestArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined; - constructor( - configuration?: Configuration, - protected basePath: string = BASE_PATH, - protected axios: AxiosInstance = globalAxios - ) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } } - } -} +}; /** * @@ -67,8 +64,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } diff --git a/ui/src/generated/client/common.ts b/ui/src/generated/client/common.ts new file mode 100644 index 000000000..8306250ea --- /dev/null +++ b/ui/src/generated/client/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * proto/api/v1/service.proto + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/ui/src/generated/client/configuration.ts b/ui/src/generated/client/configuration.ts index 54c0f3781..fe82d4188 100644 --- a/ui/src/generated/client/configuration.ts +++ b/ui/src/generated/client/configuration.ts @@ -1,121 +1,101 @@ /* tslint:disable */ /* eslint-disable */ /** - * service.proto + * proto/api/v1/service.proto * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: version not set - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export interface ConfigurationParameters { - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i' - ); - return ( - mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') - ); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } } diff --git a/ui/src/generated/client/index.ts b/ui/src/generated/client/index.ts index 63da3f088..83c067f39 100644 --- a/ui/src/generated/client/index.ts +++ b/ui/src/generated/client/index.ts @@ -1,16 +1,18 @@ /* tslint:disable */ /* eslint-disable */ /** - * service.proto + * proto/api/v1/service.proto * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: version not set - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export * from './api'; -export * from './configuration'; + +export * from "./api"; +export * from "./configuration"; +