diff --git a/components/gitpod-cli/cmd/rebuild.go b/components/gitpod-cli/cmd/rebuild.go index e6d26514cef9f4..5f2e986cf2ad2b 100644 --- a/components/gitpod-cli/cmd/rebuild.go +++ b/components/gitpod-cli/cmd/rebuild.go @@ -9,8 +9,9 @@ import ( "fmt" "os" "os/exec" + "os/signal" "path/filepath" - "strings" + "syscall" "time" "github.com/gitpod-io/gitpod/gitpod-cli/pkg/supervisor" @@ -19,48 +20,51 @@ import ( "github.com/spf13/cobra" ) -func TerminateExistingContainer() error { - cmd := exec.Command("docker", "ps", "-q", "-f", "label=gp-rebuild") - containerIds, err := cmd.Output() - if err != nil { - return err +func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClient, event *utils.EventTracker) (bool, error) { + rebuildCtx := &rebuildContext{ + supervisorClient: supervisorClient, + imageTag: "gp-rebuild", } - - for _, id := range strings.Split(string(containerIds), "\n") { - if len(id) == 0 { - continue - } - - cmd = exec.Command("docker", "stop", id) - err := cmd.Run() - if err != nil { - return err - } - - cmd = exec.Command("docker", "rm", "-f", id) - err = cmd.Run() - if err != nil { - return err - } + valid, err := validate(ctx, event, rebuildCtx) + if !valid || err != nil { + return valid, err } - return nil -} - -func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClient, event *utils.EventTracker) error { - wsInfo, err := supervisorClient.Info.WorkspaceInfo(ctx, &api.WorkspaceInfoRequest{}) + buildDir, err := os.MkdirTemp("", "gp-rebuild-*") if err != nil { event.Set("ErrorCode", utils.SystemErrorCode) - return err + return false, err } + defer os.RemoveAll(buildDir) + rebuildCtx.buildDir = buildDir - tmpDir, err := os.MkdirTemp("", "gp-rebuild-*") + err = buildImage(ctx, event, rebuildCtx) + if err != nil { + return false, err + } + err = debug(ctx, event, rebuildCtx) + if err != nil { + return false, err + } + return true, nil +} + +type rebuildContext struct { + supervisorClient *supervisor.SupervisorClient + baseImage string + buildDir string + dockerPath string + imageTag string +} + +func validate(ctx context.Context, event *utils.EventTracker, rebuildCtx *rebuildContext) (bool, error) { + wsInfo, err := rebuildCtx.supervisorClient.Info.WorkspaceInfo(ctx, &api.WorkspaceInfoRequest{}) if err != nil { event.Set("ErrorCode", utils.SystemErrorCode) - return err + return false, err } - defer os.RemoveAll(tmpDir) + // TODO make it flexible, look for first .gitopd.yml traversing parents? gitpodConfig, err := utils.ParseGitpodConfig(wsInfo.CheckoutLocation) if err != nil { fmt.Println("The .gitpod.yml file cannot be parsed: please check the file and try again") @@ -68,7 +72,7 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie fmt.Println("For help check out the reference page:") fmt.Println("https://www.gitpod.io/docs/references/gitpod-yml#gitpodyml") event.Set("ErrorCode", utils.RebuildErrorCode_MalformedGitpodYaml) - return err + return false, err } if gitpodConfig == nil { @@ -79,27 +83,27 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie fmt.Println("Alternatively, check out the following docs for getting started configuring your project") fmt.Println("https://www.gitpod.io/docs/configure#configure-gitpod") event.Set("ErrorCode", utils.RebuildErrorCode_MissingGitpodYaml) - return err + return false, err } - var baseimage string + var baseImage string switch img := gitpodConfig.Image.(type) { case nil: - baseimage = "" + baseImage = "" case string: - baseimage = "FROM " + img + baseImage = "FROM " + img case map[interface{}]interface{}: dockerfilePath := filepath.Join(wsInfo.CheckoutLocation, img["file"].(string)) if _, err := os.Stat(dockerfilePath); os.IsNotExist(err) { fmt.Println("Your .gitpod.yml points to a Dockerfile that doesn't exist: " + dockerfilePath) event.Set("ErrorCode", utils.RebuildErrorCode_DockerfileNotFound).Send(ctx) - return err + return false, err } dockerfile, err := os.ReadFile(dockerfilePath) if err != nil { event.Set("ErrorCode", utils.RebuildErrorCode_DockerfileCannotRead) - return err + return false, err } if string(dockerfile) == "" { fmt.Println("Your Gitpod's Dockerfile is empty") @@ -109,46 +113,50 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie fmt.Println("") fmt.Println("Once you configure your Dockerfile, re-run this command to validate your changes") event.Set("ErrorCode", utils.RebuildErrorCode_DockerfileEmpty) - return err + return false, err } - baseimage = "\n" + string(dockerfile) + "\n" + baseImage = "\n" + string(dockerfile) + "\n" default: fmt.Println("Check your .gitpod.yml and make sure the image property is configured correctly") event.Set("ErrorCode", utils.RebuildErrorCode_MalformedGitpodYaml) - return err + return false, err } - if baseimage == "" { + if baseImage == "" { fmt.Println("Your project is not using any custom Docker image.") fmt.Println("Check out the following docs, to know how to get started") fmt.Println("") fmt.Println("https://www.gitpod.io/docs/configure/workspaces/workspace-image#use-a-public-docker-image") event.Set("ErrorCode", utils.RebuildErrorCode_NoCustomImage) - return err - } - - err = os.WriteFile(filepath.Join(tmpDir, "Dockerfile"), []byte(baseimage), 0644) - if err != nil { - fmt.Println("Could not write the temporary Dockerfile") - event.Set("ErrorCode", utils.RebuildErrorCode_DockerfileCannotWirte) - return err + return false, err } + rebuildCtx.baseImage = baseImage + return true, nil +} +func buildImage(ctx context.Context, event *utils.EventTracker, rebuildCtx *rebuildContext) error { dockerPath, err := exec.LookPath("docker") if err != nil { fmt.Println("Docker is not installed in your workspace") event.Set("ErrorCode", utils.RebuildErrorCode_DockerNotFound) return err } + rebuildCtx.dockerPath = dockerPath - tag := "gp-rebuild-temp-build" + dockerFile := filepath.Join(rebuildCtx.buildDir, "Dockerfile") + err = os.WriteFile(dockerFile, []byte(rebuildCtx.baseImage), 0644) + if err != nil { + fmt.Println("Could not write the temporary Dockerfile") + event.Set("ErrorCode", utils.RebuildErrorCode_DockerfileCannotWrite) + return err + } - dockerCmd := exec.Command(dockerPath, "build", "-t", tag, "--progress=tty", ".") - dockerCmd.Dir = tmpDir + imageBuildStartTime := time.Now() + fmt.Println("building the workspace image...") + dockerCmd := exec.CommandContext(ctx, dockerPath, "build", "-t", rebuildCtx.imageTag, ".", "-f", dockerFile) dockerCmd.Stdout = os.Stdout dockerCmd.Stderr = os.Stderr - - imageBuildStartTime := time.Now() + dockerCmd.Env = append(os.Environ(), "DOCKER_BUILDKIT=1") err = dockerCmd.Run() if _, ok := err.(*exec.ExitError); ok { fmt.Println("Image Build Failed") @@ -161,57 +169,56 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie } ImageBuildDuration := time.Since(imageBuildStartTime).Milliseconds() event.Set("ImageBuildDuration", ImageBuildDuration) + return err +} - err = TerminateExistingContainer() +func debug(ctx context.Context, event *utils.EventTracker, rebuildCtx *rebuildContext) (err error) { + // TODO: stopDebug to release the root FS + + // TODO skip if image did not change, it is very slow, how to tune? + exportStartTime := time.Now() + exportPhase := "exporting the workspace root filesystem" + fmt.Println(exportPhase + ", may take sometime...") + exportCmd := exec.CommandContext(ctx, "sudo", "/.supervisor/supervisor", "export-rootfs", rebuildCtx.buildDir, rebuildCtx.dockerPath, rebuildCtx.imageTag) + exportCmd.Stdout = os.Stdout + exportCmd.Stderr = os.Stderr + err = exportCmd.Run() + event.Data.ExportRootFileSystemDuration = time.Since(exportStartTime).Milliseconds() + fmt.Printf(exportPhase+" finished in %s \n", + (time.Duration(event.Data.ExportRootFileSystemDuration) * time.Millisecond).Round(time.Second).String(), + ) if err != nil { - event.Set("ErrorCode", utils.SystemErrorCode) + event.Data.ErrorCode = utils.RebuildErrorCode_ExportRootFSFailed return err } - messages := []string{ - "\n\nYou are now connected to the container", - "You can inspect the container and make sure the necessary tools & libraries are installed.", - "When you are done, just type exit to return to your Gitpod workspace\n", - } - - welcomeMessage := strings.Join(messages, "\n") - - dockerRunCmd := exec.Command( - dockerPath, - "run", - "--rm", - "--label", "gp-rebuild=true", - "-it", - tag, - "bash", - "-c", - fmt.Sprintf("echo '%s'; bash", welcomeMessage), - ) - - dockerRunCmd.Stdout = os.Stdout - dockerRunCmd.Stderr = os.Stderr - dockerRunCmd.Stdin = os.Stdin - - err = dockerRunCmd.Run() - if _, ok := err.(*exec.ExitError); ok { - fmt.Println("Docker Run Command Failed") - event.Set("ErrorCode", utils.RebuildErrorCode_DockerRunFailed) - return err - } else if err != nil { - fmt.Println("Docker error") - event.Set("ErrorCode", utils.RebuildErrorCode_DockerErr) + fmt.Println("starting a debug workspace...") + debugCmd := exec.CommandContext(ctx, "/.supervisor/supervisor", "inner-loop") + debugCmd.Stdout = os.Stdout + debugCmd.Stderr = os.Stderr + err = debugCmd.Run() + if err != nil { + event.Data.ErrorCode = utils.RebuildErrorCode_DebugFailed return err } - return nil } var buildCmd = &cobra.Command{ Use: "rebuild", - Short: "Re-builds the workspace image (useful to debug a workspace custom image)", + Short: "Re-builds the workspace (useful to debug a workspace configuration)", Hidden: false, Run: func(cmd *cobra.Command, args []string) { - ctx := context.Background() + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigChan := make(chan os.Signal, 1) + signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) + go func() { + <-sigChan + cancel() + }() + supervisorClient, err := supervisor.New(ctx) if err != nil { utils.LogError(ctx, err, "Could not get workspace info required to build", supervisorClient) @@ -223,16 +230,24 @@ var buildCmd = &cobra.Command{ Command: cmd.Name(), }) - err = runRebuild(ctx, supervisorClient, event) - if err != nil && event.Data.ErrorCode == "" { - event.Set("ErrorCode", utils.SystemErrorCode) + ok, err := runRebuild(ctx, supervisorClient, event) + if event.Data.ErrorCode == "" { + if err != nil { + event.Set("ErrorCode", utils.SystemErrorCode) + } else if !ok { + event.Set("ErrorCode", utils.UserErrorCode) + } } event.Send(ctx) if err != nil { utils.LogError(ctx, err, "Failed to rebuild", supervisorClient) - os.Exit(1) } + var exitCode int + if err != nil || !ok { + exitCode = 1 + } + os.Exit(exitCode) }, } diff --git a/components/gitpod-cli/cmd/stop-workspace.go b/components/gitpod-cli/cmd/stop-workspace.go index 80f970bcb6ed55..e705b1b416c872 100644 --- a/components/gitpod-cli/cmd/stop-workspace.go +++ b/components/gitpod-cli/cmd/stop-workspace.go @@ -6,9 +6,11 @@ package cmd import ( "context" + "syscall" "time" gitpod "github.com/gitpod-io/gitpod/gitpod-cli/pkg/gitpod" + "github.com/gitpod-io/gitpod/gitpod-cli/pkg/utils" "github.com/spf13/cobra" ) @@ -20,6 +22,10 @@ var stopWorkspaceCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() + if utils.IsRunningInDebugWorkspace() { + _ = syscall.Kill(1, syscall.SIGTERM) + return + } wsInfo, err := gitpod.GetWSInfo(ctx) if err != nil { fail(err.Error()) diff --git a/components/gitpod-cli/pkg/utils/debug.go b/components/gitpod-cli/pkg/utils/debug.go new file mode 100644 index 00000000000000..71f32a32d3e110 --- /dev/null +++ b/components/gitpod-cli/pkg/utils/debug.go @@ -0,0 +1,11 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +package utils + +import "os" + +func IsRunningInDebugWorkspace() bool { + return os.Getenv("SUPERVISOR_DEBUG_WORKSPACE") == "true" +} diff --git a/components/gitpod-cli/pkg/utils/trackEvent.go b/components/gitpod-cli/pkg/utils/trackEvent.go index 38a148719aee01..8b342b2c3c2c30 100644 --- a/components/gitpod-cli/pkg/utils/trackEvent.go +++ b/components/gitpod-cli/pkg/utils/trackEvent.go @@ -18,29 +18,32 @@ import ( const ( // System SystemErrorCode = "system_error" + UserErrorCode = "user_error" // Rebuild RebuildErrorCode_DockerBuildFailed = "rebuild_docker_build_failed" RebuildErrorCode_DockerErr = "rebuild_docker_err" RebuildErrorCode_DockerfileCannotRead = "rebuild_dockerfile_cannot_read" - RebuildErrorCode_DockerfileCannotWirte = "rebuild_dockerfile_cannot_write" + RebuildErrorCode_DockerfileCannotWrite = "rebuild_dockerfile_cannot_write" RebuildErrorCode_DockerfileEmpty = "rebuild_dockerfile_empty" RebuildErrorCode_DockerfileNotFound = "rebuild_dockerfile_not_found" RebuildErrorCode_DockerNotFound = "rebuild_docker_not_found" - RebuildErrorCode_DockerRunFailed = "rebuild_docker_run_failed" RebuildErrorCode_MalformedGitpodYaml = "rebuild_malformed_gitpod_yaml" RebuildErrorCode_MissingGitpodYaml = "rebuild_missing_gitpod_yaml" RebuildErrorCode_NoCustomImage = "rebuild_no_custom_image" + RebuildErrorCode_ExportRootFSFailed = "rebuild_export_root_fs_failed" + RebuildErrorCode_DebugFailed = "rebuild_debug_failed" ) type TrackCommandUsageParams struct { - Command string `json:"command,omitempty"` - Duration int64 `json:"duration,omitempty"` - ErrorCode string `json:"errorCode,omitempty"` - WorkspaceId string `json:"workspaceId,omitempty"` - InstanceId string `json:"instanceId,omitempty"` - Timestamp int64 `json:"timestamp,omitempty"` - ImageBuildDuration int64 `json:"imageBuildDuration,omitempty"` + Command string `json:"command,omitempty"` + Duration int64 `json:"duration,omitempty"` + ErrorCode string `json:"errorCode,omitempty"` + WorkspaceId string `json:"workspaceId,omitempty"` + InstanceId string `json:"instanceId,omitempty"` + Timestamp int64 `json:"timestamp,omitempty"` + ImageBuildDuration int64 `json:"imageBuildDuration,omitempty"` + ExportRootFileSystemDuration int64 `json:"imageExportDuration,omitempty"` } type EventTracker struct { diff --git a/components/supervisor/cmd/export-rootfs.go b/components/supervisor/cmd/export-rootfs.go new file mode 100644 index 00000000000000..dc1ec2994c4f27 --- /dev/null +++ b/components/supervisor/cmd/export-rootfs.go @@ -0,0 +1,78 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +package cmd + +import ( + "context" + "os" + "os/exec" + "os/signal" + "syscall" + + "github.com/gitpod-io/gitpod/common-go/log" + "github.com/spf13/cobra" +) + +var rootFS = "/.debug/rootfs" + +func exportRootFS(ctx context.Context, buildDir, dockerPath, imageTag string) error { + err := os.RemoveAll(rootFS) + if err != nil { + return err + } + err = os.MkdirAll(rootFS, 0775) + if err != nil { + return err + } + + name := imageTag + "-0" + + rm := func() { + _ = exec.CommandContext(ctx, dockerPath, "rm", "-f", name).Run() + } + + rm() + createCmd := exec.CommandContext(ctx, dockerPath, "create", "--name", name, imageTag) + createCmd.Stderr = os.Stderr + err = createCmd.Run() + if err != nil { + return err + } + defer rm() + + exportCmd := exec.CommandContext(ctx, dockerPath, "cp", name+":/", rootFS) + exportCmd.Stdout = os.Stdout + exportCmd.Stderr = os.Stderr + return exportCmd.Run() +} + +var exportRootFScmd = &cobra.Command{ + Use: "export-rootfs ", + Run: func(cmd *cobra.Command, args []string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigChan := make(chan os.Signal, 1) + signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) + go func() { + <-sigChan + cancel() + }() + + var exitCode int + err := exportRootFS(ctx, args[0], args[1], args[2]) + if errr, ok := err.(*exec.ExitError); ok { + exitCode = errr.ExitCode() + } else if err != nil { + exitCode = 1 + log.WithError(err).Error() + } + os.Exit(exitCode) + }, +} + +func init() { + rootCmd.AddCommand(exportRootFScmd) +} diff --git a/components/supervisor/cmd/inner-loop.go b/components/supervisor/cmd/inner-loop.go new file mode 100644 index 00000000000000..69b8e6854d6b7f --- /dev/null +++ b/components/supervisor/cmd/inner-loop.go @@ -0,0 +1,166 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +package cmd + +import ( + "bufio" + "context" + "encoding/json" + "fmt" + "io" + "os" + "os/exec" + "strings" + "time" + + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + prefixed "github.com/x-cray/logrus-prefixed-formatter" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" + + "github.com/gitpod-io/gitpod/common-go/log" + daemonapi "github.com/gitpod-io/gitpod/ws-daemon/api" + + supervisorapi "github.com/gitpod-io/gitpod/supervisor/api" +) + +var innerLoopOpts struct { + Headless bool +} + +var innerLoopCmd = &cobra.Command{ + Use: "inner-loop", + Short: "innerLoop Test", + Run: func(cmd *cobra.Command, args []string) { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + + log.Log = logrus.WithFields(logrus.Fields{}) + logrus.SetReportCaller(false) + log.Log.Logger.SetFormatter(&prefixed.TextFormatter{ + TimestampFormat: "2006-01-02 15:04:05", + FullTimestamp: true, + ForceFormatting: true, + ForceColors: true, + }) + + const socketFN = "/.supervisor/debug-service.sock" + + conn, err := grpc.DialContext(ctx, "unix://"+socketFN, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + log.WithError(err).Fatal("could not dial context") + } + defer conn.Close() + + client := daemonapi.NewDebugServiceClient(conn) + resp, err := client.Start(context.Background(), &daemonapi.StartRequest{Headless: innerLoopOpts.Headless}) + if err != nil { + log.WithError(err).Fatal("could not retrieve workspace info") + } + r, w := io.Pipe() + reader := bufio.NewReader(r) + go func() { + for { + data, err := resp.Recv() + if err == io.EOF { + w.Close() + break + } + if err != nil { + if s := status.Convert(err); s != nil { + log.Fatal(s.Message()) + return + } + log.Fatal(err.Error()) + } + if d := data.GetData(); d != nil { + _, _ = w.Write(d) + } + } + }() + + for { + line, _, err := reader.ReadLine() + if err != nil { + if err == io.EOF { + return + } + log.Fatal(err.Error()) + } + msg := make(logrus.Fields) + err = json.Unmarshal(line, &msg) + if err != nil { + continue + + } + message := fmt.Sprintf("%v", msg["message"]) + level, err := logrus.ParseLevel(fmt.Sprintf("%v", msg["level"])) + if err != nil { + level = logrus.DebugLevel + } + if level == logrus.FatalLevel { + level = logrus.ErrorLevel + } + + delete(msg, "message") + delete(msg, "level") + delete(msg, "file") + delete(msg, "func") + delete(msg, "serviceContext") + delete(msg, "time") + delete(msg, "severity") + delete(msg, "@type") + + if fmt.Sprintf("%v", msg["debugWorkspace"]) == "true" { + workspaceUrl := fmt.Sprintf("%v", msg["workspaceUrl"]) + // TODO ssh link too + sep := strings.Repeat("=", len(message)) + log.Info("\n" + sep + "\n\n\n" + message + "\n\n\n" + sep) + go func() { + err := notify(workspaceUrl, message) + if err != nil { + log.WithError(err).Error("failed to notify") + } + }() + } else { + log.Log.WithFields(msg).Log(level, message) + } + } + }, +} + +func notify(workspaceUrl string, message string) error { + conn := dialSupervisor() + defer conn.Close() + + client := supervisorapi.NewNotificationServiceClient(conn) + + response, err := client.Notify(context.Background(), &supervisorapi.NotifyRequest{ + Level: supervisorapi.NotifyRequest_INFO, + Message: message, + Actions: []string{"Open Browser"}, + }) + if err != nil { + return err + } + if response.Action == "Open Browser" { + gpPath, err := exec.LookPath("gp") + if err != nil { + return err + } + gpCmd := exec.Command(gpPath, "preview", "--external", workspaceUrl) + gpCmd.Stdout = os.Stdout + gpCmd.Stderr = os.Stderr + return gpCmd.Run() + } + return nil +} + +func init() { + rootCmd.AddCommand(innerLoopCmd) + innerLoopCmd.Flags().BoolVar(&innerLoopOpts.Headless, "headless", false, "running debug workspace in headless mode") +} diff --git a/components/supervisor/cmd/proxy.go b/components/supervisor/cmd/proxy.go new file mode 100644 index 00000000000000..397e3a633d989e --- /dev/null +++ b/components/supervisor/cmd/proxy.go @@ -0,0 +1,56 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +package cmd + +import ( + "fmt" + "net/http" + "net/http/httputil" + "net/url" + "strconv" + + "github.com/gitpod-io/gitpod/common-go/log" + "github.com/spf13/cobra" +) + +func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy { + director := func(req *http.Request) { + req.URL.Scheme = target.Scheme + req.URL.Host = target.Host + if _, ok := req.Header["User-Agent"]; !ok { + // explicitly disable User-Agent so it's not set to default value + req.Header.Set("User-Agent", "") + } + req.Header.Del("X-WS-Proxy-Debug-Port") + } + return &httputil.ReverseProxy{Director: director} +} + +var proxyCmd = &cobra.Command{ + Use: "proxy", + Short: "forward request to debug workspace", + Run: func(cmd *cobra.Command, args []string) { + log.Fatal(http.ListenAndServe(":25003", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + portStr := r.Header.Get("X-WS-Proxy-Debug-Port") + port, err := strconv.Atoi(portStr) + if err != nil || port < 1 || port > 65535 { + w.WriteHeader(502) + return + } + dst, err := url.Parse("http://10.0.6.2:" + portStr) + if err != nil { + w.WriteHeader(502) + return + } + fmt.Printf("%+v\n", dst) + proxy := NewSingleHostReverseProxy(dst) + proxy.ServeHTTP(w, r) + }))) + }, +} + +func init() { + rootCmd.AddCommand(proxyCmd) +} diff --git a/components/supervisor/go.mod b/components/supervisor/go.mod index a89c68b976da08..20084282057b07 100644 --- a/components/supervisor/go.mod +++ b/components/supervisor/go.mod @@ -97,7 +97,10 @@ require ( github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/klauspost/compress v1.13.5 // indirect github.com/klauspost/cpuid v1.3.1 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/minio/md5-simd v1.1.0 // indirect github.com/minio/minio-go/v7 v7.0.26 // indirect github.com/minio/sha256-simd v0.1.1 // indirect @@ -119,6 +122,7 @@ require ( github.com/stretchr/testify v1.7.1 // indirect github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.4.0 // indirect diff --git a/components/supervisor/go.sum b/components/supervisor/go.sum index 3f96bd387d5367..a5947a7cc51eaa 100644 --- a/components/supervisor/go.sum +++ b/components/supervisor/go.sum @@ -374,10 +374,15 @@ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/mailru/easygo v0.0.0-20190618140210-3c14a0dc985f h1:4+gHs0jJFJ06bfN8PshnM6cHcxGjRUVRLo5jndDiKRQ= github.com/mailru/easygo v0.0.0-20190618140210-3c14a0dc985f/go.mod h1:tHCZHV8b2A90ObojrEAzY0Lb03gxUxjDHr5IJyAh4ew= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/minio-go/v7 v7.0.26 h1:D0HK+8793etZfRY/vHhDmFaP+vmT41K3K4JV9vmZCBQ= @@ -489,6 +494,8 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c h1:3lbZUMbMiGUW/LMkfsEABsc5zNT9+b1CvsJx47JzJ8g= github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/components/supervisor/hot-deploy.sh b/components/supervisor/hot-deploy.sh index 7c5780212d1306..a30015245bd550 100755 --- a/components/supervisor/hot-deploy.sh +++ b/components/supervisor/hot-deploy.sh @@ -19,7 +19,7 @@ echo "Image Version: $version" bldfn="/tmp/build-$version.tar.gz" docker ps &> /dev/null || (echo "You need a working Docker daemon. Maybe set DOCKER_HOST?"; exit 1) -leeway build -Dversion="$version" -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build .:docker --save "$bldfn" +leeway build -Dversion="$version" -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build .:docker --dont-test --save "$bldfn" dev_image="$(tar xfO "$bldfn" ./imgnames.txt | head -n1)" echo "Dev Image: $dev_image" diff --git a/components/supervisor/pkg/ports/exposed-ports.go b/components/supervisor/pkg/ports/exposed-ports.go index 9d01d1a9dd88b5..af2aa183e9e757 100644 --- a/components/supervisor/pkg/ports/exposed-ports.go +++ b/components/supervisor/pkg/ports/exposed-ports.go @@ -60,10 +60,11 @@ func (*NoopExposedPorts) Expose(ctx context.Context, local uint32, public bool) // GitpodExposedPorts uses a connection to the Gitpod server to implement // the ExposedPortsInterface. type GitpodExposedPorts struct { - WorkspaceID string - InstanceID string - WorkspaceUrl string - gitpodService serverapi.APIInterface + WorkspaceID string + InstanceID string + WorkspaceUrl string + gitpodService serverapi.APIInterface + debugWorkspace bool localExposedPort []uint32 localExposedNotice chan struct{} @@ -79,12 +80,13 @@ type exposePortRequest struct { } // NewGitpodExposedPorts creates a new instance of GitpodExposedPorts -func NewGitpodExposedPorts(workspaceID string, instanceID string, workspaceUrl string, gitpodService serverapi.APIInterface) *GitpodExposedPorts { +func NewGitpodExposedPorts(workspaceID string, instanceID string, workspaceUrl string, debugWorkspace bool, gitpodService serverapi.APIInterface) *GitpodExposedPorts { return &GitpodExposedPorts{ - WorkspaceID: workspaceID, - InstanceID: instanceID, - WorkspaceUrl: workspaceUrl, - gitpodService: gitpodService, + WorkspaceID: workspaceID, + InstanceID: instanceID, + WorkspaceUrl: workspaceUrl, + gitpodService: gitpodService, + debugWorkspace: debugWorkspace, // allow clients to submit 30 expose requests without blocking requests: make(chan *exposePortRequest, 30), @@ -227,7 +229,7 @@ func (g *GitpodExposedPorts) doExpose(req *exposePortRequest) { // Expose exposes a port to the internet. Upon successful execution any Observer will be updated. func (g *GitpodExposedPorts) Expose(ctx context.Context, local uint32, public bool) <-chan error { - if !public { + if !public || g.debugWorkspace { if !g.existInLocalExposed(local) { g.localExposedPort = append(g.localExposedPort, local) g.localExposedNotice <- struct{}{} diff --git a/components/supervisor/pkg/supervisor/config.go b/components/supervisor/pkg/supervisor/config.go index 0c9149dd5b12f4..ea1ec01f7761a8 100644 --- a/components/supervisor/pkg/supervisor/config.go +++ b/components/supervisor/pkg/supervisor/config.go @@ -285,6 +285,9 @@ type WorkspaceConfig struct { // TerminationGracePeriodSeconds is the max number of seconds the workspace can take to shut down all its processes after SIGTERM was sent. TerminationGracePeriodSeconds *int `env:"GITPOD_TERMINATION_GRACE_PERIOD_SECONDS"` + + // DebugWorkspace controls whether the workspace is running in inner-loop + DebugWorkspace bool `env:"SUPERVISOR_DEBUG_WORKSPACE"` } // WorkspaceGitpodToken is a list of tokens that should be added to supervisor's token service. diff --git a/components/supervisor/pkg/supervisor/supervisor.go b/components/supervisor/pkg/supervisor/supervisor.go index 589e382623dc23..ef8d6f0f422ce9 100644 --- a/components/supervisor/pkg/supervisor/supervisor.go +++ b/components/supervisor/pkg/supervisor/supervisor.go @@ -337,7 +337,7 @@ func Run(options ...RunOption) { Gid: gitpodGID, } - taskManager := newTasksManager(cfg, termMuxSrv, cstate, nil, ideReady, desktopIdeReady) + taskManager := newTasksManager(cfg, termMuxSrv, cstate, nil, ideReady, desktopIdeReady, gitpodConfigService) apiServices := []RegisterableService{ &statusService{ @@ -662,7 +662,7 @@ func createExposedPortsImpl(cfg *Config, gitpodService serverapi.APIInterface) p log.Error("auto-port exposure won't work") return &ports.NoopExposedPorts{} } - return ports.NewGitpodExposedPorts(cfg.WorkspaceID, cfg.WorkspaceInstanceID, cfg.WorkspaceUrl, gitpodService) + return ports.NewGitpodExposedPorts(cfg.WorkspaceID, cfg.WorkspaceInstanceID, cfg.WorkspaceUrl, cfg.DebugWorkspace, gitpodService) } // supervisor ships some binaries we want in the PATH. We could just add some directory to the path, but @@ -1076,6 +1076,11 @@ func runIDEReadinessProbe(cfg *Config, ideConfig *IDEConfig, ide IDEKind) (deskt duration := time.Since(t0).Seconds() log.WithField("ide", ide.String()).WithField("duration", duration).Infof("IDE readiness took %.3f seconds", duration) + if cfg.DebugWorkspace && ide == WebIDE { + log.WithField("debugWorkspace", "true"). + WithField("workspaceUrl", cfg.WorkspaceUrl). + Infof("The debug workspace is available on: %s", cfg.WorkspaceUrl) + } if ide != DesktopIDE { return } diff --git a/components/supervisor/pkg/supervisor/tasks.go b/components/supervisor/pkg/supervisor/tasks.go index 12463a08fde91b..fcb4f3611abaf2 100644 --- a/components/supervisor/pkg/supervisor/tasks.go +++ b/components/supervisor/pkg/supervisor/tasks.go @@ -22,6 +22,7 @@ import ( csapi "github.com/gitpod-io/gitpod/content-service/api" "github.com/gitpod-io/gitpod/content-service/pkg/logs" "github.com/gitpod-io/gitpod/supervisor/api" + "github.com/gitpod-io/gitpod/supervisor/pkg/config" "github.com/gitpod-io/gitpod/supervisor/pkg/terminal" ) @@ -109,9 +110,11 @@ type tasksManager struct { reporter headlessTaskProgressReporter ideReady *ideReadyState desktopIdeReady *ideReadyState + + configService config.ConfigInterface } -func newTasksManager(config *Config, terminalService *terminal.MuxTerminalService, contentState ContentState, reporter headlessTaskProgressReporter, ideReady *ideReadyState, desktopIdeReady *ideReadyState) *tasksManager { +func newTasksManager(config *Config, terminalService *terminal.MuxTerminalService, contentState ContentState, reporter headlessTaskProgressReporter, ideReady *ideReadyState, desktopIdeReady *ideReadyState, configService config.ConfigInterface) *tasksManager { return &tasksManager{ config: config, terminalService: terminalService, @@ -122,6 +125,7 @@ func newTasksManager(config *Config, terminalService *terminal.MuxTerminalServic storeLocation: logs.TerminalStoreLocation, ideReady: ideReady, desktopIdeReady: desktopIdeReady, + configService: configService, } } @@ -176,10 +180,36 @@ func (tm *tasksManager) setTaskState(t *task, newState api.TaskState) { func (tm *tasksManager) init(ctx context.Context) { defer close(tm.ready) - tasks, err := tm.config.getGitpodTasks() - if err != nil { - log.WithError(err).Error() - return + var tasks *[]TaskConfig + var err error + if tm.config.DebugWorkspace { + if tm.configService == nil { + return + } + + nctx, cancel := context.WithCancel(ctx) + ch := tm.configService.Observe(nctx) + gitpodConfig, ok := <-ch + cancel() + if !ok { + return + } + tasksRaw, err := json.Marshal(gitpodConfig.Tasks) + if err != nil { + log.WithError(err).Error("resolve .gitpod.yml tasks failed") + return + } + err = json.Unmarshal(tasksRaw, &tasks) + if err != nil { + log.WithError(err).Error("resolve .gitpod.yml tasks failed") + return + } + } else { + tasks, err = tm.config.getGitpodTasks() + if err != nil { + log.WithError(err).Error() + return + } } if tasks == nil && tm.config.isHeadless() { return @@ -187,7 +217,6 @@ func (tm *tasksManager) init(ctx context.Context) { if tasks == nil { tasks = &[]TaskConfig{{}} } - select { case <-ctx.Done(): return diff --git a/components/supervisor/pkg/supervisor/tasks_test.go b/components/supervisor/pkg/supervisor/tasks_test.go index c5a33b7afeb927..aef7384f3026ec 100644 --- a/components/supervisor/pkg/supervisor/tasks_test.go +++ b/components/supervisor/pkg/supervisor/tasks_test.go @@ -224,7 +224,7 @@ func TestTaskManager(t *testing.T) { GitpodTasks: gitpodTasks, GitpodHeadless: strconv.FormatBool(test.Headless), }, - }, terminalService, contentState, &reporter, nil, nil) + }, terminalService, contentState, &reporter, nil, nil, nil) ) taskManager.storeLocation = storeLocation contentState.MarkContentReady(test.Source) diff --git a/components/workspacekit/cmd/rings.go b/components/workspacekit/cmd/rings.go index 754c54edbee3f1..4dcf927a67f34a 100644 --- a/components/workspacekit/cmd/rings.go +++ b/components/workspacekit/cmd/rings.go @@ -15,13 +15,16 @@ import ( "io/fs" "io/ioutil" "net" + "net/url" "os" "os/exec" "os/signal" + "path" "path/filepath" "runtime" "strconv" "strings" + "sync" "syscall" "time" @@ -33,7 +36,9 @@ import ( "golang.org/x/sys/unix" "golang.org/x/xerrors" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" common_grpc "github.com/gitpod-io/gitpod/common-go/grpc" "github.com/gitpod-io/gitpod/common-go/log" @@ -111,80 +116,240 @@ var ring0Cmd = &cobra.Command{ } }() - cmd := exec.Command("/proc/self/exe", "ring1") - cmd.SysProcAttr = &syscall.SysProcAttr{ - Pdeathsig: syscall.SIGKILL, - Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS | unix.CLONE_NEWCGROUP, + // start ring0 services + stopHook, err := startDebugServiceServer("/tmp/", prep) + if err != nil { + log.WithError(err).Error("cannot start debug service") + } else { + defer stopHook() } - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - cmd.Env = append(os.Environ(), - "WORKSPACEKIT_FSSHIFT="+prep.FsShift.String(), - fmt.Sprintf("WORKSPACEKIT_NO_WORKSPACE_MOUNT=%v", prep.FullWorkspaceBackup || prep.PersistentVolumeClaim), - ) + // root process tree don't have cancelable context + exitCode = startRing1(context.Background(), nil, prep, os.Stderr, os.Stdout, os.Stderr) + }, +} - if err := cmd.Start(); err != nil { - log.WithError(err).Error("failed to start ring0") - return - } +func startRing1(ctx context.Context, additionEnviron []string, prep *api.PrepareForUserNSResponse, stdin io.Reader, stdout, stderr io.Writer) (exitCode int) { + exitCode = 1 + cmd := exec.Command("/proc/self/exe", "ring1") + cmd.SysProcAttr = &syscall.SysProcAttr{ + Pdeathsig: syscall.SIGKILL, + Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS | unix.CLONE_NEWCGROUP, + } + cmd.Stdin = stdin + cmd.Stdout = stdout + cmd.Stderr = stderr + cmd.Env = append(os.Environ(), + "WORKSPACEKIT_FSSHIFT="+prep.FsShift.String(), + fmt.Sprintf("WORKSPACEKIT_NO_WORKSPACE_MOUNT=%v", prep.FullWorkspaceBackup || prep.PersistentVolumeClaim), + ) + cmd.Env = append(cmd.Env, additionEnviron...) + + if err := cmd.Start(); err != nil { + log.WithError(err).Error("failed to start ring1") + return + } - sigc := make(chan os.Signal, 128) - signal.Notify(sigc) - go func() { - defer func() { - // This is a 'just in case' fallback, in case we're racing the cmd.Process and it's become - // nil in the time since we checked. - err := recover() - if err != nil { - log.WithField("recovered", err).Error("recovered from panic") - } - }() + sigc := make(chan os.Signal, 128) + signal.Notify(sigc) + go func() { + defer func() { + signal.Stop(sigc) + + // This is a 'just in case' fallback, in case we're racing the cmd.Process and it's become + // nil in the time since we checked. + err := recover() + if err != nil { + log.WithField("recovered", err).Error("recovered from panic") + } + }() - for { - sig := <-sigc + for { + select { + case <-ctx.Done(): + case sig := <-sigc: if sig != unix.SIGTERM { _ = cmd.Process.Signal(sig) continue } + } - _ = cmd.Process.Signal(unix.SIGTERM) - time.Sleep(ring1ShutdownTimeout) - if cmd.Process == nil { + _ = cmd.Process.Signal(unix.SIGTERM) + time.Sleep(ring1ShutdownTimeout) + if cmd.Process == nil { + return + } + + log.Warn("ring1 did not shut down in time - sending sigkill") + err := cmd.Process.Kill() + if err != nil { + if isProcessAlreadyFinished(err) { return } + log.WithError(err).Error("cannot kill ring1") + } + } + }() - log.Warn("ring1 did not shut down in time - sending sigkill") - err = cmd.Process.Kill() - if err != nil { - if isProcessAlreadyFinished(err) { - err = nil - return - } + err := cmd.Wait() + if eerr, ok := err.(*exec.ExitError); ok { + state, ok := eerr.ProcessState.Sys().(syscall.WaitStatus) + if ok && state.Signal() == syscall.SIGKILL { + log.Warn("ring1 was killed") + return + } + } + if err != nil { + if eerr, ok := err.(*exec.ExitError); ok { + exitCode = eerr.ExitCode() + } + log.WithError(err).Error("unexpected exit") + return + } + exitCode = 0 // once we get here everythings good + return +} - log.WithError(err).Error("cannot kill ring1") - } - return +type debugServiceServer struct { + socket net.Listener + server *grpc.Server + api.UnimplementedDebugServiceServer + + prep *api.PrepareForUserNSResponse + running bool +} + +func (svc *debugServiceServer) Start(req *api.StartRequest, resp api.DebugService_StartServer) error { + if svc.running { + return errors.New("Already running debug workspace") + } + svc.running = true + defer func() { + svc.running = false + }() + + stat, err := os.Stat("/.workspace/mark/.debug/rootfs") + if err != nil || !stat.IsDir() { + return errors.New("Looks like you don't have any root filesystem in /.debug/rootfs folder") + } + + ctx, cancel := context.WithCancel(resp.Context()) + defer cancel() + + errchan := make(chan error, 1) + messages := make(chan *api.StartResponse, 1) + + outReader, outWriter := io.Pipe() + + startDebugProxy := func() { + cmd := exec.Command("/.supervisor/supervisor", "proxy") + cmd.SysProcAttr = &syscall.SysProcAttr{ + Pdeathsig: syscall.SIGKILL, + } + err := cmd.Start() + if err != nil { + log.WithError(err).Error("cannot run debug workspace proxy") + return + } + go func() { + <-ctx.Done() + if cmd != nil && cmd.Process != nil { + _ = cmd.Process.Kill() } }() + _ = cmd.Wait() + } - err = cmd.Wait() - if eerr, ok := err.(*exec.ExitError); ok { - state, ok := eerr.ProcessState.Sys().(syscall.WaitStatus) - if ok && state.Signal() == syscall.SIGKILL { - log.Warn("ring1 was killed") + go startDebugProxy() + wg := sync.WaitGroup{} + wg.Add(1) + exitCode := -1 + + workspaceUrl, err := url.Parse(os.Getenv("GITPOD_WORKSPACE_URL")) + if err != nil { + return errors.New("cannot running debug workspace, missing GITPOD_WORKSPACE_URL") + } + workspaceUrl.Host = "debug-" + workspaceUrl.Host + additionEnviron := []string{"WORKSPACEKIT_ROOTFS=/.debug/rootfs", "SUPERVISOR_DEBUG_WORKSPACE=true", "GITPOD_WORKSPACE_URL=" + workspaceUrl.String()} + if req.Headless { + additionEnviron = append(additionEnviron, "GITPOD_HEADLESS=true") + } + go func() { + defer wg.Done() + exitCode = startRing1(ctx, additionEnviron, svc.prep, nil, outWriter, outWriter) + outWriter.Close() + }() + + go func() { + for { + buf := make([]byte, 4096) + n, err := outReader.Read(buf) + if err == io.EOF { + break + } + if err != nil { + errchan <- err return } + messages <- &api.StartResponse{Output: &api.StartResponse_Data{Data: buf[:n]}} + } + wg.Wait() + messages <- &api.StartResponse{Output: &api.StartResponse_ExitCode{ExitCode: int32(exitCode)}} + errchan <- io.EOF + }() + + for { + var err error + select { + case message := <-messages: + err = resp.Send(message) + case err = <-errchan: + case <-ctx.Done(): + return status.Error(codes.DeadlineExceeded, ctx.Err().Error()) + } + if err == io.EOF { + // EOF isn't really an error here + return nil } if err != nil { - if eerr, ok := err.(*exec.ExitError); ok { - exitCode = eerr.ExitCode() - } - log.WithError(err).Error("unexpected exit") - return + return status.Error(codes.Internal, err.Error()) } - exitCode = 0 // once we get here everythings good - }, + } + +} + +func startDebugServiceServer(socketDir string, prep *api.PrepareForUserNSResponse) (func(), error) { + socketFN := filepath.Join(socketDir, "debug-service.sock") + if _, err := os.Stat(socketFN); err == nil { + _ = os.Remove(socketFN) + } + + sckt, err := net.Listen("unix", socketFN) + if err != nil { + return nil, xerrors.Errorf("cannot create info socket: %w", err) + } + + err = os.Chmod(socketFN, 0777) + if err != nil { + return nil, xerrors.Errorf("cannot chmod info socket: %w", err) + } + + debugSvc := debugServiceServer{ + socket: sckt, + prep: prep, + } + debugSvc.server = grpc.NewServer() + api.RegisterDebugServiceServer(debugSvc.server, &debugSvc) + go func() { + err := debugSvc.server.Serve(sckt) + if err != nil { + log.WithError(err).Error("start debug service failed") + } + }() + + return func() { + debugSvc.server.Stop() + os.Remove(socketFN) + }, nil } var ring1Opts struct { @@ -273,18 +438,36 @@ var ring1Cmd = &cobra.Command{ } var mnts []mnte + + rootfs := os.Getenv("WORKSPACEKIT_ROOTFS") + switch fsshift { case api.FSShiftMethod_FUSE: mnts = append(mnts, - mnte{Target: "/", Source: "/.workspace/mark", Flags: unix.MS_BIND | unix.MS_REC}, + mnte{Target: "/", Source: "/.workspace/mark" + rootfs, Flags: unix.MS_BIND | unix.MS_REC}, ) + if rootfs != "" { + mnts = append(mnts, + mnte{Target: "/ide", Source: "/.workspace/mark/ide", Flags: unix.MS_BIND}, + mnte{Target: "/.supervisor", Source: "/.workspace/mark/.supervisor", Flags: unix.MS_BIND}, + ) + } case api.FSShiftMethod_SHIFTFS: mnts = append(mnts, - mnte{Target: "/", Source: "/.workspace/mark", FSType: "shiftfs"}, + mnte{Target: "/", Source: "/.workspace/mark" + rootfs, FSType: "shiftfs"}, ) + if rootfs != "" { + mnts = append(mnts, + mnte{Target: "/ide", Source: "/.workspace/mark/ide", FSType: "shiftfs"}, + mnte{Target: "/.supervisor", Source: "/.workspace/mark/.supervisor", FSType: "shiftfs"}, + ) + } default: log.WithField("fsshift", fsshift).Fatal("unknown FS shift method") } + mnts = append(mnts, + mnte{Target: "/.supervisor/debug-service.sock", Source: "/tmp/debug-service.sock", Flags: unix.MS_BIND}, + ) procMounts, err := ioutil.ReadFile("/proc/mounts") if err != nil { @@ -328,7 +511,17 @@ var ring1Cmd = &cobra.Command{ for _, m := range mnts { dst := filepath.Join(ring2Root, m.Target) - _ = os.MkdirAll(dst, 0644) + func() { + if (m.FSType == "" || m.FSType == "none") && m.Source != "" { + stat, err := os.Stat(m.Source) + if err == nil && !stat.IsDir() { + _ = os.MkdirAll(path.Base(dst), 0644) + _ = os.WriteFile(dst, []byte("placeholder"), 0644) + return + } + } + _ = os.MkdirAll(dst, 0644) + }() if m.Source == "" { m.Source = m.Target @@ -345,7 +538,12 @@ var ring1Cmd = &cobra.Command{ }).Debug("mounting new rootfs") err = unix.Mount(m.Source, dst, m.FSType, m.Flags, "") if err != nil { - log.WithError(err).WithField("dest", dst).WithField("fsType", m.FSType).Error("cannot establish mount") + log.WithError(err).WithFields(map[string]interface{}{ + "source": m.Source, + "target": dst, + "fstype": m.FSType, + "flags": m.Flags, + }).Error("cannot establish mount") return } } @@ -426,11 +624,13 @@ var ring1Cmd = &cobra.Command{ return } - _, err = client.EvacuateCGroup(ctx, &daemonapi.EvacuateCGroupRequest{}) - if err != nil { - client.Close() - log.WithError(err).Error("cannot evacuate cgroup") - return + if rootfs == "" { + _, err = client.EvacuateCGroup(ctx, &daemonapi.EvacuateCGroupRequest{}) + if err != nil { + client.Close() + log.WithError(err).Error("cannot evacuate cgroup") + return + } } client.Close() @@ -485,10 +685,18 @@ var ring1Cmd = &cobra.Command{ log.WithError(err).Error("cannot connect to daemon from ring1 after ring2") return } - _, err = client.SetupPairVeths(ctx, &daemonapi.SetupPairVethsRequest{Pid: int64(cmd.Process.Pid)}) - if err != nil { - log.WithError(err).Error("cannot setup pair of veths") - return + if rootfs == "" { + _, err = client.SetupPairVeths(ctx, &daemonapi.SetupPairVethsRequest{Pid: int64(cmd.Process.Pid)}) + if err != nil { + log.WithError(err).Error("cannot setup pair of veths") + return + } + } else { + _, err = client.SetupDebugPairVeths(ctx, &daemonapi.SetupDebugPairVethsRequest{Pid: int64(cmd.Process.Pid)}) + if err != nil { + log.WithError(err).Error("cannot setup debug pair of veths") + return + } } client.Close() @@ -556,6 +764,9 @@ var ring1Cmd = &cobra.Command{ } go func() { + if rootfs != "" { + return + } err := lift.ServeLift(ctx, lift.DefaultSocketPath) if err != nil { log.WithError(err).Error("failed to serve ring1 command lift") diff --git a/components/workspacekit/debug.sh b/components/workspacekit/debug.sh new file mode 100755 index 00000000000000..16f07c5b133a3e --- /dev/null +++ b/components/workspacekit/debug.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright (c) 2022 Gitpod GmbH. All rights reserved. +# Licensed under the GNU Affero General Public License (AGPL). +# See License.AGPL.txt in the project root for license information. + +# This script builds a workspace component and updates the cluster + +set -Eeuo pipefail + +version="dev-$(date +%F_T"%H-%M-%S")" +bldfn="/tmp/build-$version.tar.gz" + +docker ps &> /dev/null || (echo "You need a working Docker daemon. Maybe set DOCKER_HOST?"; exit 1) +leeway build .:docker -Dversion="$version" -DimageRepoBase=eu.gcr.io/gitpod-core-dev/dev --save "$bldfn" --dont-test +dev_image="$(tar xfO "$bldfn" ./imgnames.txt | head -n1)" + +echo "$dev_image" diff --git a/components/ws-daemon-api/go/daemon.pb.go b/components/ws-daemon-api/go/daemon.pb.go index 4e53fa62771652..28691e4bbc0414 100644 --- a/components/ws-daemon-api/go/daemon.pb.go +++ b/components/ws-daemon-api/go/daemon.pb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License.AGPL.txt in the project root for license information. diff --git a/components/ws-daemon-api/go/daemon_grpc.pb.go b/components/ws-daemon-api/go/daemon_grpc.pb.go index 278dacd7e23b75..e370d83c6dbb9f 100644 --- a/components/ws-daemon-api/go/daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/daemon_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License.AGPL.txt in the project root for license information. diff --git a/components/ws-daemon-api/go/mock/mock.go b/components/ws-daemon-api/go/mock/mock.go index cd938cd3b5cb5b..bb421c5797b2d9 100644 --- a/components/ws-daemon-api/go/mock/mock.go +++ b/components/ws-daemon-api/go/mock/mock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License.AGPL.txt in the project root for license information. @@ -389,6 +389,26 @@ func (mr *MockInWorkspaceServiceClientMockRecorder) PrepareForUserNS(arg0, arg1 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForUserNS", reflect.TypeOf((*MockInWorkspaceServiceClient)(nil).PrepareForUserNS), varargs...) } +// SetupDebugPairVeths mocks base method. +func (m *MockInWorkspaceServiceClient) SetupDebugPairVeths(arg0 context.Context, arg1 *api.SetupDebugPairVethsRequest, arg2 ...grpc.CallOption) (*api.SetupDebugPairVethsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SetupDebugPairVeths", varargs...) + ret0, _ := ret[0].(*api.SetupDebugPairVethsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SetupDebugPairVeths indicates an expected call of SetupDebugPairVeths. +func (mr *MockInWorkspaceServiceClientMockRecorder) SetupDebugPairVeths(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetupDebugPairVeths", reflect.TypeOf((*MockInWorkspaceServiceClient)(nil).SetupDebugPairVeths), varargs...) +} + // SetupPairVeths mocks base method. func (m *MockInWorkspaceServiceClient) SetupPairVeths(arg0 context.Context, arg1 *api.SetupPairVethsRequest, arg2 ...grpc.CallOption) (*api.SetupPairVethsResponse, error) { m.ctrl.T.Helper() diff --git a/components/ws-daemon-api/go/workspace_daemon.pb.go b/components/ws-daemon-api/go/workspace_daemon.pb.go index 16125f5dfd47fd..6481768dec4b70 100644 --- a/components/ws-daemon-api/go/workspace_daemon.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon.pb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License.AGPL.txt in the project root for license information. @@ -723,6 +723,91 @@ func (*SetupPairVethsResponse) Descriptor() ([]byte, []int) { return file_workspace_daemon_proto_rawDescGZIP(), []int{13} } +type SetupDebugPairVethsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *SetupDebugPairVethsRequest) Reset() { + *x = SetupDebugPairVethsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_daemon_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetupDebugPairVethsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetupDebugPairVethsRequest) ProtoMessage() {} + +func (x *SetupDebugPairVethsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_daemon_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 SetupDebugPairVethsRequest.ProtoReflect.Descriptor instead. +func (*SetupDebugPairVethsRequest) Descriptor() ([]byte, []int) { + return file_workspace_daemon_proto_rawDescGZIP(), []int{14} +} + +func (x *SetupDebugPairVethsRequest) GetPid() int64 { + if x != nil { + return x.Pid + } + return 0 +} + +type SetupDebugPairVethsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetupDebugPairVethsResponse) Reset() { + *x = SetupDebugPairVethsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_daemon_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetupDebugPairVethsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetupDebugPairVethsResponse) ProtoMessage() {} + +func (x *SetupDebugPairVethsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_daemon_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 SetupDebugPairVethsResponse.ProtoReflect.Descriptor instead. +func (*SetupDebugPairVethsResponse) Descriptor() ([]byte, []int) { + return file_workspace_daemon_proto_rawDescGZIP(), []int{15} +} + type WorkspaceInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -732,7 +817,7 @@ type WorkspaceInfoRequest struct { func (x *WorkspaceInfoRequest) Reset() { *x = WorkspaceInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[14] + mi := &file_workspace_daemon_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -745,7 +830,7 @@ func (x *WorkspaceInfoRequest) String() string { func (*WorkspaceInfoRequest) ProtoMessage() {} func (x *WorkspaceInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[14] + mi := &file_workspace_daemon_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -758,7 +843,7 @@ func (x *WorkspaceInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceInfoRequest.ProtoReflect.Descriptor instead. func (*WorkspaceInfoRequest) Descriptor() ([]byte, []int) { - return file_workspace_daemon_proto_rawDescGZIP(), []int{14} + return file_workspace_daemon_proto_rawDescGZIP(), []int{16} } type WorkspaceInfoResponse struct { @@ -772,7 +857,7 @@ type WorkspaceInfoResponse struct { func (x *WorkspaceInfoResponse) Reset() { *x = WorkspaceInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[15] + mi := &file_workspace_daemon_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -785,7 +870,7 @@ func (x *WorkspaceInfoResponse) String() string { func (*WorkspaceInfoResponse) ProtoMessage() {} func (x *WorkspaceInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[15] + mi := &file_workspace_daemon_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -798,7 +883,7 @@ func (x *WorkspaceInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceInfoResponse.ProtoReflect.Descriptor instead. func (*WorkspaceInfoResponse) Descriptor() ([]byte, []int) { - return file_workspace_daemon_proto_rawDescGZIP(), []int{15} + return file_workspace_daemon_proto_rawDescGZIP(), []int{17} } func (x *WorkspaceInfoResponse) GetResources() *Resources { @@ -820,7 +905,7 @@ type Resources struct { func (x *Resources) Reset() { *x = Resources{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[16] + mi := &file_workspace_daemon_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -833,7 +918,7 @@ func (x *Resources) String() string { func (*Resources) ProtoMessage() {} func (x *Resources) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[16] + mi := &file_workspace_daemon_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -846,7 +931,7 @@ func (x *Resources) ProtoReflect() protoreflect.Message { // Deprecated: Use Resources.ProtoReflect.Descriptor instead. func (*Resources) Descriptor() ([]byte, []int) { - return file_workspace_daemon_proto_rawDescGZIP(), []int{16} + return file_workspace_daemon_proto_rawDescGZIP(), []int{18} } func (x *Resources) GetCpu() *Cpu { @@ -875,7 +960,7 @@ type Cpu struct { func (x *Cpu) Reset() { *x = Cpu{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[17] + mi := &file_workspace_daemon_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -888,7 +973,7 @@ func (x *Cpu) String() string { func (*Cpu) ProtoMessage() {} func (x *Cpu) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[17] + mi := &file_workspace_daemon_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -901,7 +986,7 @@ func (x *Cpu) ProtoReflect() protoreflect.Message { // Deprecated: Use Cpu.ProtoReflect.Descriptor instead. func (*Cpu) Descriptor() ([]byte, []int) { - return file_workspace_daemon_proto_rawDescGZIP(), []int{17} + return file_workspace_daemon_proto_rawDescGZIP(), []int{19} } func (x *Cpu) GetUsed() int64 { @@ -930,7 +1015,7 @@ type Memory struct { func (x *Memory) Reset() { *x = Memory{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[18] + mi := &file_workspace_daemon_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -943,7 +1028,7 @@ func (x *Memory) String() string { func (*Memory) ProtoMessage() {} func (x *Memory) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[18] + mi := &file_workspace_daemon_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -956,7 +1041,7 @@ func (x *Memory) ProtoReflect() protoreflect.Message { // Deprecated: Use Memory.ProtoReflect.Descriptor instead. func (*Memory) Descriptor() ([]byte, []int) { - return file_workspace_daemon_proto_rawDescGZIP(), []int{18} + return file_workspace_daemon_proto_rawDescGZIP(), []int{20} } func (x *Memory) GetUsed() int64 { @@ -973,6 +1058,134 @@ func (x *Memory) GetLimit() int64 { return 0 } +type StartRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Headless bool `protobuf:"varint,1,opt,name=headless,proto3" json:"headless,omitempty"` +} + +func (x *StartRequest) Reset() { + *x = StartRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_daemon_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartRequest) ProtoMessage() {} + +func (x *StartRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_daemon_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 StartRequest.ProtoReflect.Descriptor instead. +func (*StartRequest) Descriptor() ([]byte, []int) { + return file_workspace_daemon_proto_rawDescGZIP(), []int{21} +} + +func (x *StartRequest) GetHeadless() bool { + if x != nil { + return x.Headless + } + return false +} + +type StartResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Output: + // + // *StartResponse_Data + // *StartResponse_ExitCode + Output isStartResponse_Output `protobuf_oneof:"output"` +} + +func (x *StartResponse) Reset() { + *x = StartResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_daemon_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartResponse) ProtoMessage() {} + +func (x *StartResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_daemon_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 StartResponse.ProtoReflect.Descriptor instead. +func (*StartResponse) Descriptor() ([]byte, []int) { + return file_workspace_daemon_proto_rawDescGZIP(), []int{22} +} + +func (m *StartResponse) GetOutput() isStartResponse_Output { + if m != nil { + return m.Output + } + return nil +} + +func (x *StartResponse) GetData() []byte { + if x, ok := x.GetOutput().(*StartResponse_Data); ok { + return x.Data + } + return nil +} + +func (x *StartResponse) GetExitCode() int32 { + if x, ok := x.GetOutput().(*StartResponse_ExitCode); ok { + return x.ExitCode + } + return 0 +} + +type isStartResponse_Output interface { + isStartResponse_Output() +} + +type StartResponse_Data struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3,oneof"` +} + +type StartResponse_ExitCode struct { + ExitCode int32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3,oneof"` +} + +func (*StartResponse_Data) isStartResponse_Output() {} + +func (*StartResponse_ExitCode) isStartResponse_Output() {} + type WriteIDMappingRequest_Mapping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -986,7 +1199,7 @@ type WriteIDMappingRequest_Mapping struct { func (x *WriteIDMappingRequest_Mapping) Reset() { *x = WriteIDMappingRequest_Mapping{} if protoimpl.UnsafeEnabled { - mi := &file_workspace_daemon_proto_msgTypes[19] + mi := &file_workspace_daemon_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -999,7 +1212,7 @@ func (x *WriteIDMappingRequest_Mapping) String() string { func (*WriteIDMappingRequest_Mapping) ProtoMessage() {} func (x *WriteIDMappingRequest_Mapping) ProtoReflect() protoreflect.Message { - mi := &file_workspace_daemon_proto_msgTypes[19] + mi := &file_workspace_daemon_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1094,82 +1307,104 @@ var file_workspace_daemon_proto_rawDesc = []byte{ 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, - 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x09, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x09, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x43, 0x70, 0x75, 0x52, 0x03, - 0x63, 0x70, 0x75, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x2f, 0x0a, 0x03, 0x43, 0x70, 0x75, 0x12, - 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x32, 0x0a, 0x06, 0x4d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2a, 0x26, 0x0a, - 0x0d, 0x46, 0x53, 0x53, 0x68, 0x69, 0x66, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0b, - 0x0a, 0x07, 0x53, 0x48, 0x49, 0x46, 0x54, 0x46, 0x53, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, - 0x55, 0x53, 0x45, 0x10, 0x01, 0x32, 0xd3, 0x05, 0x0a, 0x12, 0x49, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x10, + 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x1a, 0x53, + 0x65, 0x74, 0x75, 0x70, 0x44, 0x65, 0x62, 0x75, 0x67, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, + 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x53, + 0x65, 0x74, 0x75, 0x70, 0x44, 0x65, 0x62, 0x75, 0x67, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, + 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x45, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x09, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x43, 0x70, 0x75, 0x52, 0x03, 0x63, + 0x70, 0x75, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, + 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x2f, 0x0a, 0x03, 0x43, 0x70, 0x75, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x32, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x2a, 0x0a, 0x0c, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2a, 0x26, 0x0a, 0x0d, 0x46, 0x53, 0x53, 0x68, + 0x69, 0x66, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x48, 0x49, + 0x46, 0x54, 0x46, 0x53, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x53, 0x45, 0x10, 0x01, + 0x32, 0xaf, 0x06, 0x0a, 0x12, 0x49, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x53, 0x12, 0x1c, 0x2e, 0x69, 0x77, + 0x73, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, + 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x53, - 0x12, 0x1c, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x46, 0x6f, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x4e, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4b, 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x69, 0x77, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0e, - 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, - 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x77, 0x73, - 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, 0x4d, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x12, 0x15, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x55, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x63, 0x12, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x4d, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x79, 0x73, 0x66, 0x73, 0x12, 0x15, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x55, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x79, 0x73, 0x66, 0x73, 0x12, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x08, 0x54, 0x65, 0x61, - 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x14, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x72, - 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x69, 0x77, - 0x73, 0x2e, 0x54, 0x65, 0x61, 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, 0x69, - 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x12, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, - 0x75, 0x70, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, - 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0e, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x2e, 0x69, + 0x77, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x49, 0x44, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0e, 0x45, 0x76, 0x61, 0x63, 0x75, + 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, + 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x45, 0x76, 0x61, 0x63, + 0x75, 0x61, 0x74, 0x65, 0x43, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x12, 0x15, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, + 0x12, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x79, 0x73, 0x66, + 0x73, 0x12, 0x15, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x4d, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x79, 0x73, 0x66, + 0x73, 0x12, 0x16, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x77, 0x73, 0x2e, + 0x55, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x72, 0x64, 0x6f, 0x77, 0x6e, + 0x12, 0x14, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x54, 0x65, 0x61, + 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4b, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, + 0x73, 0x12, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, 0x69, + 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, + 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x60, 0x0a, 0x14, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2b, 0x5a, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, - 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x75, 0x70, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x50, 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x12, 0x1f, 0x2e, + 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x44, 0x65, 0x62, 0x75, 0x67, 0x50, 0x61, + 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x44, 0x65, 0x62, 0x75, 0x67, 0x50, + 0x61, 0x69, 0x72, 0x56, 0x65, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x32, 0x60, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x69, 0x77, + 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x32, 0x42, 0x0a, 0x0c, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x11, 0x2e, + 0x69, 0x77, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x69, 0x77, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x64, 0x61, 0x65, 0x6d, 0x6f, + 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1185,7 +1420,7 @@ func file_workspace_daemon_proto_rawDescGZIP() []byte { } var file_workspace_daemon_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_workspace_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_workspace_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_workspace_daemon_proto_goTypes = []interface{}{ (FSShiftMethod)(0), // 0: iws.FSShiftMethod (*PrepareForUserNSRequest)(nil), // 1: iws.PrepareForUserNSRequest @@ -1202,19 +1437,23 @@ var file_workspace_daemon_proto_goTypes = []interface{}{ (*TeardownResponse)(nil), // 12: iws.TeardownResponse (*SetupPairVethsRequest)(nil), // 13: iws.SetupPairVethsRequest (*SetupPairVethsResponse)(nil), // 14: iws.SetupPairVethsResponse - (*WorkspaceInfoRequest)(nil), // 15: iws.WorkspaceInfoRequest - (*WorkspaceInfoResponse)(nil), // 16: iws.WorkspaceInfoResponse - (*Resources)(nil), // 17: iws.Resources - (*Cpu)(nil), // 18: iws.Cpu - (*Memory)(nil), // 19: iws.Memory - (*WriteIDMappingRequest_Mapping)(nil), // 20: iws.WriteIDMappingRequest.Mapping + (*SetupDebugPairVethsRequest)(nil), // 15: iws.SetupDebugPairVethsRequest + (*SetupDebugPairVethsResponse)(nil), // 16: iws.SetupDebugPairVethsResponse + (*WorkspaceInfoRequest)(nil), // 17: iws.WorkspaceInfoRequest + (*WorkspaceInfoResponse)(nil), // 18: iws.WorkspaceInfoResponse + (*Resources)(nil), // 19: iws.Resources + (*Cpu)(nil), // 20: iws.Cpu + (*Memory)(nil), // 21: iws.Memory + (*StartRequest)(nil), // 22: iws.StartRequest + (*StartResponse)(nil), // 23: iws.StartResponse + (*WriteIDMappingRequest_Mapping)(nil), // 24: iws.WriteIDMappingRequest.Mapping } var file_workspace_daemon_proto_depIdxs = []int32{ 0, // 0: iws.PrepareForUserNSResponse.fs_shift:type_name -> iws.FSShiftMethod - 20, // 1: iws.WriteIDMappingRequest.mapping:type_name -> iws.WriteIDMappingRequest.Mapping - 17, // 2: iws.WorkspaceInfoResponse.resources:type_name -> iws.Resources - 18, // 3: iws.Resources.cpu:type_name -> iws.Cpu - 19, // 4: iws.Resources.memory:type_name -> iws.Memory + 24, // 1: iws.WriteIDMappingRequest.mapping:type_name -> iws.WriteIDMappingRequest.Mapping + 19, // 2: iws.WorkspaceInfoResponse.resources:type_name -> iws.Resources + 20, // 3: iws.Resources.cpu:type_name -> iws.Cpu + 21, // 4: iws.Resources.memory:type_name -> iws.Memory 1, // 5: iws.InWorkspaceService.PrepareForUserNS:input_type -> iws.PrepareForUserNSRequest 4, // 6: iws.InWorkspaceService.WriteIDMapping:input_type -> iws.WriteIDMappingRequest 5, // 7: iws.InWorkspaceService.EvacuateCGroup:input_type -> iws.EvacuateCGroupRequest @@ -1224,21 +1463,25 @@ var file_workspace_daemon_proto_depIdxs = []int32{ 9, // 11: iws.InWorkspaceService.UmountSysfs:input_type -> iws.UmountProcRequest 11, // 12: iws.InWorkspaceService.Teardown:input_type -> iws.TeardownRequest 13, // 13: iws.InWorkspaceService.SetupPairVeths:input_type -> iws.SetupPairVethsRequest - 15, // 14: iws.InWorkspaceService.WorkspaceInfo:input_type -> iws.WorkspaceInfoRequest - 15, // 15: iws.WorkspaceInfoService.WorkspaceInfo:input_type -> iws.WorkspaceInfoRequest - 2, // 16: iws.InWorkspaceService.PrepareForUserNS:output_type -> iws.PrepareForUserNSResponse - 3, // 17: iws.InWorkspaceService.WriteIDMapping:output_type -> iws.WriteIDMappingResponse - 6, // 18: iws.InWorkspaceService.EvacuateCGroup:output_type -> iws.EvacuateCGroupResponse - 8, // 19: iws.InWorkspaceService.MountProc:output_type -> iws.MountProcResponse - 10, // 20: iws.InWorkspaceService.UmountProc:output_type -> iws.UmountProcResponse - 8, // 21: iws.InWorkspaceService.MountSysfs:output_type -> iws.MountProcResponse - 10, // 22: iws.InWorkspaceService.UmountSysfs:output_type -> iws.UmountProcResponse - 12, // 23: iws.InWorkspaceService.Teardown:output_type -> iws.TeardownResponse - 14, // 24: iws.InWorkspaceService.SetupPairVeths:output_type -> iws.SetupPairVethsResponse - 16, // 25: iws.InWorkspaceService.WorkspaceInfo:output_type -> iws.WorkspaceInfoResponse - 16, // 26: iws.WorkspaceInfoService.WorkspaceInfo:output_type -> iws.WorkspaceInfoResponse - 16, // [16:27] is the sub-list for method output_type - 5, // [5:16] is the sub-list for method input_type + 17, // 14: iws.InWorkspaceService.WorkspaceInfo:input_type -> iws.WorkspaceInfoRequest + 15, // 15: iws.InWorkspaceService.SetupDebugPairVeths:input_type -> iws.SetupDebugPairVethsRequest + 17, // 16: iws.WorkspaceInfoService.WorkspaceInfo:input_type -> iws.WorkspaceInfoRequest + 22, // 17: iws.DebugService.Start:input_type -> iws.StartRequest + 2, // 18: iws.InWorkspaceService.PrepareForUserNS:output_type -> iws.PrepareForUserNSResponse + 3, // 19: iws.InWorkspaceService.WriteIDMapping:output_type -> iws.WriteIDMappingResponse + 6, // 20: iws.InWorkspaceService.EvacuateCGroup:output_type -> iws.EvacuateCGroupResponse + 8, // 21: iws.InWorkspaceService.MountProc:output_type -> iws.MountProcResponse + 10, // 22: iws.InWorkspaceService.UmountProc:output_type -> iws.UmountProcResponse + 8, // 23: iws.InWorkspaceService.MountSysfs:output_type -> iws.MountProcResponse + 10, // 24: iws.InWorkspaceService.UmountSysfs:output_type -> iws.UmountProcResponse + 12, // 25: iws.InWorkspaceService.Teardown:output_type -> iws.TeardownResponse + 14, // 26: iws.InWorkspaceService.SetupPairVeths:output_type -> iws.SetupPairVethsResponse + 18, // 27: iws.InWorkspaceService.WorkspaceInfo:output_type -> iws.WorkspaceInfoResponse + 16, // 28: iws.InWorkspaceService.SetupDebugPairVeths:output_type -> iws.SetupDebugPairVethsResponse + 18, // 29: iws.WorkspaceInfoService.WorkspaceInfo:output_type -> iws.WorkspaceInfoResponse + 23, // 30: iws.DebugService.Start:output_type -> iws.StartResponse + 18, // [18:31] is the sub-list for method output_type + 5, // [5:18] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -1419,7 +1662,7 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceInfoRequest); i { + switch v := v.(*SetupDebugPairVethsRequest); i { case 0: return &v.state case 1: @@ -1431,7 +1674,7 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceInfoResponse); i { + switch v := v.(*SetupDebugPairVethsResponse); i { case 0: return &v.state case 1: @@ -1443,7 +1686,7 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resources); i { + switch v := v.(*WorkspaceInfoRequest); i { case 0: return &v.state case 1: @@ -1455,7 +1698,7 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cpu); i { + switch v := v.(*WorkspaceInfoResponse); i { case 0: return &v.state case 1: @@ -1467,7 +1710,7 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memory); i { + switch v := v.(*Resources); i { case 0: return &v.state case 1: @@ -1479,6 +1722,54 @@ func file_workspace_daemon_proto_init() { } } file_workspace_daemon_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cpu); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_daemon_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Memory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_daemon_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_daemon_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_daemon_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteIDMappingRequest_Mapping); i { case 0: return &v.state @@ -1491,15 +1782,19 @@ func file_workspace_daemon_proto_init() { } } } + file_workspace_daemon_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*StartResponse_Data)(nil), + (*StartResponse_ExitCode)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_workspace_daemon_proto_rawDesc, NumEnums: 1, - NumMessages: 20, + NumMessages: 24, NumExtensions: 0, - NumServices: 2, + NumServices: 3, }, GoTypes: file_workspace_daemon_proto_goTypes, DependencyIndexes: file_workspace_daemon_proto_depIdxs, diff --git a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go index ccb0249941895c..f2dc48d234db27 100644 --- a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License.AGPL.txt in the project root for license information. @@ -63,6 +63,8 @@ type InWorkspaceServiceClient interface { SetupPairVeths(ctx context.Context, in *SetupPairVethsRequest, opts ...grpc.CallOption) (*SetupPairVethsResponse, error) // Get information about the workspace WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error) + // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace, but only setup route for access network. + SetupDebugPairVeths(ctx context.Context, in *SetupDebugPairVethsRequest, opts ...grpc.CallOption) (*SetupDebugPairVethsResponse, error) } type inWorkspaceServiceClient struct { @@ -163,6 +165,15 @@ func (c *inWorkspaceServiceClient) WorkspaceInfo(ctx context.Context, in *Worksp return out, nil } +func (c *inWorkspaceServiceClient) SetupDebugPairVeths(ctx context.Context, in *SetupDebugPairVethsRequest, opts ...grpc.CallOption) (*SetupDebugPairVethsResponse, error) { + out := new(SetupDebugPairVethsResponse) + err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/SetupDebugPairVeths", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // InWorkspaceServiceServer is the server API for InWorkspaceService service. // All implementations must embed UnimplementedInWorkspaceServiceServer // for forward compatibility @@ -204,6 +215,8 @@ type InWorkspaceServiceServer interface { SetupPairVeths(context.Context, *SetupPairVethsRequest) (*SetupPairVethsResponse, error) // Get information about the workspace WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) + // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace, but only setup route for access network. + SetupDebugPairVeths(context.Context, *SetupDebugPairVethsRequest) (*SetupDebugPairVethsResponse, error) mustEmbedUnimplementedInWorkspaceServiceServer() } @@ -241,6 +254,9 @@ func (UnimplementedInWorkspaceServiceServer) SetupPairVeths(context.Context, *Se func (UnimplementedInWorkspaceServiceServer) WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WorkspaceInfo not implemented") } +func (UnimplementedInWorkspaceServiceServer) SetupDebugPairVeths(context.Context, *SetupDebugPairVethsRequest) (*SetupDebugPairVethsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetupDebugPairVeths not implemented") +} func (UnimplementedInWorkspaceServiceServer) mustEmbedUnimplementedInWorkspaceServiceServer() {} // UnsafeInWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service. @@ -434,6 +450,24 @@ func _InWorkspaceService_WorkspaceInfo_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _InWorkspaceService_SetupDebugPairVeths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetupDebugPairVethsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InWorkspaceServiceServer).SetupDebugPairVeths(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/iws.InWorkspaceService/SetupDebugPairVeths", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InWorkspaceServiceServer).SetupDebugPairVeths(ctx, req.(*SetupDebugPairVethsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // InWorkspaceService_ServiceDesc is the grpc.ServiceDesc for InWorkspaceService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -481,6 +515,10 @@ var InWorkspaceService_ServiceDesc = grpc.ServiceDesc{ MethodName: "WorkspaceInfo", Handler: _InWorkspaceService_WorkspaceInfo_Handler, }, + { + MethodName: "SetupDebugPairVeths", + Handler: _InWorkspaceService_SetupDebugPairVeths_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "workspace_daemon.proto", @@ -573,3 +611,116 @@ var WorkspaceInfoService_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "workspace_daemon.proto", } + +// DebugServiceClient is the client API for DebugService 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 DebugServiceClient interface { + Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (DebugService_StartClient, error) +} + +type debugServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDebugServiceClient(cc grpc.ClientConnInterface) DebugServiceClient { + return &debugServiceClient{cc} +} + +func (c *debugServiceClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (DebugService_StartClient, error) { + stream, err := c.cc.NewStream(ctx, &DebugService_ServiceDesc.Streams[0], "/iws.DebugService/Start", opts...) + if err != nil { + return nil, err + } + x := &debugServiceStartClient{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 DebugService_StartClient interface { + Recv() (*StartResponse, error) + grpc.ClientStream +} + +type debugServiceStartClient struct { + grpc.ClientStream +} + +func (x *debugServiceStartClient) Recv() (*StartResponse, error) { + m := new(StartResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// DebugServiceServer is the server API for DebugService service. +// All implementations must embed UnimplementedDebugServiceServer +// for forward compatibility +type DebugServiceServer interface { + Start(*StartRequest, DebugService_StartServer) error + mustEmbedUnimplementedDebugServiceServer() +} + +// UnimplementedDebugServiceServer must be embedded to have forward compatible implementations. +type UnimplementedDebugServiceServer struct { +} + +func (UnimplementedDebugServiceServer) Start(*StartRequest, DebugService_StartServer) error { + return status.Errorf(codes.Unimplemented, "method Start not implemented") +} +func (UnimplementedDebugServiceServer) mustEmbedUnimplementedDebugServiceServer() {} + +// UnsafeDebugServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DebugServiceServer will +// result in compilation errors. +type UnsafeDebugServiceServer interface { + mustEmbedUnimplementedDebugServiceServer() +} + +func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) { + s.RegisterService(&DebugService_ServiceDesc, srv) +} + +func _DebugService_Start_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StartRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DebugServiceServer).Start(m, &debugServiceStartServer{stream}) +} + +type DebugService_StartServer interface { + Send(*StartResponse) error + grpc.ServerStream +} + +type debugServiceStartServer struct { + grpc.ServerStream +} + +func (x *debugServiceStartServer) Send(m *StartResponse) error { + return x.ServerStream.SendMsg(m) +} + +// DebugService_ServiceDesc is the grpc.ServiceDesc for DebugService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DebugService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "iws.DebugService", + HandlerType: (*DebugServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Start", + Handler: _DebugService_Start_Handler, + ServerStreams: true, + }, + }, + Metadata: "workspace_daemon.proto", +} diff --git a/components/ws-daemon-api/typescript/src/daemon_grpc_pb.d.ts b/components/ws-daemon-api/typescript/src/daemon_grpc_pb.d.ts index e2b622a0db8de3..4615dcd407b916 100644 --- a/components/ws-daemon-api/typescript/src/daemon_grpc_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/daemon_grpc_pb.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -23,8 +23,7 @@ interface IWorkspaceContentServiceService extends grpc.ServiceDefinition { +interface IWorkspaceContentServiceService_IInitWorkspace extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/InitWorkspace"; requestStream: false; responseStream: false; @@ -33,8 +32,7 @@ interface IWorkspaceContentServiceService_IInitWorkspace responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IWorkspaceContentServiceService_IWaitForInit - extends grpc.MethodDefinition { +interface IWorkspaceContentServiceService_IWaitForInit extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/WaitForInit"; requestStream: false; responseStream: false; @@ -43,8 +41,7 @@ interface IWorkspaceContentServiceService_IWaitForInit responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IWorkspaceContentServiceService_IIsWorkspaceExists - extends grpc.MethodDefinition { +interface IWorkspaceContentServiceService_IIsWorkspaceExists extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/IsWorkspaceExists"; requestStream: false; responseStream: false; @@ -53,8 +50,7 @@ interface IWorkspaceContentServiceService_IIsWorkspaceExists responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IWorkspaceContentServiceService_ITakeSnapshot - extends grpc.MethodDefinition { +interface IWorkspaceContentServiceService_ITakeSnapshot extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/TakeSnapshot"; requestStream: false; responseStream: false; @@ -63,8 +59,7 @@ interface IWorkspaceContentServiceService_ITakeSnapshot responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IWorkspaceContentServiceService_IDisposeWorkspace - extends grpc.MethodDefinition { +interface IWorkspaceContentServiceService_IDisposeWorkspace extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/DisposeWorkspace"; requestStream: false; responseStream: false; @@ -73,8 +68,7 @@ interface IWorkspaceContentServiceService_IDisposeWorkspace responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IWorkspaceContentServiceService_IBackupWorkspace - extends grpc.MethodDefinition { +interface IWorkspaceContentServiceService_IBackupWorkspace extends grpc.MethodDefinition { path: "/wsdaemon.WorkspaceContentService/BackupWorkspace"; requestStream: false; responseStream: false; @@ -96,188 +90,44 @@ export interface IWorkspaceContentServiceServer extends grpc.UntypedServiceImple } export interface IWorkspaceContentServiceClient { - initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - waitForInit( - request: daemon_pb.WaitForInitRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - waitForInit( - request: daemon_pb.WaitForInitRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - waitForInit( - request: daemon_pb.WaitForInitRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; + initWorkspace(request: daemon_pb.InitWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + initWorkspace(request: daemon_pb.InitWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + initWorkspace(request: daemon_pb.InitWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + waitForInit(request: daemon_pb.WaitForInitRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + waitForInit(request: daemon_pb.WaitForInitRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + waitForInit(request: daemon_pb.WaitForInitRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + takeSnapshot(request: daemon_pb.TakeSnapshotRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + takeSnapshot(request: daemon_pb.TakeSnapshotRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + takeSnapshot(request: daemon_pb.TakeSnapshotRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; + backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; + backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; } export class WorkspaceContentServiceClient extends grpc.Client implements IWorkspaceContentServiceClient { constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public initWorkspace( - request: daemon_pb.InitWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public waitForInit( - request: daemon_pb.WaitForInitRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - public waitForInit( - request: daemon_pb.WaitForInitRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - public waitForInit( - request: daemon_pb.WaitForInitRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void, - ): grpc.ClientUnaryCall; - public isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - public isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - public isWorkspaceExists( - request: daemon_pb.IsWorkspaceExistsRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void, - ): grpc.ClientUnaryCall; - public takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - public takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - public takeSnapshot( - request: daemon_pb.TakeSnapshotRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void, - ): grpc.ClientUnaryCall; - public disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public disposeWorkspace( - request: daemon_pb.DisposeWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; - public backupWorkspace( - request: daemon_pb.BackupWorkspaceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void, - ): grpc.ClientUnaryCall; + public initWorkspace(request: daemon_pb.InitWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + public initWorkspace(request: daemon_pb.InitWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + public initWorkspace(request: daemon_pb.InitWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.InitWorkspaceResponse) => void): grpc.ClientUnaryCall; + public waitForInit(request: daemon_pb.WaitForInitRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + public waitForInit(request: daemon_pb.WaitForInitRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + public waitForInit(request: daemon_pb.WaitForInitRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.WaitForInitResponse) => void): grpc.ClientUnaryCall; + public isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + public isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + public isWorkspaceExists(request: daemon_pb.IsWorkspaceExistsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.IsWorkspaceExistsResponse) => void): grpc.ClientUnaryCall; + public takeSnapshot(request: daemon_pb.TakeSnapshotRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + public takeSnapshot(request: daemon_pb.TakeSnapshotRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + public takeSnapshot(request: daemon_pb.TakeSnapshotRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.TakeSnapshotResponse) => void): grpc.ClientUnaryCall; + public disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + public disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + public disposeWorkspace(request: daemon_pb.DisposeWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.DisposeWorkspaceResponse) => void): grpc.ClientUnaryCall; + public backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; + public backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; + public backupWorkspace(request: daemon_pb.BackupWorkspaceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: daemon_pb.BackupWorkspaceResponse) => void): grpc.ClientUnaryCall; } diff --git a/components/ws-daemon-api/typescript/src/daemon_grpc_pb.js b/components/ws-daemon-api/typescript/src/daemon_grpc_pb.js index 68ef2c4265e265..e46ba0db704ca9 100644 --- a/components/ws-daemon-api/typescript/src/daemon_grpc_pb.js +++ b/components/ws-daemon-api/typescript/src/daemon_grpc_pb.js @@ -1,223 +1,224 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ // GENERATED CODE -- DO NOT EDIT! -"use strict"; -var grpc = require("@grpc/grpc-js"); -var daemon_pb = require("./daemon_pb.js"); -var content$service$api_initializer_pb = require("@gitpod/content-service/lib"); +'use strict'; +var grpc = require('@grpc/grpc-js'); +var daemon_pb = require('./daemon_pb.js'); +var content$service$api_initializer_pb = require('@gitpod/content-service/lib'); function serialize_wsdaemon_BackupWorkspaceRequest(arg) { - if (!(arg instanceof daemon_pb.BackupWorkspaceRequest)) { - throw new Error("Expected argument of type wsdaemon.BackupWorkspaceRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.BackupWorkspaceRequest)) { + throw new Error('Expected argument of type wsdaemon.BackupWorkspaceRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_BackupWorkspaceRequest(buffer_arg) { - return daemon_pb.BackupWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.BackupWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_BackupWorkspaceResponse(arg) { - if (!(arg instanceof daemon_pb.BackupWorkspaceResponse)) { - throw new Error("Expected argument of type wsdaemon.BackupWorkspaceResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.BackupWorkspaceResponse)) { + throw new Error('Expected argument of type wsdaemon.BackupWorkspaceResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_BackupWorkspaceResponse(buffer_arg) { - return daemon_pb.BackupWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.BackupWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_DisposeWorkspaceRequest(arg) { - if (!(arg instanceof daemon_pb.DisposeWorkspaceRequest)) { - throw new Error("Expected argument of type wsdaemon.DisposeWorkspaceRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.DisposeWorkspaceRequest)) { + throw new Error('Expected argument of type wsdaemon.DisposeWorkspaceRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_DisposeWorkspaceRequest(buffer_arg) { - return daemon_pb.DisposeWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.DisposeWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_DisposeWorkspaceResponse(arg) { - if (!(arg instanceof daemon_pb.DisposeWorkspaceResponse)) { - throw new Error("Expected argument of type wsdaemon.DisposeWorkspaceResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.DisposeWorkspaceResponse)) { + throw new Error('Expected argument of type wsdaemon.DisposeWorkspaceResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_DisposeWorkspaceResponse(buffer_arg) { - return daemon_pb.DisposeWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.DisposeWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_InitWorkspaceRequest(arg) { - if (!(arg instanceof daemon_pb.InitWorkspaceRequest)) { - throw new Error("Expected argument of type wsdaemon.InitWorkspaceRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.InitWorkspaceRequest)) { + throw new Error('Expected argument of type wsdaemon.InitWorkspaceRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_InitWorkspaceRequest(buffer_arg) { - return daemon_pb.InitWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.InitWorkspaceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_InitWorkspaceResponse(arg) { - if (!(arg instanceof daemon_pb.InitWorkspaceResponse)) { - throw new Error("Expected argument of type wsdaemon.InitWorkspaceResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.InitWorkspaceResponse)) { + throw new Error('Expected argument of type wsdaemon.InitWorkspaceResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_InitWorkspaceResponse(buffer_arg) { - return daemon_pb.InitWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.InitWorkspaceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_IsWorkspaceExistsRequest(arg) { - if (!(arg instanceof daemon_pb.IsWorkspaceExistsRequest)) { - throw new Error("Expected argument of type wsdaemon.IsWorkspaceExistsRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.IsWorkspaceExistsRequest)) { + throw new Error('Expected argument of type wsdaemon.IsWorkspaceExistsRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_IsWorkspaceExistsRequest(buffer_arg) { - return daemon_pb.IsWorkspaceExistsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.IsWorkspaceExistsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_IsWorkspaceExistsResponse(arg) { - if (!(arg instanceof daemon_pb.IsWorkspaceExistsResponse)) { - throw new Error("Expected argument of type wsdaemon.IsWorkspaceExistsResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.IsWorkspaceExistsResponse)) { + throw new Error('Expected argument of type wsdaemon.IsWorkspaceExistsResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_IsWorkspaceExistsResponse(buffer_arg) { - return daemon_pb.IsWorkspaceExistsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.IsWorkspaceExistsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_TakeSnapshotRequest(arg) { - if (!(arg instanceof daemon_pb.TakeSnapshotRequest)) { - throw new Error("Expected argument of type wsdaemon.TakeSnapshotRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.TakeSnapshotRequest)) { + throw new Error('Expected argument of type wsdaemon.TakeSnapshotRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_TakeSnapshotRequest(buffer_arg) { - return daemon_pb.TakeSnapshotRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.TakeSnapshotRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_TakeSnapshotResponse(arg) { - if (!(arg instanceof daemon_pb.TakeSnapshotResponse)) { - throw new Error("Expected argument of type wsdaemon.TakeSnapshotResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.TakeSnapshotResponse)) { + throw new Error('Expected argument of type wsdaemon.TakeSnapshotResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_TakeSnapshotResponse(buffer_arg) { - return daemon_pb.TakeSnapshotResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.TakeSnapshotResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_WaitForInitRequest(arg) { - if (!(arg instanceof daemon_pb.WaitForInitRequest)) { - throw new Error("Expected argument of type wsdaemon.WaitForInitRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.WaitForInitRequest)) { + throw new Error('Expected argument of type wsdaemon.WaitForInitRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_WaitForInitRequest(buffer_arg) { - return daemon_pb.WaitForInitRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return daemon_pb.WaitForInitRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_wsdaemon_WaitForInitResponse(arg) { - if (!(arg instanceof daemon_pb.WaitForInitResponse)) { - throw new Error("Expected argument of type wsdaemon.WaitForInitResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof daemon_pb.WaitForInitResponse)) { + throw new Error('Expected argument of type wsdaemon.WaitForInitResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_wsdaemon_WaitForInitResponse(buffer_arg) { - return daemon_pb.WaitForInitResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -var WorkspaceContentServiceService = (exports.WorkspaceContentServiceService = { - // initWorkspace intialises a new workspace folder in the working area - initWorkspace: { - path: "/wsdaemon.WorkspaceContentService/InitWorkspace", - requestStream: false, - responseStream: false, - requestType: daemon_pb.InitWorkspaceRequest, - responseType: daemon_pb.InitWorkspaceResponse, - requestSerialize: serialize_wsdaemon_InitWorkspaceRequest, - requestDeserialize: deserialize_wsdaemon_InitWorkspaceRequest, - responseSerialize: serialize_wsdaemon_InitWorkspaceResponse, - responseDeserialize: deserialize_wsdaemon_InitWorkspaceResponse, - }, - // WaitForInit waits until a workspace is fully initialized. - // If the workspace is already initialized, this function returns immediately. - // If there is no initialization is going on, an error is returned. - waitForInit: { - path: "/wsdaemon.WorkspaceContentService/WaitForInit", - requestStream: false, - responseStream: false, - requestType: daemon_pb.WaitForInitRequest, - responseType: daemon_pb.WaitForInitResponse, - requestSerialize: serialize_wsdaemon_WaitForInitRequest, - requestDeserialize: deserialize_wsdaemon_WaitForInitRequest, - responseSerialize: serialize_wsdaemon_WaitForInitResponse, - responseDeserialize: deserialize_wsdaemon_WaitForInitResponse, - }, - // IsWorkspaceExists checks if ws-daemon knows about workspace. - isWorkspaceExists: { - path: "/wsdaemon.WorkspaceContentService/IsWorkspaceExists", - requestStream: false, - responseStream: false, - requestType: daemon_pb.IsWorkspaceExistsRequest, - responseType: daemon_pb.IsWorkspaceExistsResponse, - requestSerialize: serialize_wsdaemon_IsWorkspaceExistsRequest, - requestDeserialize: deserialize_wsdaemon_IsWorkspaceExistsRequest, - responseSerialize: serialize_wsdaemon_IsWorkspaceExistsResponse, - responseDeserialize: deserialize_wsdaemon_IsWorkspaceExistsResponse, - }, - // TakeSnapshot creates a backup/snapshot of a workspace - takeSnapshot: { - path: "/wsdaemon.WorkspaceContentService/TakeSnapshot", - requestStream: false, - responseStream: false, - requestType: daemon_pb.TakeSnapshotRequest, - responseType: daemon_pb.TakeSnapshotResponse, - requestSerialize: serialize_wsdaemon_TakeSnapshotRequest, - requestDeserialize: deserialize_wsdaemon_TakeSnapshotRequest, - responseSerialize: serialize_wsdaemon_TakeSnapshotResponse, - responseDeserialize: deserialize_wsdaemon_TakeSnapshotResponse, - }, - // disposeWorkspace cleans up a workspace, possibly after taking a final backup - disposeWorkspace: { - path: "/wsdaemon.WorkspaceContentService/DisposeWorkspace", - requestStream: false, - responseStream: false, - requestType: daemon_pb.DisposeWorkspaceRequest, - responseType: daemon_pb.DisposeWorkspaceResponse, - requestSerialize: serialize_wsdaemon_DisposeWorkspaceRequest, - requestDeserialize: deserialize_wsdaemon_DisposeWorkspaceRequest, - responseSerialize: serialize_wsdaemon_DisposeWorkspaceResponse, - responseDeserialize: deserialize_wsdaemon_DisposeWorkspaceResponse, - }, - // BackupWorkspace creates a backup of a workspace - backupWorkspace: { - path: "/wsdaemon.WorkspaceContentService/BackupWorkspace", - requestStream: false, - responseStream: false, - requestType: daemon_pb.BackupWorkspaceRequest, - responseType: daemon_pb.BackupWorkspaceResponse, - requestSerialize: serialize_wsdaemon_BackupWorkspaceRequest, - requestDeserialize: deserialize_wsdaemon_BackupWorkspaceRequest, - responseSerialize: serialize_wsdaemon_BackupWorkspaceResponse, - responseDeserialize: deserialize_wsdaemon_BackupWorkspaceResponse, - }, -}); + return daemon_pb.WaitForInitResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var WorkspaceContentServiceService = exports.WorkspaceContentServiceService = { + // initWorkspace intialises a new workspace folder in the working area +initWorkspace: { + path: '/wsdaemon.WorkspaceContentService/InitWorkspace', + requestStream: false, + responseStream: false, + requestType: daemon_pb.InitWorkspaceRequest, + responseType: daemon_pb.InitWorkspaceResponse, + requestSerialize: serialize_wsdaemon_InitWorkspaceRequest, + requestDeserialize: deserialize_wsdaemon_InitWorkspaceRequest, + responseSerialize: serialize_wsdaemon_InitWorkspaceResponse, + responseDeserialize: deserialize_wsdaemon_InitWorkspaceResponse, + }, + // WaitForInit waits until a workspace is fully initialized. +// If the workspace is already initialized, this function returns immediately. +// If there is no initialization is going on, an error is returned. +waitForInit: { + path: '/wsdaemon.WorkspaceContentService/WaitForInit', + requestStream: false, + responseStream: false, + requestType: daemon_pb.WaitForInitRequest, + responseType: daemon_pb.WaitForInitResponse, + requestSerialize: serialize_wsdaemon_WaitForInitRequest, + requestDeserialize: deserialize_wsdaemon_WaitForInitRequest, + responseSerialize: serialize_wsdaemon_WaitForInitResponse, + responseDeserialize: deserialize_wsdaemon_WaitForInitResponse, + }, + // IsWorkspaceExists checks if ws-daemon knows about workspace. +isWorkspaceExists: { + path: '/wsdaemon.WorkspaceContentService/IsWorkspaceExists', + requestStream: false, + responseStream: false, + requestType: daemon_pb.IsWorkspaceExistsRequest, + responseType: daemon_pb.IsWorkspaceExistsResponse, + requestSerialize: serialize_wsdaemon_IsWorkspaceExistsRequest, + requestDeserialize: deserialize_wsdaemon_IsWorkspaceExistsRequest, + responseSerialize: serialize_wsdaemon_IsWorkspaceExistsResponse, + responseDeserialize: deserialize_wsdaemon_IsWorkspaceExistsResponse, + }, + // TakeSnapshot creates a backup/snapshot of a workspace +takeSnapshot: { + path: '/wsdaemon.WorkspaceContentService/TakeSnapshot', + requestStream: false, + responseStream: false, + requestType: daemon_pb.TakeSnapshotRequest, + responseType: daemon_pb.TakeSnapshotResponse, + requestSerialize: serialize_wsdaemon_TakeSnapshotRequest, + requestDeserialize: deserialize_wsdaemon_TakeSnapshotRequest, + responseSerialize: serialize_wsdaemon_TakeSnapshotResponse, + responseDeserialize: deserialize_wsdaemon_TakeSnapshotResponse, + }, + // disposeWorkspace cleans up a workspace, possibly after taking a final backup +disposeWorkspace: { + path: '/wsdaemon.WorkspaceContentService/DisposeWorkspace', + requestStream: false, + responseStream: false, + requestType: daemon_pb.DisposeWorkspaceRequest, + responseType: daemon_pb.DisposeWorkspaceResponse, + requestSerialize: serialize_wsdaemon_DisposeWorkspaceRequest, + requestDeserialize: deserialize_wsdaemon_DisposeWorkspaceRequest, + responseSerialize: serialize_wsdaemon_DisposeWorkspaceResponse, + responseDeserialize: deserialize_wsdaemon_DisposeWorkspaceResponse, + }, + // BackupWorkspace creates a backup of a workspace +backupWorkspace: { + path: '/wsdaemon.WorkspaceContentService/BackupWorkspace', + requestStream: false, + responseStream: false, + requestType: daemon_pb.BackupWorkspaceRequest, + responseType: daemon_pb.BackupWorkspaceResponse, + requestSerialize: serialize_wsdaemon_BackupWorkspaceRequest, + requestDeserialize: deserialize_wsdaemon_BackupWorkspaceRequest, + responseSerialize: serialize_wsdaemon_BackupWorkspaceResponse, + responseDeserialize: deserialize_wsdaemon_BackupWorkspaceResponse, + }, +}; exports.WorkspaceContentServiceClient = grpc.makeGenericClientConstructor(WorkspaceContentServiceService); diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts index 3c1e387b05576e..87d5f7705ce86a 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -42,8 +42,8 @@ export class InitWorkspaceRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InitWorkspaceRequest.AsObject; static toObject(includeInstance: boolean, msg: InitWorkspaceRequest): InitWorkspaceRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: InitWorkspaceRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InitWorkspaceRequest; static deserializeBinaryFromReader(message: InitWorkspaceRequest, reader: jspb.BinaryReader): InitWorkspaceRequest; @@ -51,15 +51,15 @@ export class InitWorkspaceRequest extends jspb.Message { export namespace InitWorkspaceRequest { export type AsObject = { - id: string; - metadata?: WorkspaceMetadata.AsObject; - initializer?: content_service_api_initializer_pb.WorkspaceInitializer.AsObject; - fullWorkspaceBackup: boolean; - contentManifest: Uint8Array | string; - remoteStorageDisabled: boolean; - storageQuotaBytes: number; - persistentVolumeClaim: boolean; - }; + id: string, + metadata?: WorkspaceMetadata.AsObject, + initializer?: content_service_api_initializer_pb.WorkspaceInitializer.AsObject, + fullWorkspaceBackup: boolean, + contentManifest: Uint8Array | string, + remoteStorageDisabled: boolean, + storageQuotaBytes: number, + persistentVolumeClaim: boolean, + } } export class WorkspaceMetadata extends jspb.Message { @@ -71,8 +71,8 @@ export class WorkspaceMetadata extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceMetadata.AsObject; static toObject(includeInstance: boolean, msg: WorkspaceMetadata): WorkspaceMetadata.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WorkspaceMetadata, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WorkspaceMetadata; static deserializeBinaryFromReader(message: WorkspaceMetadata, reader: jspb.BinaryReader): WorkspaceMetadata; @@ -80,27 +80,26 @@ export class WorkspaceMetadata extends jspb.Message { export namespace WorkspaceMetadata { export type AsObject = { - owner: string; - metaId: string; - }; + owner: string, + metaId: string, + } } export class InitWorkspaceResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InitWorkspaceResponse.AsObject; static toObject(includeInstance: boolean, msg: InitWorkspaceResponse): InitWorkspaceResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: InitWorkspaceResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InitWorkspaceResponse; - static deserializeBinaryFromReader( - message: InitWorkspaceResponse, - reader: jspb.BinaryReader, - ): InitWorkspaceResponse; + static deserializeBinaryFromReader(message: InitWorkspaceResponse, reader: jspb.BinaryReader): InitWorkspaceResponse; } export namespace InitWorkspaceResponse { - export type AsObject = {}; + export type AsObject = { + } } export class WaitForInitRequest extends jspb.Message { @@ -110,8 +109,8 @@ export class WaitForInitRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WaitForInitRequest.AsObject; static toObject(includeInstance: boolean, msg: WaitForInitRequest): WaitForInitRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WaitForInitRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WaitForInitRequest; static deserializeBinaryFromReader(message: WaitForInitRequest, reader: jspb.BinaryReader): WaitForInitRequest; @@ -119,23 +118,25 @@ export class WaitForInitRequest extends jspb.Message { export namespace WaitForInitRequest { export type AsObject = { - id: string; - }; + id: string, + } } export class WaitForInitResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WaitForInitResponse.AsObject; static toObject(includeInstance: boolean, msg: WaitForInitResponse): WaitForInitResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WaitForInitResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WaitForInitResponse; static deserializeBinaryFromReader(message: WaitForInitResponse, reader: jspb.BinaryReader): WaitForInitResponse; } export namespace WaitForInitResponse { - export type AsObject = {}; + export type AsObject = { + } } export class IsWorkspaceExistsRequest extends jspb.Message { @@ -145,20 +146,17 @@ export class IsWorkspaceExistsRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): IsWorkspaceExistsRequest.AsObject; static toObject(includeInstance: boolean, msg: IsWorkspaceExistsRequest): IsWorkspaceExistsRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: IsWorkspaceExistsRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): IsWorkspaceExistsRequest; - static deserializeBinaryFromReader( - message: IsWorkspaceExistsRequest, - reader: jspb.BinaryReader, - ): IsWorkspaceExistsRequest; + static deserializeBinaryFromReader(message: IsWorkspaceExistsRequest, reader: jspb.BinaryReader): IsWorkspaceExistsRequest; } export namespace IsWorkspaceExistsRequest { export type AsObject = { - id: string; - }; + id: string, + } } export class IsWorkspaceExistsResponse extends jspb.Message { @@ -168,20 +166,17 @@ export class IsWorkspaceExistsResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): IsWorkspaceExistsResponse.AsObject; static toObject(includeInstance: boolean, msg: IsWorkspaceExistsResponse): IsWorkspaceExistsResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: IsWorkspaceExistsResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): IsWorkspaceExistsResponse; - static deserializeBinaryFromReader( - message: IsWorkspaceExistsResponse, - reader: jspb.BinaryReader, - ): IsWorkspaceExistsResponse; + static deserializeBinaryFromReader(message: IsWorkspaceExistsResponse, reader: jspb.BinaryReader): IsWorkspaceExistsResponse; } export namespace IsWorkspaceExistsResponse { export type AsObject = { - exists: boolean; - }; + exists: boolean, + } } export class TakeSnapshotRequest extends jspb.Message { @@ -193,8 +188,8 @@ export class TakeSnapshotRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TakeSnapshotRequest.AsObject; static toObject(includeInstance: boolean, msg: TakeSnapshotRequest): TakeSnapshotRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: TakeSnapshotRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TakeSnapshotRequest; static deserializeBinaryFromReader(message: TakeSnapshotRequest, reader: jspb.BinaryReader): TakeSnapshotRequest; @@ -202,9 +197,9 @@ export class TakeSnapshotRequest extends jspb.Message { export namespace TakeSnapshotRequest { export type AsObject = { - id: string; - returnImmediately: boolean; - }; + id: string, + returnImmediately: boolean, + } } export class TakeSnapshotResponse extends jspb.Message { @@ -214,8 +209,8 @@ export class TakeSnapshotResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TakeSnapshotResponse.AsObject; static toObject(includeInstance: boolean, msg: TakeSnapshotResponse): TakeSnapshotResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: TakeSnapshotResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TakeSnapshotResponse; static deserializeBinaryFromReader(message: TakeSnapshotResponse, reader: jspb.BinaryReader): TakeSnapshotResponse; @@ -223,8 +218,8 @@ export class TakeSnapshotResponse extends jspb.Message { export namespace TakeSnapshotResponse { export type AsObject = { - url: string; - }; + url: string, + } } export class DisposeWorkspaceRequest extends jspb.Message { @@ -238,25 +233,23 @@ export class DisposeWorkspaceRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DisposeWorkspaceRequest.AsObject; static toObject(includeInstance: boolean, msg: DisposeWorkspaceRequest): DisposeWorkspaceRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: DisposeWorkspaceRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): DisposeWorkspaceRequest; - static deserializeBinaryFromReader( - message: DisposeWorkspaceRequest, - reader: jspb.BinaryReader, - ): DisposeWorkspaceRequest; + static deserializeBinaryFromReader(message: DisposeWorkspaceRequest, reader: jspb.BinaryReader): DisposeWorkspaceRequest; } export namespace DisposeWorkspaceRequest { export type AsObject = { - id: string; - backup: boolean; - backupLogs: boolean; - }; + id: string, + backup: boolean, + backupLogs: boolean, + } } export class DisposeWorkspaceResponse extends jspb.Message { + hasGitStatus(): boolean; clearGitStatus(): void; getGitStatus(): content_service_api_initializer_pb.GitStatus | undefined; @@ -265,20 +258,17 @@ export class DisposeWorkspaceResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DisposeWorkspaceResponse.AsObject; static toObject(includeInstance: boolean, msg: DisposeWorkspaceResponse): DisposeWorkspaceResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: DisposeWorkspaceResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): DisposeWorkspaceResponse; - static deserializeBinaryFromReader( - message: DisposeWorkspaceResponse, - reader: jspb.BinaryReader, - ): DisposeWorkspaceResponse; + static deserializeBinaryFromReader(message: DisposeWorkspaceResponse, reader: jspb.BinaryReader): DisposeWorkspaceResponse; } export namespace DisposeWorkspaceResponse { export type AsObject = { - gitStatus?: content_service_api_initializer_pb.GitStatus.AsObject; - }; + gitStatus?: content_service_api_initializer_pb.GitStatus.AsObject, + } } export class BackupWorkspaceRequest extends jspb.Message { @@ -288,20 +278,17 @@ export class BackupWorkspaceRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BackupWorkspaceRequest.AsObject; static toObject(includeInstance: boolean, msg: BackupWorkspaceRequest): BackupWorkspaceRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: BackupWorkspaceRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): BackupWorkspaceRequest; - static deserializeBinaryFromReader( - message: BackupWorkspaceRequest, - reader: jspb.BinaryReader, - ): BackupWorkspaceRequest; + static deserializeBinaryFromReader(message: BackupWorkspaceRequest, reader: jspb.BinaryReader): BackupWorkspaceRequest; } export namespace BackupWorkspaceRequest { export type AsObject = { - id: string; - }; + id: string, + } } export class BackupWorkspaceResponse extends jspb.Message { @@ -311,20 +298,17 @@ export class BackupWorkspaceResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BackupWorkspaceResponse.AsObject; static toObject(includeInstance: boolean, msg: BackupWorkspaceResponse): BackupWorkspaceResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: BackupWorkspaceResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): BackupWorkspaceResponse; - static deserializeBinaryFromReader( - message: BackupWorkspaceResponse, - reader: jspb.BinaryReader, - ): BackupWorkspaceResponse; + static deserializeBinaryFromReader(message: BackupWorkspaceResponse, reader: jspb.BinaryReader): BackupWorkspaceResponse; } export namespace BackupWorkspaceResponse { export type AsObject = { - url: string; - }; + url: string, + } } export enum WorkspaceContentState { diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.js b/components/ws-daemon-api/typescript/src/daemon_pb.js index 16b07424268310..cce86c25c799be 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/daemon_pb.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -17,28 +17,26 @@ /* eslint-disable */ // @ts-nocheck -var jspb = require("google-protobuf"); +var jspb = require('google-protobuf'); var goog = jspb; -var global = function () { - return this || window || global || self || Function("return this")(); -}.call(null); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var content$service$api_initializer_pb = require("@gitpod/content-service/lib"); +var content$service$api_initializer_pb = require('@gitpod/content-service/lib'); goog.object.extend(proto, content$service$api_initializer_pb); -goog.exportSymbol("proto.wsdaemon.BackupWorkspaceRequest", null, global); -goog.exportSymbol("proto.wsdaemon.BackupWorkspaceResponse", null, global); -goog.exportSymbol("proto.wsdaemon.DisposeWorkspaceRequest", null, global); -goog.exportSymbol("proto.wsdaemon.DisposeWorkspaceResponse", null, global); -goog.exportSymbol("proto.wsdaemon.InitWorkspaceRequest", null, global); -goog.exportSymbol("proto.wsdaemon.InitWorkspaceResponse", null, global); -goog.exportSymbol("proto.wsdaemon.IsWorkspaceExistsRequest", null, global); -goog.exportSymbol("proto.wsdaemon.IsWorkspaceExistsResponse", null, global); -goog.exportSymbol("proto.wsdaemon.TakeSnapshotRequest", null, global); -goog.exportSymbol("proto.wsdaemon.TakeSnapshotResponse", null, global); -goog.exportSymbol("proto.wsdaemon.WaitForInitRequest", null, global); -goog.exportSymbol("proto.wsdaemon.WaitForInitResponse", null, global); -goog.exportSymbol("proto.wsdaemon.WorkspaceContentState", null, global); -goog.exportSymbol("proto.wsdaemon.WorkspaceMetadata", null, global); +goog.exportSymbol('proto.wsdaemon.BackupWorkspaceRequest', null, global); +goog.exportSymbol('proto.wsdaemon.BackupWorkspaceResponse', null, global); +goog.exportSymbol('proto.wsdaemon.DisposeWorkspaceRequest', null, global); +goog.exportSymbol('proto.wsdaemon.DisposeWorkspaceResponse', null, global); +goog.exportSymbol('proto.wsdaemon.InitWorkspaceRequest', null, global); +goog.exportSymbol('proto.wsdaemon.InitWorkspaceResponse', null, global); +goog.exportSymbol('proto.wsdaemon.IsWorkspaceExistsRequest', null, global); +goog.exportSymbol('proto.wsdaemon.IsWorkspaceExistsResponse', null, global); +goog.exportSymbol('proto.wsdaemon.TakeSnapshotRequest', null, global); +goog.exportSymbol('proto.wsdaemon.TakeSnapshotResponse', null, global); +goog.exportSymbol('proto.wsdaemon.WaitForInitRequest', null, global); +goog.exportSymbol('proto.wsdaemon.WaitForInitResponse', null, global); +goog.exportSymbol('proto.wsdaemon.WorkspaceContentState', null, global); +goog.exportSymbol('proto.wsdaemon.WorkspaceMetadata', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -49,16 +47,16 @@ goog.exportSymbol("proto.wsdaemon.WorkspaceMetadata", null, global); * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.InitWorkspaceRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.InitWorkspaceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.InitWorkspaceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.InitWorkspaceRequest.displayName = "proto.wsdaemon.InitWorkspaceRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.InitWorkspaceRequest.displayName = 'proto.wsdaemon.InitWorkspaceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -70,16 +68,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.WorkspaceMetadata = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.WorkspaceMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.WorkspaceMetadata, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.WorkspaceMetadata.displayName = "proto.wsdaemon.WorkspaceMetadata"; + /** + * @public + * @override + */ + proto.wsdaemon.WorkspaceMetadata.displayName = 'proto.wsdaemon.WorkspaceMetadata'; } /** * Generated by JsPbCodeGenerator. @@ -91,16 +89,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.InitWorkspaceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.InitWorkspaceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.InitWorkspaceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.InitWorkspaceResponse.displayName = "proto.wsdaemon.InitWorkspaceResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.InitWorkspaceResponse.displayName = 'proto.wsdaemon.InitWorkspaceResponse'; } /** * Generated by JsPbCodeGenerator. @@ -112,16 +110,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.WaitForInitRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.WaitForInitRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.WaitForInitRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.WaitForInitRequest.displayName = "proto.wsdaemon.WaitForInitRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.WaitForInitRequest.displayName = 'proto.wsdaemon.WaitForInitRequest'; } /** * Generated by JsPbCodeGenerator. @@ -133,16 +131,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.WaitForInitResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.WaitForInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.WaitForInitResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.WaitForInitResponse.displayName = "proto.wsdaemon.WaitForInitResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.WaitForInitResponse.displayName = 'proto.wsdaemon.WaitForInitResponse'; } /** * Generated by JsPbCodeGenerator. @@ -154,16 +152,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.IsWorkspaceExistsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.IsWorkspaceExistsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.IsWorkspaceExistsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.IsWorkspaceExistsRequest.displayName = "proto.wsdaemon.IsWorkspaceExistsRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.IsWorkspaceExistsRequest.displayName = 'proto.wsdaemon.IsWorkspaceExistsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -175,16 +173,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.IsWorkspaceExistsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.IsWorkspaceExistsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.IsWorkspaceExistsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.IsWorkspaceExistsResponse.displayName = "proto.wsdaemon.IsWorkspaceExistsResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.IsWorkspaceExistsResponse.displayName = 'proto.wsdaemon.IsWorkspaceExistsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -196,16 +194,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.TakeSnapshotRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.TakeSnapshotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.TakeSnapshotRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.TakeSnapshotRequest.displayName = "proto.wsdaemon.TakeSnapshotRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.TakeSnapshotRequest.displayName = 'proto.wsdaemon.TakeSnapshotRequest'; } /** * Generated by JsPbCodeGenerator. @@ -217,16 +215,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.TakeSnapshotResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.TakeSnapshotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.TakeSnapshotResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.TakeSnapshotResponse.displayName = "proto.wsdaemon.TakeSnapshotResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.TakeSnapshotResponse.displayName = 'proto.wsdaemon.TakeSnapshotResponse'; } /** * Generated by JsPbCodeGenerator. @@ -238,16 +236,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.DisposeWorkspaceRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.DisposeWorkspaceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.DisposeWorkspaceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.DisposeWorkspaceRequest.displayName = "proto.wsdaemon.DisposeWorkspaceRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.DisposeWorkspaceRequest.displayName = 'proto.wsdaemon.DisposeWorkspaceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -259,16 +257,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.DisposeWorkspaceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.DisposeWorkspaceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.DisposeWorkspaceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.DisposeWorkspaceResponse.displayName = "proto.wsdaemon.DisposeWorkspaceResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.DisposeWorkspaceResponse.displayName = 'proto.wsdaemon.DisposeWorkspaceResponse'; } /** * Generated by JsPbCodeGenerator. @@ -280,16 +278,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.BackupWorkspaceRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.BackupWorkspaceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.BackupWorkspaceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.BackupWorkspaceRequest.displayName = "proto.wsdaemon.BackupWorkspaceRequest"; + /** + * @public + * @override + */ + proto.wsdaemon.BackupWorkspaceRequest.displayName = 'proto.wsdaemon.BackupWorkspaceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -301,77 +299,79 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsdaemon.BackupWorkspaceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.wsdaemon.BackupWorkspaceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wsdaemon.BackupWorkspaceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wsdaemon.BackupWorkspaceResponse.displayName = "proto.wsdaemon.BackupWorkspaceResponse"; + /** + * @public + * @override + */ + proto.wsdaemon.BackupWorkspaceResponse.displayName = 'proto.wsdaemon.BackupWorkspaceResponse'; } + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.InitWorkspaceRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.InitWorkspaceRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.InitWorkspaceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.InitWorkspaceRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - metadata: (f = msg.getMetadata()) && proto.wsdaemon.WorkspaceMetadata.toObject(includeInstance, f), - initializer: - (f = msg.getInitializer()) && - content$service$api_initializer_pb.WorkspaceInitializer.toObject(includeInstance, f), - fullWorkspaceBackup: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - contentManifest: msg.getContentManifest_asB64(), - remoteStorageDisabled: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - storageQuotaBytes: jspb.Message.getFieldWithDefault(msg, 8, 0), - persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.InitWorkspaceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.InitWorkspaceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.InitWorkspaceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.InitWorkspaceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + metadata: (f = msg.getMetadata()) && proto.wsdaemon.WorkspaceMetadata.toObject(includeInstance, f), + initializer: (f = msg.getInitializer()) && content$service$api_initializer_pb.WorkspaceInitializer.toObject(includeInstance, f), + fullWorkspaceBackup: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + contentManifest: msg.getContentManifest_asB64(), + remoteStorageDisabled: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + storageQuotaBytes: jspb.Message.getFieldWithDefault(msg, 8, 0), + persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.InitWorkspaceRequest} */ -proto.wsdaemon.InitWorkspaceRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.InitWorkspaceRequest(); - return proto.wsdaemon.InitWorkspaceRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.InitWorkspaceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.InitWorkspaceRequest; + return proto.wsdaemon.InitWorkspaceRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -379,68 +379,67 @@ proto.wsdaemon.InitWorkspaceRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.InitWorkspaceRequest} */ -proto.wsdaemon.InitWorkspaceRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = new proto.wsdaemon.WorkspaceMetadata(); - reader.readMessage(value, proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader); - msg.setMetadata(value); - break; - case 3: - var value = new content$service$api_initializer_pb.WorkspaceInitializer(); - reader.readMessage( - value, - content$service$api_initializer_pb.WorkspaceInitializer.deserializeBinaryFromReader, - ); - msg.setInitializer(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFullWorkspaceBackup(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContentManifest(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoteStorageDisabled(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageQuotaBytes(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPersistentVolumeClaim(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.InitWorkspaceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.wsdaemon.WorkspaceMetadata; + reader.readMessage(value,proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 3: + var value = new content$service$api_initializer_pb.WorkspaceInitializer; + reader.readMessage(value,content$service$api_initializer_pb.WorkspaceInitializer.deserializeBinaryFromReader); + msg.setInitializer(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullWorkspaceBackup(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContentManifest(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoteStorageDisabled(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageQuotaBytes(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPersistentVolumeClaim(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.InitWorkspaceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.InitWorkspaceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.InitWorkspaceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -448,159 +447,199 @@ proto.wsdaemon.InitWorkspaceRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.InitWorkspaceRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage(2, f, proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter); - } - f = message.getInitializer(); - if (f != null) { - writer.writeMessage(3, f, content$service$api_initializer_pb.WorkspaceInitializer.serializeBinaryToWriter); - } - f = message.getFullWorkspaceBackup(); - if (f) { - writer.writeBool(4, f); - } - f = message.getContentManifest_asU8(); - if (f.length > 0) { - writer.writeBytes(5, f); - } - f = message.getRemoteStorageDisabled(); - if (f) { - writer.writeBool(7, f); - } - f = message.getStorageQuotaBytes(); - if (f !== 0) { - writer.writeInt64(8, f); - } - f = message.getPersistentVolumeClaim(); - if (f) { - writer.writeBool(9, f); - } +proto.wsdaemon.InitWorkspaceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter + ); + } + f = message.getInitializer(); + if (f != null) { + writer.writeMessage( + 3, + f, + content$service$api_initializer_pb.WorkspaceInitializer.serializeBinaryToWriter + ); + } + f = message.getFullWorkspaceBackup(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getContentManifest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getRemoteStorageDisabled(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getStorageQuotaBytes(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getPersistentVolumeClaim(); + if (f) { + writer.writeBool( + 9, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.InitWorkspaceRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional WorkspaceMetadata metadata = 2; * @return {?proto.wsdaemon.WorkspaceMetadata} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getMetadata = function () { - return /** @type{?proto.wsdaemon.WorkspaceMetadata} */ ( - jspb.Message.getWrapperField(this, proto.wsdaemon.WorkspaceMetadata, 2) - ); +proto.wsdaemon.InitWorkspaceRequest.prototype.getMetadata = function() { + return /** @type{?proto.wsdaemon.WorkspaceMetadata} */ ( + jspb.Message.getWrapperField(this, proto.wsdaemon.WorkspaceMetadata, 2)); }; + /** * @param {?proto.wsdaemon.WorkspaceMetadata|undefined} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this - */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setMetadata = function (value) { - return jspb.Message.setWrapperField(this, 2, value); +*/ +proto.wsdaemon.InitWorkspaceRequest.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; + /** * Clears the message field making it undefined. * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.clearMetadata = function () { - return this.setMetadata(undefined); +proto.wsdaemon.InitWorkspaceRequest.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.hasMetadata = function () { - return jspb.Message.getField(this, 2) != null; +proto.wsdaemon.InitWorkspaceRequest.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 2) != null; }; + /** * optional contentservice.WorkspaceInitializer initializer = 3; * @return {?proto.contentservice.WorkspaceInitializer} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getInitializer = function () { - return /** @type{?proto.contentservice.WorkspaceInitializer} */ ( - jspb.Message.getWrapperField(this, content$service$api_initializer_pb.WorkspaceInitializer, 3) - ); +proto.wsdaemon.InitWorkspaceRequest.prototype.getInitializer = function() { + return /** @type{?proto.contentservice.WorkspaceInitializer} */ ( + jspb.Message.getWrapperField(this, content$service$api_initializer_pb.WorkspaceInitializer, 3)); }; + /** * @param {?proto.contentservice.WorkspaceInitializer|undefined} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this - */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setInitializer = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +*/ +proto.wsdaemon.InitWorkspaceRequest.prototype.setInitializer = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; + /** * Clears the message field making it undefined. * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.clearInitializer = function () { - return this.setInitializer(undefined); +proto.wsdaemon.InitWorkspaceRequest.prototype.clearInitializer = function() { + return this.setInitializer(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.hasInitializer = function () { - return jspb.Message.getField(this, 3) != null; +proto.wsdaemon.InitWorkspaceRequest.prototype.hasInitializer = function() { + return jspb.Message.getField(this, 3) != null; }; + /** * optional bool full_workspace_backup = 4; * @return {boolean} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getFullWorkspaceBackup = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.wsdaemon.InitWorkspaceRequest.prototype.getFullWorkspaceBackup = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setFullWorkspaceBackup = function (value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setFullWorkspaceBackup = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; + /** * optional bytes content_manifest = 5; * @return {!(string|Uint8Array)} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest = function () { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; + /** * optional bytes content_manifest = 5; * This is a type-conversion wrapper around `getContentManifest()` * @return {string} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContentManifest())); +proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContentManifest())); }; + /** * optional bytes content_manifest = 5; * Note that Uint8Array is not supported on all browsers. @@ -608,117 +647,131 @@ proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest_asB64 = functio * This is a type-conversion wrapper around `getContentManifest()` * @return {!Uint8Array} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContentManifest())); +proto.wsdaemon.InitWorkspaceRequest.prototype.getContentManifest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContentManifest())); }; + /** * @param {!(string|Uint8Array)} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setContentManifest = function (value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setContentManifest = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; + /** * optional bool remote_storage_disabled = 7; * @return {boolean} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getRemoteStorageDisabled = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +proto.wsdaemon.InitWorkspaceRequest.prototype.getRemoteStorageDisabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setRemoteStorageDisabled = function (value) { - return jspb.Message.setProto3BooleanField(this, 7, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setRemoteStorageDisabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); }; + /** * optional int64 storage_quota_bytes = 8; * @return {number} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getStorageQuotaBytes = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.wsdaemon.InitWorkspaceRequest.prototype.getStorageQuotaBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; + /** * @param {number} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setStorageQuotaBytes = function (value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setStorageQuotaBytes = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; + /** * optional bool persistent_volume_claim = 9; * @return {boolean} */ -proto.wsdaemon.InitWorkspaceRequest.prototype.getPersistentVolumeClaim = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.wsdaemon.InitWorkspaceRequest.prototype.getPersistentVolumeClaim = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.InitWorkspaceRequest} returns this */ -proto.wsdaemon.InitWorkspaceRequest.prototype.setPersistentVolumeClaim = function (value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.wsdaemon.InitWorkspaceRequest.prototype.setPersistentVolumeClaim = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.WorkspaceMetadata.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.WorkspaceMetadata.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.WorkspaceMetadata} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.WorkspaceMetadata.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - metaId: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.WorkspaceMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.WorkspaceMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.WorkspaceMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.WorkspaceMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + metaId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.WorkspaceMetadata} */ -proto.wsdaemon.WorkspaceMetadata.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.WorkspaceMetadata(); - return proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.WorkspaceMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.WorkspaceMetadata; + return proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -726,39 +779,41 @@ proto.wsdaemon.WorkspaceMetadata.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.WorkspaceMetadata} */ -proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMetaId(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.WorkspaceMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMetaId(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.WorkspaceMetadata.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.WorkspaceMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -766,98 +821,116 @@ proto.wsdaemon.WorkspaceMetadata.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getMetaId(); - if (f.length > 0) { - writer.writeString(2, f); - } +proto.wsdaemon.WorkspaceMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMetaId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; + /** * optional string owner = 1; * @return {string} */ -proto.wsdaemon.WorkspaceMetadata.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.WorkspaceMetadata.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.WorkspaceMetadata} returns this */ -proto.wsdaemon.WorkspaceMetadata.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.WorkspaceMetadata.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional string meta_id = 2; * @return {string} */ -proto.wsdaemon.WorkspaceMetadata.prototype.getMetaId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.wsdaemon.WorkspaceMetadata.prototype.getMetaId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.WorkspaceMetadata} returns this */ -proto.wsdaemon.WorkspaceMetadata.prototype.setMetaId = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.wsdaemon.WorkspaceMetadata.prototype.setMetaId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.InitWorkspaceResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.InitWorkspaceResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.InitWorkspaceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.InitWorkspaceResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.InitWorkspaceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.InitWorkspaceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.InitWorkspaceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.InitWorkspaceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.InitWorkspaceResponse} */ -proto.wsdaemon.InitWorkspaceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.InitWorkspaceResponse(); - return proto.wsdaemon.InitWorkspaceResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.InitWorkspaceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.InitWorkspaceResponse; + return proto.wsdaemon.InitWorkspaceResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -865,31 +938,33 @@ proto.wsdaemon.InitWorkspaceResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.InitWorkspaceResponse} */ -proto.wsdaemon.InitWorkspaceResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.wsdaemon.InitWorkspaceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.InitWorkspaceResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.InitWorkspaceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.InitWorkspaceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.InitWorkspaceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -897,60 +972,66 @@ proto.wsdaemon.InitWorkspaceResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.InitWorkspaceResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.wsdaemon.InitWorkspaceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.WaitForInitRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.WaitForInitRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.WaitForInitRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.WaitForInitRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.WaitForInitRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.WaitForInitRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.WaitForInitRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.WaitForInitRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.WaitForInitRequest} */ -proto.wsdaemon.WaitForInitRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.WaitForInitRequest(); - return proto.wsdaemon.WaitForInitRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.WaitForInitRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.WaitForInitRequest; + return proto.wsdaemon.WaitForInitRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -958,35 +1039,37 @@ proto.wsdaemon.WaitForInitRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.WaitForInitRequest} */ -proto.wsdaemon.WaitForInitRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.WaitForInitRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.WaitForInitRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.WaitForInitRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.WaitForInitRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.WaitForInitRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -994,78 +1077,91 @@ proto.wsdaemon.WaitForInitRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.WaitForInitRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } +proto.wsdaemon.WaitForInitRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.WaitForInitRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.WaitForInitRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.WaitForInitRequest} returns this */ -proto.wsdaemon.WaitForInitRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.WaitForInitRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.WaitForInitResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.WaitForInitResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.WaitForInitResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.WaitForInitResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.WaitForInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.WaitForInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.WaitForInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.WaitForInitResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.WaitForInitResponse} */ -proto.wsdaemon.WaitForInitResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.WaitForInitResponse(); - return proto.wsdaemon.WaitForInitResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.WaitForInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.WaitForInitResponse; + return proto.wsdaemon.WaitForInitResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1073,31 +1169,33 @@ proto.wsdaemon.WaitForInitResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.WaitForInitResponse} */ -proto.wsdaemon.WaitForInitResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.wsdaemon.WaitForInitResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.WaitForInitResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.WaitForInitResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.WaitForInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.WaitForInitResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1105,60 +1203,66 @@ proto.wsdaemon.WaitForInitResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.WaitForInitResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.wsdaemon.WaitForInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.IsWorkspaceExistsRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.IsWorkspaceExistsRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.IsWorkspaceExistsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.IsWorkspaceExistsRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.IsWorkspaceExistsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.IsWorkspaceExistsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.IsWorkspaceExistsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.IsWorkspaceExistsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.IsWorkspaceExistsRequest} */ -proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.IsWorkspaceExistsRequest(); - return proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.IsWorkspaceExistsRequest; + return proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1166,35 +1270,37 @@ proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.IsWorkspaceExistsRequest} */ -proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.IsWorkspaceExistsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.IsWorkspaceExistsRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.IsWorkspaceExistsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.IsWorkspaceExistsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.IsWorkspaceExistsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1202,80 +1308,91 @@ proto.wsdaemon.IsWorkspaceExistsRequest.prototype.serializeBinary = function () * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.IsWorkspaceExistsRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } +proto.wsdaemon.IsWorkspaceExistsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.IsWorkspaceExistsRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.IsWorkspaceExistsRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.IsWorkspaceExistsRequest} returns this */ -proto.wsdaemon.IsWorkspaceExistsRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.IsWorkspaceExistsRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.IsWorkspaceExistsResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.IsWorkspaceExistsResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.IsWorkspaceExistsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.IsWorkspaceExistsResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - exists: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.IsWorkspaceExistsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.IsWorkspaceExistsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.IsWorkspaceExistsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.IsWorkspaceExistsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + exists: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.IsWorkspaceExistsResponse} */ -proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.IsWorkspaceExistsResponse(); - return proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.IsWorkspaceExistsResponse; + return proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1283,35 +1400,37 @@ proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.IsWorkspaceExistsResponse} */ -proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExists(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.IsWorkspaceExistsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExists(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.IsWorkspaceExistsResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.IsWorkspaceExistsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.IsWorkspaceExistsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.IsWorkspaceExistsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1319,81 +1438,92 @@ proto.wsdaemon.IsWorkspaceExistsResponse.prototype.serializeBinary = function () * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.IsWorkspaceExistsResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getExists(); - if (f) { - writer.writeBool(1, f); - } +proto.wsdaemon.IsWorkspaceExistsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExists(); + if (f) { + writer.writeBool( + 1, + f + ); + } }; + /** * optional bool exists = 1; * @return {boolean} */ -proto.wsdaemon.IsWorkspaceExistsResponse.prototype.getExists = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.wsdaemon.IsWorkspaceExistsResponse.prototype.getExists = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.IsWorkspaceExistsResponse} returns this */ -proto.wsdaemon.IsWorkspaceExistsResponse.prototype.setExists = function (value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.wsdaemon.IsWorkspaceExistsResponse.prototype.setExists = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.TakeSnapshotRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.TakeSnapshotRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.TakeSnapshotRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.TakeSnapshotRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - returnImmediately: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.TakeSnapshotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.TakeSnapshotRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.TakeSnapshotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.TakeSnapshotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + returnImmediately: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.TakeSnapshotRequest} */ -proto.wsdaemon.TakeSnapshotRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.TakeSnapshotRequest(); - return proto.wsdaemon.TakeSnapshotRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.TakeSnapshotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.TakeSnapshotRequest; + return proto.wsdaemon.TakeSnapshotRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1401,39 +1531,41 @@ proto.wsdaemon.TakeSnapshotRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.TakeSnapshotRequest} */ -proto.wsdaemon.TakeSnapshotRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReturnImmediately(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.TakeSnapshotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReturnImmediately(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.TakeSnapshotRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.TakeSnapshotRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.TakeSnapshotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.TakeSnapshotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1441,100 +1573,116 @@ proto.wsdaemon.TakeSnapshotRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.TakeSnapshotRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getReturnImmediately(); - if (f) { - writer.writeBool(2, f); - } +proto.wsdaemon.TakeSnapshotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReturnImmediately(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.TakeSnapshotRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.TakeSnapshotRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.TakeSnapshotRequest} returns this */ -proto.wsdaemon.TakeSnapshotRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.TakeSnapshotRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional bool return_immediately = 2; * @return {boolean} */ -proto.wsdaemon.TakeSnapshotRequest.prototype.getReturnImmediately = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.wsdaemon.TakeSnapshotRequest.prototype.getReturnImmediately = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.TakeSnapshotRequest} returns this */ -proto.wsdaemon.TakeSnapshotRequest.prototype.setReturnImmediately = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.wsdaemon.TakeSnapshotRequest.prototype.setReturnImmediately = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.TakeSnapshotResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.TakeSnapshotResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.TakeSnapshotResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.TakeSnapshotResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.TakeSnapshotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.TakeSnapshotResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.TakeSnapshotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.TakeSnapshotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.TakeSnapshotResponse} */ -proto.wsdaemon.TakeSnapshotResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.TakeSnapshotResponse(); - return proto.wsdaemon.TakeSnapshotResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.TakeSnapshotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.TakeSnapshotResponse; + return proto.wsdaemon.TakeSnapshotResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1542,35 +1690,37 @@ proto.wsdaemon.TakeSnapshotResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.TakeSnapshotResponse} */ -proto.wsdaemon.TakeSnapshotResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.TakeSnapshotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.TakeSnapshotResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.TakeSnapshotResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.TakeSnapshotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.TakeSnapshotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1578,82 +1728,93 @@ proto.wsdaemon.TakeSnapshotResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.TakeSnapshotResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString(1, f); - } +proto.wsdaemon.TakeSnapshotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** * optional string url = 1; * @return {string} */ -proto.wsdaemon.TakeSnapshotResponse.prototype.getUrl = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.TakeSnapshotResponse.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.TakeSnapshotResponse} returns this */ -proto.wsdaemon.TakeSnapshotResponse.prototype.setUrl = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.TakeSnapshotResponse.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.DisposeWorkspaceRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.DisposeWorkspaceRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.DisposeWorkspaceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.DisposeWorkspaceRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - backup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - backupLogs: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.DisposeWorkspaceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.DisposeWorkspaceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.DisposeWorkspaceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.DisposeWorkspaceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + backup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + backupLogs: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.DisposeWorkspaceRequest} */ -proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.DisposeWorkspaceRequest(); - return proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.DisposeWorkspaceRequest; + return proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1661,43 +1822,45 @@ proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.DisposeWorkspaceRequest} */ -proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBackup(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBackupLogs(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBackup(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBackupLogs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1705,122 +1868,141 @@ proto.wsdaemon.DisposeWorkspaceRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getBackup(); - if (f) { - writer.writeBool(2, f); - } - f = message.getBackupLogs(); - if (f) { - writer.writeBool(3, f); - } +proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBackup(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getBackupLogs(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.DisposeWorkspaceRequest} returns this */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional bool backup = 2; * @return {boolean} */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.getBackup = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.getBackup = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.DisposeWorkspaceRequest} returns this */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.setBackup = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.setBackup = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; + /** * optional bool backup_logs = 3; * @return {boolean} */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.getBackupLogs = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.getBackupLogs = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; + /** * @param {boolean} value * @return {!proto.wsdaemon.DisposeWorkspaceRequest} returns this */ -proto.wsdaemon.DisposeWorkspaceRequest.prototype.setBackupLogs = function (value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.wsdaemon.DisposeWorkspaceRequest.prototype.setBackupLogs = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.DisposeWorkspaceResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.DisposeWorkspaceResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.DisposeWorkspaceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.DisposeWorkspaceResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - gitStatus: - (f = msg.getGitStatus()) && - content$service$api_initializer_pb.GitStatus.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.DisposeWorkspaceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.DisposeWorkspaceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.DisposeWorkspaceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.DisposeWorkspaceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + gitStatus: (f = msg.getGitStatus()) && content$service$api_initializer_pb.GitStatus.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.DisposeWorkspaceResponse} */ -proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.DisposeWorkspaceResponse(); - return proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.DisposeWorkspaceResponse; + return proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1828,36 +2010,38 @@ proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.DisposeWorkspaceResponse} */ -proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new content$service$api_initializer_pb.GitStatus(); - reader.readMessage(value, content$service$api_initializer_pb.GitStatus.deserializeBinaryFromReader); - msg.setGitStatus(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.DisposeWorkspaceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new content$service$api_initializer_pb.GitStatus; + reader.readMessage(value,content$service$api_initializer_pb.GitStatus.deserializeBinaryFromReader); + msg.setGitStatus(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.DisposeWorkspaceResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.DisposeWorkspaceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.DisposeWorkspaceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.DisposeWorkspaceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1865,98 +2049,111 @@ proto.wsdaemon.DisposeWorkspaceResponse.prototype.serializeBinary = function () * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.DisposeWorkspaceResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getGitStatus(); - if (f != null) { - writer.writeMessage(1, f, content$service$api_initializer_pb.GitStatus.serializeBinaryToWriter); - } +proto.wsdaemon.DisposeWorkspaceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGitStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + content$service$api_initializer_pb.GitStatus.serializeBinaryToWriter + ); + } }; + /** * optional contentservice.GitStatus git_status = 1; * @return {?proto.contentservice.GitStatus} */ -proto.wsdaemon.DisposeWorkspaceResponse.prototype.getGitStatus = function () { - return /** @type{?proto.contentservice.GitStatus} */ ( - jspb.Message.getWrapperField(this, content$service$api_initializer_pb.GitStatus, 1) - ); +proto.wsdaemon.DisposeWorkspaceResponse.prototype.getGitStatus = function() { + return /** @type{?proto.contentservice.GitStatus} */ ( + jspb.Message.getWrapperField(this, content$service$api_initializer_pb.GitStatus, 1)); }; + /** * @param {?proto.contentservice.GitStatus|undefined} value * @return {!proto.wsdaemon.DisposeWorkspaceResponse} returns this - */ -proto.wsdaemon.DisposeWorkspaceResponse.prototype.setGitStatus = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +*/ +proto.wsdaemon.DisposeWorkspaceResponse.prototype.setGitStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; + /** * Clears the message field making it undefined. * @return {!proto.wsdaemon.DisposeWorkspaceResponse} returns this */ -proto.wsdaemon.DisposeWorkspaceResponse.prototype.clearGitStatus = function () { - return this.setGitStatus(undefined); +proto.wsdaemon.DisposeWorkspaceResponse.prototype.clearGitStatus = function() { + return this.setGitStatus(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.wsdaemon.DisposeWorkspaceResponse.prototype.hasGitStatus = function () { - return jspb.Message.getField(this, 1) != null; +proto.wsdaemon.DisposeWorkspaceResponse.prototype.hasGitStatus = function() { + return jspb.Message.getField(this, 1) != null; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.BackupWorkspaceRequest.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.BackupWorkspaceRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.BackupWorkspaceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.BackupWorkspaceRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.BackupWorkspaceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.BackupWorkspaceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.BackupWorkspaceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.BackupWorkspaceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.BackupWorkspaceRequest} */ -proto.wsdaemon.BackupWorkspaceRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.BackupWorkspaceRequest(); - return proto.wsdaemon.BackupWorkspaceRequest.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.BackupWorkspaceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.BackupWorkspaceRequest; + return proto.wsdaemon.BackupWorkspaceRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1964,35 +2161,37 @@ proto.wsdaemon.BackupWorkspaceRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.BackupWorkspaceRequest} */ -proto.wsdaemon.BackupWorkspaceRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.BackupWorkspaceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.BackupWorkspaceRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.BackupWorkspaceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.BackupWorkspaceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.BackupWorkspaceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2000,80 +2199,91 @@ proto.wsdaemon.BackupWorkspaceRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.BackupWorkspaceRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } +proto.wsdaemon.BackupWorkspaceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** * optional string id = 1; * @return {string} */ -proto.wsdaemon.BackupWorkspaceRequest.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.BackupWorkspaceRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.BackupWorkspaceRequest} returns this */ -proto.wsdaemon.BackupWorkspaceRequest.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.BackupWorkspaceRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.wsdaemon.BackupWorkspaceResponse.prototype.toObject = function (opt_includeInstance) { - return proto.wsdaemon.BackupWorkspaceResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wsdaemon.BackupWorkspaceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.wsdaemon.BackupWorkspaceResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsdaemon.BackupWorkspaceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsdaemon.BackupWorkspaceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsdaemon.BackupWorkspaceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsdaemon.BackupWorkspaceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wsdaemon.BackupWorkspaceResponse} */ -proto.wsdaemon.BackupWorkspaceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsdaemon.BackupWorkspaceResponse(); - return proto.wsdaemon.BackupWorkspaceResponse.deserializeBinaryFromReader(msg, reader); +proto.wsdaemon.BackupWorkspaceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsdaemon.BackupWorkspaceResponse; + return proto.wsdaemon.BackupWorkspaceResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2081,35 +2291,37 @@ proto.wsdaemon.BackupWorkspaceResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wsdaemon.BackupWorkspaceResponse} */ -proto.wsdaemon.BackupWorkspaceResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - default: - reader.skipField(); - break; - } +proto.wsdaemon.BackupWorkspaceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsdaemon.BackupWorkspaceResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.wsdaemon.BackupWorkspaceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.wsdaemon.BackupWorkspaceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsdaemon.BackupWorkspaceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2117,38 +2329,44 @@ proto.wsdaemon.BackupWorkspaceResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsdaemon.BackupWorkspaceResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString(1, f); - } +proto.wsdaemon.BackupWorkspaceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** * optional string url = 1; * @return {string} */ -proto.wsdaemon.BackupWorkspaceResponse.prototype.getUrl = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.wsdaemon.BackupWorkspaceResponse.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.wsdaemon.BackupWorkspaceResponse} returns this */ -proto.wsdaemon.BackupWorkspaceResponse.prototype.setUrl = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.wsdaemon.BackupWorkspaceResponse.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * @enum {number} */ proto.wsdaemon.WorkspaceContentState = { - NONE: 0, - SETTING_UP: 1, - AVAILABLE: 2, - WRAPPING_UP: 3, + NONE: 0, + SETTING_UP: 1, + AVAILABLE: 2, + WRAPPING_UP: 3 }; goog.object.extend(exports, proto.wsdaemon); diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.d.ts b/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.d.ts index bff0a5d2982f28..27e1145e08426e 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -24,13 +24,10 @@ interface IInWorkspaceServiceService extends grpc.ServiceDefinition { +interface IInWorkspaceServiceService_IPrepareForUserNS extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/PrepareForUserNS"; requestStream: false; responseStream: false; @@ -39,11 +36,7 @@ interface IInWorkspaceServiceService_IPrepareForUserNS responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IWriteIDMapping - extends grpc.MethodDefinition< - workspace_daemon_pb.WriteIDMappingRequest, - workspace_daemon_pb.WriteIDMappingResponse - > { +interface IInWorkspaceServiceService_IWriteIDMapping extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/WriteIDMapping"; requestStream: false; responseStream: false; @@ -52,11 +45,7 @@ interface IInWorkspaceServiceService_IWriteIDMapping responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IEvacuateCGroup - extends grpc.MethodDefinition< - workspace_daemon_pb.EvacuateCGroupRequest, - workspace_daemon_pb.EvacuateCGroupResponse - > { +interface IInWorkspaceServiceService_IEvacuateCGroup extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/EvacuateCGroup"; requestStream: false; responseStream: false; @@ -65,8 +54,7 @@ interface IInWorkspaceServiceService_IEvacuateCGroup responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IMountProc - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_IMountProc extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/MountProc"; requestStream: false; responseStream: false; @@ -75,8 +63,7 @@ interface IInWorkspaceServiceService_IMountProc responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IUmountProc - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_IUmountProc extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/UmountProc"; requestStream: false; responseStream: false; @@ -85,8 +72,7 @@ interface IInWorkspaceServiceService_IUmountProc responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IMountSysfs - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_IMountSysfs extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/MountSysfs"; requestStream: false; responseStream: false; @@ -95,8 +81,7 @@ interface IInWorkspaceServiceService_IMountSysfs responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IUmountSysfs - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_IUmountSysfs extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/UmountSysfs"; requestStream: false; responseStream: false; @@ -105,8 +90,7 @@ interface IInWorkspaceServiceService_IUmountSysfs responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_ITeardown - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_ITeardown extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/Teardown"; requestStream: false; responseStream: false; @@ -115,11 +99,7 @@ interface IInWorkspaceServiceService_ITeardown responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_ISetupPairVeths - extends grpc.MethodDefinition< - workspace_daemon_pb.SetupPairVethsRequest, - workspace_daemon_pb.SetupPairVethsResponse - > { +interface IInWorkspaceServiceService_ISetupPairVeths extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/SetupPairVeths"; requestStream: false; responseStream: false; @@ -128,8 +108,7 @@ interface IInWorkspaceServiceService_ISetupPairVeths responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IInWorkspaceServiceService_IWorkspaceInfo - extends grpc.MethodDefinition { +interface IInWorkspaceServiceService_IWorkspaceInfo extends grpc.MethodDefinition { path: "/iws.InWorkspaceService/WorkspaceInfo"; requestStream: false; responseStream: false; @@ -138,350 +117,110 @@ interface IInWorkspaceServiceService_IWorkspaceInfo responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IInWorkspaceServiceService_ISetupDebugPairVeths extends grpc.MethodDefinition { + path: "/iws.InWorkspaceService/SetupDebugPairVeths"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const InWorkspaceServiceService: IInWorkspaceServiceService; export interface IInWorkspaceServiceServer extends grpc.UntypedServiceImplementation { - prepareForUserNS: grpc.handleUnaryCall< - workspace_daemon_pb.PrepareForUserNSRequest, - workspace_daemon_pb.PrepareForUserNSResponse - >; - writeIDMapping: grpc.handleUnaryCall< - workspace_daemon_pb.WriteIDMappingRequest, - workspace_daemon_pb.WriteIDMappingResponse - >; - evacuateCGroup: grpc.handleUnaryCall< - workspace_daemon_pb.EvacuateCGroupRequest, - workspace_daemon_pb.EvacuateCGroupResponse - >; + prepareForUserNS: grpc.handleUnaryCall; + writeIDMapping: grpc.handleUnaryCall; + evacuateCGroup: grpc.handleUnaryCall; mountProc: grpc.handleUnaryCall; umountProc: grpc.handleUnaryCall; mountSysfs: grpc.handleUnaryCall; umountSysfs: grpc.handleUnaryCall; teardown: grpc.handleUnaryCall; - setupPairVeths: grpc.handleUnaryCall< - workspace_daemon_pb.SetupPairVethsRequest, - workspace_daemon_pb.SetupPairVethsResponse - >; - workspaceInfo: grpc.handleUnaryCall< - workspace_daemon_pb.WorkspaceInfoRequest, - workspace_daemon_pb.WorkspaceInfoResponse - >; + setupPairVeths: grpc.handleUnaryCall; + workspaceInfo: grpc.handleUnaryCall; + setupDebugPairVeths: grpc.handleUnaryCall; } export interface IInWorkspaceServiceClient { - prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - mountProc( - request: workspace_daemon_pb.MountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - mountProc( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - mountProc( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountProc( - request: workspace_daemon_pb.UmountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountProc( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountProc( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - teardown( - request: workspace_daemon_pb.TeardownRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - teardown( - request: workspace_daemon_pb.TeardownRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - teardown( - request: workspace_daemon_pb.TeardownRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; + prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + mountProc(request: workspace_daemon_pb.MountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + mountProc(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + mountProc(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + umountProc(request: workspace_daemon_pb.UmountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + umountProc(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + umountProc(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + mountSysfs(request: workspace_daemon_pb.MountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + mountSysfs(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + mountSysfs(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + umountSysfs(request: workspace_daemon_pb.UmountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + umountSysfs(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + umountSysfs(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + teardown(request: workspace_daemon_pb.TeardownRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + teardown(request: workspace_daemon_pb.TeardownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + teardown(request: workspace_daemon_pb.TeardownRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; + setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; + setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; } export class InWorkspaceServiceClient extends grpc.Client implements IInWorkspaceServiceClient { constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - public prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - public prepareForUserNS( - request: workspace_daemon_pb.PrepareForUserNSRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void, - ): grpc.ClientUnaryCall; - public writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - public writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - public writeIDMapping( - request: workspace_daemon_pb.WriteIDMappingRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void, - ): grpc.ClientUnaryCall; - public evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - public evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - public evacuateCGroup( - request: workspace_daemon_pb.EvacuateCGroupRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void, - ): grpc.ClientUnaryCall; - public mountProc( - request: workspace_daemon_pb.MountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public mountProc( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public mountProc( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountProc( - request: workspace_daemon_pb.UmountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountProc( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountProc( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public mountSysfs( - request: workspace_daemon_pb.MountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public umountSysfs( - request: workspace_daemon_pb.UmountProcRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void, - ): grpc.ClientUnaryCall; - public teardown( - request: workspace_daemon_pb.TeardownRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - public teardown( - request: workspace_daemon_pb.TeardownRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - public teardown( - request: workspace_daemon_pb.TeardownRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void, - ): grpc.ClientUnaryCall; - public setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - public setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - public setupPairVeths( - request: workspace_daemon_pb.SetupPairVethsRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void, - ): grpc.ClientUnaryCall; - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; + public prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + public prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + public prepareForUserNS(request: workspace_daemon_pb.PrepareForUserNSRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.PrepareForUserNSResponse) => void): grpc.ClientUnaryCall; + public writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + public writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + public writeIDMapping(request: workspace_daemon_pb.WriteIDMappingRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WriteIDMappingResponse) => void): grpc.ClientUnaryCall; + public evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + public evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + public evacuateCGroup(request: workspace_daemon_pb.EvacuateCGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.EvacuateCGroupResponse) => void): grpc.ClientUnaryCall; + public mountProc(request: workspace_daemon_pb.MountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public mountProc(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public mountProc(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public umountProc(request: workspace_daemon_pb.UmountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public umountProc(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public umountProc(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public mountSysfs(request: workspace_daemon_pb.MountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public mountSysfs(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public mountSysfs(request: workspace_daemon_pb.MountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.MountProcResponse) => void): grpc.ClientUnaryCall; + public umountSysfs(request: workspace_daemon_pb.UmountProcRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public umountSysfs(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public umountSysfs(request: workspace_daemon_pb.UmountProcRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.UmountProcResponse) => void): grpc.ClientUnaryCall; + public teardown(request: workspace_daemon_pb.TeardownRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + public teardown(request: workspace_daemon_pb.TeardownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + public teardown(request: workspace_daemon_pb.TeardownRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.TeardownResponse) => void): grpc.ClientUnaryCall; + public setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + public setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + public setupPairVeths(request: workspace_daemon_pb.SetupPairVethsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupPairVethsResponse) => void): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + public setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; + public setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; + public setupDebugPairVeths(request: workspace_daemon_pb.SetupDebugPairVethsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.SetupDebugPairVethsResponse) => void): grpc.ClientUnaryCall; } interface IWorkspaceInfoServiceService extends grpc.ServiceDefinition { workspaceInfo: IWorkspaceInfoServiceService_IWorkspaceInfo; } -interface IWorkspaceInfoServiceService_IWorkspaceInfo - extends grpc.MethodDefinition { +interface IWorkspaceInfoServiceService_IWorkspaceInfo extends grpc.MethodDefinition { path: "/iws.WorkspaceInfoService/WorkspaceInfo"; requestStream: false; responseStream: false; @@ -494,45 +233,49 @@ interface IWorkspaceInfoServiceService_IWorkspaceInfo export const WorkspaceInfoServiceService: IWorkspaceInfoServiceService; export interface IWorkspaceInfoServiceServer extends grpc.UntypedServiceImplementation { - workspaceInfo: grpc.handleUnaryCall< - workspace_daemon_pb.WorkspaceInfoRequest, - workspace_daemon_pb.WorkspaceInfoResponse - >; + workspaceInfo: grpc.handleUnaryCall; } export interface IWorkspaceInfoServiceClient { - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; } export class WorkspaceInfoServiceClient extends grpc.Client implements IWorkspaceInfoServiceClient { constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; - public workspaceInfo( - request: workspace_daemon_pb.WorkspaceInfoRequest, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void, - ): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; + public workspaceInfo(request: workspace_daemon_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: workspace_daemon_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall; +} + +interface IDebugServiceService extends grpc.ServiceDefinition { + start: IDebugServiceService_IStart; +} + +interface IDebugServiceService_IStart extends grpc.MethodDefinition { + path: "/iws.DebugService/Start"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const DebugServiceService: IDebugServiceService; + +export interface IDebugServiceServer extends grpc.UntypedServiceImplementation { + start: grpc.handleServerStreamingCall; +} + +export interface IDebugServiceClient { + start(request: workspace_daemon_pb.StartRequest, options?: Partial): grpc.ClientReadableStream; + start(request: workspace_daemon_pb.StartRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; +} + +export class DebugServiceClient extends grpc.Client implements IDebugServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public start(request: workspace_daemon_pb.StartRequest, options?: Partial): grpc.ClientReadableStream; + public start(request: workspace_daemon_pb.StartRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.js b/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.js index 096415c1ae2ccf..bdf574cfc72006 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.js +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_grpc_pb.js @@ -1,345 +1,417 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ // GENERATED CODE -- DO NOT EDIT! -"use strict"; -var grpc = require("@grpc/grpc-js"); -var workspace_daemon_pb = require("./workspace_daemon_pb.js"); +'use strict'; +var grpc = require('@grpc/grpc-js'); +var workspace_daemon_pb = require('./workspace_daemon_pb.js'); function serialize_iws_EvacuateCGroupRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.EvacuateCGroupRequest)) { - throw new Error("Expected argument of type iws.EvacuateCGroupRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.EvacuateCGroupRequest)) { + throw new Error('Expected argument of type iws.EvacuateCGroupRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_EvacuateCGroupRequest(buffer_arg) { - return workspace_daemon_pb.EvacuateCGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.EvacuateCGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_EvacuateCGroupResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.EvacuateCGroupResponse)) { - throw new Error("Expected argument of type iws.EvacuateCGroupResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.EvacuateCGroupResponse)) { + throw new Error('Expected argument of type iws.EvacuateCGroupResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_EvacuateCGroupResponse(buffer_arg) { - return workspace_daemon_pb.EvacuateCGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.EvacuateCGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_MountProcRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.MountProcRequest)) { - throw new Error("Expected argument of type iws.MountProcRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.MountProcRequest)) { + throw new Error('Expected argument of type iws.MountProcRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_MountProcRequest(buffer_arg) { - return workspace_daemon_pb.MountProcRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.MountProcRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_MountProcResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.MountProcResponse)) { - throw new Error("Expected argument of type iws.MountProcResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.MountProcResponse)) { + throw new Error('Expected argument of type iws.MountProcResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_MountProcResponse(buffer_arg) { - return workspace_daemon_pb.MountProcResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.MountProcResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_PrepareForUserNSRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.PrepareForUserNSRequest)) { - throw new Error("Expected argument of type iws.PrepareForUserNSRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.PrepareForUserNSRequest)) { + throw new Error('Expected argument of type iws.PrepareForUserNSRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_PrepareForUserNSRequest(buffer_arg) { - return workspace_daemon_pb.PrepareForUserNSRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.PrepareForUserNSRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_PrepareForUserNSResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.PrepareForUserNSResponse)) { - throw new Error("Expected argument of type iws.PrepareForUserNSResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.PrepareForUserNSResponse)) { + throw new Error('Expected argument of type iws.PrepareForUserNSResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_PrepareForUserNSResponse(buffer_arg) { - return workspace_daemon_pb.PrepareForUserNSResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.PrepareForUserNSResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_iws_SetupDebugPairVethsRequest(arg) { + if (!(arg instanceof workspace_daemon_pb.SetupDebugPairVethsRequest)) { + throw new Error('Expected argument of type iws.SetupDebugPairVethsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_iws_SetupDebugPairVethsRequest(buffer_arg) { + return workspace_daemon_pb.SetupDebugPairVethsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_iws_SetupDebugPairVethsResponse(arg) { + if (!(arg instanceof workspace_daemon_pb.SetupDebugPairVethsResponse)) { + throw new Error('Expected argument of type iws.SetupDebugPairVethsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_iws_SetupDebugPairVethsResponse(buffer_arg) { + return workspace_daemon_pb.SetupDebugPairVethsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_SetupPairVethsRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.SetupPairVethsRequest)) { - throw new Error("Expected argument of type iws.SetupPairVethsRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.SetupPairVethsRequest)) { + throw new Error('Expected argument of type iws.SetupPairVethsRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_SetupPairVethsRequest(buffer_arg) { - return workspace_daemon_pb.SetupPairVethsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.SetupPairVethsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_SetupPairVethsResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.SetupPairVethsResponse)) { - throw new Error("Expected argument of type iws.SetupPairVethsResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.SetupPairVethsResponse)) { + throw new Error('Expected argument of type iws.SetupPairVethsResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_SetupPairVethsResponse(buffer_arg) { - return workspace_daemon_pb.SetupPairVethsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.SetupPairVethsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_iws_StartRequest(arg) { + if (!(arg instanceof workspace_daemon_pb.StartRequest)) { + throw new Error('Expected argument of type iws.StartRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_iws_StartRequest(buffer_arg) { + return workspace_daemon_pb.StartRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_iws_StartResponse(arg) { + if (!(arg instanceof workspace_daemon_pb.StartResponse)) { + throw new Error('Expected argument of type iws.StartResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_iws_StartResponse(buffer_arg) { + return workspace_daemon_pb.StartResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_TeardownRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.TeardownRequest)) { - throw new Error("Expected argument of type iws.TeardownRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.TeardownRequest)) { + throw new Error('Expected argument of type iws.TeardownRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_TeardownRequest(buffer_arg) { - return workspace_daemon_pb.TeardownRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.TeardownRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_TeardownResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.TeardownResponse)) { - throw new Error("Expected argument of type iws.TeardownResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.TeardownResponse)) { + throw new Error('Expected argument of type iws.TeardownResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_TeardownResponse(buffer_arg) { - return workspace_daemon_pb.TeardownResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.TeardownResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_UmountProcRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.UmountProcRequest)) { - throw new Error("Expected argument of type iws.UmountProcRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.UmountProcRequest)) { + throw new Error('Expected argument of type iws.UmountProcRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_UmountProcRequest(buffer_arg) { - return workspace_daemon_pb.UmountProcRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.UmountProcRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_UmountProcResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.UmountProcResponse)) { - throw new Error("Expected argument of type iws.UmountProcResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.UmountProcResponse)) { + throw new Error('Expected argument of type iws.UmountProcResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_UmountProcResponse(buffer_arg) { - return workspace_daemon_pb.UmountProcResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.UmountProcResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_WorkspaceInfoRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.WorkspaceInfoRequest)) { - throw new Error("Expected argument of type iws.WorkspaceInfoRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.WorkspaceInfoRequest)) { + throw new Error('Expected argument of type iws.WorkspaceInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_WorkspaceInfoRequest(buffer_arg) { - return workspace_daemon_pb.WorkspaceInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.WorkspaceInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_WorkspaceInfoResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.WorkspaceInfoResponse)) { - throw new Error("Expected argument of type iws.WorkspaceInfoResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.WorkspaceInfoResponse)) { + throw new Error('Expected argument of type iws.WorkspaceInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_WorkspaceInfoResponse(buffer_arg) { - return workspace_daemon_pb.WorkspaceInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.WorkspaceInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_WriteIDMappingRequest(arg) { - if (!(arg instanceof workspace_daemon_pb.WriteIDMappingRequest)) { - throw new Error("Expected argument of type iws.WriteIDMappingRequest"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.WriteIDMappingRequest)) { + throw new Error('Expected argument of type iws.WriteIDMappingRequest'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_WriteIDMappingRequest(buffer_arg) { - return workspace_daemon_pb.WriteIDMappingRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return workspace_daemon_pb.WriteIDMappingRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_iws_WriteIDMappingResponse(arg) { - if (!(arg instanceof workspace_daemon_pb.WriteIDMappingResponse)) { - throw new Error("Expected argument of type iws.WriteIDMappingResponse"); - } - return Buffer.from(arg.serializeBinary()); + if (!(arg instanceof workspace_daemon_pb.WriteIDMappingResponse)) { + throw new Error('Expected argument of type iws.WriteIDMappingResponse'); + } + return Buffer.from(arg.serializeBinary()); } function deserialize_iws_WriteIDMappingResponse(buffer_arg) { - return workspace_daemon_pb.WriteIDMappingResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -var InWorkspaceServiceService = (exports.InWorkspaceServiceService = { - // PrepareForUserNS prepares a workspace container for wrapping it in a user namespace. - // A container that called this function MUST call Teardown. - // - // This call will make the workspace container's rootfs shared, and mount the workspace - // container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has - // the daemon hostPath mount. Can only be used once per workspace. - prepareForUserNS: { - path: "/iws.InWorkspaceService/PrepareForUserNS", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.PrepareForUserNSRequest, - responseType: workspace_daemon_pb.PrepareForUserNSResponse, - requestSerialize: serialize_iws_PrepareForUserNSRequest, - requestDeserialize: deserialize_iws_PrepareForUserNSRequest, - responseSerialize: serialize_iws_PrepareForUserNSResponse, - responseDeserialize: deserialize_iws_PrepareForUserNSResponse, - }, - // WriteIDMapping writes a new user/group ID mapping to /proc//uid_map (gid_map respectively). This is used - // for user namespaces and is available four times every 10 seconds. - writeIDMapping: { - path: "/iws.InWorkspaceService/WriteIDMapping", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.WriteIDMappingRequest, - responseType: workspace_daemon_pb.WriteIDMappingResponse, - requestSerialize: serialize_iws_WriteIDMappingRequest, - requestDeserialize: deserialize_iws_WriteIDMappingRequest, - responseSerialize: serialize_iws_WriteIDMappingResponse, - responseDeserialize: deserialize_iws_WriteIDMappingResponse, - }, - // EvacuateCGroup empties the workspace pod cgroup and produces a new substructure. - // In combincation with introducing a new cgroup namespace, we can create a situation - // where the subcontroller are enabled and the ring2-visible cgroup is of type "domain". - evacuateCGroup: { - path: "/iws.InWorkspaceService/EvacuateCGroup", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.EvacuateCGroupRequest, - responseType: workspace_daemon_pb.EvacuateCGroupResponse, - requestSerialize: serialize_iws_EvacuateCGroupRequest, - requestDeserialize: deserialize_iws_EvacuateCGroupRequest, - responseSerialize: serialize_iws_EvacuateCGroupResponse, - responseDeserialize: deserialize_iws_EvacuateCGroupResponse, - }, - // MountProc mounts a masked proc in the container's rootfs. - // The PID must be in the PID namespace of the workspace container. - // The path is relative to the mount namespace of the PID. - mountProc: { - path: "/iws.InWorkspaceService/MountProc", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.MountProcRequest, - responseType: workspace_daemon_pb.MountProcResponse, - requestSerialize: serialize_iws_MountProcRequest, - requestDeserialize: deserialize_iws_MountProcRequest, - responseSerialize: serialize_iws_MountProcResponse, - responseDeserialize: deserialize_iws_MountProcResponse, - }, - // UmountProc unmounts a masked proc from the container's rootfs. - // The PID must be in the PID namespace of the workspace container. - // The path is relative to the mount namespace of the PID. - umountProc: { - path: "/iws.InWorkspaceService/UmountProc", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.UmountProcRequest, - responseType: workspace_daemon_pb.UmountProcResponse, - requestSerialize: serialize_iws_UmountProcRequest, - requestDeserialize: deserialize_iws_UmountProcRequest, - responseSerialize: serialize_iws_UmountProcResponse, - responseDeserialize: deserialize_iws_UmountProcResponse, - }, - // MountSysfs mounts a masked sysfs in the container's rootfs. - // The PID must be in the PID namespace of the workspace container. - // The path is relative to the mount namespace of the PID. - mountSysfs: { - path: "/iws.InWorkspaceService/MountSysfs", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.MountProcRequest, - responseType: workspace_daemon_pb.MountProcResponse, - requestSerialize: serialize_iws_MountProcRequest, - requestDeserialize: deserialize_iws_MountProcRequest, - responseSerialize: serialize_iws_MountProcResponse, - responseDeserialize: deserialize_iws_MountProcResponse, - }, - // UmountSysfs unmounts a masked sysfs from the container's rootfs. - // The PID must be in the PID namespace of the workspace container. - // The path is relative to the mount namespace of the PID. - umountSysfs: { - path: "/iws.InWorkspaceService/UmountSysfs", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.UmountProcRequest, - responseType: workspace_daemon_pb.UmountProcResponse, - requestSerialize: serialize_iws_UmountProcRequest, - requestDeserialize: deserialize_iws_UmountProcRequest, - responseSerialize: serialize_iws_UmountProcResponse, - responseDeserialize: deserialize_iws_UmountProcResponse, - }, - // Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered - // when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container. - teardown: { - path: "/iws.InWorkspaceService/Teardown", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.TeardownRequest, - responseType: workspace_daemon_pb.TeardownResponse, - requestSerialize: serialize_iws_TeardownRequest, - requestDeserialize: deserialize_iws_TeardownRequest, - responseSerialize: serialize_iws_TeardownResponse, - responseDeserialize: deserialize_iws_TeardownResponse, - }, - // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace. - setupPairVeths: { - path: "/iws.InWorkspaceService/SetupPairVeths", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.SetupPairVethsRequest, - responseType: workspace_daemon_pb.SetupPairVethsResponse, - requestSerialize: serialize_iws_SetupPairVethsRequest, - requestDeserialize: deserialize_iws_SetupPairVethsRequest, - responseSerialize: serialize_iws_SetupPairVethsResponse, - responseDeserialize: deserialize_iws_SetupPairVethsResponse, - }, - // Get information about the workspace - workspaceInfo: { - path: "/iws.InWorkspaceService/WorkspaceInfo", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.WorkspaceInfoRequest, - responseType: workspace_daemon_pb.WorkspaceInfoResponse, - requestSerialize: serialize_iws_WorkspaceInfoRequest, - requestDeserialize: deserialize_iws_WorkspaceInfoRequest, - responseSerialize: serialize_iws_WorkspaceInfoResponse, - responseDeserialize: deserialize_iws_WorkspaceInfoResponse, - }, -}); + return workspace_daemon_pb.WriteIDMappingResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var InWorkspaceServiceService = exports.InWorkspaceServiceService = { + // PrepareForUserNS prepares a workspace container for wrapping it in a user namespace. +// A container that called this function MUST call Teardown. +// +// This call will make the workspace container's rootfs shared, and mount the workspace +// container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has +// the daemon hostPath mount. Can only be used once per workspace. +prepareForUserNS: { + path: '/iws.InWorkspaceService/PrepareForUserNS', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.PrepareForUserNSRequest, + responseType: workspace_daemon_pb.PrepareForUserNSResponse, + requestSerialize: serialize_iws_PrepareForUserNSRequest, + requestDeserialize: deserialize_iws_PrepareForUserNSRequest, + responseSerialize: serialize_iws_PrepareForUserNSResponse, + responseDeserialize: deserialize_iws_PrepareForUserNSResponse, + }, + // WriteIDMapping writes a new user/group ID mapping to /proc//uid_map (gid_map respectively). This is used +// for user namespaces and is available four times every 10 seconds. +writeIDMapping: { + path: '/iws.InWorkspaceService/WriteIDMapping', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.WriteIDMappingRequest, + responseType: workspace_daemon_pb.WriteIDMappingResponse, + requestSerialize: serialize_iws_WriteIDMappingRequest, + requestDeserialize: deserialize_iws_WriteIDMappingRequest, + responseSerialize: serialize_iws_WriteIDMappingResponse, + responseDeserialize: deserialize_iws_WriteIDMappingResponse, + }, + // EvacuateCGroup empties the workspace pod cgroup and produces a new substructure. +// In combincation with introducing a new cgroup namespace, we can create a situation +// where the subcontroller are enabled and the ring2-visible cgroup is of type "domain". +evacuateCGroup: { + path: '/iws.InWorkspaceService/EvacuateCGroup', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.EvacuateCGroupRequest, + responseType: workspace_daemon_pb.EvacuateCGroupResponse, + requestSerialize: serialize_iws_EvacuateCGroupRequest, + requestDeserialize: deserialize_iws_EvacuateCGroupRequest, + responseSerialize: serialize_iws_EvacuateCGroupResponse, + responseDeserialize: deserialize_iws_EvacuateCGroupResponse, + }, + // MountProc mounts a masked proc in the container's rootfs. +// The PID must be in the PID namespace of the workspace container. +// The path is relative to the mount namespace of the PID. +mountProc: { + path: '/iws.InWorkspaceService/MountProc', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.MountProcRequest, + responseType: workspace_daemon_pb.MountProcResponse, + requestSerialize: serialize_iws_MountProcRequest, + requestDeserialize: deserialize_iws_MountProcRequest, + responseSerialize: serialize_iws_MountProcResponse, + responseDeserialize: deserialize_iws_MountProcResponse, + }, + // UmountProc unmounts a masked proc from the container's rootfs. +// The PID must be in the PID namespace of the workspace container. +// The path is relative to the mount namespace of the PID. +umountProc: { + path: '/iws.InWorkspaceService/UmountProc', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.UmountProcRequest, + responseType: workspace_daemon_pb.UmountProcResponse, + requestSerialize: serialize_iws_UmountProcRequest, + requestDeserialize: deserialize_iws_UmountProcRequest, + responseSerialize: serialize_iws_UmountProcResponse, + responseDeserialize: deserialize_iws_UmountProcResponse, + }, + // MountSysfs mounts a masked sysfs in the container's rootfs. +// The PID must be in the PID namespace of the workspace container. +// The path is relative to the mount namespace of the PID. +mountSysfs: { + path: '/iws.InWorkspaceService/MountSysfs', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.MountProcRequest, + responseType: workspace_daemon_pb.MountProcResponse, + requestSerialize: serialize_iws_MountProcRequest, + requestDeserialize: deserialize_iws_MountProcRequest, + responseSerialize: serialize_iws_MountProcResponse, + responseDeserialize: deserialize_iws_MountProcResponse, + }, + // UmountSysfs unmounts a masked sysfs from the container's rootfs. +// The PID must be in the PID namespace of the workspace container. +// The path is relative to the mount namespace of the PID. +umountSysfs: { + path: '/iws.InWorkspaceService/UmountSysfs', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.UmountProcRequest, + responseType: workspace_daemon_pb.UmountProcResponse, + requestSerialize: serialize_iws_UmountProcRequest, + requestDeserialize: deserialize_iws_UmountProcRequest, + responseSerialize: serialize_iws_UmountProcResponse, + responseDeserialize: deserialize_iws_UmountProcResponse, + }, + // Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered +// when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container. +teardown: { + path: '/iws.InWorkspaceService/Teardown', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.TeardownRequest, + responseType: workspace_daemon_pb.TeardownResponse, + requestSerialize: serialize_iws_TeardownRequest, + requestDeserialize: deserialize_iws_TeardownRequest, + responseSerialize: serialize_iws_TeardownResponse, + responseDeserialize: deserialize_iws_TeardownResponse, + }, + // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace. +setupPairVeths: { + path: '/iws.InWorkspaceService/SetupPairVeths', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.SetupPairVethsRequest, + responseType: workspace_daemon_pb.SetupPairVethsResponse, + requestSerialize: serialize_iws_SetupPairVethsRequest, + requestDeserialize: deserialize_iws_SetupPairVethsRequest, + responseSerialize: serialize_iws_SetupPairVethsResponse, + responseDeserialize: deserialize_iws_SetupPairVethsResponse, + }, + // Get information about the workspace +workspaceInfo: { + path: '/iws.InWorkspaceService/WorkspaceInfo', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.WorkspaceInfoRequest, + responseType: workspace_daemon_pb.WorkspaceInfoResponse, + requestSerialize: serialize_iws_WorkspaceInfoRequest, + requestDeserialize: deserialize_iws_WorkspaceInfoRequest, + responseSerialize: serialize_iws_WorkspaceInfoResponse, + responseDeserialize: deserialize_iws_WorkspaceInfoResponse, + }, + // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace, but only setup route for access network. +setupDebugPairVeths: { + path: '/iws.InWorkspaceService/SetupDebugPairVeths', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.SetupDebugPairVethsRequest, + responseType: workspace_daemon_pb.SetupDebugPairVethsResponse, + requestSerialize: serialize_iws_SetupDebugPairVethsRequest, + requestDeserialize: deserialize_iws_SetupDebugPairVethsRequest, + responseSerialize: serialize_iws_SetupDebugPairVethsResponse, + responseDeserialize: deserialize_iws_SetupDebugPairVethsResponse, + }, +}; exports.InWorkspaceServiceClient = grpc.makeGenericClientConstructor(InWorkspaceServiceService); -var WorkspaceInfoServiceService = (exports.WorkspaceInfoServiceService = { - // Get information about the workspace - workspaceInfo: { - path: "/iws.WorkspaceInfoService/WorkspaceInfo", - requestStream: false, - responseStream: false, - requestType: workspace_daemon_pb.WorkspaceInfoRequest, - responseType: workspace_daemon_pb.WorkspaceInfoResponse, - requestSerialize: serialize_iws_WorkspaceInfoRequest, - requestDeserialize: deserialize_iws_WorkspaceInfoRequest, - responseSerialize: serialize_iws_WorkspaceInfoResponse, - responseDeserialize: deserialize_iws_WorkspaceInfoResponse, - }, -}); +var WorkspaceInfoServiceService = exports.WorkspaceInfoServiceService = { + // Get information about the workspace +workspaceInfo: { + path: '/iws.WorkspaceInfoService/WorkspaceInfo', + requestStream: false, + responseStream: false, + requestType: workspace_daemon_pb.WorkspaceInfoRequest, + responseType: workspace_daemon_pb.WorkspaceInfoResponse, + requestSerialize: serialize_iws_WorkspaceInfoRequest, + requestDeserialize: deserialize_iws_WorkspaceInfoRequest, + responseSerialize: serialize_iws_WorkspaceInfoResponse, + responseDeserialize: deserialize_iws_WorkspaceInfoResponse, + }, +}; exports.WorkspaceInfoServiceClient = grpc.makeGenericClientConstructor(WorkspaceInfoServiceService); +var DebugServiceService = exports.DebugServiceService = { + start: { + path: '/iws.DebugService/Start', + requestStream: false, + responseStream: true, + requestType: workspace_daemon_pb.StartRequest, + responseType: workspace_daemon_pb.StartResponse, + requestSerialize: serialize_iws_StartRequest, + requestDeserialize: deserialize_iws_StartRequest, + responseSerialize: serialize_iws_StartResponse, + responseDeserialize: deserialize_iws_StartResponse, + }, +}; + +exports.DebugServiceClient = grpc.makeGenericClientConstructor(DebugServiceService); diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts index cea4edd5e495e3..df2dfd6aebe367 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -13,21 +13,20 @@ import * as jspb from "google-protobuf"; export class PrepareForUserNSRequest extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PrepareForUserNSRequest.AsObject; static toObject(includeInstance: boolean, msg: PrepareForUserNSRequest): PrepareForUserNSRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: PrepareForUserNSRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PrepareForUserNSRequest; - static deserializeBinaryFromReader( - message: PrepareForUserNSRequest, - reader: jspb.BinaryReader, - ): PrepareForUserNSRequest; + static deserializeBinaryFromReader(message: PrepareForUserNSRequest, reader: jspb.BinaryReader): PrepareForUserNSRequest; } export namespace PrepareForUserNSRequest { - export type AsObject = {}; + export type AsObject = { + } } export class PrepareForUserNSResponse extends jspb.Message { @@ -41,22 +40,19 @@ export class PrepareForUserNSResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PrepareForUserNSResponse.AsObject; static toObject(includeInstance: boolean, msg: PrepareForUserNSResponse): PrepareForUserNSResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: PrepareForUserNSResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PrepareForUserNSResponse; - static deserializeBinaryFromReader( - message: PrepareForUserNSResponse, - reader: jspb.BinaryReader, - ): PrepareForUserNSResponse; + static deserializeBinaryFromReader(message: PrepareForUserNSResponse, reader: jspb.BinaryReader): PrepareForUserNSResponse; } export namespace PrepareForUserNSResponse { export type AsObject = { - fsShift: FSShiftMethod; - fullWorkspaceBackup: boolean; - persistentVolumeClaim: boolean; - }; + fsShift: FSShiftMethod, + fullWorkspaceBackup: boolean, + persistentVolumeClaim: boolean, + } } export class WriteIDMappingResponse extends jspb.Message { @@ -68,21 +64,18 @@ export class WriteIDMappingResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WriteIDMappingResponse.AsObject; static toObject(includeInstance: boolean, msg: WriteIDMappingResponse): WriteIDMappingResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WriteIDMappingResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WriteIDMappingResponse; - static deserializeBinaryFromReader( - message: WriteIDMappingResponse, - reader: jspb.BinaryReader, - ): WriteIDMappingResponse; + static deserializeBinaryFromReader(message: WriteIDMappingResponse, reader: jspb.BinaryReader): WriteIDMappingResponse; } export namespace WriteIDMappingResponse { export type AsObject = { - message: string; - errorCode: number; - }; + message: string, + errorCode: number, + } } export class WriteIDMappingRequest extends jspb.Message { @@ -98,22 +91,20 @@ export class WriteIDMappingRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WriteIDMappingRequest.AsObject; static toObject(includeInstance: boolean, msg: WriteIDMappingRequest): WriteIDMappingRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WriteIDMappingRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WriteIDMappingRequest; - static deserializeBinaryFromReader( - message: WriteIDMappingRequest, - reader: jspb.BinaryReader, - ): WriteIDMappingRequest; + static deserializeBinaryFromReader(message: WriteIDMappingRequest, reader: jspb.BinaryReader): WriteIDMappingRequest; } export namespace WriteIDMappingRequest { export type AsObject = { - pid: number; - gid: boolean; - mappingList: Array; - }; + pid: number, + gid: boolean, + mappingList: Array, + } + export class Mapping extends jspb.Message { getContainerId(): number; @@ -126,8 +117,8 @@ export namespace WriteIDMappingRequest { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Mapping.AsObject; static toObject(includeInstance: boolean, msg: Mapping): Mapping.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Mapping, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Mapping; static deserializeBinaryFromReader(message: Mapping, reader: jspb.BinaryReader): Mapping; @@ -135,47 +126,46 @@ export namespace WriteIDMappingRequest { export namespace Mapping { export type AsObject = { - containerId: number; - hostId: number; - size: number; - }; + containerId: number, + hostId: number, + size: number, + } } + } export class EvacuateCGroupRequest extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EvacuateCGroupRequest.AsObject; static toObject(includeInstance: boolean, msg: EvacuateCGroupRequest): EvacuateCGroupRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EvacuateCGroupRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): EvacuateCGroupRequest; - static deserializeBinaryFromReader( - message: EvacuateCGroupRequest, - reader: jspb.BinaryReader, - ): EvacuateCGroupRequest; + static deserializeBinaryFromReader(message: EvacuateCGroupRequest, reader: jspb.BinaryReader): EvacuateCGroupRequest; } export namespace EvacuateCGroupRequest { - export type AsObject = {}; + export type AsObject = { + } } export class EvacuateCGroupResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EvacuateCGroupResponse.AsObject; static toObject(includeInstance: boolean, msg: EvacuateCGroupResponse): EvacuateCGroupResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EvacuateCGroupResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): EvacuateCGroupResponse; - static deserializeBinaryFromReader( - message: EvacuateCGroupResponse, - reader: jspb.BinaryReader, - ): EvacuateCGroupResponse; + static deserializeBinaryFromReader(message: EvacuateCGroupResponse, reader: jspb.BinaryReader): EvacuateCGroupResponse; } export namespace EvacuateCGroupResponse { - export type AsObject = {}; + export type AsObject = { + } } export class MountProcRequest extends jspb.Message { @@ -187,8 +177,8 @@ export class MountProcRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MountProcRequest.AsObject; static toObject(includeInstance: boolean, msg: MountProcRequest): MountProcRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: MountProcRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): MountProcRequest; static deserializeBinaryFromReader(message: MountProcRequest, reader: jspb.BinaryReader): MountProcRequest; @@ -196,24 +186,26 @@ export class MountProcRequest extends jspb.Message { export namespace MountProcRequest { export type AsObject = { - target: string; - pid: number; - }; + target: string, + pid: number, + } } export class MountProcResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MountProcResponse.AsObject; static toObject(includeInstance: boolean, msg: MountProcResponse): MountProcResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: MountProcResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): MountProcResponse; static deserializeBinaryFromReader(message: MountProcResponse, reader: jspb.BinaryReader): MountProcResponse; } export namespace MountProcResponse { - export type AsObject = {}; + export type AsObject = { + } } export class UmountProcRequest extends jspb.Message { @@ -225,8 +217,8 @@ export class UmountProcRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UmountProcRequest.AsObject; static toObject(includeInstance: boolean, msg: UmountProcRequest): UmountProcRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: UmountProcRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UmountProcRequest; static deserializeBinaryFromReader(message: UmountProcRequest, reader: jspb.BinaryReader): UmountProcRequest; @@ -234,39 +226,43 @@ export class UmountProcRequest extends jspb.Message { export namespace UmountProcRequest { export type AsObject = { - target: string; - pid: number; - }; + target: string, + pid: number, + } } export class UmountProcResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UmountProcResponse.AsObject; static toObject(includeInstance: boolean, msg: UmountProcResponse): UmountProcResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: UmountProcResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UmountProcResponse; static deserializeBinaryFromReader(message: UmountProcResponse, reader: jspb.BinaryReader): UmountProcResponse; } export namespace UmountProcResponse { - export type AsObject = {}; + export type AsObject = { + } } export class TeardownRequest extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TeardownRequest.AsObject; static toObject(includeInstance: boolean, msg: TeardownRequest): TeardownRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: TeardownRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TeardownRequest; static deserializeBinaryFromReader(message: TeardownRequest, reader: jspb.BinaryReader): TeardownRequest; } export namespace TeardownRequest { - export type AsObject = {}; + export type AsObject = { + } } export class TeardownResponse extends jspb.Message { @@ -276,8 +272,8 @@ export class TeardownResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TeardownResponse.AsObject; static toObject(includeInstance: boolean, msg: TeardownResponse): TeardownResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: TeardownResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TeardownResponse; static deserializeBinaryFromReader(message: TeardownResponse, reader: jspb.BinaryReader): TeardownResponse; @@ -285,8 +281,8 @@ export class TeardownResponse extends jspb.Message { export namespace TeardownResponse { export type AsObject = { - success: boolean; - }; + success: boolean, + } } export class SetupPairVethsRequest extends jspb.Message { @@ -296,56 +292,92 @@ export class SetupPairVethsRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SetupPairVethsRequest.AsObject; static toObject(includeInstance: boolean, msg: SetupPairVethsRequest): SetupPairVethsRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: SetupPairVethsRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): SetupPairVethsRequest; - static deserializeBinaryFromReader( - message: SetupPairVethsRequest, - reader: jspb.BinaryReader, - ): SetupPairVethsRequest; + static deserializeBinaryFromReader(message: SetupPairVethsRequest, reader: jspb.BinaryReader): SetupPairVethsRequest; } export namespace SetupPairVethsRequest { export type AsObject = { - pid: number; - }; + pid: number, + } } export class SetupPairVethsResponse extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SetupPairVethsResponse.AsObject; static toObject(includeInstance: boolean, msg: SetupPairVethsResponse): SetupPairVethsResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: SetupPairVethsResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): SetupPairVethsResponse; - static deserializeBinaryFromReader( - message: SetupPairVethsResponse, - reader: jspb.BinaryReader, - ): SetupPairVethsResponse; + static deserializeBinaryFromReader(message: SetupPairVethsResponse, reader: jspb.BinaryReader): SetupPairVethsResponse; } export namespace SetupPairVethsResponse { - export type AsObject = {}; + export type AsObject = { + } +} + +export class SetupDebugPairVethsRequest extends jspb.Message { + getPid(): number; + setPid(value: number): SetupDebugPairVethsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetupDebugPairVethsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetupDebugPairVethsRequest): SetupDebugPairVethsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetupDebugPairVethsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetupDebugPairVethsRequest; + static deserializeBinaryFromReader(message: SetupDebugPairVethsRequest, reader: jspb.BinaryReader): SetupDebugPairVethsRequest; +} + +export namespace SetupDebugPairVethsRequest { + export type AsObject = { + pid: number, + } +} + +export class SetupDebugPairVethsResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetupDebugPairVethsResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetupDebugPairVethsResponse): SetupDebugPairVethsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetupDebugPairVethsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetupDebugPairVethsResponse; + static deserializeBinaryFromReader(message: SetupDebugPairVethsResponse, reader: jspb.BinaryReader): SetupDebugPairVethsResponse; +} + +export namespace SetupDebugPairVethsResponse { + export type AsObject = { + } } export class WorkspaceInfoRequest extends jspb.Message { + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceInfoRequest.AsObject; static toObject(includeInstance: boolean, msg: WorkspaceInfoRequest): WorkspaceInfoRequest.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WorkspaceInfoRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WorkspaceInfoRequest; static deserializeBinaryFromReader(message: WorkspaceInfoRequest, reader: jspb.BinaryReader): WorkspaceInfoRequest; } export namespace WorkspaceInfoRequest { - export type AsObject = {}; + export type AsObject = { + } } export class WorkspaceInfoResponse extends jspb.Message { + hasResources(): boolean; clearResources(): void; getResources(): Resources | undefined; @@ -354,23 +386,21 @@ export class WorkspaceInfoResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceInfoResponse.AsObject; static toObject(includeInstance: boolean, msg: WorkspaceInfoResponse): WorkspaceInfoResponse.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: WorkspaceInfoResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WorkspaceInfoResponse; - static deserializeBinaryFromReader( - message: WorkspaceInfoResponse, - reader: jspb.BinaryReader, - ): WorkspaceInfoResponse; + static deserializeBinaryFromReader(message: WorkspaceInfoResponse, reader: jspb.BinaryReader): WorkspaceInfoResponse; } export namespace WorkspaceInfoResponse { export type AsObject = { - resources?: Resources.AsObject; - }; + resources?: Resources.AsObject, + } } export class Resources extends jspb.Message { + hasCpu(): boolean; clearCpu(): void; getCpu(): Cpu | undefined; @@ -384,8 +414,8 @@ export class Resources extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Resources.AsObject; static toObject(includeInstance: boolean, msg: Resources): Resources.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Resources, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Resources; static deserializeBinaryFromReader(message: Resources, reader: jspb.BinaryReader): Resources; @@ -393,9 +423,9 @@ export class Resources extends jspb.Message { export namespace Resources { export type AsObject = { - cpu?: Cpu.AsObject; - memory?: Memory.AsObject; - }; + cpu?: Cpu.AsObject, + memory?: Memory.AsObject, + } } export class Cpu extends jspb.Message { @@ -407,8 +437,8 @@ export class Cpu extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Cpu.AsObject; static toObject(includeInstance: boolean, msg: Cpu): Cpu.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Cpu, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Cpu; static deserializeBinaryFromReader(message: Cpu, reader: jspb.BinaryReader): Cpu; @@ -416,9 +446,9 @@ export class Cpu extends jspb.Message { export namespace Cpu { export type AsObject = { - used: number; - limit: number; - }; + used: number, + limit: number, + } } export class Memory extends jspb.Message { @@ -430,8 +460,8 @@ export class Memory extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Memory.AsObject; static toObject(includeInstance: boolean, msg: Memory): Memory.AsObject; - static extensions: { [key: number]: jspb.ExtensionFieldInfo }; - static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo }; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Memory, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Memory; static deserializeBinaryFromReader(message: Memory, reader: jspb.BinaryReader): Memory; @@ -439,9 +469,69 @@ export class Memory extends jspb.Message { export namespace Memory { export type AsObject = { - used: number; - limit: number; - }; + used: number, + limit: number, + } +} + +export class StartRequest extends jspb.Message { + getHeadless(): boolean; + setHeadless(value: boolean): StartRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StartRequest.AsObject; + static toObject(includeInstance: boolean, msg: StartRequest): StartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StartRequest; + static deserializeBinaryFromReader(message: StartRequest, reader: jspb.BinaryReader): StartRequest; +} + +export namespace StartRequest { + export type AsObject = { + headless: boolean, + } +} + +export class StartResponse extends jspb.Message { + + hasData(): boolean; + clearData(): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): StartResponse; + + hasExitCode(): boolean; + clearExitCode(): void; + getExitCode(): number; + setExitCode(value: number): StartResponse; + + getOutputCase(): StartResponse.OutputCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StartResponse.AsObject; + static toObject(includeInstance: boolean, msg: StartResponse): StartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StartResponse; + static deserializeBinaryFromReader(message: StartResponse, reader: jspb.BinaryReader): StartResponse; +} + +export namespace StartResponse { + export type AsObject = { + data: Uint8Array | string, + exitCode: number, + } + + export enum OutputCase { + OUTPUT_NOT_SET = 0, + DATA = 1, + EXIT_CODE = 2, + } + } export enum FSShiftMethod { diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js index d361202d2f08e8..ca46fde6cfef32 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License.AGPL.txt in the project root for license information. */ @@ -17,33 +17,36 @@ /* eslint-disable */ // @ts-nocheck -var jspb = require("google-protobuf"); +var jspb = require('google-protobuf'); var goog = jspb; -var global = function () { - return this || window || global || self || Function("return this")(); -}.call(null); - -goog.exportSymbol("proto.iws.Cpu", null, global); -goog.exportSymbol("proto.iws.EvacuateCGroupRequest", null, global); -goog.exportSymbol("proto.iws.EvacuateCGroupResponse", null, global); -goog.exportSymbol("proto.iws.FSShiftMethod", null, global); -goog.exportSymbol("proto.iws.Memory", null, global); -goog.exportSymbol("proto.iws.MountProcRequest", null, global); -goog.exportSymbol("proto.iws.MountProcResponse", null, global); -goog.exportSymbol("proto.iws.PrepareForUserNSRequest", null, global); -goog.exportSymbol("proto.iws.PrepareForUserNSResponse", null, global); -goog.exportSymbol("proto.iws.Resources", null, global); -goog.exportSymbol("proto.iws.SetupPairVethsRequest", null, global); -goog.exportSymbol("proto.iws.SetupPairVethsResponse", null, global); -goog.exportSymbol("proto.iws.TeardownRequest", null, global); -goog.exportSymbol("proto.iws.TeardownResponse", null, global); -goog.exportSymbol("proto.iws.UmountProcRequest", null, global); -goog.exportSymbol("proto.iws.UmountProcResponse", null, global); -goog.exportSymbol("proto.iws.WorkspaceInfoRequest", null, global); -goog.exportSymbol("proto.iws.WorkspaceInfoResponse", null, global); -goog.exportSymbol("proto.iws.WriteIDMappingRequest", null, global); -goog.exportSymbol("proto.iws.WriteIDMappingRequest.Mapping", null, global); -goog.exportSymbol("proto.iws.WriteIDMappingResponse", null, global); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.iws.Cpu', null, global); +goog.exportSymbol('proto.iws.EvacuateCGroupRequest', null, global); +goog.exportSymbol('proto.iws.EvacuateCGroupResponse', null, global); +goog.exportSymbol('proto.iws.FSShiftMethod', null, global); +goog.exportSymbol('proto.iws.Memory', null, global); +goog.exportSymbol('proto.iws.MountProcRequest', null, global); +goog.exportSymbol('proto.iws.MountProcResponse', null, global); +goog.exportSymbol('proto.iws.PrepareForUserNSRequest', null, global); +goog.exportSymbol('proto.iws.PrepareForUserNSResponse', null, global); +goog.exportSymbol('proto.iws.Resources', null, global); +goog.exportSymbol('proto.iws.SetupDebugPairVethsRequest', null, global); +goog.exportSymbol('proto.iws.SetupDebugPairVethsResponse', null, global); +goog.exportSymbol('proto.iws.SetupPairVethsRequest', null, global); +goog.exportSymbol('proto.iws.SetupPairVethsResponse', null, global); +goog.exportSymbol('proto.iws.StartRequest', null, global); +goog.exportSymbol('proto.iws.StartResponse', null, global); +goog.exportSymbol('proto.iws.StartResponse.OutputCase', null, global); +goog.exportSymbol('proto.iws.TeardownRequest', null, global); +goog.exportSymbol('proto.iws.TeardownResponse', null, global); +goog.exportSymbol('proto.iws.UmountProcRequest', null, global); +goog.exportSymbol('proto.iws.UmountProcResponse', null, global); +goog.exportSymbol('proto.iws.WorkspaceInfoRequest', null, global); +goog.exportSymbol('proto.iws.WorkspaceInfoResponse', null, global); +goog.exportSymbol('proto.iws.WriteIDMappingRequest', null, global); +goog.exportSymbol('proto.iws.WriteIDMappingRequest.Mapping', null, global); +goog.exportSymbol('proto.iws.WriteIDMappingResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -54,16 +57,16 @@ goog.exportSymbol("proto.iws.WriteIDMappingResponse", null, global); * @extends {jspb.Message} * @constructor */ -proto.iws.PrepareForUserNSRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.PrepareForUserNSRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.PrepareForUserNSRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.PrepareForUserNSRequest.displayName = "proto.iws.PrepareForUserNSRequest"; + /** + * @public + * @override + */ + proto.iws.PrepareForUserNSRequest.displayName = 'proto.iws.PrepareForUserNSRequest'; } /** * Generated by JsPbCodeGenerator. @@ -75,16 +78,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.PrepareForUserNSResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.PrepareForUserNSResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.PrepareForUserNSResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.PrepareForUserNSResponse.displayName = "proto.iws.PrepareForUserNSResponse"; + /** + * @public + * @override + */ + proto.iws.PrepareForUserNSResponse.displayName = 'proto.iws.PrepareForUserNSResponse'; } /** * Generated by JsPbCodeGenerator. @@ -96,16 +99,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.WriteIDMappingResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.WriteIDMappingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.WriteIDMappingResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.WriteIDMappingResponse.displayName = "proto.iws.WriteIDMappingResponse"; + /** + * @public + * @override + */ + proto.iws.WriteIDMappingResponse.displayName = 'proto.iws.WriteIDMappingResponse'; } /** * Generated by JsPbCodeGenerator. @@ -117,16 +120,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.WriteIDMappingRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.iws.WriteIDMappingRequest.repeatedFields_, null); +proto.iws.WriteIDMappingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.iws.WriteIDMappingRequest.repeatedFields_, null); }; goog.inherits(proto.iws.WriteIDMappingRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.WriteIDMappingRequest.displayName = "proto.iws.WriteIDMappingRequest"; + /** + * @public + * @override + */ + proto.iws.WriteIDMappingRequest.displayName = 'proto.iws.WriteIDMappingRequest'; } /** * Generated by JsPbCodeGenerator. @@ -138,16 +141,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.WriteIDMappingRequest.Mapping = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.WriteIDMappingRequest.Mapping = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.WriteIDMappingRequest.Mapping, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.WriteIDMappingRequest.Mapping.displayName = "proto.iws.WriteIDMappingRequest.Mapping"; + /** + * @public + * @override + */ + proto.iws.WriteIDMappingRequest.Mapping.displayName = 'proto.iws.WriteIDMappingRequest.Mapping'; } /** * Generated by JsPbCodeGenerator. @@ -159,16 +162,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.EvacuateCGroupRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.EvacuateCGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.EvacuateCGroupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.EvacuateCGroupRequest.displayName = "proto.iws.EvacuateCGroupRequest"; + /** + * @public + * @override + */ + proto.iws.EvacuateCGroupRequest.displayName = 'proto.iws.EvacuateCGroupRequest'; } /** * Generated by JsPbCodeGenerator. @@ -180,16 +183,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.EvacuateCGroupResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.EvacuateCGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.EvacuateCGroupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.EvacuateCGroupResponse.displayName = "proto.iws.EvacuateCGroupResponse"; + /** + * @public + * @override + */ + proto.iws.EvacuateCGroupResponse.displayName = 'proto.iws.EvacuateCGroupResponse'; } /** * Generated by JsPbCodeGenerator. @@ -201,16 +204,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.MountProcRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.MountProcRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.MountProcRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.MountProcRequest.displayName = "proto.iws.MountProcRequest"; + /** + * @public + * @override + */ + proto.iws.MountProcRequest.displayName = 'proto.iws.MountProcRequest'; } /** * Generated by JsPbCodeGenerator. @@ -222,16 +225,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.MountProcResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.MountProcResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.MountProcResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.MountProcResponse.displayName = "proto.iws.MountProcResponse"; + /** + * @public + * @override + */ + proto.iws.MountProcResponse.displayName = 'proto.iws.MountProcResponse'; } /** * Generated by JsPbCodeGenerator. @@ -243,16 +246,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.UmountProcRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.UmountProcRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.UmountProcRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.UmountProcRequest.displayName = "proto.iws.UmountProcRequest"; + /** + * @public + * @override + */ + proto.iws.UmountProcRequest.displayName = 'proto.iws.UmountProcRequest'; } /** * Generated by JsPbCodeGenerator. @@ -264,16 +267,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.UmountProcResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.UmountProcResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.UmountProcResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.UmountProcResponse.displayName = "proto.iws.UmountProcResponse"; + /** + * @public + * @override + */ + proto.iws.UmountProcResponse.displayName = 'proto.iws.UmountProcResponse'; } /** * Generated by JsPbCodeGenerator. @@ -285,16 +288,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.TeardownRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.TeardownRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.TeardownRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.TeardownRequest.displayName = "proto.iws.TeardownRequest"; + /** + * @public + * @override + */ + proto.iws.TeardownRequest.displayName = 'proto.iws.TeardownRequest'; } /** * Generated by JsPbCodeGenerator. @@ -306,16 +309,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.TeardownResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.TeardownResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.TeardownResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.TeardownResponse.displayName = "proto.iws.TeardownResponse"; + /** + * @public + * @override + */ + proto.iws.TeardownResponse.displayName = 'proto.iws.TeardownResponse'; } /** * Generated by JsPbCodeGenerator. @@ -327,16 +330,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.SetupPairVethsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.SetupPairVethsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.SetupPairVethsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.SetupPairVethsRequest.displayName = "proto.iws.SetupPairVethsRequest"; + /** + * @public + * @override + */ + proto.iws.SetupPairVethsRequest.displayName = 'proto.iws.SetupPairVethsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -348,16 +351,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.SetupPairVethsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.SetupPairVethsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.SetupPairVethsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.SetupPairVethsResponse.displayName = "proto.iws.SetupPairVethsResponse"; + /** + * @public + * @override + */ + proto.iws.SetupPairVethsResponse.displayName = 'proto.iws.SetupPairVethsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -369,16 +372,58 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.WorkspaceInfoRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.SetupDebugPairVethsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.iws.SetupDebugPairVethsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.iws.SetupDebugPairVethsRequest.displayName = 'proto.iws.SetupDebugPairVethsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.iws.SetupDebugPairVethsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.iws.SetupDebugPairVethsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.iws.SetupDebugPairVethsResponse.displayName = 'proto.iws.SetupDebugPairVethsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.iws.WorkspaceInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.WorkspaceInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.WorkspaceInfoRequest.displayName = "proto.iws.WorkspaceInfoRequest"; + /** + * @public + * @override + */ + proto.iws.WorkspaceInfoRequest.displayName = 'proto.iws.WorkspaceInfoRequest'; } /** * Generated by JsPbCodeGenerator. @@ -390,16 +435,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.WorkspaceInfoResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.WorkspaceInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.WorkspaceInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.WorkspaceInfoResponse.displayName = "proto.iws.WorkspaceInfoResponse"; + /** + * @public + * @override + */ + proto.iws.WorkspaceInfoResponse.displayName = 'proto.iws.WorkspaceInfoResponse'; } /** * Generated by JsPbCodeGenerator. @@ -411,16 +456,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.Resources = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.Resources = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.Resources, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.Resources.displayName = "proto.iws.Resources"; + /** + * @public + * @override + */ + proto.iws.Resources.displayName = 'proto.iws.Resources'; } /** * Generated by JsPbCodeGenerator. @@ -432,16 +477,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.Cpu = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.Cpu = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.Cpu, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.Cpu.displayName = "proto.iws.Cpu"; + /** + * @public + * @override + */ + proto.iws.Cpu.displayName = 'proto.iws.Cpu'; } /** * Generated by JsPbCodeGenerator. @@ -453,66 +498,114 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.iws.Memory = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.iws.Memory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.iws.Memory, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.iws.Memory.displayName = "proto.iws.Memory"; + /** + * @public + * @override + */ + proto.iws.Memory.displayName = 'proto.iws.Memory'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.iws.StartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.iws.StartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.iws.StartRequest.displayName = 'proto.iws.StartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.iws.StartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.iws.StartResponse.oneofGroups_); +}; +goog.inherits(proto.iws.StartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.iws.StartResponse.displayName = 'proto.iws.StartResponse'; } + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.PrepareForUserNSRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.PrepareForUserNSRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.PrepareForUserNSRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.PrepareForUserNSRequest.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.PrepareForUserNSRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.PrepareForUserNSRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.PrepareForUserNSRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.PrepareForUserNSRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.PrepareForUserNSRequest} */ -proto.iws.PrepareForUserNSRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.PrepareForUserNSRequest(); - return proto.iws.PrepareForUserNSRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.PrepareForUserNSRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.PrepareForUserNSRequest; + return proto.iws.PrepareForUserNSRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -520,31 +613,33 @@ proto.iws.PrepareForUserNSRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.PrepareForUserNSRequest} */ -proto.iws.PrepareForUserNSRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.PrepareForUserNSRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.PrepareForUserNSRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.PrepareForUserNSRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.PrepareForUserNSRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.PrepareForUserNSRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -552,62 +647,68 @@ proto.iws.PrepareForUserNSRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.PrepareForUserNSRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.PrepareForUserNSRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.PrepareForUserNSResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.PrepareForUserNSResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.PrepareForUserNSResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.PrepareForUserNSResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - fsShift: jspb.Message.getFieldWithDefault(msg, 1, 0), - fullWorkspaceBackup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.PrepareForUserNSResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.PrepareForUserNSResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.PrepareForUserNSResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.PrepareForUserNSResponse.toObject = function(includeInstance, msg) { + var f, obj = { + fsShift: jspb.Message.getFieldWithDefault(msg, 1, 0), + fullWorkspaceBackup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.PrepareForUserNSResponse} */ -proto.iws.PrepareForUserNSResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.PrepareForUserNSResponse(); - return proto.iws.PrepareForUserNSResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.PrepareForUserNSResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.PrepareForUserNSResponse; + return proto.iws.PrepareForUserNSResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -615,43 +716,45 @@ proto.iws.PrepareForUserNSResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.PrepareForUserNSResponse} */ -proto.iws.PrepareForUserNSResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.iws.FSShiftMethod} */ (reader.readEnum()); - msg.setFsShift(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFullWorkspaceBackup(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPersistentVolumeClaim(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.PrepareForUserNSResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.iws.FSShiftMethod} */ (reader.readEnum()); + msg.setFsShift(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullWorkspaceBackup(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPersistentVolumeClaim(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.PrepareForUserNSResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.PrepareForUserNSResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.PrepareForUserNSResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.PrepareForUserNSResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -659,121 +762,142 @@ proto.iws.PrepareForUserNSResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.PrepareForUserNSResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getFsShift(); - if (f !== 0.0) { - writer.writeEnum(1, f); - } - f = message.getFullWorkspaceBackup(); - if (f) { - writer.writeBool(2, f); - } - f = message.getPersistentVolumeClaim(); - if (f) { - writer.writeBool(3, f); - } +proto.iws.PrepareForUserNSResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFsShift(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getFullWorkspaceBackup(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getPersistentVolumeClaim(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; + /** * optional FSShiftMethod fs_shift = 1; * @return {!proto.iws.FSShiftMethod} */ -proto.iws.PrepareForUserNSResponse.prototype.getFsShift = function () { - return /** @type {!proto.iws.FSShiftMethod} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.PrepareForUserNSResponse.prototype.getFsShift = function() { + return /** @type {!proto.iws.FSShiftMethod} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {!proto.iws.FSShiftMethod} value * @return {!proto.iws.PrepareForUserNSResponse} returns this */ -proto.iws.PrepareForUserNSResponse.prototype.setFsShift = function (value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.iws.PrepareForUserNSResponse.prototype.setFsShift = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; + /** * optional bool full_workspace_backup = 2; * @return {boolean} */ -proto.iws.PrepareForUserNSResponse.prototype.getFullWorkspaceBackup = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.iws.PrepareForUserNSResponse.prototype.getFullWorkspaceBackup = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** * @param {boolean} value * @return {!proto.iws.PrepareForUserNSResponse} returns this */ -proto.iws.PrepareForUserNSResponse.prototype.setFullWorkspaceBackup = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.iws.PrepareForUserNSResponse.prototype.setFullWorkspaceBackup = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; + /** * optional bool persistent_volume_claim = 3; * @return {boolean} */ -proto.iws.PrepareForUserNSResponse.prototype.getPersistentVolumeClaim = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.iws.PrepareForUserNSResponse.prototype.getPersistentVolumeClaim = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; + /** * @param {boolean} value * @return {!proto.iws.PrepareForUserNSResponse} returns this */ -proto.iws.PrepareForUserNSResponse.prototype.setPersistentVolumeClaim = function (value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.iws.PrepareForUserNSResponse.prototype.setPersistentVolumeClaim = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.WriteIDMappingResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.WriteIDMappingResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.WriteIDMappingResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.WriteIDMappingResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - errorCode: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.WriteIDMappingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.WriteIDMappingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.WriteIDMappingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WriteIDMappingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + errorCode: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.WriteIDMappingResponse} */ -proto.iws.WriteIDMappingResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.WriteIDMappingResponse(); - return proto.iws.WriteIDMappingResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.WriteIDMappingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.WriteIDMappingResponse; + return proto.iws.WriteIDMappingResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -781,39 +905,41 @@ proto.iws.WriteIDMappingResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.WriteIDMappingResponse} */ -proto.iws.WriteIDMappingResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setErrorCode(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.WriteIDMappingResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setErrorCode(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.WriteIDMappingResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.WriteIDMappingResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.WriteIDMappingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.WriteIDMappingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -821,50 +947,62 @@ proto.iws.WriteIDMappingResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WriteIDMappingResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getErrorCode(); - if (f !== 0) { - writer.writeUint32(2, f); - } +proto.iws.WriteIDMappingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getErrorCode(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } }; + /** * optional string message = 1; * @return {string} */ -proto.iws.WriteIDMappingResponse.prototype.getMessage = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.iws.WriteIDMappingResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.iws.WriteIDMappingResponse} returns this */ -proto.iws.WriteIDMappingResponse.prototype.setMessage = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.iws.WriteIDMappingResponse.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional uint32 error_code = 2; * @return {number} */ -proto.iws.WriteIDMappingResponse.prototype.getErrorCode = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.WriteIDMappingResponse.prototype.getErrorCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.WriteIDMappingResponse} returns this */ -proto.iws.WriteIDMappingResponse.prototype.setErrorCode = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.WriteIDMappingResponse.prototype.setErrorCode = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + /** * List of repeated fields within this message type. * @private {!Array} @@ -872,62 +1010,63 @@ proto.iws.WriteIDMappingResponse.prototype.setErrorCode = function (value) { */ proto.iws.WriteIDMappingRequest.repeatedFields_ = [3]; + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.WriteIDMappingRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.WriteIDMappingRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.WriteIDMappingRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.WriteIDMappingRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - pid: jspb.Message.getFieldWithDefault(msg, 1, 0), - gid: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - mappingList: jspb.Message.toObjectList( - msg.getMappingList(), - proto.iws.WriteIDMappingRequest.Mapping.toObject, - includeInstance, - ), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.WriteIDMappingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.WriteIDMappingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.WriteIDMappingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WriteIDMappingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pid: jspb.Message.getFieldWithDefault(msg, 1, 0), + gid: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + mappingList: jspb.Message.toObjectList(msg.getMappingList(), + proto.iws.WriteIDMappingRequest.Mapping.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.WriteIDMappingRequest} */ -proto.iws.WriteIDMappingRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.WriteIDMappingRequest(); - return proto.iws.WriteIDMappingRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.WriteIDMappingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.WriteIDMappingRequest; + return proto.iws.WriteIDMappingRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -935,44 +1074,46 @@ proto.iws.WriteIDMappingRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.WriteIDMappingRequest} */ -proto.iws.WriteIDMappingRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPid(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setGid(value); - break; - case 3: - var value = new proto.iws.WriteIDMappingRequest.Mapping(); - reader.readMessage(value, proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader); - msg.addMapping(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.WriteIDMappingRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPid(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGid(value); + break; + case 3: + var value = new proto.iws.WriteIDMappingRequest.Mapping; + reader.readMessage(value,proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader); + msg.addMapping(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.WriteIDMappingRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.WriteIDMappingRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.WriteIDMappingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.WriteIDMappingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -980,74 +1121,90 @@ proto.iws.WriteIDMappingRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WriteIDMappingRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getPid(); - if (f !== 0) { - writer.writeInt64(1, f); - } - f = message.getGid(); - if (f) { - writer.writeBool(2, f); - } - f = message.getMappingList(); - if (f.length > 0) { - writer.writeRepeatedMessage(3, f, proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter); - } +proto.iws.WriteIDMappingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPid(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getGid(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getMappingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter + ); + } }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.WriteIDMappingRequest.Mapping.prototype.toObject = function (opt_includeInstance) { - return proto.iws.WriteIDMappingRequest.Mapping.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.WriteIDMappingRequest.Mapping} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.WriteIDMappingRequest.Mapping.toObject = function (includeInstance, msg) { - var f, - obj = { - containerId: jspb.Message.getFieldWithDefault(msg, 1, 0), - hostId: jspb.Message.getFieldWithDefault(msg, 2, 0), - size: jspb.Message.getFieldWithDefault(msg, 3, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.WriteIDMappingRequest.Mapping.prototype.toObject = function(opt_includeInstance) { + return proto.iws.WriteIDMappingRequest.Mapping.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.WriteIDMappingRequest.Mapping} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WriteIDMappingRequest.Mapping.toObject = function(includeInstance, msg) { + var f, obj = { + containerId: jspb.Message.getFieldWithDefault(msg, 1, 0), + hostId: jspb.Message.getFieldWithDefault(msg, 2, 0), + size: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.WriteIDMappingRequest.Mapping} */ -proto.iws.WriteIDMappingRequest.Mapping.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.WriteIDMappingRequest.Mapping(); - return proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader(msg, reader); +proto.iws.WriteIDMappingRequest.Mapping.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.WriteIDMappingRequest.Mapping; + return proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1055,43 +1212,45 @@ proto.iws.WriteIDMappingRequest.Mapping.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.WriteIDMappingRequest.Mapping} */ -proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setContainerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHostId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSize(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.WriteIDMappingRequest.Mapping.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setContainerId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHostId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSize(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.WriteIDMappingRequest.Mapping.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1099,191 +1258,215 @@ proto.iws.WriteIDMappingRequest.Mapping.prototype.serializeBinary = function () * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getContainerId(); - if (f !== 0) { - writer.writeUint32(1, f); - } - f = message.getHostId(); - if (f !== 0) { - writer.writeUint32(2, f); - } - f = message.getSize(); - if (f !== 0) { - writer.writeUint32(3, f); - } +proto.iws.WriteIDMappingRequest.Mapping.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContainerId(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHostId(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } }; + /** * optional uint32 container_id = 1; * @return {number} */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.getContainerId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.WriteIDMappingRequest.Mapping.prototype.getContainerId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.iws.WriteIDMappingRequest.Mapping} returns this */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.setContainerId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.iws.WriteIDMappingRequest.Mapping.prototype.setContainerId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional uint32 host_id = 2; * @return {number} */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.getHostId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.WriteIDMappingRequest.Mapping.prototype.getHostId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.WriteIDMappingRequest.Mapping} returns this */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.setHostId = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.WriteIDMappingRequest.Mapping.prototype.setHostId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + /** * optional uint32 size = 3; * @return {number} */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.getSize = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.iws.WriteIDMappingRequest.Mapping.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; + /** * @param {number} value * @return {!proto.iws.WriteIDMappingRequest.Mapping} returns this */ -proto.iws.WriteIDMappingRequest.Mapping.prototype.setSize = function (value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.iws.WriteIDMappingRequest.Mapping.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + /** * optional int64 pid = 1; * @return {number} */ -proto.iws.WriteIDMappingRequest.prototype.getPid = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.WriteIDMappingRequest.prototype.getPid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.iws.WriteIDMappingRequest} returns this */ -proto.iws.WriteIDMappingRequest.prototype.setPid = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.iws.WriteIDMappingRequest.prototype.setPid = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional bool gid = 2; * @return {boolean} */ -proto.iws.WriteIDMappingRequest.prototype.getGid = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.iws.WriteIDMappingRequest.prototype.getGid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** * @param {boolean} value * @return {!proto.iws.WriteIDMappingRequest} returns this */ -proto.iws.WriteIDMappingRequest.prototype.setGid = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.iws.WriteIDMappingRequest.prototype.setGid = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; + /** * repeated Mapping mapping = 3; * @return {!Array} */ -proto.iws.WriteIDMappingRequest.prototype.getMappingList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.iws.WriteIDMappingRequest.Mapping, 3) - ); +proto.iws.WriteIDMappingRequest.prototype.getMappingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.iws.WriteIDMappingRequest.Mapping, 3)); }; + /** * @param {!Array} value * @return {!proto.iws.WriteIDMappingRequest} returns this - */ -proto.iws.WriteIDMappingRequest.prototype.setMappingList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +*/ +proto.iws.WriteIDMappingRequest.prototype.setMappingList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; + /** * @param {!proto.iws.WriteIDMappingRequest.Mapping=} opt_value * @param {number=} opt_index * @return {!proto.iws.WriteIDMappingRequest.Mapping} */ -proto.iws.WriteIDMappingRequest.prototype.addMapping = function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 3, - opt_value, - proto.iws.WriteIDMappingRequest.Mapping, - opt_index, - ); +proto.iws.WriteIDMappingRequest.prototype.addMapping = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.iws.WriteIDMappingRequest.Mapping, opt_index); }; + /** * Clears the list making it empty but non-null. * @return {!proto.iws.WriteIDMappingRequest} returns this */ -proto.iws.WriteIDMappingRequest.prototype.clearMappingList = function () { - return this.setMappingList([]); +proto.iws.WriteIDMappingRequest.prototype.clearMappingList = function() { + return this.setMappingList([]); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.EvacuateCGroupRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.EvacuateCGroupRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.EvacuateCGroupRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.EvacuateCGroupRequest.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.EvacuateCGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.EvacuateCGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.EvacuateCGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.EvacuateCGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.EvacuateCGroupRequest} */ -proto.iws.EvacuateCGroupRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.EvacuateCGroupRequest(); - return proto.iws.EvacuateCGroupRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.EvacuateCGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.EvacuateCGroupRequest; + return proto.iws.EvacuateCGroupRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1291,31 +1474,33 @@ proto.iws.EvacuateCGroupRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.EvacuateCGroupRequest} */ -proto.iws.EvacuateCGroupRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.EvacuateCGroupRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.EvacuateCGroupRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.EvacuateCGroupRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.EvacuateCGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.EvacuateCGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1323,58 +1508,66 @@ proto.iws.EvacuateCGroupRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.EvacuateCGroupRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.EvacuateCGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.EvacuateCGroupResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.EvacuateCGroupResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.EvacuateCGroupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.EvacuateCGroupResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.EvacuateCGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.EvacuateCGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.EvacuateCGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.EvacuateCGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.EvacuateCGroupResponse} */ -proto.iws.EvacuateCGroupResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.EvacuateCGroupResponse(); - return proto.iws.EvacuateCGroupResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.EvacuateCGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.EvacuateCGroupResponse; + return proto.iws.EvacuateCGroupResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1382,31 +1575,33 @@ proto.iws.EvacuateCGroupResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.EvacuateCGroupResponse} */ -proto.iws.EvacuateCGroupResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.EvacuateCGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.EvacuateCGroupResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.EvacuateCGroupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.EvacuateCGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.EvacuateCGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1414,61 +1609,67 @@ proto.iws.EvacuateCGroupResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.EvacuateCGroupResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.EvacuateCGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.MountProcRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.MountProcRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.MountProcRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.MountProcRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - target: jspb.Message.getFieldWithDefault(msg, 1, ""), - pid: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.MountProcRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.MountProcRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.MountProcRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.MountProcRequest.toObject = function(includeInstance, msg) { + var f, obj = { + target: jspb.Message.getFieldWithDefault(msg, 1, ""), + pid: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.MountProcRequest} */ -proto.iws.MountProcRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.MountProcRequest(); - return proto.iws.MountProcRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.MountProcRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.MountProcRequest; + return proto.iws.MountProcRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1476,39 +1677,41 @@ proto.iws.MountProcRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.MountProcRequest} */ -proto.iws.MountProcRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTarget(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPid(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.MountProcRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPid(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.MountProcRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.MountProcRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.MountProcRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.MountProcRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1516,98 +1719,116 @@ proto.iws.MountProcRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.MountProcRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getTarget(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getPid(); - if (f !== 0) { - writer.writeInt64(2, f); - } +proto.iws.MountProcRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPid(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; + /** * optional string target = 1; * @return {string} */ -proto.iws.MountProcRequest.prototype.getTarget = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.iws.MountProcRequest.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.iws.MountProcRequest} returns this */ -proto.iws.MountProcRequest.prototype.setTarget = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.iws.MountProcRequest.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional int64 pid = 2; * @return {number} */ -proto.iws.MountProcRequest.prototype.getPid = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.MountProcRequest.prototype.getPid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.MountProcRequest} returns this */ -proto.iws.MountProcRequest.prototype.setPid = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.MountProcRequest.prototype.setPid = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.MountProcResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.MountProcResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.MountProcResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.MountProcResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.MountProcResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.MountProcResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.MountProcResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.MountProcResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.MountProcResponse} */ -proto.iws.MountProcResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.MountProcResponse(); - return proto.iws.MountProcResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.MountProcResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.MountProcResponse; + return proto.iws.MountProcResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1615,31 +1836,33 @@ proto.iws.MountProcResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.MountProcResponse} */ -proto.iws.MountProcResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.MountProcResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.MountProcResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.MountProcResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.MountProcResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.MountProcResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1647,61 +1870,67 @@ proto.iws.MountProcResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.MountProcResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.MountProcResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.UmountProcRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.UmountProcRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.UmountProcRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.UmountProcRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - target: jspb.Message.getFieldWithDefault(msg, 1, ""), - pid: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.UmountProcRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.UmountProcRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.UmountProcRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.UmountProcRequest.toObject = function(includeInstance, msg) { + var f, obj = { + target: jspb.Message.getFieldWithDefault(msg, 1, ""), + pid: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.UmountProcRequest} */ -proto.iws.UmountProcRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.UmountProcRequest(); - return proto.iws.UmountProcRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.UmountProcRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.UmountProcRequest; + return proto.iws.UmountProcRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1709,39 +1938,41 @@ proto.iws.UmountProcRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.UmountProcRequest} */ -proto.iws.UmountProcRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTarget(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPid(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.UmountProcRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.UmountProcRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.UmountProcRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.UmountProcRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.UmountProcRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1749,98 +1980,116 @@ proto.iws.UmountProcRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.UmountProcRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getTarget(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getPid(); - if (f !== 0) { - writer.writeInt64(2, f); - } +proto.iws.UmountProcRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPid(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; + /** * optional string target = 1; * @return {string} */ -proto.iws.UmountProcRequest.prototype.getTarget = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.iws.UmountProcRequest.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.iws.UmountProcRequest} returns this */ -proto.iws.UmountProcRequest.prototype.setTarget = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.iws.UmountProcRequest.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional int64 pid = 2; * @return {number} */ -proto.iws.UmountProcRequest.prototype.getPid = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.UmountProcRequest.prototype.getPid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.UmountProcRequest} returns this */ -proto.iws.UmountProcRequest.prototype.setPid = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.UmountProcRequest.prototype.setPid = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.UmountProcResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.UmountProcResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.UmountProcResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.UmountProcResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.UmountProcResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.UmountProcResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.UmountProcResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.UmountProcResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.UmountProcResponse} */ -proto.iws.UmountProcResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.UmountProcResponse(); - return proto.iws.UmountProcResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.UmountProcResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.UmountProcResponse; + return proto.iws.UmountProcResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1848,31 +2097,33 @@ proto.iws.UmountProcResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.UmountProcResponse} */ -proto.iws.UmountProcResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.UmountProcResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.UmountProcResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.UmountProcResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.UmountProcResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.UmountProcResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1880,58 +2131,66 @@ proto.iws.UmountProcResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.UmountProcResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.UmountProcResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.TeardownRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.TeardownRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.TeardownRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.TeardownRequest.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.TeardownRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.TeardownRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.TeardownRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.TeardownRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.TeardownRequest} */ -proto.iws.TeardownRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.TeardownRequest(); - return proto.iws.TeardownRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.TeardownRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.TeardownRequest; + return proto.iws.TeardownRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1939,31 +2198,33 @@ proto.iws.TeardownRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.TeardownRequest} */ -proto.iws.TeardownRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.TeardownRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.TeardownRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.TeardownRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.TeardownRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.TeardownRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1971,60 +2232,66 @@ proto.iws.TeardownRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.TeardownRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.TeardownRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.TeardownResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.TeardownResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.TeardownResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.TeardownResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.TeardownResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.TeardownResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.TeardownResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.TeardownResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.TeardownResponse} */ -proto.iws.TeardownResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.TeardownResponse(); - return proto.iws.TeardownResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.TeardownResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.TeardownResponse; + return proto.iws.TeardownResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2032,35 +2299,37 @@ proto.iws.TeardownResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.TeardownResponse} */ -proto.iws.TeardownResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.TeardownResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.TeardownResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.TeardownResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.TeardownResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.TeardownResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2068,80 +2337,91 @@ proto.iws.TeardownResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.TeardownResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getSuccess(); - if (f) { - writer.writeBool(2, f); - } +proto.iws.TeardownResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; + /** * optional bool success = 2; * @return {boolean} */ -proto.iws.TeardownResponse.prototype.getSuccess = function () { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.iws.TeardownResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** * @param {boolean} value * @return {!proto.iws.TeardownResponse} returns this */ -proto.iws.TeardownResponse.prototype.setSuccess = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.iws.TeardownResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.SetupPairVethsRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.SetupPairVethsRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.SetupPairVethsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.SetupPairVethsRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - pid: jspb.Message.getFieldWithDefault(msg, 1, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.SetupPairVethsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.SetupPairVethsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.SetupPairVethsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.SetupPairVethsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pid: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.SetupPairVethsRequest} */ -proto.iws.SetupPairVethsRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.SetupPairVethsRequest(); - return proto.iws.SetupPairVethsRequest.deserializeBinaryFromReader(msg, reader); +proto.iws.SetupPairVethsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.SetupPairVethsRequest; + return proto.iws.SetupPairVethsRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2149,35 +2429,37 @@ proto.iws.SetupPairVethsRequest.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.SetupPairVethsRequest} */ -proto.iws.SetupPairVethsRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPid(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.SetupPairVethsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.SetupPairVethsRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.SetupPairVethsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.SetupPairVethsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.SetupPairVethsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2185,78 +2467,91 @@ proto.iws.SetupPairVethsRequest.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.SetupPairVethsRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getPid(); - if (f !== 0) { - writer.writeInt64(1, f); - } +proto.iws.SetupPairVethsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPid(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } }; + /** * optional int64 pid = 1; * @return {number} */ -proto.iws.SetupPairVethsRequest.prototype.getPid = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.SetupPairVethsRequest.prototype.getPid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.iws.SetupPairVethsRequest} returns this */ -proto.iws.SetupPairVethsRequest.prototype.setPid = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.iws.SetupPairVethsRequest.prototype.setPid = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.SetupPairVethsResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.SetupPairVethsResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.SetupPairVethsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.SetupPairVethsResponse.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.SetupPairVethsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.SetupPairVethsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.SetupPairVethsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.SetupPairVethsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.SetupPairVethsResponse} */ -proto.iws.SetupPairVethsResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.SetupPairVethsResponse(); - return proto.iws.SetupPairVethsResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.SetupPairVethsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.SetupPairVethsResponse; + return proto.iws.SetupPairVethsResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2264,31 +2559,33 @@ proto.iws.SetupPairVethsResponse.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.SetupPairVethsResponse} */ -proto.iws.SetupPairVethsResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } +proto.iws.SetupPairVethsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.SetupPairVethsResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.SetupPairVethsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.SetupPairVethsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.SetupPairVethsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2296,462 +2593,752 @@ proto.iws.SetupPairVethsResponse.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.SetupPairVethsResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; +proto.iws.SetupPairVethsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.WorkspaceInfoRequest.prototype.toObject = function (opt_includeInstance) { - return proto.iws.WorkspaceInfoRequest.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.WorkspaceInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.WorkspaceInfoRequest.toObject = function (includeInstance, msg) { - var f, - obj = {}; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; -} -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.iws.WorkspaceInfoRequest} - */ -proto.iws.WorkspaceInfoRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.WorkspaceInfoRequest(); - return proto.iws.WorkspaceInfoRequest.deserializeBinaryFromReader(msg, reader); -}; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.iws.WorkspaceInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.iws.WorkspaceInfoRequest} - */ -proto.iws.WorkspaceInfoRequest.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.iws.WorkspaceInfoRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.WorkspaceInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.SetupDebugPairVethsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.SetupDebugPairVethsRequest.toObject(opt_includeInstance, this); }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.iws.WorkspaceInfoRequest} message - * @param {!jspb.BinaryWriter} writer + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.SetupDebugPairVethsRequest} msg The msg instance to transform. + * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WorkspaceInfoRequest.serializeBinaryToWriter = function (message, writer) { - var f = undefined; -}; +proto.iws.SetupDebugPairVethsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pid: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.WorkspaceInfoResponse.prototype.toObject = function (opt_includeInstance) { - return proto.iws.WorkspaceInfoResponse.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.WorkspaceInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.WorkspaceInfoResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - resources: (f = msg.getResources()) && proto.iws.Resources.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.iws.WorkspaceInfoResponse} + * @return {!proto.iws.SetupDebugPairVethsRequest} */ -proto.iws.WorkspaceInfoResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.WorkspaceInfoResponse(); - return proto.iws.WorkspaceInfoResponse.deserializeBinaryFromReader(msg, reader); +proto.iws.SetupDebugPairVethsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.SetupDebugPairVethsRequest; + return proto.iws.SetupDebugPairVethsRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.iws.WorkspaceInfoResponse} msg The message object to deserialize into. + * @param {!proto.iws.SetupDebugPairVethsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.iws.WorkspaceInfoResponse} + * @return {!proto.iws.SetupDebugPairVethsRequest} */ -proto.iws.WorkspaceInfoResponse.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.iws.Resources(); - reader.readMessage(value, proto.iws.Resources.deserializeBinaryFromReader); - msg.setResources(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.SetupDebugPairVethsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPid(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.WorkspaceInfoResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.WorkspaceInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.SetupDebugPairVethsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.SetupDebugPairVethsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.iws.WorkspaceInfoResponse} message + * @param {!proto.iws.SetupDebugPairVethsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WorkspaceInfoResponse.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getResources(); - if (f != null) { - writer.writeMessage(1, f, proto.iws.Resources.serializeBinaryToWriter); - } +proto.iws.SetupDebugPairVethsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPid(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } }; + /** - * optional Resources resources = 1; - * @return {?proto.iws.Resources} + * optional int64 pid = 1; + * @return {number} */ -proto.iws.WorkspaceInfoResponse.prototype.getResources = function () { - return /** @type{?proto.iws.Resources} */ (jspb.Message.getWrapperField(this, proto.iws.Resources, 1)); +proto.iws.SetupDebugPairVethsRequest.prototype.getPid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** - * @param {?proto.iws.Resources|undefined} value - * @return {!proto.iws.WorkspaceInfoResponse} returns this + * @param {number} value + * @return {!proto.iws.SetupDebugPairVethsRequest} returns this */ -proto.iws.WorkspaceInfoResponse.prototype.setResources = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.iws.SetupDebugPairVethsRequest.prototype.setPid = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.iws.WorkspaceInfoResponse} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.iws.WorkspaceInfoResponse.prototype.clearResources = function () { - return this.setResources(undefined); +proto.iws.SetupDebugPairVethsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.SetupDebugPairVethsResponse.toObject(opt_includeInstance, this); }; + /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.SetupDebugPairVethsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.WorkspaceInfoResponse.prototype.hasResources = function () { - return jspb.Message.getField(this, 1) != null; -}; +proto.iws.SetupDebugPairVethsResponse.toObject = function(includeInstance, msg) { + var f, obj = { -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.Resources.prototype.toObject = function (opt_includeInstance) { - return proto.iws.Resources.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.Resources} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.Resources.toObject = function (includeInstance, msg) { - var f, - obj = { - cpu: (f = msg.getCpu()) && proto.iws.Cpu.toObject(includeInstance, f), - memory: (f = msg.getMemory()) && proto.iws.Memory.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.iws.Resources} + * @return {!proto.iws.SetupDebugPairVethsResponse} */ -proto.iws.Resources.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.Resources(); - return proto.iws.Resources.deserializeBinaryFromReader(msg, reader); +proto.iws.SetupDebugPairVethsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.SetupDebugPairVethsResponse; + return proto.iws.SetupDebugPairVethsResponse.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.iws.Resources} msg The message object to deserialize into. + * @param {!proto.iws.SetupDebugPairVethsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.iws.Resources} + * @return {!proto.iws.SetupDebugPairVethsResponse} */ -proto.iws.Resources.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.iws.Cpu(); - reader.readMessage(value, proto.iws.Cpu.deserializeBinaryFromReader); - msg.setCpu(value); - break; - case 2: - var value = new proto.iws.Memory(); - reader.readMessage(value, proto.iws.Memory.deserializeBinaryFromReader); - msg.setMemory(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.SetupDebugPairVethsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.Resources.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.Resources.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.SetupDebugPairVethsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.SetupDebugPairVethsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.iws.Resources} message + * @param {!proto.iws.SetupDebugPairVethsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.Resources.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getCpu(); - if (f != null) { - writer.writeMessage(1, f, proto.iws.Cpu.serializeBinaryToWriter); - } - f = message.getMemory(); - if (f != null) { - writer.writeMessage(2, f, proto.iws.Memory.serializeBinaryToWriter); - } +proto.iws.SetupDebugPairVethsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional Cpu cpu = 1; - * @return {?proto.iws.Cpu} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.iws.Resources.prototype.getCpu = function () { - return /** @type{?proto.iws.Cpu} */ (jspb.Message.getWrapperField(this, proto.iws.Cpu, 1)); +proto.iws.WorkspaceInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.WorkspaceInfoRequest.toObject(opt_includeInstance, this); }; + /** - * @param {?proto.iws.Cpu|undefined} value - * @return {!proto.iws.Resources} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.WorkspaceInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.Resources.prototype.setCpu = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.iws.WorkspaceInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * Clears the message field making it undefined. - * @return {!proto.iws.Resources} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.iws.WorkspaceInfoRequest} */ -proto.iws.Resources.prototype.clearCpu = function () { - return this.setCpu(undefined); +proto.iws.WorkspaceInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.WorkspaceInfoRequest; + return proto.iws.WorkspaceInfoRequest.deserializeBinaryFromReader(msg, reader); }; + /** - * Returns whether this field is set. + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.iws.WorkspaceInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.iws.WorkspaceInfoRequest} + */ +proto.iws.WorkspaceInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.iws.WorkspaceInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.WorkspaceInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.iws.WorkspaceInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WorkspaceInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.WorkspaceInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.WorkspaceInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.WorkspaceInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WorkspaceInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resources: (f = msg.getResources()) && proto.iws.Resources.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.iws.WorkspaceInfoResponse} + */ +proto.iws.WorkspaceInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.WorkspaceInfoResponse; + return proto.iws.WorkspaceInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.iws.WorkspaceInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.iws.WorkspaceInfoResponse} + */ +proto.iws.WorkspaceInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.iws.Resources; + reader.readMessage(value,proto.iws.Resources.deserializeBinaryFromReader); + msg.setResources(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.iws.WorkspaceInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.WorkspaceInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.iws.WorkspaceInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.WorkspaceInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResources(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.iws.Resources.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Resources resources = 1; + * @return {?proto.iws.Resources} + */ +proto.iws.WorkspaceInfoResponse.prototype.getResources = function() { + return /** @type{?proto.iws.Resources} */ ( + jspb.Message.getWrapperField(this, proto.iws.Resources, 1)); +}; + + +/** + * @param {?proto.iws.Resources|undefined} value + * @return {!proto.iws.WorkspaceInfoResponse} returns this +*/ +proto.iws.WorkspaceInfoResponse.prototype.setResources = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.iws.WorkspaceInfoResponse} returns this + */ +proto.iws.WorkspaceInfoResponse.prototype.clearResources = function() { + return this.setResources(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.iws.Resources.prototype.hasCpu = function () { - return jspb.Message.getField(this, 1) != null; +proto.iws.WorkspaceInfoResponse.prototype.hasResources = function() { + return jspb.Message.getField(this, 1) != null; }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.Resources.prototype.toObject = function(opt_includeInstance) { + return proto.iws.Resources.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.Resources} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.Resources.toObject = function(includeInstance, msg) { + var f, obj = { + cpu: (f = msg.getCpu()) && proto.iws.Cpu.toObject(includeInstance, f), + memory: (f = msg.getMemory()) && proto.iws.Memory.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.iws.Resources} + */ +proto.iws.Resources.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.Resources; + return proto.iws.Resources.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.iws.Resources} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.iws.Resources} + */ +proto.iws.Resources.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.iws.Cpu; + reader.readMessage(value,proto.iws.Cpu.deserializeBinaryFromReader); + msg.setCpu(value); + break; + case 2: + var value = new proto.iws.Memory; + reader.readMessage(value,proto.iws.Memory.deserializeBinaryFromReader); + msg.setMemory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.iws.Resources.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.Resources.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.iws.Resources} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.Resources.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCpu(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.iws.Cpu.serializeBinaryToWriter + ); + } + f = message.getMemory(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.iws.Memory.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Cpu cpu = 1; + * @return {?proto.iws.Cpu} + */ +proto.iws.Resources.prototype.getCpu = function() { + return /** @type{?proto.iws.Cpu} */ ( + jspb.Message.getWrapperField(this, proto.iws.Cpu, 1)); +}; + + +/** + * @param {?proto.iws.Cpu|undefined} value + * @return {!proto.iws.Resources} returns this +*/ +proto.iws.Resources.prototype.setCpu = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.iws.Resources} returns this + */ +proto.iws.Resources.prototype.clearCpu = function() { + return this.setCpu(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.iws.Resources.prototype.hasCpu = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * optional Memory memory = 2; * @return {?proto.iws.Memory} */ -proto.iws.Resources.prototype.getMemory = function () { - return /** @type{?proto.iws.Memory} */ (jspb.Message.getWrapperField(this, proto.iws.Memory, 2)); +proto.iws.Resources.prototype.getMemory = function() { + return /** @type{?proto.iws.Memory} */ ( + jspb.Message.getWrapperField(this, proto.iws.Memory, 2)); }; + /** * @param {?proto.iws.Memory|undefined} value * @return {!proto.iws.Resources} returns this - */ -proto.iws.Resources.prototype.setMemory = function (value) { - return jspb.Message.setWrapperField(this, 2, value); +*/ +proto.iws.Resources.prototype.setMemory = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; + /** * Clears the message field making it undefined. * @return {!proto.iws.Resources} returns this */ -proto.iws.Resources.prototype.clearMemory = function () { - return this.setMemory(undefined); +proto.iws.Resources.prototype.clearMemory = function() { + return this.setMemory(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.iws.Resources.prototype.hasMemory = function () { - return jspb.Message.getField(this, 2) != null; +proto.iws.Resources.prototype.hasMemory = function() { + return jspb.Message.getField(this, 2) != null; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.Cpu.prototype.toObject = function (opt_includeInstance) { - return proto.iws.Cpu.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.Cpu} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.Cpu.toObject = function (includeInstance, msg) { - var f, - obj = { - used: jspb.Message.getFieldWithDefault(msg, 1, 0), - limit: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.Cpu.prototype.toObject = function(opt_includeInstance) { + return proto.iws.Cpu.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.Cpu} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.Cpu.toObject = function(includeInstance, msg) { + var f, obj = { + used: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.Cpu} */ -proto.iws.Cpu.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.Cpu(); - return proto.iws.Cpu.deserializeBinaryFromReader(msg, reader); +proto.iws.Cpu.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.Cpu; + return proto.iws.Cpu.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2759,39 +3346,41 @@ proto.iws.Cpu.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.Cpu} */ -proto.iws.Cpu.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUsed(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.Cpu.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUsed(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.Cpu.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.Cpu.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.Cpu.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.Cpu.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2799,101 +3388,117 @@ proto.iws.Cpu.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.Cpu.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getUsed(); - if (f !== 0) { - writer.writeInt64(1, f); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeInt64(2, f); - } +proto.iws.Cpu.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUsed(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; + /** * optional int64 used = 1; * @return {number} */ -proto.iws.Cpu.prototype.getUsed = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.Cpu.prototype.getUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.iws.Cpu} returns this */ -proto.iws.Cpu.prototype.setUsed = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.iws.Cpu.prototype.setUsed = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional int64 limit = 2; * @return {number} */ -proto.iws.Cpu.prototype.getLimit = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.Cpu.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.Cpu} returns this */ -proto.iws.Cpu.prototype.setLimit = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.Cpu.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.iws.Memory.prototype.toObject = function (opt_includeInstance) { - return proto.iws.Memory.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.iws.Memory} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.iws.Memory.toObject = function (includeInstance, msg) { - var f, - obj = { - used: jspb.Message.getFieldWithDefault(msg, 1, 0), - limit: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.Memory.prototype.toObject = function(opt_includeInstance) { + return proto.iws.Memory.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.Memory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.Memory.toObject = function(includeInstance, msg) { + var f, obj = { + used: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.iws.Memory} */ -proto.iws.Memory.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.iws.Memory(); - return proto.iws.Memory.deserializeBinaryFromReader(msg, reader); +proto.iws.Memory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.Memory; + return proto.iws.Memory.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -2901,39 +3506,41 @@ proto.iws.Memory.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.iws.Memory} */ -proto.iws.Memory.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUsed(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); - break; - default: - reader.skipField(); - break; - } +proto.iws.Memory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUsed(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; } - return msg; + } + return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.iws.Memory.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.iws.Memory.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.iws.Memory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.Memory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -2941,56 +3548,443 @@ proto.iws.Memory.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.iws.Memory.serializeBinaryToWriter = function (message, writer) { - var f = undefined; - f = message.getUsed(); - if (f !== 0) { - writer.writeInt64(1, f); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeInt64(2, f); - } +proto.iws.Memory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUsed(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; + /** * optional int64 used = 1; * @return {number} */ -proto.iws.Memory.prototype.getUsed = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.iws.Memory.prototype.getUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.iws.Memory} returns this */ -proto.iws.Memory.prototype.setUsed = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.iws.Memory.prototype.setUsed = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional int64 limit = 2; * @return {number} */ -proto.iws.Memory.prototype.getLimit = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.iws.Memory.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.iws.Memory} returns this */ -proto.iws.Memory.prototype.setLimit = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.iws.Memory.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.StartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.iws.StartRequest.toObject(opt_includeInstance, this); }; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.StartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.StartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + headless: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.iws.StartRequest} + */ +proto.iws.StartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.StartRequest; + return proto.iws.StartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.iws.StartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.iws.StartRequest} + */ +proto.iws.StartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHeadless(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.iws.StartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.StartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.iws.StartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.StartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeadless(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool headless = 1; + * @return {boolean} + */ +proto.iws.StartRequest.prototype.getHeadless = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.iws.StartRequest} returns this + */ +proto.iws.StartRequest.prototype.setHeadless = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.iws.StartResponse.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.iws.StartResponse.OutputCase = { + OUTPUT_NOT_SET: 0, + DATA: 1, + EXIT_CODE: 2 +}; + +/** + * @return {proto.iws.StartResponse.OutputCase} + */ +proto.iws.StartResponse.prototype.getOutputCase = function() { + return /** @type {proto.iws.StartResponse.OutputCase} */(jspb.Message.computeOneofCase(this, proto.iws.StartResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.iws.StartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.iws.StartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.iws.StartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.StartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + exitCode: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.iws.StartResponse} + */ +proto.iws.StartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.iws.StartResponse; + return proto.iws.StartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.iws.StartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.iws.StartResponse} + */ +proto.iws.StartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExitCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.iws.StartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.iws.StartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.iws.StartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.iws.StartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.iws.StartResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.iws.StartResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.iws.StartResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.iws.StartResponse} returns this + */ +proto.iws.StartResponse.prototype.setData = function(value) { + return jspb.Message.setOneofField(this, 1, proto.iws.StartResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.iws.StartResponse} returns this + */ +proto.iws.StartResponse.prototype.clearData = function() { + return jspb.Message.setOneofField(this, 1, proto.iws.StartResponse.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.iws.StartResponse.prototype.hasData = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 exit_code = 2; + * @return {number} + */ +proto.iws.StartResponse.prototype.getExitCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.iws.StartResponse} returns this + */ +proto.iws.StartResponse.prototype.setExitCode = function(value) { + return jspb.Message.setOneofField(this, 2, proto.iws.StartResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.iws.StartResponse} returns this + */ +proto.iws.StartResponse.prototype.clearExitCode = function() { + return jspb.Message.setOneofField(this, 2, proto.iws.StartResponse.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.iws.StartResponse.prototype.hasExitCode = function() { + return jspb.Message.getField(this, 2) != null; +}; + + /** * @enum {number} */ proto.iws.FSShiftMethod = { - SHIFTFS: 0, - FUSE: 1, + SHIFTFS: 0, + FUSE: 1 }; goog.object.extend(exports, proto.iws); diff --git a/components/ws-daemon-api/workspace_daemon.proto b/components/ws-daemon-api/workspace_daemon.proto index 762bc8f6930045..246f66edd3b556 100644 --- a/components/ws-daemon-api/workspace_daemon.proto +++ b/components/ws-daemon-api/workspace_daemon.proto @@ -51,6 +51,9 @@ service InWorkspaceService { // Get information about the workspace rpc WorkspaceInfo(WorkspaceInfoRequest) returns (WorkspaceInfoResponse) {} + + // Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace, but only setup route for access network. + rpc SetupDebugPairVeths(SetupDebugPairVethsRequest) returns (SetupDebugPairVethsResponse) {} } service WorkspaceInfoService { @@ -115,6 +118,11 @@ message SetupPairVethsRequest { } message SetupPairVethsResponse {} +message SetupDebugPairVethsRequest { + int64 pid = 1; +} +message SetupDebugPairVethsResponse {} + message WorkspaceInfoRequest {} message WorkspaceInfoResponse { Resources resources = 1; @@ -134,3 +142,18 @@ message Memory { int64 used = 1; int64 limit = 2; } + +service DebugService { + rpc Start(StartRequest) returns (stream StartResponse) {} +} + +message StartRequest { + bool headless = 1; +} + +message StartResponse { + oneof output { + bytes data = 1; + int32 exit_code = 2; + }; +} diff --git a/components/ws-daemon/nsinsider/main.go b/components/ws-daemon/nsinsider/main.go index 30d0b61c05224d..a427371cb0272a 100644 --- a/components/ws-daemon/nsinsider/main.go +++ b/components/ws-daemon/nsinsider/main.go @@ -268,16 +268,21 @@ func main() { Name: "target-pid", Required: true, }, + &cli.IntFlag{ + Name: "network-offset", + Value: 0, + }, }, Action: func(c *cli.Context) error { - containerIf, vethIf, cethIf := "eth0", "veth0", "ceth0" + offset := c.Int("network-offset") + containerIf, vethIf, cethIf := "eth0", fmt.Sprintf("veth%d", offset), fmt.Sprintf("ceth%d", offset) mask := net.IPv4Mask(255, 255, 255, 0) vethIp := net.IPNet{ - IP: net.IPv4(10, 0, 5, 1), + IP: net.IPv4(10, 0, byte(5+offset), 1), Mask: mask, } cethIp := net.IPNet{ - IP: net.IPv4(10, 0, 5, 2), + IP: net.IPv4(10, 0, byte(5+offset), 2), Mask: mask, } masqueradeAddr := net.IPNet{ @@ -291,6 +296,10 @@ func main() { return xerrors.Errorf("cannot get container network device %s: %w", containerIf, err) } + if oldVeth, err := netlink.LinkByName(vethIf); err == nil && oldVeth != nil { + netlink.LinkDel(oldVeth) + } + veth := &netlink.Veth{ LinkAttrs: netlink.LinkAttrs{ Name: vethIf, @@ -329,7 +338,7 @@ func main() { Type: nftables.ChainTypeNAT, }) - // ip saddr 10.0.5.0/24 oifname "eth0" masquerade + // ip saddr 10.0.(5+offset).0/24 oifname "eth0" masquerade nc.AddRule(&nftables.Rule{ Table: nat, Chain: postrouting, @@ -370,54 +379,161 @@ func main() { Type: nftables.ChainTypeNAT, }) - // iif $containerIf tcp dport 1-65535 dnat to $cethIp:tcp dport - nc.AddRule(&nftables.Rule{ - Table: nat, - Chain: prerouting, - Exprs: []expr.Any{ - &expr.Meta{Key: expr.MetaKeyIIFNAME, Register: 1}, - &expr.Cmp{ - Op: expr.CmpOpEq, - Register: 1, - Data: []byte(containerIf + "\x00"), - }, + if offset == 0 { + // iif $containerIf tcp dport 1-24998 dnat to $cethIp:tcp dport + nc.AddRule(&nftables.Rule{ + Table: nat, + Chain: prerouting, + Exprs: []expr.Any{ + &expr.Meta{Key: expr.MetaKeyIIFNAME, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte(containerIf + "\x00"), + }, - &expr.Meta{Key: expr.MetaKeyL4PROTO, Register: 1}, - &expr.Cmp{ - Op: expr.CmpOpEq, - Register: 1, - Data: []byte{unix.IPPROTO_TCP}, - }, - &expr.Payload{ - DestRegister: 1, - Base: expr.PayloadBaseTransportHeader, - Offset: 2, - Len: 2, - }, + &expr.Meta{Key: expr.MetaKeyL4PROTO, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte{unix.IPPROTO_TCP}, + }, + &expr.Payload{ + DestRegister: 1, + Base: expr.PayloadBaseTransportHeader, + Offset: 2, + Len: 2, + }, - &expr.Cmp{ - Op: expr.CmpOpGte, - Register: 1, - Data: []byte{0x00, 0x01}, - }, - &expr.Cmp{ - Op: expr.CmpOpLte, - Register: 1, - Data: []byte{0xff, 0xff}, - }, + &expr.Cmp{ + Op: expr.CmpOpGte, + Register: 1, + Data: []byte{0x00, 0x01}, + }, + &expr.Cmp{ + Op: expr.CmpOpLte, + Register: 1, + Data: []byte{0x61, 0xa6}, + }, - &expr.Immediate{ - Register: 2, - Data: cethIp.IP.To4(), + &expr.Immediate{ + Register: 2, + Data: cethIp.IP.To4(), + }, + &expr.NAT{ + Type: expr.NATTypeDestNAT, + Family: unix.NFPROTO_IPV4, + RegAddrMin: 2, + RegProtoMin: 1, + }, }, - &expr.NAT{ - Type: expr.NATTypeDestNAT, - Family: unix.NFPROTO_IPV4, - RegAddrMin: 2, - RegProtoMin: 1, + }) + + // iif $containerIf tcp dport 25004-65535 dnat to $cethIp:tcp dport + nc.AddRule(&nftables.Rule{ + Table: nat, + Chain: prerouting, + Exprs: []expr.Any{ + &expr.Meta{Key: expr.MetaKeyIIFNAME, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte(containerIf + "\x00"), + }, + + &expr.Meta{Key: expr.MetaKeyL4PROTO, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte{unix.IPPROTO_TCP}, + }, + &expr.Payload{ + DestRegister: 1, + Base: expr.PayloadBaseTransportHeader, + Offset: 2, + Len: 2, + }, + + &expr.Cmp{ + Op: expr.CmpOpGte, + Register: 1, + Data: []byte{0x61, 0xac}, + }, + &expr.Cmp{ + Op: expr.CmpOpLte, + Register: 1, + Data: []byte{0xff, 0xff}, + }, + + &expr.Immediate{ + Register: 2, + Data: cethIp.IP.To4(), + }, + &expr.NAT{ + Type: expr.NATTypeDestNAT, + Family: unix.NFPROTO_IPV4, + RegAddrMin: 2, + RegProtoMin: 1, + }, }, - }, - }) + }) + + } else { + addPortForwardRule := func(srcPort, dstPort uint16) { + srcPortByte := []byte{byte(srcPort >> 8), byte(srcPort & 0xff)} + dstPortByte := []byte{byte(dstPort >> 8), byte(dstPort & 0xff)} + nc.AddRule(&nftables.Rule{ + Table: nat, + Chain: prerouting, + Exprs: []expr.Any{ + &expr.Meta{Key: expr.MetaKeyIIFNAME, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte(containerIf + "\x00"), + }, + + &expr.Meta{Key: expr.MetaKeyL4PROTO, Register: 1}, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: []byte{unix.IPPROTO_TCP}, + }, + &expr.Payload{ + DestRegister: 1, + Base: expr.PayloadBaseTransportHeader, + Offset: 2, + Len: 2, + }, + + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: srcPortByte, + }, + + &expr.Immediate{ + Register: 1, + Data: dstPortByte, + }, + &expr.Immediate{ + Register: 2, + Data: cethIp.IP.To4(), + }, + &expr.NAT{ + Type: expr.NATTypeDestNAT, + Family: unix.NFPROTO_IPV4, + RegAddrMin: 2, + RegProtoMin: 1, + }, + }, + }) + } + // iif $containerIf tcp dport 24999-25002 dnat to $cethIp:tcp dport-2000, 25003 should direct send to workspacekit + for port := uint16(24999); port < 25003; port++ { + addPortForwardRule(port, port-2000) + } + } if err := nc.Flush(); err != nil { return xerrors.Errorf("failed to apply nftables: %v", err) @@ -429,15 +545,22 @@ func main() { { Name: "setup-peer-veth", Usage: "set up a peer veth", + Flags: []cli.Flag{ + &cli.IntFlag{ + Name: "network-offset", + Value: 0, + }, + }, Action: func(c *cli.Context) error { - cethIf := "ceth0" + offset := c.Int("network-offset") + cethIf := fmt.Sprintf("ceth%d", offset) mask := net.IPv4Mask(255, 255, 255, 0) cethIp := net.IPNet{ - IP: net.IPv4(10, 0, 5, 2), + IP: net.IPv4(10, 0, byte(5+offset), 2), Mask: mask, } vethIp := net.IPNet{ - IP: net.IPv4(10, 0, 5, 1), + IP: net.IPv4(10, 0, byte(5+offset), 1), Mask: mask, } diff --git a/components/ws-daemon/pkg/iws/iws.go b/components/ws-daemon/pkg/iws/iws.go index b3f4b6e431fa27..6161cedfb44269 100644 --- a/components/ws-daemon/pkg/iws/iws.go +++ b/components/ws-daemon/pkg/iws/iws.go @@ -177,7 +177,7 @@ func (wbs *InWorkspaceServiceServer) Start() error { UseOnce: true, }, "/iws.InWorkspaceService/EvacuateCGroup": ratelimit{ - UseOnce: true, + UseOnce: false, }, "/iws.InWorkspaceService/WriteIDMapping": ratelimit{ Limiter: rate.NewLimiter(rate.Every(2500*time.Millisecond), 4), @@ -186,7 +186,7 @@ func (wbs *InWorkspaceServiceServer) Start() error { UseOnce: true, }, "/iws.InWorkspaceService/WorkspaceInfo": ratelimit{ - Limiter: rate.NewLimiter(rate.Every(1500*time.Millisecond), 4), + Limiter: rate.NewLimiter(rate.Every(1500*time.Millisecond), 8), }, } @@ -392,6 +392,54 @@ func (wbs *InWorkspaceServiceServer) SetupPairVeths(ctx context.Context, req *ap return &api.SetupPairVethsResponse{}, nil } +func (wbs *InWorkspaceServiceServer) SetupDebugPairVeths(ctx context.Context, req *api.SetupDebugPairVethsRequest) (*api.SetupDebugPairVethsResponse, error) { + rt := wbs.Uidmapper.Runtime + if rt == nil { + return nil, status.Errorf(codes.FailedPrecondition, "not connected to container runtime") + } + wscontainerID, err := rt.WaitForContainer(ctx, wbs.Session.InstanceID) + if err != nil { + log.WithError(err).WithFields(wbs.Session.OWI()).Error("SetupDebugPairVeths: cannot find workspace container") + return nil, status.Errorf(codes.Internal, "cannot find workspace container") + } + + containerPID, err := rt.ContainerPID(ctx, wscontainerID) + if err != nil { + log.WithError(err).WithFields(wbs.Session.OWI()).Error("SetupDebugPairVeths: cannot find workspace container PID") + return nil, status.Errorf(codes.Internal, "cannnot setup a pair of veths") + } + + err = nsi.Nsinsider(wbs.Session.InstanceID, int(containerPID), func(c *exec.Cmd) { + c.Args = append(c.Args, "setup-pair-veths", "--target-pid", strconv.Itoa(int(req.Pid)), "--network-offset", strconv.Itoa(int(1))) + }, nsi.EnterMountNS(true), nsi.EnterPidNS(true), nsi.EnterNetNS(true)) + if err != nil { + log.WithError(err).WithFields(wbs.Session.OWI()).Error("SetupDebugPairVeths: cannot setup a pair of veths") + return nil, status.Errorf(codes.Internal, "cannot setup a pair of veths") + } + + pid, err := wbs.Uidmapper.findHostPID(containerPID, uint64(req.Pid)) + if err != nil { + return nil, xerrors.Errorf("cannot map in-container PID %d (container PID: %d): %w", req.Pid, containerPID, err) + } + err = nsi.Nsinsider(wbs.Session.InstanceID, int(pid), func(c *exec.Cmd) { + c.Args = append(c.Args, "setup-peer-veth", "--network-offset", strconv.Itoa(int(1))) + }, nsi.EnterMountNS(true), nsi.EnterPidNS(true), nsi.EnterNetNS(true)) + if err != nil { + log.WithError(err).WithFields(wbs.Session.OWI()).Error("SetupDebugPairVeths: cannot setup a peer veths") + return nil, status.Errorf(codes.Internal, "cannot setup a peer veths") + } + + err = nsi.Nsinsider(wbs.Session.InstanceID, int(containerPID), func(c *exec.Cmd) { + c.Args = append(c.Args, "enable-ip-forward") + }, nsi.EnterNetNS(true), nsi.EnterMountNSPid(1)) + if err != nil { + log.WithError(err).WithFields(wbs.Session.OWI()).Error("SetupDebugPairVeths: cannot enable IP forwarding") + return nil, status.Errorf(codes.Internal, "cannot enable IP forwarding") + } + + return &api.SetupDebugPairVethsResponse{}, nil +} + func evacuateToCGroup(ctx context.Context, mountpoint, oldGroup, child string) error { newGroup := filepath.Join(oldGroup, child) oldPath := filepath.Join(mountpoint, oldGroup) diff --git a/components/ws-proxy/pkg/proxy/config.go b/components/ws-proxy/pkg/proxy/config.go index 98f3a916e40ae9..e037b52f24013d 100644 --- a/components/ws-proxy/pkg/proxy/config.go +++ b/components/ws-proxy/pkg/proxy/config.go @@ -71,10 +71,11 @@ func (c *HostBasedIngressConfig) Validate() error { // WorkspacePodConfig contains config around the workspace pod. type WorkspacePodConfig struct { - TheiaPort uint16 `json:"theiaPort"` - IDEDebugPort uint16 `json:"ideDebugPort"` - SupervisorPort uint16 `json:"supervisorPort"` - SupervisorDebugPort uint16 `json:"supervisorDebugPort"` + TheiaPort uint16 `json:"theiaPort"` + IDEDebugPort uint16 `json:"ideDebugPort"` + SupervisorPort uint16 `json:"supervisorPort"` + SupervisorDebugPort uint16 `json:"supervisorDebugPort"` + DebugWorkspaceProxyPort uint16 `json:"debugWorkspaceProxyPort"` // SupervisorImage is deprecated SupervisorImage string `json:"supervisorImage"` } @@ -90,6 +91,7 @@ func (c *WorkspacePodConfig) Validate() error { validation.Field(&c.IDEDebugPort, validation.Required), validation.Field(&c.SupervisorPort, validation.Required), validation.Field(&c.SupervisorDebugPort, validation.Required), + validation.Field(&c.DebugWorkspaceProxyPort, validation.Required), ) if len(c.SupervisorImage) > 0 { log.Warn("config value 'workspacePodConfig.supervisorImage' is deprected, use it only to be backwards compatible") diff --git a/components/ws-proxy/pkg/proxy/routes.go b/components/ws-proxy/pkg/proxy/routes.go index 5476a47846f872..86c7ed81d4deb3 100644 --- a/components/ws-proxy/pkg/proxy/routes.go +++ b/components/ws-proxy/pkg/proxy/routes.go @@ -94,9 +94,6 @@ func installWorkspaceRoutes(r *mux.Router, config *RouteHandlerConfig, ip Worksp }) routes.HandleSupervisorFrontendRoute(faviconRouter.NewRoute()) - routes.HandleDirectSupervisorRoute(enableCompression(r).PathPrefix("/_supervisor/frontend").MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) bool { - return rm.Vars[debugWorkspaceIdentifier] == "true" - }), false) routes.HandleSupervisorFrontendRoute(enableCompression(r).PathPrefix("/_supervisor/frontend")) routes.HandleDirectSupervisorRoute(r.PathPrefix("/_supervisor/v1/status/supervisor"), false) @@ -115,12 +112,6 @@ func installWorkspaceRoutes(r *mux.Router, config *RouteHandlerConfig, ip Worksp h.ServeHTTP(resp, req) }) }) - err := installDebugWorkspaceRoutes(rootRouter.MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) bool { - return rm.Vars[debugWorkspaceIdentifier] == "true" - }).Subrouter(), routes.Config, routes.InfoProvider) - if err != nil { - return err - } routes.HandleRoot(rootRouter.NewRoute()) return nil } @@ -419,6 +410,12 @@ func installWorkspacePortRoutes(r *mux.Router, config *RouteHandlerConfig, infoP r.Header.Add("X-Forwarded-Proto", "https") r.Header.Add("X-Forwarded-Host", r.Host) r.Header.Add("X-Forwarded-Port", "443") + + coords := getWorkspaceCoords(r) + if coords.Debug { + r.Header.Add("X-WS-Proxy-Debug-Port", coords.Port) + } + proxyPass( config, infoProvider, @@ -449,7 +446,13 @@ func workspacePodResolver(config *Config, infoProvider WorkspaceInfoProvider, re func workspacePodPortResolver(config *Config, infoProvider WorkspaceInfoProvider, req *http.Request) (url *url.URL, err error) { coords := getWorkspaceCoords(req) workspaceInfo := infoProvider.WorkspaceInfo(coords.ID) - return buildWorkspacePodURL(workspaceInfo.IPAddress, coords.Port) + var port string + if coords.Debug { + port = fmt.Sprint(config.WorkspacePodConfig.DebugWorkspaceProxyPort) + } else { + port = coords.Port + } + return buildWorkspacePodURL(workspaceInfo.IPAddress, port) } // workspacePodSupervisorResolver resolves to the workspace pods Supervisor url from the given request. diff --git a/components/ws-proxy/pkg/proxy/routes_test.go b/components/ws-proxy/pkg/proxy/routes_test.go index 45dcc2e22ff1d1..a187144dd102d7 100644 --- a/components/ws-proxy/pkg/proxy/routes_test.go +++ b/components/ws-proxy/pkg/proxy/routes_test.go @@ -56,14 +56,15 @@ var ( }, } - ideServerHost = "localhost:20000" - workspacePort = uint16(20001) - supervisorPort = uint16(20002) - workspaceDebugPort = uint16(20004) - supervisorDebugPort = uint16(20005) - workspaceHost = fmt.Sprintf("localhost:%d", workspacePort) - portServeHost = fmt.Sprintf("localhost:%d", workspaces[0].Ports[0].Port) - blobServeHost = "localhost:20003" + ideServerHost = "localhost:20000" + workspacePort = uint16(20001) + supervisorPort = uint16(20002) + workspaceDebugPort = uint16(20004) + supervisorDebugPort = uint16(20005) + debugWorkspaceProxyPort = uint16(20006) + workspaceHost = fmt.Sprintf("localhost:%d", workspacePort) + portServeHost = fmt.Sprintf("localhost:%d", workspaces[0].Ports[0].Port) + blobServeHost = "localhost:20003" config = Config{ TransportConfig: &TransportConfig{ @@ -82,10 +83,11 @@ var ( Scheme: "http", }, WorkspacePodConfig: &WorkspacePodConfig{ - TheiaPort: workspacePort, - SupervisorPort: supervisorPort, - IDEDebugPort: workspaceDebugPort, - SupervisorDebugPort: supervisorDebugPort, + TheiaPort: workspacePort, + SupervisorPort: supervisorPort, + IDEDebugPort: workspaceDebugPort, + SupervisorDebugPort: supervisorDebugPort, + DebugWorkspaceProxyPort: debugWorkspaceProxyPort, }, BuiltinPages: BuiltinPagesConfig{ Location: "../../public", @@ -665,23 +667,6 @@ func TestRoutes(t *testing.T) { Body: "debug workspace hit: /\n", }, }, - { - Desc: "debug supervisor frontend /main.js", - Config: &config, - Request: modifyRequest(httptest.NewRequest("GET", debugWorkspaceURL+"_supervisor/frontend/main.js", nil), - addHostHeader, - ), - Targets: &Targets{DebugSupervisor: &Target{Status: http.StatusOK}}, - Expectation: Expectation{ - Status: http.StatusOK, - Header: http.Header{ - "Content-Length": {"52"}, - "Content-Type": {"text/plain; charset=utf-8"}, - "Vary": {"Accept-Encoding"}, - }, - Body: "supervisor debug hit: /_supervisor/frontend/main.js\n", - }, - }, } log.Init("ws-proxy-test", "", false, true) diff --git a/components/ws-proxy/pkg/proxy/workspacerouter.go b/components/ws-proxy/pkg/proxy/workspacerouter.go index 14ff9ccf514cad..18226c1413f8c0 100644 --- a/components/ws-proxy/pkg/proxy/workspacerouter.go +++ b/components/ws-proxy/pkg/proxy/workspacerouter.go @@ -80,7 +80,7 @@ type hostHeaderProvider func(req *http.Request) string func matchWorkspaceHostHeader(wsHostSuffix string, headerProvider hostHeaderProvider, matchPort bool) mux.MatcherFunc { var regexPrefix string if matchPort { - regexPrefix = workspacePortRegex + workspaceIDRegex + regexPrefix = workspacePortRegex + debugWorkspaceRegex + workspaceIDRegex } else { regexPrefix = debugWorkspaceRegex + workspaceIDRegex } @@ -95,17 +95,23 @@ func matchWorkspaceHostHeader(wsHostSuffix string, headerProvider hostHeaderProv var workspaceID, workspacePort, debugWorkspace string matches := r.FindStringSubmatch(hostname) - if len(matches) < 3 { - return false - } if matchPort { - // https://3000-coral-dragon-ilr0r6eq.ws-eu10.gitpod.io/index.html - // debugWorkspace: + if len(matches) < 4 { + return false + } + if matches[2] != "" { + debugWorkspace = "true" + } + // https://3000-debug-coral-dragon-ilr0r6eq.ws-eu10.gitpod.io/index.html + // debugWorkspace: true // workspaceID: coral-dragon-ilr0r6eq // workspacePort: 3000 - workspaceID = matches[2] + workspaceID = matches[3] workspacePort = matches[1] } else { + if len(matches) < 3 { + return false + } // https://debug-coral-dragon-ilr0r6eq.ws-eu10.gitpod.io/index.html // debugWorkspace: true // workspaceID: coral-dragon-ilr0r6eq diff --git a/dev/preview/workflow/preview/deploy-gitpod.sh b/dev/preview/workflow/preview/deploy-gitpod.sh index ca9b1f117b3568..14a378b3d0b6f3 100755 --- a/dev/preview/workflow/preview/deploy-gitpod.sh +++ b/dev/preview/workflow/preview/deploy-gitpod.sh @@ -272,6 +272,7 @@ yq w -i "${INSTALLER_CONFIG_PATH}" domain "${DOMAIN}" # CONTAINERD_RUNTIME_DIR="/var/lib/containerd/io.containerd.runtime.v2.task/k8s.io" yq w -i "${INSTALLER_CONFIG_PATH}" workspace.runtime.containerdRuntimeDir ${CONTAINERD_RUNTIME_DIR} +yq w -i "${INSTALLER_CONFIG_PATH}" workspace.runtime.fsShiftMethod "shiftfs" yq w -i "${INSTALLER_CONFIG_PATH}" workspace.resources.requests.cpu "100m" yq w -i "${INSTALLER_CONFIG_PATH}" workspace.resources.requests.memory "256Mi" diff --git a/install/installer/cmd/testdata/render/aws-setup/output.golden b/install/installer/cmd/testdata/render/aws-setup/output.golden index a041f607186de3..19835dbe7024fe 100644 --- a/install/installer/cmd/testdata/render/aws-setup/output.golden +++ b/install/installer/cmd/testdata/render/aws-setup/output.golden @@ -5717,6 +5717,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -10452,7 +10453,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/azure-setup/output.golden b/install/installer/cmd/testdata/render/azure-setup/output.golden index bdabc62c846e65..24efa6c231ff58 100644 --- a/install/installer/cmd/testdata/render/azure-setup/output.golden +++ b/install/installer/cmd/testdata/render/azure-setup/output.golden @@ -5693,6 +5693,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -10521,7 +10522,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/custom-pull-repository/output.golden b/install/installer/cmd/testdata/render/custom-pull-repository/output.golden index 3c402ce5c6f04d..11485f1c186448 100644 --- a/install/installer/cmd/testdata/render/custom-pull-repository/output.golden +++ b/install/installer/cmd/testdata/render/custom-pull-repository/output.golden @@ -6100,6 +6100,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "registry.mydomain.com/namespace/supervisor:test" }, "builtinPages": { @@ -11325,7 +11326,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: f0a077b5cee652ccf128621f7f7cc23ae4cdb4225b4aa32942eccaa2be4e528e + gitpod.io/checksum_config: 8d2c99a864e5f9f28f96628cf5f56f5abae0de8a43206e0523784ce039d20a90 creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/customization/output.golden b/install/installer/cmd/testdata/render/customization/output.golden index c4b736231b8e75..ae4c3bcb3c6331 100644 --- a/install/installer/cmd/testdata/render/customization/output.golden +++ b/install/installer/cmd/testdata/render/customization/output.golden @@ -6723,6 +6723,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -12206,7 +12207,7 @@ spec: metadata: annotations: gitpod.io: hello - gitpod.io/checksum_config: be61210a63646185a45ed41810fa0ff56fb433059593b7eaea7a23d9a3cc4bdf + gitpod.io/checksum_config: 91f8cea7c5bfea1b90f1426ef89c453853e01b7c692851fc25af41491d5734a7 hello: world creationTimestamp: null labels: diff --git a/install/installer/cmd/testdata/render/external-registry/output.golden b/install/installer/cmd/testdata/render/external-registry/output.golden index 63dc01d425c49e..9998e5adf95bcd 100644 --- a/install/installer/cmd/testdata/render/external-registry/output.golden +++ b/install/installer/cmd/testdata/render/external-registry/output.golden @@ -5880,6 +5880,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -10948,7 +10949,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/gcp-setup/output.golden b/install/installer/cmd/testdata/render/gcp-setup/output.golden index 306e0bdc174da2..6c0f688c211b0c 100644 --- a/install/installer/cmd/testdata/render/gcp-setup/output.golden +++ b/install/installer/cmd/testdata/render/gcp-setup/output.golden @@ -5652,6 +5652,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -10411,7 +10412,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/http-proxy/output.golden b/install/installer/cmd/testdata/render/http-proxy/output.golden index f8cc742e9c2097..a4680f46e34834 100644 --- a/install/installer/cmd/testdata/render/http-proxy/output.golden +++ b/install/installer/cmd/testdata/render/http-proxy/output.golden @@ -6103,6 +6103,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -13013,7 +13014,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/kind-workspace/output.golden b/install/installer/cmd/testdata/render/kind-workspace/output.golden index 8854f19f9eb2fd..42f922c1d820d0 100644 --- a/install/installer/cmd/testdata/render/kind-workspace/output.golden +++ b/install/installer/cmd/testdata/render/kind-workspace/output.golden @@ -2135,6 +2135,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -3910,7 +3911,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/minimal/output.golden b/install/installer/cmd/testdata/render/minimal/output.golden index 4deb8df1a99063..820365dd4e5b2f 100644 --- a/install/installer/cmd/testdata/render/minimal/output.golden +++ b/install/installer/cmd/testdata/render/minimal/output.golden @@ -6100,6 +6100,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11325,7 +11326,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/shortname/output.golden b/install/installer/cmd/testdata/render/shortname/output.golden index fd1ec294aa389f..c554259937dd3c 100644 --- a/install/installer/cmd/testdata/render/shortname/output.golden +++ b/install/installer/cmd/testdata/render/shortname/output.golden @@ -6100,6 +6100,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11325,7 +11326,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 1d3e519239eb23a1e2f00e30f73abf47a1a18a74052043e6dc8d1196eed4fd1f + gitpod.io/checksum_config: 9a39727d1f0fad7df2a842459983ecd049b262fa12be3a72b29809d844b3365b creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/statefulset-customization/output.golden b/install/installer/cmd/testdata/render/statefulset-customization/output.golden index 79f4554a909198..177a606e48710e 100644 --- a/install/installer/cmd/testdata/render/statefulset-customization/output.golden +++ b/install/installer/cmd/testdata/render/statefulset-customization/output.golden @@ -6112,6 +6112,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11337,7 +11338,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/use-pod-security-policies/output.golden b/install/installer/cmd/testdata/render/use-pod-security-policies/output.golden index a81bbf278439f3..2792eb42deb49b 100644 --- a/install/installer/cmd/testdata/render/use-pod-security-policies/output.golden +++ b/install/installer/cmd/testdata/render/use-pod-security-policies/output.golden @@ -6433,6 +6433,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11769,7 +11770,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/vsxproxy-pvc/output.golden b/install/installer/cmd/testdata/render/vsxproxy-pvc/output.golden index bcdd345d058311..47f7121561e39d 100644 --- a/install/installer/cmd/testdata/render/vsxproxy-pvc/output.golden +++ b/install/installer/cmd/testdata/render/vsxproxy-pvc/output.golden @@ -6102,6 +6102,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11315,7 +11316,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/cmd/testdata/render/workspace-requests-limits/output.golden b/install/installer/cmd/testdata/render/workspace-requests-limits/output.golden index 5d25d61f16e01b..e011656d2a4b59 100644 --- a/install/installer/cmd/testdata/render/workspace-requests-limits/output.golden +++ b/install/installer/cmd/testdata/render/workspace-requests-limits/output.golden @@ -6103,6 +6103,7 @@ data: "ideDebugPort": 25000, "supervisorPort": 22999, "supervisorDebugPort": 24999, + "debugWorkspaceProxyPort": 25003, "supervisorImage": "eu.gcr.io/gitpod-core-dev/build/supervisor:test" }, "builtinPages": { @@ -11328,7 +11329,7 @@ spec: template: metadata: annotations: - gitpod.io/checksum_config: 714740065966c437ee71b41e8953aa6bb77ac83596e2326b267a2b954f60242d + gitpod.io/checksum_config: 50975660db033ea3555b3ced8dcb5e88a95b63142b5402732d0bc8355f3daaed creationTimestamp: null labels: app: gitpod diff --git a/install/installer/pkg/components/workspace/constants.go b/install/installer/pkg/components/workspace/constants.go index 339710b6adc016..4cfa42bbdeee0b 100644 --- a/install/installer/pkg/components/workspace/constants.go +++ b/install/installer/pkg/components/workspace/constants.go @@ -15,4 +15,5 @@ const ( SupervisorPort = 22999 SupervisorDebugPort = 24999 IDEDebugPort = 25000 + DebugWorkspaceProxyPort = 25003 ) diff --git a/install/installer/pkg/components/ws-proxy/configmap.go b/install/installer/pkg/components/ws-proxy/configmap.go index f5e8f950b90e5d..d75003e505f279 100644 --- a/install/installer/pkg/components/ws-proxy/configmap.go +++ b/install/installer/pkg/components/ws-proxy/configmap.go @@ -108,11 +108,12 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { WorkspaceHostSuffixRegex: gitpodInstallationWorkspaceHostSuffixRegex, }, WorkspacePodConfig: &proxy.WorkspacePodConfig{ - TheiaPort: workspace.ContainerPort, - IDEDebugPort: workspace.IDEDebugPort, - SupervisorPort: workspace.SupervisorPort, - SupervisorDebugPort: workspace.SupervisorDebugPort, - SupervisorImage: ctx.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version), + TheiaPort: workspace.ContainerPort, + IDEDebugPort: workspace.IDEDebugPort, + SupervisorPort: workspace.SupervisorPort, + SupervisorDebugPort: workspace.SupervisorDebugPort, + DebugWorkspaceProxyPort: workspace.DebugWorkspaceProxyPort, + SupervisorImage: ctx.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version), }, BuiltinPages: proxy.BuiltinPagesConfig{ Location: "/app/public",